commandmate 0.49.1 → 0.49.3

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 (819) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +246 -243
  3. package/.next/app-path-routes-manifest.json +18 -17
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +12 -12
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/routes-manifest.json +8 -0
  8. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/release-notes/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/capabilities/route.js +1 -1
  18. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/daily-summary/route.js +1 -1
  20. package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
  21. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/daily-summary/status/route.js +1 -1
  23. package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
  24. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/hooks/agent-event/route.js +2 -2
  31. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  32. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/hooks/claude-done/route.js +2 -2
  34. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  35. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  37. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  38. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/push/escalation/route.js +1 -1
  42. package/.next/server/app/api/push/escalation/route.js.nft.json +1 -1
  43. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/push/subscriptions/route.js +1 -1
  45. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/push/vapid/route.js +1 -1
  47. package/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
  48. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/relays/[relayId]/cancel/route.js +4 -1
  50. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
  51. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  52. package/.next/server/app/api/relays/[relayId]/resolve/route.js +1 -0
  53. package/.next/server/app/api/relays/[relayId]/resolve/route.js.nft.json +1 -0
  54. package/.next/server/app/api/relays/[relayId]/resolve/route_client-reference-manifest.js +1 -0
  55. package/.next/server/app/api/relays/[relayId]/route.js +1 -1
  56. package/.next/server/app/api/relays/[relayId]/route.js.nft.json +1 -1
  57. package/.next/server/app/api/relays/[relayId]/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/relays/route.js +4 -1
  59. package/.next/server/app/api/relays/route.js.nft.json +1 -1
  60. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  61. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  64. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  65. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/repositories/clone/route.js +1 -1
  67. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  68. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  70. package/.next/server/app/api/repositories/restore/route.js +1 -1
  71. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  72. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/repositories/route.js +1 -1
  74. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  75. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/repositories/scan/route.js +1 -1
  77. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  78. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/repositories/sync/route.js +1 -1
  80. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  81. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  84. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  85. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
  96. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
  100. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/verification/runs/route.js +1 -1
  102. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  104. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  105. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  108. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  111. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/cli-reference/route.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +2 -2
  117. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js.nft.json +1 -1
  118. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  121. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
  124. package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/env/route.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +2 -2
  130. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js.nft.json +1 -1
  131. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/instances/notes/route.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  183. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  186. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +2 -1
  188. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  189. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js.nft.json +1 -1
  192. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/logs/route.js +2 -2
  194. package/.next/server/app/api/worktrees/[id]/logs/route.js.nft.json +1 -1
  195. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js.nft.json +1 -1
  206. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
  209. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -1
  211. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
  212. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  215. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js.nft.json +1 -1
  218. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  221. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  222. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  223. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  224. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  225. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  226. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  227. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +2 -2
  228. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js.nft.json +1 -1
  229. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  230. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +2 -2
  231. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
  232. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  233. package/.next/server/app/api/worktrees/[id]/schedules/route.js +2 -2
  234. package/.next/server/app/api/worktrees/[id]/schedules/route.js.nft.json +1 -1
  235. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  236. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  237. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -144
  238. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  239. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  240. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -3
  241. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  242. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  243. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  244. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  245. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  246. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  247. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  248. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  249. package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
  250. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  251. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  252. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  253. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  254. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  255. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  256. package/.next/server/app/api/worktrees/[id]/tasks/route.js +1 -1
  257. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  258. package/.next/server/app/api/worktrees/[id]/terminal/route.js +2 -2
  259. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  260. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  261. package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
  262. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  263. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  264. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  265. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  266. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  267. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js.nft.json +1 -1
  268. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  269. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  270. package/.next/server/app/api/worktrees/[id]/todos/route.js.nft.json +1 -1
  271. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  272. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  273. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  274. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  275. package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
  276. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  277. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  278. package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -1
  279. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  280. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  281. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js.nft.json +1 -1
  282. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  283. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
  284. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  285. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
  286. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  287. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
  288. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  289. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  290. package/.next/server/app/api/worktrees/route.js +1 -1
  291. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  292. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  293. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  294. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  295. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  296. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  297. package/.next/server/app/page_client-reference-manifest.js +1 -1
  298. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  299. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  300. package/.next/server/app/review/page.js +1 -1
  301. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  302. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  303. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  304. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  305. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  306. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  307. package/.next/server/app/worktrees/[id]/page.js +10 -10
  308. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  309. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  310. package/.next/server/app-paths-manifest.json +18 -17
  311. package/.next/server/chunks/1308.js +1 -0
  312. package/.next/server/chunks/1501.js +5 -4
  313. package/.next/server/chunks/1656.js +2 -2
  314. package/.next/server/chunks/1957.js +2 -0
  315. package/.next/server/chunks/2119.js +1 -1
  316. package/.next/server/chunks/2445.js +1 -1
  317. package/.next/server/chunks/2897.js +1 -0
  318. package/.next/server/chunks/3417.js +1 -0
  319. package/.next/server/chunks/3505.js +1 -1
  320. package/.next/server/chunks/3801.js +8 -8
  321. package/.next/server/chunks/4207.js +1 -1
  322. package/.next/server/chunks/4490.js +1 -0
  323. package/.next/server/chunks/4911.js +1 -0
  324. package/.next/server/chunks/4936.js +1 -0
  325. package/.next/server/chunks/5209.js +2 -1
  326. package/.next/server/chunks/5350.js +212 -0
  327. package/.next/server/chunks/5354.js +1 -1
  328. package/.next/server/chunks/6130.js +1 -1
  329. package/.next/server/chunks/6401.js +1 -1
  330. package/.next/server/chunks/7023.js +3 -3
  331. package/.next/server/chunks/7905.js +1 -1
  332. package/.next/server/chunks/7926.js +1 -0
  333. package/.next/server/chunks/8581.js +15 -15
  334. package/.next/server/chunks/8728.js +2 -2
  335. package/.next/server/chunks/8782.js +1 -1
  336. package/.next/server/chunks/8807.js +89 -88
  337. package/.next/server/chunks/8918.js +3 -3
  338. package/.next/server/chunks/9169.js +1 -0
  339. package/.next/server/chunks/9390.js +1 -1
  340. package/.next/server/chunks/9584.js +1 -1
  341. package/.next/server/chunks/9627.js +5 -5
  342. package/.next/server/chunks/9702.js +1 -0
  343. package/.next/server/chunks/9731.js +3 -3
  344. package/.next/server/middleware-manifest.json +5 -5
  345. package/.next/server/pages/500.html +1 -1
  346. package/.next/server/server-reference-manifest.json +1 -1
  347. package/.next/static/chunks/{2407-675ba6b21844dc3b.js → 2407-87ec01332344ec2b.js} +1 -1
  348. package/.next/static/chunks/3931-3ef48b8d97357282.js +1 -0
  349. package/.next/static/chunks/5794-7975b8e51e731b19.js +1 -0
  350. package/.next/static/chunks/6966-d8dc6032410ffaba.js +1 -0
  351. package/.next/static/chunks/7197-ed3b3d99ac3bd450.js +1 -0
  352. package/.next/static/chunks/7636-a48cf0f7110250c5.js +1 -0
  353. package/.next/static/chunks/app/api/agents/update/route-96fc12d400b49b13.js +1 -0
  354. package/.next/static/chunks/app/api/agents/versions/route-96fc12d400b49b13.js +1 -0
  355. package/.next/static/chunks/app/api/app/release-notes/route-96fc12d400b49b13.js +1 -0
  356. package/.next/static/chunks/app/api/app/update/route-96fc12d400b49b13.js +1 -0
  357. package/.next/static/chunks/app/api/app/update-check/route-96fc12d400b49b13.js +1 -0
  358. package/.next/static/chunks/app/api/auth/login/route-96fc12d400b49b13.js +1 -0
  359. package/.next/static/chunks/app/api/auth/logout/route-96fc12d400b49b13.js +1 -0
  360. package/.next/static/chunks/app/api/auth/status/route-96fc12d400b49b13.js +1 -0
  361. package/.next/static/chunks/app/api/capabilities/route-96fc12d400b49b13.js +1 -0
  362. package/.next/static/chunks/app/api/daily-summary/route-96fc12d400b49b13.js +1 -0
  363. package/.next/static/chunks/app/api/daily-summary/status/route-96fc12d400b49b13.js +1 -0
  364. package/.next/static/chunks/app/api/external-apps/[id]/health/route-96fc12d400b49b13.js +1 -0
  365. package/.next/static/chunks/app/api/external-apps/[id]/route-96fc12d400b49b13.js +1 -0
  366. package/.next/static/chunks/app/api/external-apps/route-96fc12d400b49b13.js +1 -0
  367. package/.next/static/chunks/app/api/fs/browse/route-96fc12d400b49b13.js +1 -0
  368. package/.next/static/chunks/app/api/fs/recent-paths/route-96fc12d400b49b13.js +1 -0
  369. package/.next/static/chunks/app/api/hooks/agent-event/route-96fc12d400b49b13.js +1 -0
  370. package/.next/static/chunks/app/api/hooks/claude-done/route-96fc12d400b49b13.js +1 -0
  371. package/.next/static/chunks/app/api/hooks/permission-request/route-96fc12d400b49b13.js +1 -0
  372. package/.next/static/chunks/app/api/metrics/vibe/route-96fc12d400b49b13.js +1 -0
  373. package/.next/static/chunks/app/api/ollama/models/route-96fc12d400b49b13.js +1 -0
  374. package/.next/static/chunks/app/api/push/escalation/route-96fc12d400b49b13.js +1 -0
  375. package/.next/static/chunks/app/api/push/subscriptions/route-96fc12d400b49b13.js +1 -0
  376. package/.next/static/chunks/app/api/push/vapid/route-96fc12d400b49b13.js +1 -0
  377. package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-96fc12d400b49b13.js +1 -0
  378. package/.next/static/chunks/app/api/relays/[relayId]/resolve/route-96fc12d400b49b13.js +1 -0
  379. package/.next/static/chunks/app/api/relays/[relayId]/route-96fc12d400b49b13.js +1 -0
  380. package/.next/static/chunks/app/api/relays/route-96fc12d400b49b13.js +1 -0
  381. package/.next/static/chunks/app/api/remote/pair/route-96fc12d400b49b13.js +1 -0
  382. package/.next/static/chunks/app/api/repositories/[id]/route-96fc12d400b49b13.js +1 -0
  383. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-96fc12d400b49b13.js +1 -0
  384. package/.next/static/chunks/app/api/repositories/clone/route-96fc12d400b49b13.js +1 -0
  385. package/.next/static/chunks/app/api/repositories/excluded/route-96fc12d400b49b13.js +1 -0
  386. package/.next/static/chunks/app/api/repositories/restore/route-96fc12d400b49b13.js +1 -0
  387. package/.next/static/chunks/app/api/repositories/route-96fc12d400b49b13.js +1 -0
  388. package/.next/static/chunks/app/api/repositories/scan/route-96fc12d400b49b13.js +1 -0
  389. package/.next/static/chunks/app/api/repositories/sync/route-96fc12d400b49b13.js +1 -0
  390. package/.next/static/chunks/app/api/repositories/validate-path/route-96fc12d400b49b13.js +1 -0
  391. package/.next/static/chunks/app/api/settings/default-agents/route-96fc12d400b49b13.js +1 -0
  392. package/.next/static/chunks/app/api/settings/default-surface-mode/route-96fc12d400b49b13.js +1 -0
  393. package/.next/static/chunks/app/api/sidebar/group-order/route-96fc12d400b49b13.js +1 -0
  394. package/.next/static/chunks/app/api/skills/[id]/route-96fc12d400b49b13.js +1 -0
  395. package/.next/static/chunks/app/api/skills/installations/route-96fc12d400b49b13.js +1 -0
  396. package/.next/static/chunks/app/api/skills/operations/route-96fc12d400b49b13.js +1 -0
  397. package/.next/static/chunks/app/api/skills/reindex/route-96fc12d400b49b13.js +1 -0
  398. package/.next/static/chunks/app/api/skills/route-96fc12d400b49b13.js +1 -0
  399. package/.next/static/chunks/app/api/slash-commands/route-96fc12d400b49b13.js +1 -0
  400. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-96fc12d400b49b13.js +1 -0
  401. package/.next/static/chunks/app/api/tasks/[taskId]/route-96fc12d400b49b13.js +1 -0
  402. package/.next/static/chunks/app/api/templates/[id]/route-96fc12d400b49b13.js +1 -0
  403. package/.next/static/chunks/app/api/templates/route-96fc12d400b49b13.js +1 -0
  404. package/.next/static/chunks/app/api/verification/runs/[runId]/route-96fc12d400b49b13.js +1 -0
  405. package/.next/static/chunks/app/api/verification/runs/route-96fc12d400b49b13.js +1 -0
  406. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-96fc12d400b49b13.js +1 -0
  407. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-96fc12d400b49b13.js +1 -0
  408. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-96fc12d400b49b13.js +1 -0
  409. package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-96fc12d400b49b13.js +1 -0
  410. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-96fc12d400b49b13.js +1 -0
  411. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-96fc12d400b49b13.js +1 -0
  412. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-96fc12d400b49b13.js +1 -0
  413. package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-96fc12d400b49b13.js +1 -0
  414. package/.next/static/chunks/app/api/worktrees/[id]/env/route-96fc12d400b49b13.js +1 -0
  415. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-96fc12d400b49b13.js +1 -0
  416. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-96fc12d400b49b13.js +1 -0
  417. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-96fc12d400b49b13.js +1 -0
  418. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-96fc12d400b49b13.js +1 -0
  419. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-96fc12d400b49b13.js +1 -0
  420. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-96fc12d400b49b13.js +1 -0
  421. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-96fc12d400b49b13.js +1 -0
  422. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-96fc12d400b49b13.js +1 -0
  423. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-96fc12d400b49b13.js +1 -0
  424. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-96fc12d400b49b13.js +1 -0
  425. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-96fc12d400b49b13.js +1 -0
  426. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-96fc12d400b49b13.js +1 -0
  427. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-96fc12d400b49b13.js +1 -0
  428. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-96fc12d400b49b13.js +1 -0
  429. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-96fc12d400b49b13.js +1 -0
  430. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-96fc12d400b49b13.js +1 -0
  431. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-96fc12d400b49b13.js +1 -0
  432. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-96fc12d400b49b13.js +1 -0
  433. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-96fc12d400b49b13.js +1 -0
  434. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-96fc12d400b49b13.js +1 -0
  435. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-96fc12d400b49b13.js +1 -0
  436. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-96fc12d400b49b13.js +1 -0
  437. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-96fc12d400b49b13.js +1 -0
  438. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-96fc12d400b49b13.js +1 -0
  439. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-96fc12d400b49b13.js +1 -0
  440. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-96fc12d400b49b13.js +1 -0
  441. package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-96fc12d400b49b13.js +1 -0
  442. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-96fc12d400b49b13.js +1 -0
  443. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-96fc12d400b49b13.js +1 -0
  444. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-96fc12d400b49b13.js +1 -0
  445. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-96fc12d400b49b13.js +1 -0
  446. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-96fc12d400b49b13.js +1 -0
  447. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-96fc12d400b49b13.js +1 -0
  448. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-96fc12d400b49b13.js +1 -0
  449. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-96fc12d400b49b13.js +1 -0
  450. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-96fc12d400b49b13.js +1 -0
  451. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-96fc12d400b49b13.js +1 -0
  452. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-96fc12d400b49b13.js +1 -0
  453. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-96fc12d400b49b13.js +1 -0
  454. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-96fc12d400b49b13.js +1 -0
  455. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-96fc12d400b49b13.js +1 -0
  456. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-96fc12d400b49b13.js +1 -0
  457. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-96fc12d400b49b13.js +1 -0
  458. package/.next/static/chunks/app/api/worktrees/[id]/route-96fc12d400b49b13.js +1 -0
  459. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-96fc12d400b49b13.js +1 -0
  460. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-96fc12d400b49b13.js +1 -0
  461. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-96fc12d400b49b13.js +1 -0
  462. package/.next/static/chunks/app/api/worktrees/[id]/search/route-96fc12d400b49b13.js +1 -0
  463. package/.next/static/chunks/app/api/worktrees/[id]/send/route-96fc12d400b49b13.js +1 -0
  464. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-96fc12d400b49b13.js +1 -0
  465. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-96fc12d400b49b13.js +1 -0
  466. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-96fc12d400b49b13.js +1 -0
  467. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-96fc12d400b49b13.js +1 -0
  468. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-96fc12d400b49b13.js +1 -0
  469. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-96fc12d400b49b13.js +1 -0
  470. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-96fc12d400b49b13.js +1 -0
  471. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-96fc12d400b49b13.js +1 -0
  472. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-96fc12d400b49b13.js +1 -0
  473. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-96fc12d400b49b13.js +1 -0
  474. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-96fc12d400b49b13.js +1 -0
  475. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-96fc12d400b49b13.js +1 -0
  476. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-96fc12d400b49b13.js +1 -0
  477. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-96fc12d400b49b13.js +1 -0
  478. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-96fc12d400b49b13.js +1 -0
  479. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-96fc12d400b49b13.js +1 -0
  480. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-96fc12d400b49b13.js +1 -0
  481. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-96fc12d400b49b13.js +1 -0
  482. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-96fc12d400b49b13.js +1 -0
  483. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-96fc12d400b49b13.js +1 -0
  484. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-96fc12d400b49b13.js +1 -0
  485. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-96fc12d400b49b13.js +1 -0
  486. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-96fc12d400b49b13.js +1 -0
  487. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-96fc12d400b49b13.js +1 -0
  488. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-96fc12d400b49b13.js +1 -0
  489. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-96fc12d400b49b13.js +1 -0
  490. package/.next/static/chunks/app/api/worktrees/route-96fc12d400b49b13.js +1 -0
  491. package/.next/static/chunks/app/layout-b9d8aef70e4f17b2.js +1 -0
  492. package/.next/static/chunks/app/manifest.webmanifest/route-96fc12d400b49b13.js +1 -0
  493. package/.next/static/chunks/app/more/page-ff5af5ca48774c89.js +1 -0
  494. package/.next/static/chunks/app/page-b4863bfe0452e09d.js +1 -0
  495. package/.next/static/chunks/app/proxy/[...path]/route-96fc12d400b49b13.js +1 -0
  496. package/.next/static/chunks/app/review/page-ff3efb96fdf9bb4b.js +1 -0
  497. package/.next/static/chunks/app/sessions/{page-890fd50ec9739973.js → page-c6eb7c02db2f4c80.js} +1 -1
  498. package/.next/static/chunks/app/worktrees/[id]/layout-96fc12d400b49b13.js +1 -0
  499. package/.next/static/chunks/app/worktrees/[id]/page-f6a151304860b549.js +1 -0
  500. package/.next/trace +13 -13
  501. package/.next/types/app/api/relays/[relayId]/resolve/route.ts +347 -0
  502. package/.next/types/routes.d.ts +2 -1
  503. package/.next/types/validator.ts +9 -0
  504. package/dist/cli/commands/ask.d.ts.map +1 -1
  505. package/dist/cli/commands/ask.js +56 -5
  506. package/dist/cli/commands/attach.d.ts +4 -1
  507. package/dist/cli/commands/attach.d.ts.map +1 -1
  508. package/dist/cli/commands/attach.js +19 -7
  509. package/dist/cli/commands/command-target.d.ts +7 -0
  510. package/dist/cli/commands/command-target.d.ts.map +1 -1
  511. package/dist/cli/commands/command-target.js +10 -0
  512. package/dist/cli/commands/instances.d.ts.map +1 -1
  513. package/dist/cli/commands/instances.js +38 -2
  514. package/dist/cli/commands/message-dispatch.d.ts +17 -3
  515. package/dist/cli/commands/message-dispatch.d.ts.map +1 -1
  516. package/dist/cli/commands/message-dispatch.js +14 -8
  517. package/dist/cli/commands/prompt.d.ts.map +1 -1
  518. package/dist/cli/commands/prompt.js +2 -1
  519. package/dist/cli/commands/relays.d.ts +4 -1
  520. package/dist/cli/commands/relays.d.ts.map +1 -1
  521. package/dist/cli/commands/relays.js +146 -8
  522. package/dist/cli/commands/report.d.ts +7 -2
  523. package/dist/cli/commands/report.d.ts.map +1 -1
  524. package/dist/cli/commands/report.js +19 -6
  525. package/dist/cli/commands/respond-strict.d.ts.map +1 -1
  526. package/dist/cli/commands/respond-strict.js +29 -5
  527. package/dist/cli/commands/respond.d.ts +2 -2
  528. package/dist/cli/commands/respond.d.ts.map +1 -1
  529. package/dist/cli/commands/respond.js +40 -37
  530. package/dist/cli/commands/send.d.ts.map +1 -1
  531. package/dist/cli/commands/send.js +8 -4
  532. package/dist/cli/commands/task.d.ts +22 -0
  533. package/dist/cli/commands/task.d.ts.map +1 -1
  534. package/dist/cli/commands/task.js +26 -18
  535. package/dist/cli/commands/wait-instance.d.ts +9 -1
  536. package/dist/cli/commands/wait-instance.d.ts.map +1 -1
  537. package/dist/cli/commands/wait-instance.js +15 -0
  538. package/dist/cli/commands/wait-poll-state.d.ts +18 -0
  539. package/dist/cli/commands/wait-poll-state.d.ts.map +1 -1
  540. package/dist/cli/commands/wait-verify.d.ts +2 -1
  541. package/dist/cli/commands/wait-verify.d.ts.map +1 -1
  542. package/dist/cli/commands/wait-verify.js +5 -1
  543. package/dist/cli/commands/wait.d.ts.map +1 -1
  544. package/dist/cli/commands/wait.js +37 -13
  545. package/dist/cli/commands/whoami.d.ts.map +1 -1
  546. package/dist/cli/commands/whoami.js +3 -1
  547. package/dist/cli/docs/agent-operations.d.ts +1 -1
  548. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  549. package/dist/cli/docs/agent-operations.js +1 -0
  550. package/dist/cli/types/api-responses.d.ts +55 -1
  551. package/dist/cli/types/api-responses.d.ts.map +1 -1
  552. package/dist/cli/utils/api-client-deadline.d.ts +28 -0
  553. package/dist/cli/utils/api-client-deadline.d.ts.map +1 -0
  554. package/dist/cli/utils/api-client-deadline.js +46 -0
  555. package/dist/cli/utils/api-client-errors.d.ts +118 -0
  556. package/dist/cli/utils/api-client-errors.d.ts.map +1 -0
  557. package/dist/cli/utils/api-client-errors.js +210 -0
  558. package/dist/cli/utils/api-client.d.ts +33 -109
  559. package/dist/cli/utils/api-client.d.ts.map +1 -1
  560. package/dist/cli/utils/api-client.js +202 -227
  561. package/dist/cli/utils/follow-up-command.d.ts +38 -0
  562. package/dist/cli/utils/follow-up-command.d.ts.map +1 -0
  563. package/dist/cli/utils/follow-up-command.js +57 -0
  564. package/dist/cli/utils/reply-ledger.d.ts +1 -1
  565. package/dist/cli/utils/reply-ledger.d.ts.map +1 -1
  566. package/dist/cli/utils/reply-ledger.js +7 -2
  567. package/dist/cli/utils/server-capabilities.d.ts +18 -0
  568. package/dist/cli/utils/server-capabilities.d.ts.map +1 -1
  569. package/dist/cli/utils/server-capabilities.js +36 -3
  570. package/dist/cli/utils/session-target.d.ts +1 -1
  571. package/dist/cli/utils/session-target.d.ts.map +1 -1
  572. package/dist/cli/utils/session-target.js +3 -0
  573. package/dist/cli/utils/verify-runner.d.ts +7 -0
  574. package/dist/cli/utils/verify-runner.d.ts.map +1 -1
  575. package/dist/cli/utils/verify-runner.js +51 -15
  576. package/dist/lib/cli-tools/session-name.d.ts.map +1 -1
  577. package/dist/lib/cli-tools/session-name.js +11 -3
  578. package/dist/lib/cli-tools/types.d.ts +6 -0
  579. package/dist/lib/cli-tools/types.d.ts.map +1 -1
  580. package/dist/lib/session/send-attempt-types.d.ts +25 -0
  581. package/dist/lib/session/send-attempt-types.d.ts.map +1 -1
  582. package/dist/lib/session/send-attempt-types.js +10 -1
  583. package/dist/lib/verification/session-kill-ledger.d.ts +110 -0
  584. package/dist/lib/verification/session-kill-ledger.d.ts.map +1 -0
  585. package/dist/lib/verification/session-kill-ledger.js +174 -0
  586. package/dist/server/locales/en/worktree.json +9 -0
  587. package/dist/server/locales/ja/worktree.json +9 -0
  588. package/dist/server/src/config/cli-tool-timing-config.js +1 -7
  589. package/dist/server/src/lib/auto-yes-poller.js +5 -1
  590. package/dist/server/src/lib/cli-tools/antigravity.js +5 -2
  591. package/dist/server/src/lib/cli-tools/base.js +39 -0
  592. package/dist/server/src/lib/cli-tools/claude.js +8 -2
  593. package/dist/server/src/lib/cli-tools/codex.js +7 -4
  594. package/dist/server/src/lib/cli-tools/command-code.js +14 -18
  595. package/dist/server/src/lib/cli-tools/copilot.js +159 -28
  596. package/dist/server/src/lib/cli-tools/gemini.js +10 -2
  597. package/dist/server/src/lib/cli-tools/launch-keys.js +39 -0
  598. package/dist/server/src/lib/cli-tools/opencode-v2.js +6 -2
  599. package/dist/server/src/lib/cli-tools/opencode.js +162 -8
  600. package/dist/server/src/lib/cli-tools/prompt-wait-dialog.js +115 -0
  601. package/dist/server/src/lib/cli-tools/session-name.js +11 -3
  602. package/dist/server/src/lib/cli-tools/submit-composer-read.js +57 -14
  603. package/dist/server/src/lib/cli-tools/submit-verified-sender-composer.js +78 -0
  604. package/dist/server/src/lib/cli-tools/submit-verified-sender-lock.js +116 -0
  605. package/dist/server/src/lib/cli-tools/submit-verified-sender-report.js +250 -0
  606. package/dist/server/src/lib/cli-tools/submit-verified-sender-shared.js +106 -0
  607. package/dist/server/src/lib/cli-tools/submit-verified-sender.js +143 -187
  608. package/dist/server/src/lib/cli-tools/vibe-local.js +91 -2
  609. package/dist/server/src/lib/db/chat-db.js +14 -1
  610. package/dist/server/src/lib/db/db-instance.js +114 -2
  611. package/dist/server/src/lib/db/db-migration-path.js +63 -2
  612. package/dist/server/src/lib/db/migrations/index.js +2 -0
  613. package/dist/server/src/lib/db/migrations/runner.js +1 -1
  614. package/dist/server/src/lib/db/migrations/v63-session-relays-delivery-attempt.js +61 -0
  615. package/dist/server/src/lib/db/relay-bind-db-base.js +89 -0
  616. package/dist/server/src/lib/db/relay-bind-db-delivery.js +223 -0
  617. package/dist/server/src/lib/db/relay-bind-db-pending.js +183 -0
  618. package/dist/server/src/lib/db/relay-bind-db.js +88 -167
  619. package/dist/server/src/lib/db/relay-db-base.js +20 -0
  620. package/dist/server/src/lib/db/relay-db-count.js +49 -0
  621. package/dist/server/src/lib/db/relay-db-delivery.js +104 -0
  622. package/dist/server/src/lib/db/relay-db-hold.js +250 -0
  623. package/dist/server/src/lib/db/relay-db.js +33 -92
  624. package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +5 -4
  625. package/dist/server/src/lib/detection/tools/opencode/composer-own-text.js +119 -0
  626. package/dist/server/src/lib/detection/tools/opencode/readiness.js +62 -0
  627. package/dist/server/src/lib/detection/tools/vibe-local/readiness.js +70 -0
  628. package/dist/server/src/lib/hooks/sources/copilot/hook-settings.js +2 -3
  629. package/dist/server/src/lib/prompt-answer-errors.js +76 -2
  630. package/dist/server/src/lib/relay/relay-bound-reply.js +20 -9
  631. package/dist/server/src/lib/relay/relay-delivery.js +359 -79
  632. package/dist/server/src/lib/relay/relay-messages.js +13 -0
  633. package/dist/server/src/lib/relay/relay-system-line.js +28 -15
  634. package/dist/server/src/lib/relay/types.js +14 -2
  635. package/dist/server/src/lib/session/agent-event-state.js +4 -0
  636. package/dist/server/src/lib/session/agent-session-lifecycle.js +6 -1
  637. package/dist/server/src/lib/session/claude-session.js +26 -7
  638. package/dist/server/src/lib/session/current-output-builder.js +7 -3
  639. package/dist/server/src/lib/session/current-output-history-writers.js +1 -1
  640. package/dist/server/src/lib/session/instance-input-lock.js +47 -2
  641. package/dist/server/src/lib/session/prompt-submit-receipt.js +224 -0
  642. package/dist/server/src/lib/session/prompt-waiting-guard.js +16 -3
  643. package/dist/server/src/lib/session/respond-target.js +82 -0
  644. package/dist/server/src/lib/session/send-attempt-state.js +177 -2
  645. package/dist/server/src/lib/session/send-attempt-types.js +10 -1
  646. package/dist/server/src/lib/session/send-user-message.js +80 -8
  647. package/dist/server/src/lib/session/session-launch-flight.js +243 -0
  648. package/dist/server/src/lib/session/session-starting-state.js +40 -4
  649. package/dist/server/src/lib/session/structured-prompt.js +17 -9
  650. package/dist/server/src/lib/session/waiting-episode-binding.js +4 -2
  651. package/dist/server/src/lib/session/worktree-session-reconcile.js +10 -0
  652. package/dist/server/src/lib/session-cleanup.js +32 -0
  653. package/dist/server/src/lib/session-key-sender.js +6 -28
  654. package/dist/server/src/lib/verification/env-clean-gate.js +129 -0
  655. package/dist/server/src/lib/verification/env-snapshot.js +11 -2
  656. package/dist/server/src/lib/verification/session-kill-ledger.js +174 -0
  657. package/package.json +5 -1
  658. package/release-notes/0.49.2.json +49 -0
  659. package/release-notes/0.49.3.json +52 -0
  660. package/.next/server/chunks/2422.js +0 -1
  661. package/.next/server/chunks/3773.js +0 -1
  662. package/.next/server/chunks/5630.js +0 -1
  663. package/.next/server/chunks/5775.js +0 -1
  664. package/.next/server/chunks/6808.js +0 -4
  665. package/.next/server/chunks/7604.js +0 -2
  666. package/.next/server/chunks/9198.js +0 -144
  667. package/.next/static/chunks/3931-1a1abab16248f14d.js +0 -1
  668. package/.next/static/chunks/4768-ad6f82f034f21eae.js +0 -1
  669. package/.next/static/chunks/5794-80ac3f06f098ea29.js +0 -1
  670. package/.next/static/chunks/6654-f3534f35f16644bc.js +0 -1
  671. package/.next/static/chunks/7665-e9ef6e0a85b9fa49.js +0 -1
  672. package/.next/static/chunks/8606-ce17ffa77f39608e.js +0 -1
  673. package/.next/static/chunks/app/api/agents/update/route-a4f129c451de7859.js +0 -1
  674. package/.next/static/chunks/app/api/agents/versions/route-a4f129c451de7859.js +0 -1
  675. package/.next/static/chunks/app/api/app/release-notes/route-a4f129c451de7859.js +0 -1
  676. package/.next/static/chunks/app/api/app/update/route-a4f129c451de7859.js +0 -1
  677. package/.next/static/chunks/app/api/app/update-check/route-a4f129c451de7859.js +0 -1
  678. package/.next/static/chunks/app/api/auth/login/route-a4f129c451de7859.js +0 -1
  679. package/.next/static/chunks/app/api/auth/logout/route-a4f129c451de7859.js +0 -1
  680. package/.next/static/chunks/app/api/auth/status/route-a4f129c451de7859.js +0 -1
  681. package/.next/static/chunks/app/api/capabilities/route-a4f129c451de7859.js +0 -1
  682. package/.next/static/chunks/app/api/daily-summary/route-a4f129c451de7859.js +0 -1
  683. package/.next/static/chunks/app/api/daily-summary/status/route-a4f129c451de7859.js +0 -1
  684. package/.next/static/chunks/app/api/external-apps/[id]/health/route-a4f129c451de7859.js +0 -1
  685. package/.next/static/chunks/app/api/external-apps/[id]/route-a4f129c451de7859.js +0 -1
  686. package/.next/static/chunks/app/api/external-apps/route-a4f129c451de7859.js +0 -1
  687. package/.next/static/chunks/app/api/fs/browse/route-a4f129c451de7859.js +0 -1
  688. package/.next/static/chunks/app/api/fs/recent-paths/route-a4f129c451de7859.js +0 -1
  689. package/.next/static/chunks/app/api/hooks/agent-event/route-a4f129c451de7859.js +0 -1
  690. package/.next/static/chunks/app/api/hooks/claude-done/route-a4f129c451de7859.js +0 -1
  691. package/.next/static/chunks/app/api/hooks/permission-request/route-a4f129c451de7859.js +0 -1
  692. package/.next/static/chunks/app/api/metrics/vibe/route-a4f129c451de7859.js +0 -1
  693. package/.next/static/chunks/app/api/ollama/models/route-a4f129c451de7859.js +0 -1
  694. package/.next/static/chunks/app/api/push/escalation/route-a4f129c451de7859.js +0 -1
  695. package/.next/static/chunks/app/api/push/subscriptions/route-a4f129c451de7859.js +0 -1
  696. package/.next/static/chunks/app/api/push/vapid/route-a4f129c451de7859.js +0 -1
  697. package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-a4f129c451de7859.js +0 -1
  698. package/.next/static/chunks/app/api/relays/[relayId]/route-a4f129c451de7859.js +0 -1
  699. package/.next/static/chunks/app/api/relays/route-a4f129c451de7859.js +0 -1
  700. package/.next/static/chunks/app/api/remote/pair/route-a4f129c451de7859.js +0 -1
  701. package/.next/static/chunks/app/api/repositories/[id]/route-a4f129c451de7859.js +0 -1
  702. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-a4f129c451de7859.js +0 -1
  703. package/.next/static/chunks/app/api/repositories/clone/route-a4f129c451de7859.js +0 -1
  704. package/.next/static/chunks/app/api/repositories/excluded/route-a4f129c451de7859.js +0 -1
  705. package/.next/static/chunks/app/api/repositories/restore/route-a4f129c451de7859.js +0 -1
  706. package/.next/static/chunks/app/api/repositories/route-a4f129c451de7859.js +0 -1
  707. package/.next/static/chunks/app/api/repositories/scan/route-a4f129c451de7859.js +0 -1
  708. package/.next/static/chunks/app/api/repositories/sync/route-a4f129c451de7859.js +0 -1
  709. package/.next/static/chunks/app/api/repositories/validate-path/route-a4f129c451de7859.js +0 -1
  710. package/.next/static/chunks/app/api/settings/default-agents/route-a4f129c451de7859.js +0 -1
  711. package/.next/static/chunks/app/api/settings/default-surface-mode/route-a4f129c451de7859.js +0 -1
  712. package/.next/static/chunks/app/api/sidebar/group-order/route-a4f129c451de7859.js +0 -1
  713. package/.next/static/chunks/app/api/skills/[id]/route-a4f129c451de7859.js +0 -1
  714. package/.next/static/chunks/app/api/skills/installations/route-a4f129c451de7859.js +0 -1
  715. package/.next/static/chunks/app/api/skills/operations/route-a4f129c451de7859.js +0 -1
  716. package/.next/static/chunks/app/api/skills/reindex/route-a4f129c451de7859.js +0 -1
  717. package/.next/static/chunks/app/api/skills/route-a4f129c451de7859.js +0 -1
  718. package/.next/static/chunks/app/api/slash-commands/route-a4f129c451de7859.js +0 -1
  719. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-a4f129c451de7859.js +0 -1
  720. package/.next/static/chunks/app/api/tasks/[taskId]/route-a4f129c451de7859.js +0 -1
  721. package/.next/static/chunks/app/api/templates/[id]/route-a4f129c451de7859.js +0 -1
  722. package/.next/static/chunks/app/api/templates/route-a4f129c451de7859.js +0 -1
  723. package/.next/static/chunks/app/api/verification/runs/[runId]/route-a4f129c451de7859.js +0 -1
  724. package/.next/static/chunks/app/api/verification/runs/route-a4f129c451de7859.js +0 -1
  725. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-a4f129c451de7859.js +0 -1
  726. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-a4f129c451de7859.js +0 -1
  727. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-a4f129c451de7859.js +0 -1
  728. package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-a4f129c451de7859.js +0 -1
  729. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-a4f129c451de7859.js +0 -1
  730. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-a4f129c451de7859.js +0 -1
  731. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-a4f129c451de7859.js +0 -1
  732. package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-a4f129c451de7859.js +0 -1
  733. package/.next/static/chunks/app/api/worktrees/[id]/env/route-a4f129c451de7859.js +0 -1
  734. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-a4f129c451de7859.js +0 -1
  735. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-a4f129c451de7859.js +0 -1
  736. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-a4f129c451de7859.js +0 -1
  737. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-a4f129c451de7859.js +0 -1
  738. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-a4f129c451de7859.js +0 -1
  739. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-a4f129c451de7859.js +0 -1
  740. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-a4f129c451de7859.js +0 -1
  741. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-a4f129c451de7859.js +0 -1
  742. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-a4f129c451de7859.js +0 -1
  743. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-a4f129c451de7859.js +0 -1
  744. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-a4f129c451de7859.js +0 -1
  745. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-a4f129c451de7859.js +0 -1
  746. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-a4f129c451de7859.js +0 -1
  747. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-a4f129c451de7859.js +0 -1
  748. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-a4f129c451de7859.js +0 -1
  749. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-a4f129c451de7859.js +0 -1
  750. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-a4f129c451de7859.js +0 -1
  751. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-a4f129c451de7859.js +0 -1
  752. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-a4f129c451de7859.js +0 -1
  753. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-a4f129c451de7859.js +0 -1
  754. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-a4f129c451de7859.js +0 -1
  755. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-a4f129c451de7859.js +0 -1
  756. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-a4f129c451de7859.js +0 -1
  757. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-a4f129c451de7859.js +0 -1
  758. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-a4f129c451de7859.js +0 -1
  759. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-a4f129c451de7859.js +0 -1
  760. package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-a4f129c451de7859.js +0 -1
  761. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-a4f129c451de7859.js +0 -1
  762. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-a4f129c451de7859.js +0 -1
  763. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-a4f129c451de7859.js +0 -1
  764. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-a4f129c451de7859.js +0 -1
  765. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-a4f129c451de7859.js +0 -1
  766. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-a4f129c451de7859.js +0 -1
  767. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-a4f129c451de7859.js +0 -1
  768. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-a4f129c451de7859.js +0 -1
  769. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-a4f129c451de7859.js +0 -1
  770. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-a4f129c451de7859.js +0 -1
  771. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-a4f129c451de7859.js +0 -1
  772. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-a4f129c451de7859.js +0 -1
  773. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-a4f129c451de7859.js +0 -1
  774. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-a4f129c451de7859.js +0 -1
  775. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-a4f129c451de7859.js +0 -1
  776. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-a4f129c451de7859.js +0 -1
  777. package/.next/static/chunks/app/api/worktrees/[id]/route-a4f129c451de7859.js +0 -1
  778. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-a4f129c451de7859.js +0 -1
  779. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-a4f129c451de7859.js +0 -1
  780. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-a4f129c451de7859.js +0 -1
  781. package/.next/static/chunks/app/api/worktrees/[id]/search/route-a4f129c451de7859.js +0 -1
  782. package/.next/static/chunks/app/api/worktrees/[id]/send/route-a4f129c451de7859.js +0 -1
  783. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-a4f129c451de7859.js +0 -1
  784. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-a4f129c451de7859.js +0 -1
  785. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-a4f129c451de7859.js +0 -1
  786. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-a4f129c451de7859.js +0 -1
  787. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-a4f129c451de7859.js +0 -1
  788. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-a4f129c451de7859.js +0 -1
  789. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-a4f129c451de7859.js +0 -1
  790. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-a4f129c451de7859.js +0 -1
  791. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-a4f129c451de7859.js +0 -1
  792. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-a4f129c451de7859.js +0 -1
  793. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-a4f129c451de7859.js +0 -1
  794. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-a4f129c451de7859.js +0 -1
  795. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-a4f129c451de7859.js +0 -1
  796. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-a4f129c451de7859.js +0 -1
  797. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-a4f129c451de7859.js +0 -1
  798. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-a4f129c451de7859.js +0 -1
  799. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-a4f129c451de7859.js +0 -1
  800. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-a4f129c451de7859.js +0 -1
  801. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-a4f129c451de7859.js +0 -1
  802. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-a4f129c451de7859.js +0 -1
  803. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-a4f129c451de7859.js +0 -1
  804. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-a4f129c451de7859.js +0 -1
  805. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-a4f129c451de7859.js +0 -1
  806. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-a4f129c451de7859.js +0 -1
  807. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-a4f129c451de7859.js +0 -1
  808. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-a4f129c451de7859.js +0 -1
  809. package/.next/static/chunks/app/api/worktrees/route-a4f129c451de7859.js +0 -1
  810. package/.next/static/chunks/app/layout-8bfac4724277b47f.js +0 -1
  811. package/.next/static/chunks/app/manifest.webmanifest/route-a4f129c451de7859.js +0 -1
  812. package/.next/static/chunks/app/more/page-87c84987b2765213.js +0 -1
  813. package/.next/static/chunks/app/page-1b820c421db48c2c.js +0 -1
  814. package/.next/static/chunks/app/proxy/[...path]/route-a4f129c451de7859.js +0 -1
  815. package/.next/static/chunks/app/review/page-e2fd4a590646a2d8.js +0 -1
  816. package/.next/static/chunks/app/worktrees/[id]/layout-a4f129c451de7859.js +0 -1
  817. package/.next/static/chunks/app/worktrees/[id]/page-f6d3ab8185d93aae.js +0 -1
  818. /package/.next/static/{fqfSDqQMweROeHUzOt_m1 → LNfVZiq6FZwKsV7L9Mi6M}/_buildManifest.js +0 -0
  819. /package/.next/static/{fqfSDqQMweROeHUzOt_m1 → LNfVZiq6FZwKsV7L9Mi6M}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";exports.id=3773,exports.ids=[3773],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()}}},5416:(a,b,c)=>{c.d(b,{H:()=>i});var d=c(95375),e=c(91318),f=c(20029),g=c(39532),h=c(15961);function i(a,b,c,j=Date.now()){let{policy:k,taskId:l}=(0,e.d8)(a,b.cliToolId,b.instanceId),m={worktreeId:a,cliToolId:b.cliToolId,instanceId:b.instanceId??b.cliToolId};return(0,h.Fw)({...m,resolvedBy:b.resolvedBy??null,payload:c,sessionGeneration:(0,d.getAgentEventGenerationStartedAt)(a,b.cliToolId,b.instanceId),contract:{policy:k,taskId:l},appearance:{note:a=>(0,g.HO)(m,a,j),forget:()=>(0,g.mt)(m)},lastSend:(0,f.KF)(m),now:j})}},15961:(a,b,c)=>{c.d(b,{Fw:()=>M,Z1:()=>L});var d=c(48736),e=c(27354),f=c(16402),g=c(41733),h=c(42422),i=c(90166),j=c(15194),k=c(31239),l=c(81254),m=c(28861),n=c(69082);let o=/^\s*Do you trust the contents of this project\?\s*$/,p=/^\s*Accessing workspace:\s*(.*)$/,q=/^\s*>\s+(\S.*)$/,r=/^\s*(?:>\s+)?(\/[\w:.-]+)(?:\s{2,}.*)?$/,s=/^\s*[↓↑]\s*\d+\s+more\s*$/,t=/^\s*Effort\b/,u=/^ {40,}\S/;function v(a,b,c,d){let e=[],f=-1;for(let g=b;g<c;g++){let b=a[g];if(""===b.trim()||d&&d.test(b))break;if(q.test(b)){if(f>=0)return null;f=e.length}e.push(b.replace(/^\s*>\s+/,"").replace(/\s{2,}/g," ").trim())}return e.length<2||f<0?null:{options:e,selectedIndex:f}}let w=/^\s*Keyboard:\s+↑\/↓\s+Navigate\s+←\/→\s+Effort\s+enter\s+Select\s+esc\s+(?:Go Back|Clear search)\s*$/,x=/^\s*Switch Model\s*$/,y=/^\s*Search:(?:\s.*)?$/,z=/^\s*─+\s*$/,A=/^\s*Effort\b/,B=/^\s*>\s+(\S.*)$/,C=/^ {40,}\S/,D=a=>""===a.trim();function E(a,b,c){for(;b<c&&D(a[b]);)b++;return b}let F={trust:"antigravity-trust","model-picker":"antigravity-model-picker","slash-menu":"antigravity-slash-menu"},G={question:null,approvalTarget:null,options:[],selectedIndex:-1};var H=c(29567),I=c(77245),J=c(39532);function K(a,b){return{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId,sessionName:a.sessionName,sessionGeneration:a.sessionGeneration,screenAppearedAt:a.screenAppearedAt,kind:b.kind,question:b.question,options:b.options,approvalTarget:(0,J.vQ)(b.kind,b.approvalTarget,b.options),selectedPosition:b.selectedIndex>=0?b.selectedIndex+1:null}}function L(a){let{screen:b,target:c,session:d}=a;return null===b||null===b.token||null===b.appearedAt||null===d.generation?null:K({worktreeId:c.worktreeId,cliToolId:c.cliToolId,instanceId:c.instanceId,sessionName:c.sessionName,sessionGeneration:d.generation,screenAppearedAt:b.appearedAt},{kind:b.kind,question:b.question,options:b.options.map(a=>a.label),approvalTarget:b.approvalTarget,selectedIndex:null===b.selectedPosition?-1:b.selectedPosition-1})}function M(a){let{payload:b,now:c}=a,L=a.lastSend??null,M={worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId,sessionName:b.sessionName,resolvedBy:a.resolvedBy},N={running:b.isRunning,starting:"number"==typeof b.startingSince,generation:a.sessionGeneration},O=b.isRunning?function(a){if("antigravity"===a.cliToolId&&a.fullOutput){let b=function(a){let b=(0,h.aJ)(a),c=(0,h._A)(b);if((0,h.bH)(c)){let a=(0,m.g8)(c),b=a?.promptData;return b?.type!=="multiple_choice"?{kind:"unknown",...G}:{kind:"antigravity-permission",question:b.question,approvalTarget:b.approvalTarget??null,options:b.options.map(a=>a.label),selectedIndex:b.options.findIndex(a=>a.isDefault)}}let d=function(a){let b=a.split("\n").map(a=>a.trimEnd()),c=function(a){for(let b=a.length-1;b>=0;b--)if(n.YH.test(a[b])){for(let c=b+1;c<a.length;c++)if(n.lE.test(a[c]))return -1;return b}return -1}(b);return c<0?null:function(a,b){let c=Math.max(0,b-30),d=-1;for(let e=b-1;e>=c;e--)if(o.test(a[e])){d=e;break}if(d<0)return null;for(let c=b+1;c<a.length;c++)if(""!==a[c].trim()&&!u.test(a[c]))return null;let e=-1;for(let c=d+1;c<b;c++)if(q.test(a[c])){e=c;break}if(e<0)return null;let f=e;for(;f-1>d&&""!==a[f-1].trim();)f--;let g=v(a,f,b);if(null===g)return null;let h=null,i=Math.max(0,d-8);for(let b=d-1;b>=i;b--){let c=p.exec(a[b]);if(!c)continue;let e=c[1].trim();if(""!==e)h=e;else for(let c=b+1;c<d;c++)if(""!==a[c].trim()){h=a[c].trim();break}break}return{screen:"trust",question:a[d].trim(),approvalTarget:h,options:g.options,selectedIndex:g.selectedIndex}}(b,c)??function(a,b){let c=Math.max(0,b-30);for(let d=b-1;d>=c;d--){if(!n.d0.test(a[d]))continue;let c=d+1;for(;c<b&&""===a[c].trim();)c++;let e=v(a,c,b,t);if(null===e)break;return{screen:"model-picker",question:a[d].trim(),approvalTarget:null,options:e.options,selectedIndex:e.selectedIndex}}return null}(b,c)??function(a,b){let c=b-1;for(;c>=0&&(""===a[c].trim()||s.test(a[c]));)c--;let d=[],e=Math.max(0,b-30);for(;c>=e&&r.test(a[c]);c--)d.unshift(a[c]);return d.length<2||1!==d.filter(a=>q.test(a)).length?null:{screen:"slash-menu",question:null,approvalTarget:null,options:d.map(a=>r.exec(a)[1]),selectedIndex:d.findIndex(a=>q.test(a))}}(b,c)}(b);if(null===d){let a=function(a){let b,c=a.split("\n").map(a=>a.trimEnd()),d=function(a){for(let b=a.length-1;b>=0;b--)if(!(D(a[b])||C.test(a[b])))return w.test(a[b])?b:-1;return -1}(c);if(d<0)return null;let e=function(a,b){let c=Math.max(0,b-30);for(let d=b-1;d>=c;d--)if(x.test(a[d]))return d;return -1}(c,d);if(e<0)return null;let f=(b=E(c,e+1,d))>=d||!y.test(c[b])||++b>=d||!z.test(c[b])?-1:E(c,b+1,d);if(f<0)return null;let g=function(a,b,c){let d=[],e=-1,f=b;for(;f<c&&!D(a[f]);f++){if(A.test(a[f]))return null;if(B.test(a[f])){if(e>=0)return null;e=d.length}d.push(a[f].replace(/^\s*>\s+/,"").replace(/\s{2,}/g," ").trim())}return 0===d.length||e<0?null:{options:d,selectedIndex:e,end:f}}(c,f,d);return g&&function(a,b,c){let d=E(a,b,c);return!(d>=c)&&!!A.test(a[d])&&c-d<=6}(c,g.end,d)?{question:c[e].trim(),options:g.options,selectedIndex:g.selectedIndex}:null}(b);return null===a?null:{kind:"antigravity-model-picker",question:a.question,approvalTarget:null,options:[...a.options],selectedIndex:a.selectedIndex}}return{kind:F[d.screen],question:d.question,approvalTarget:d.approvalTarget,options:[...d.options],selectedIndex:d.selectedIndex}}(a.fullOutput);if(null!==b)return b}return a.isPromptWaiting||a.isSelectionListActive||a.isPagerActive||a.isDismissablePanelActive||a.isUnclassifiedActive||"waiting"===a.sessionStatus?{kind:"unknown",...function(a){if(!(0,l.XF)(a))return G;let b=a.approvalTarget??null;return"yes_no"===a.type?{question:a.question,approvalTarget:b,options:[...a.options],selectedIndex:a.defaultOption?a.options.indexOf(a.defaultOption):-1}:{question:a.question,approvalTarget:b,options:a.options.map(a=>a.label),selectedIndex:a.options.findIndex(a=>a.isDefault)}}(a.promptData)}:"ready"===a.sessionStatus?{kind:"composer",...G}:{kind:"none",...G}}({cliToolId:a.cliToolId,fullOutput:b.fullOutput,sessionStatus:b.sessionStatus,isPromptWaiting:b.isPromptWaiting,promptData:b.promptData,isSelectionListActive:b.isSelectionListActive,isPagerActive:b.isPagerActive,isDismissablePanelActive:b.isDismissablePanelActive,isUnclassifiedActive:b.isUnclassifiedActive}):null,{token:P,tokenWithheld:Q,appearedAt:R}=function(a,b){var c;let d=null===b?null:(c=a.sessionGeneration,(0,H.PJ)(b.kind)?"unknown"===b.kind?"unknown-screen":null===c?"no-session-generation":null:"no-decision"),e=a.sessionGeneration;if(null===b||null!==d||null===e)return a.appearance.forget(),{token:null,tokenWithheld:d,appearedAt:null};let f=a.payload.sessionName,g=a.appearance.note((0,J.z2)({sessionName:f,sessionGeneration:e,...b})),h=K({...a,sessionName:f,sessionGeneration:e,screenAppearedAt:g},b);return{token:(0,I.hH)(h,a.now),tokenWithheld:null,appearedAt:g}}(a,O),S=null;null!==O&&(S={kind:O.kind,token:P,tokenExpiresAt:null===P?null:(0,I.rk)(c),tokenWithheld:Q,appearedAt:R,question:O.question,approvalTarget:O.approvalTarget,options:O.options.map((a,b)=>({position:b+1,label:a})),selectedPosition:O.selectedIndex>=0?O.selectedIndex+1:null,answerVia:function(a,b){if(!(0,H.PJ)(a.kind))return"none";if("antigravity-trust"===a.kind)return"strict";let c=b.promptView??(0,k.ds)(b.promptData??null);return c?.kind==="screen-choices"?"screen":c?.kind==="api-choices"?"api":"terminal"}(O,b),sessionStatus:b.sessionStatus,sessionStatusReason:b.sessionStatusReason});let T=b.autoYes;return{schemaVersion:H.To,observedAt:c,target:M,session:N,status:null===O?"unavailable":"observed",unavailableReason:null===O?"session-not-running":null,screen:S,autoYes:{enabled:T?T.enabled:null,expiresAt:T?.expiresAt??null,stopReason:T?.stopReason??null,pollerActive:"boolean"==typeof b.serverPollerActive?b.serverPollerActive:null,pollerRecord:null===O?null:function(a,b,c){var d;let e=a.autoYes?.lastSuppression;return e?{reason:e.reason,mode:e.mode,promptType:e.promptType,...void 0!==e.pattern&&{pattern:e.pattern},at:e.at,ageSeconds:Math.max(0,Math.round((c-e.at)/1e3)),screenCorrelation:(d=e.promptType,(0,H.PJ)(b.kind)?(0,l.XF)(a.promptData)&&a.promptData.type!==d?"type-mismatch":"unknown":"no-prompt-on-screen")}:null}(b,O,c),contractEvaluation:function(a,b){let{policy:c,taskId:k}=a.contract,m=c?{taskId:k,mode:c.mode}:null;if(null===b)return{state:"not-evaluated",because:"session-not-running",contract:m};let n=a.payload.promptData;if(!(0,H.PJ)(b.kind)||!(0,l.XF)(n))return{state:"not-evaluated",because:"no-parsed-prompt",contract:m};let o=(0,j.hR)(a.cliToolId)?a.cliToolId:void 0,p=function(a,b,c){if(!(0,l.XF)(b))return;let d=a.autoYesAnswerMode??i.Rb,e=(0,f.Xc)((0,f.j4)(b,void 0,c),d);return"left-to-human"===e?{kind:"left-to-human"}:"base-rules"!==e?{kind:"answered",question:{optionRecommendations:function(a,b){if(!a||void 0===b)return;let c=(0,h._A)((0,h.aJ)(a));return(0,g.$M)(c,b,c.split("\n"),a).optionRecommendations}(a.fullOutput,c)}}:void 0}(a.payload,n,o);if(p?.kind==="left-to-human")return{state:"base-withholds",reason:e.eS,contract:m};let q=(0,d.sD)(n,c,o,p?.kind==="answered"?p.question:void 0);return null!==q.suppressedBy&&(0,e.PP)(q.suppressedBy)?{state:"base-withholds",reason:q.suppressedBy,contract:m}:null!==q.suppressedBy?{state:"policy-withholds",reason:q.suppressedBy,...void 0!==q.pattern&&{pattern:q.pattern},contract:m}:null===q.answer?{state:"no-base-answer",contract:m}:{state:"policy-permits",contract:m}}(a,O)},lastSend:null===L?null:{at:L.at,state:L.state,reason:L.reason}}}},20029:(a,b,c)=>{c.d(b,{C7:()=>r,KF:()=>n,Nq:()=>p,cu:()=>l,m4:()=>s,zE:()=>m});var d=c(55511),e=c(36925),f=c(72626),g=c(2669),h=c(7321);let i=(0,f.h)("session/send-attempt-state"),j=(0,e.v)("__sendAttemptRecords",()=>new Map);function k(a){return JSON.stringify([a.worktreeId,a.cliToolId,a.instanceId])}function l(a){return(0,d.createHash)("sha256").update(a,"utf8").digest("hex").slice(0,16)}function m(a,b,c=Date.now()){try{let d=k(a);for(j.delete(d),j.set(d,{at:Math.floor(c),state:b.state,reason:b.reason,messageDigest:l(b.content)});j.size>1024;){let a=j.keys().next().value;if(void 0===a)break;j.delete(a)}}catch(a){i.warn("send-attempt-record-failed",{error:a instanceof Error?a.message:String(a)})}}function n(a){return j.get(k(a))??null}let o=/Command failed: tmux |Failed to send (?:special )?keys? to tmux session|Failed to send special key:|Failed to paste message into tmux session/;function p(a){if("object"==typeof a&&null!==a&&a.code===g.M7)return{state:"not-sent",reason:"session-starting"};if("object"==typeof a&&null!==a&&a.code===h.Le)return{state:"not-sent",reason:"plan-review"};let b=a instanceof Error?a.message:String(a);return/Enter was not pressed, so nothing was submitted/.test(b)?{state:"indeterminate",reason:"body-not-landed"}:/replaced by a TUI autocompletion/.test(b)?{state:"indeterminate",reason:"replaced-by-completion"}:/submit could not be confirmed/i.test(b)?{state:"indeterminate",reason:"submit-unconfirmed"}:/Could not re-read session \S+ before typing \(.*\); nothing was typed \(Issue #3945\)/s.test(b)?{state:"not-sent",reason:"recheck-failed"}:o.test(b)?{state:"indeterminate",reason:"send-error"}:/prompt not ready/i.test(b)?{state:"not-sent",reason:"prompt-not-ready"}:/input lock not acquired, nothing was typed/.test(b)?/was replaced while this send waited/.test(b)?{state:"not-sent",reason:"session-replaced"}:{state:"not-sent",reason:"input-lock-timeout"}:/\(re-checked under the input lock\); nothing was typed/.test(b)?{state:"not-sent",reason:"prompt-waiting"}:/input lock lost, nothing was typed/.test(b)?{state:"not-sent",reason:"input-lock-lost"}:/still holds unsent text after \d+ clear passes/.test(b)?{state:"not-sent",reason:"composer-not-empty"}:{state:"indeterminate",reason:"send-error"}}function q(a){return a.replace(/\s+/g,"")}function r(a,b){let c=q(b.split("\n").find(a=>""!==a.trim())??"").slice(0,32);return""!==c&&q(a).includes(c)}function s(a){return"not-sent"===a.state?`[send state: not-sent (${a.reason}): the message was not typed. CommandMate does not resend it; send it again once the input prompt is back (\`commandmate prompt <worktree-id> --json\` shows the screen and lastSend).]`:"indeterminate"===a.state?`[send state: indeterminate (${a.reason}): part of the message may have been typed or submitted. CommandMate does not resend it; do not resend before checking the pane (\`commandmate capture <worktree-id> --pane\`), or it may arrive twice.]`:`[send state: sent (${a.reason})]`}},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})}},29567:(a,b,c)=>{c.d(b,{PJ:()=>h,To:()=>d,_Q:()=>k,a:()=>m,fm:()=>j,tq:()=>g});let d=1,e=["antigravity-trust","antigravity-model-picker","antigravity-permission","antigravity-slash-menu","composer","none","unknown"],f=["composer","none"];function g(a){return"string"==typeof a&&e.includes(a)}function h(a){return!f.includes(a)}let i=["antigravity-trust","antigravity-permission"];function j(a){return"string"==typeof a&&i.includes(a)}let k=["antigravity-trust"],l={"antigravity-trust":{position:2,optionCount:2,label:"No, exit"}};function m(a,b,c){let d=l[a];return void 0!==d&&d.position===b&&d.optionCount===c.length&&c[b-1].replace(/\s+/g," ").trim()===d.label}},77245:(a,b,c)=>{c.d(b,{hH:()=>i,iV:()=>k,rk:()=>j});var d=c(55511),e=c(36925);let f=(0,e.v)("__promptObservationTokenSecret",()=>({value:(0,d.randomBytes)(32)})),g=(0,e.v)("__promptObservationConsumedTokens",()=>new Map);function h(a,b){return(0,d.createHmac)("sha256",f.value).update(JSON.stringify(["po1",a.worktreeId,a.cliToolId,a.instanceId,a.sessionName,a.sessionGeneration,a.screenAppearedAt,a.kind,a.question,[...a.options],a.approvalTarget,a.selectedPosition,b])).digest()}function i(a,b){let c=Math.floor(b);return`po1.${c.toString(36)}.${h(a,c).toString("base64url")}`}function j(a){return Math.floor(a)+12e4}function k(a,b,c=Date.now()){let e=function(a,b,c=Date.now()){if("string"!=typeof a||a.length>80)return{ok:!1,reason:"malformed"};let e=a.split(".");if(3!==e.length||"po1"!==e[0]||!/^[0-9a-z]{1,12}$/.test(e[1])||!/^[A-Za-z0-9_-]{43}$/.test(e[2]))return{ok:!1,reason:"malformed"};let f=parseInt(e[1],36);if(!Number.isSafeInteger(f)||f.toString(36)!==e[1])return{ok:!1,reason:"malformed"};let g=Buffer.from(e[2],"base64url");if(g.toString("base64url")!==e[2])return{ok:!1,reason:"malformed"};let i=h(b,f);return g.length===i.length&&(0,d.timingSafeEqual)(g,i)?f-c>5e3?{ok:!1,reason:"not-yet-valid"}:c>=j(f)?{ok:!1,reason:"expired"}:{ok:!0,issuedAt:f}:{ok:!1,reason:"mismatch"}}(a,b,c);if(!e.ok)return e;for(let[a,b]of g)c>=b&&g.delete(a);let f=(0,d.createHash)("sha256").update(JSON.stringify(["po1",b.worktreeId,b.cliToolId,b.instanceId,b.sessionName,b.sessionGeneration,b.screenAppearedAt,b.kind,b.question,[...b.options],b.approvalTarget])).digest("base64url");return g.has(f)?{ok:!1,reason:"consumed"}:g.size>=4096?{ok:!1,reason:"consumed-store-full"}:(g.set(f,Math.floor(c)+12e4),e)}},95736:(a,b,c)=>{a.exports=c(44870)}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=5630,exports.ids=[5630],exports.modules={2669:(a,b,c)=>{c.d(b,{JI:()=>n,M7:()=>d,Sr:()=>h,Zf:()=>f,c7:()=>e,lU:()=>k,mR:()=>j,qO:()=>i,su:()=>m,wQ:()=>l});let d="SESSION_STARTING",e="SESSION_START_FAILED",f="SESSION_START_UNAVAILABLE",g=[d,e];class h extends Error{constructor(a,b,c){super(`${a} did not reach its input prompt within ${Math.round(c/1e3)}s (initialization timeout). The tmux session '${b}' and its process are still running, so this is a slow start, not a failed one — the message was not delivered, but nothing needs repairing. Retry the send in a few seconds, or run \`commandmate capture <worktree-id>\` to see what it is waiting on.`),this.toolName=a,this.sessionName=b,this.timeoutMs=c,this.code=d,this.name="SessionStartTimeoutError"}}function i(a,b){return`${a} exited before reaching its input prompt: the tmux session '${b}' is back at a shell, so this is not a slow start and waiting will not help. The message was not delivered. Run \`commandmate capture <worktree-id>\` to see why it exited (for example a startup dialog answered with exit, or a missing login), fix that, then send again.`}class j extends Error{constructor(a,b,c){super(`${a} reported an error while starting in tmux session '${b}': "${c}". Retrying will not help until that is resolved; run \`commandmate capture <worktree-id>\` to see the session output.`),this.toolName=a,this.sessionName=b,this.detectedPattern=c,this.code=e,this.name="SessionStartFailedError"}}class k extends Error{constructor(a,b=`${a} is not installed. Please install it first.`){super(b),this.toolName=a,this.code=f,this.name="SessionStartUnavailableError"}}function l(a){return o(a)===d}function m(a){let b=o(a);return void 0!==b&&g.includes(b)}function n(a){return o(a)===f}function o(a){if("object"!=typeof a||null===a)return;let b=a.code;return"string"==typeof b?b:void 0}},22354:(a,b,c)=>{c.d(b,{F0:()=>j.F,K9:()=>e.K9,VM:()=>d.VM,_0:()=>f._0,c1:()=>k.c,o:()=>i.o,vm:()=>h.v,y_:()=>g.y_});var d=c(70096);c(66101);var e=c(45567);c(57510),c(38367);var f=c(25071),g=c(50474),h=c(70997),i=c(77904),j=c(76835),k=c(2734)},50474:(a,b,c)=>{c.d(b,{y_:()=>d});function d(a){var b=a.noDecision;switch(b.kind){case"proceeds":return{safe:!0,blocksForMs:0,summary:"the agent continues with its own approval flow"};case"blocks":return{safe:!1,blocksForMs:null,summary:"the agent waits indefinitely; nothing else will unblock it"};case"blocksUntil":return{safe:!1,blocksForMs:b.timeoutMs,summary:`the agent waits up to ${b.timeoutMs}ms before continuing`}}}},73495:(a,b,c)=>{c.d(b,{Me:()=>h});let d="don['’]t",e=["deny",/^No(?:,|$)/],f={claude:[["allow-once",/^Yes$/],["allow-persistent",/^Yes, and always allow\b/],["mode-change",/^Yes, allow all edits\b/],["mode-change",/^Yes, and switch to\b/],e],codex:[["allow-once",/^Yes$/],["allow-once",/^Yes, proceed\b/],["allow-once",/^Allow(?:\s{2,}|$)/],["allow-persistent",RegExp(`^Yes, and ${d} ask again\\b`)],["allow-persistent",/^Always allow\b/],["mode-change",/^Ask for approval\b/],["mode-change",/^Approve for me\b/],["mode-change",/^Full Access\b/],["deny",/^Cancel\b/],e],antigravity:[["allow-once",/^Yes$/],["allow-once",/^Yes, run command$/],["allow-once",/^Yes, allow creation$/],["allow-persistent",/^Yes, and always allow\b/],e],"command-code":[["allow-once",/^Yes$/],["allow-persistent",RegExp(`^Yes, ${d} ask again\\b`)],["mode-change",/^Yes, allow all edits\b/],e],copilot:[["allow-once",/^Yes$/],["allow-persistent",RegExp(`^Yes, and ${d} ask again\\b`)],["mode-change",/^Manual\b/],["mode-change",/^Allow all\b/],e]},g=Object.values(f).flat();function h(a,b){let c=void 0===b?g:f[b]??null;if(null===c)return{kind:"not-a-permission-dialog"};let d=a.map(a=>(function(a,b){let c=b.trim();for(let[b,d]of a)if(d.test(c))return b;return"unknown"})(c,a.label));if(!d.some(a=>"allow-once"===a||"allow-persistent"===a||"mode-change"===a))return{kind:"not-a-permission-dialog"};let e=a.filter((a,b)=>"allow-once"===d[b]);return 1===e.length?{kind:"allow-once",option:e[0]}:{kind:"unidentified",allowOnceCount:e.length}}Object.keys(f)}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=5775,exports.ids=[2839,5220,5775],exports.modules={20029:(a,b,c)=>{c.d(b,{C7:()=>r,KF:()=>n,Nq:()=>p,cu:()=>l,m4:()=>s,zE:()=>m});var d=c(55511),e=c(36925),f=c(72626),g=c(2669),h=c(7321);let i=(0,f.h)("session/send-attempt-state"),j=(0,e.v)("__sendAttemptRecords",()=>new Map);function k(a){return JSON.stringify([a.worktreeId,a.cliToolId,a.instanceId])}function l(a){return(0,d.createHash)("sha256").update(a,"utf8").digest("hex").slice(0,16)}function m(a,b,c=Date.now()){try{let d=k(a);for(j.delete(d),j.set(d,{at:Math.floor(c),state:b.state,reason:b.reason,messageDigest:l(b.content)});j.size>1024;){let a=j.keys().next().value;if(void 0===a)break;j.delete(a)}}catch(a){i.warn("send-attempt-record-failed",{error:a instanceof Error?a.message:String(a)})}}function n(a){return j.get(k(a))??null}let o=/Command failed: tmux |Failed to send (?:special )?keys? to tmux session|Failed to send special key:|Failed to paste message into tmux session/;function p(a){if("object"==typeof a&&null!==a&&a.code===g.M7)return{state:"not-sent",reason:"session-starting"};if("object"==typeof a&&null!==a&&a.code===h.Le)return{state:"not-sent",reason:"plan-review"};let b=a instanceof Error?a.message:String(a);return/Enter was not pressed, so nothing was submitted/.test(b)?{state:"indeterminate",reason:"body-not-landed"}:/replaced by a TUI autocompletion/.test(b)?{state:"indeterminate",reason:"replaced-by-completion"}:/submit could not be confirmed/i.test(b)?{state:"indeterminate",reason:"submit-unconfirmed"}:/Could not re-read session \S+ before typing \(.*\); nothing was typed \(Issue #3945\)/s.test(b)?{state:"not-sent",reason:"recheck-failed"}:o.test(b)?{state:"indeterminate",reason:"send-error"}:/prompt not ready/i.test(b)?{state:"not-sent",reason:"prompt-not-ready"}:/input lock not acquired, nothing was typed/.test(b)?/was replaced while this send waited/.test(b)?{state:"not-sent",reason:"session-replaced"}:{state:"not-sent",reason:"input-lock-timeout"}:/\(re-checked under the input lock\); nothing was typed/.test(b)?{state:"not-sent",reason:"prompt-waiting"}:/input lock lost, nothing was typed/.test(b)?{state:"not-sent",reason:"input-lock-lost"}:/still holds unsent text after \d+ clear passes/.test(b)?{state:"not-sent",reason:"composer-not-empty"}:{state:"indeterminate",reason:"send-error"}}function q(a){return a.replace(/\s+/g,"")}function r(a,b){let c=q(b.split("\n").find(a=>""!==a.trim())??"").slice(0,32);return""!==c&&q(a).includes(c)}function s(a){return"not-sent"===a.state?`[send state: not-sent (${a.reason}): the message was not typed. CommandMate does not resend it; send it again once the input prompt is back (\`commandmate prompt <worktree-id> --json\` shows the screen and lastSend).]`:"indeterminate"===a.state?`[send state: indeterminate (${a.reason}): part of the message may have been typed or submitted. CommandMate does not resend it; do not resend before checking the pane (\`commandmate capture <worktree-id> --pane\`), or it may arrive twice.]`:`[send state: sent (${a.reason})]`}},39687:(a,b,c)=>{c.d(b,{d:()=>A});var d=c(56791),e=c(8360),f=c(15194),g=c(95220),h=c(12462),i=c(43015),j=c(54325),k=c(72626),l=c(34331),m=c(40964),n=c(58707),o=c(2669),p=c(31990),q=c(20029),r=c(7321),s=c(94154),t=c(34405),u=c(49973),v=c(49319);let w=(0,k.h)("session/send-user-message");function x(a){return a instanceof Error?a.message:String(a)}async function y(a,b){let c=`${a}:${b}`,d=Date.now()+5e3;for(;(0,g.getActivePollers)().includes(c);){if(Date.now()>=d)return!1;await new Promise(a=>setTimeout(a,100))}return!0}async function z(a,b,c,d){if(!s.wn.has(b))return!1;try{let e=await (0,p.WD)(a,b,t._,c),f=(0,s.ji)(e,b);return"content"===f.state&&(0,q.C7)(f.text,d)}catch(a){return w.warn("send-composer-residue-read-failed",{error:x(a)}),!1}}async function A(a,b){let{worktreeId:c,content:k,cliToolId:p,instanceId:t,absoluteImagePath:A,copilotModel:B}=b,C=b.messageType??"normal",D=t??p,E=e.CLIToolManager.getInstance().getTool(p),F=(a,d)=>{(0,q.zE)({worktreeId:c,cliToolId:p,instanceId:D},{state:a,reason:d,content:k}),b.onAttempt?.({state:a,reason:d})},G=(0,m.mf)(p,c,t),H=await (0,l.L)(c,G,a);if(null===H||"foreign"===H.verdict)return F("not-sent","foreign-session"),w.warn("send-refused-foreign-session",{worktreeId:c,cliToolId:p,instanceId:D,sessionName:G,sessionPath:H?.sessionPath??null,reason:H?"foreign":"worktree_not_found"}),{ok:!1,stage:"foreign_session",error:H?`tmux session "${G}" belongs to another CommandMate server`:`Worktree '${c}' not found; cannot confirm tmux session "${G}" is this server's`};let I=await (0,n.a3)(c,p,t,{ignoreStructured:b.ignoreStructuredPromptGuard});if(I.waiting)return F("not-sent","prompt-waiting"),w.info("send-refused-prompt-waiting",{worktreeId:c,cliToolId:p,reason:I.reason,blockedBy:I.blockedBy}),{ok:!1,stage:"prompt_waiting",error:(0,n.br)(c,I.blockedBy)};if(B&&"copilot"===p){try{await E.sendModelCommand(c,B,t),w.info("copilot-model-command-sent",{model:B})}catch(b){w.error("failed-to-send-model-command:",{error:x(b)});let a=b?.code;if(a===r.a9)return F("not-sent","prompt-waiting"),{ok:!1,stage:"prompt_waiting",error:(0,n.br)(c)};return F("not-sent",a===r.$_?"recheck-failed":"model-switch-failed"),{ok:!1,stage:"model",error:x(b)}}await y(c,D)||w.warn("previous-turn-poller-still-running",{worktreeId:c,instanceId:D,waitedMs:5e3})}let J=new Date;try{await (0,h.o4)(a,c,p,J,t)}catch(a){w.error("failed-to-save-pending-assistant-response:",{error:x(a)})}let K=null;try{let b=(0,d.getMessages)(a,c,{limit:1,cliToolId:p,instanceId:D,matchResolvedInstance:!0});b.length>0&&"user"===b[0].role&&b[0].content===k&&(K=b[0].id)}catch(a){w.error("failed-to-detect-orphaned-messages:",{error:x(a)})}async function L(){try{let{inputStartedAt:a}=await (0,u.x1)(M,b.onInputStart,b.inputBoundary);return{sent:!0,inputStartedAt:a}}catch(b){if(w.error("failed-to-send-message-to:",{error:x(b)}),(0,u.fi)(b))return{error:b,failure:{state:"not-sent",reason:"relay-reservation-lost"}};let a=(0,q.Nq)(b);return"submit-unconfirmed"===a.reason&&await z(c,p,t,k)&&(a={state:"indeterminate",reason:"composer-residue"}),{error:b,failure:a}}}async function M(){A?(0,f._J)(E)?await E.sendMessageWithImage(c,k,A,t):await E.sendMessage(c,(0,v.TZ)(k,A),t):await E.sendMessage(c,k,t)}let N=s.wn.has(p)?await (0,u.hC)(G,()=>L()).catch(a=>({error:a,failure:(0,q.Nq)(a)})):await L();if(!("sent"in N)){let{error:a,failure:b}=N;return(F(b.state,b.reason),"prompt-waiting"===b.reason)?{ok:!1,stage:"prompt_waiting",error:(0,n.br)(c)}:(0,o.wQ)(a)?{ok:!1,stage:"send",error:a.message,code:o.M7}:{ok:!1,stage:"send",error:x(a)}}F("sent","submitted");let O=N.inputStartedAt,P=null!==O&&O.getTime()>J.getTime()?O:J,Q=(0,d.createMessage)(a,{worktreeId:c,role:"user",content:k,messageType:C,timestamp:P,cliToolId:p,instanceId:t,requestId:b.requestId});try{(0,i.broadcastMessage)("message",{worktreeId:c,message:{...Q,cliToolId:p,instanceId:D}})}catch(a){w.warn("user-message-broadcast-failed",{error:x(a)})}if(K)try{if((0,d.deleteMessageById)(a,K)){w.info("cleaned-up-orphaned-user");try{(0,i.broadcastMessage)(j.dz,{worktreeId:c,cliToolId:p,instanceId:D,reason:"orphan_cleanup"})}catch(a){w.warn("orphan-cleanup-broadcast-failed",{error:x(a)})}}}catch(a){w.error("failed-to-clean-up-orphaned-message:",{error:x(a)})}return(0,d.updateLastUserMessage)(a,c,k,P),(0,d.clearInProgressMessageId)(a,c,p,t),w.info("cleared-in-progress-message"),(0,g.startPolling)(c,p,t),{ok:!0,message:Q}}},58707:(a,b,c)=>{c.d(b,{$n:()=>k,a3:()=>l,br:()=>m});var d=c(8360),e=c(31990),f=c(95595),g=c(34405),h=c(72626),i=c(30008);let j=(0,h.h)("prompt-waiting-guard"),k="PROMPT_WAITING";async function l(a,b,c,h){try{let k=d.CLIToolManager.getInstance().getTool(b);if(!await k.isRunning(a,c))return{waiting:!1};let l=await (0,e.Wh)(a,b,g._,c),m=(0,f.WC)(l,b),n=(0,i._G)({worktreeId:a,cliToolId:b,instanceId:c,scraper:{status:m.status,reason:m.reason,hasActivePrompt:m.hasActivePrompt},ignoreStructured:h?.ignoreStructured});if(!n.blocksSend)return null!==n.structuredSendBlockSuppressed&&j.info("structured-send-guard-not-applied",{worktreeId:a,cliToolId:b,instanceId:c,suppressed:n.structuredSendBlockSuppressed,promptWaitingSince:n.structured?.at??null}),{waiting:!1};return{waiting:!0,reason:n.blockReason??void 0,blockedBy:n.blockedBy??void 0}}catch(c){return j.warn("prompt-waiting-check-failed",{worktreeId:a,cliToolId:b,error:c instanceof Error?c.message:String(c)}),{waiting:!1}}}function m(a,b){let c=`${a} is waiting on a prompt. Sending now would type into the prompt's input line instead of reaching the agent, and would leave that text in place for the next answer. Answer the prompt first: \`commandmate respond ${a} <answer>\`.`;if("structured"!==b)return c;let d=Math.round(i.j0/6e4);return`${c} This dialog was reported by the agent's own hooks and is not visible to the terminal scraper, so if the pane looks idle the record has outlived its dialog: it stops blocking sends ${d} minutes after it was reported, or immediately with \`commandmate send ${a} <message> --ignore-structured-prompt\` (server-wide: ${i.F1}=off).`}},85775:(a,b,c)=>{c.d(b,{Tm:()=>p,x4:()=>n,xJ:()=>o});var d=c(34129),e=c(8360),f=c(88807),g=c(72626),h=c(87374),i=c(39687),j=c(36925);let k=(0,g.h)("timer-manager");function l(){return(0,j.v)("__timerManagerState",()=>({timers:new Map,timerWorktrees:new Map,initialized:!1}))}async function m(a){let b=l(),c=(0,f.getDbInstance)();try{let b=(0,d.kx)(c,a);if(!b||"pending"!==b.status)return;let f=e.CLIToolManager.getInstance().getTool(b.cliToolId),g=b.instanceId,j=await f.isRunning(b.worktreeId,g),l=(0,d.kx)(c,a);if(!l||"pending"!==l.status)return;if(!j){k.warn("timer:no-session",{timerId:a,worktreeId:b.worktreeId,instanceId:g}),(0,d.j2)(c,a,h.HR.NO_SESSION);return}(0,d.j2)(c,a,"sending");let m=await (0,i.d)(c,{worktreeId:b.worktreeId,content:b.message,cliToolId:b.cliToolId,instanceId:g});if(!m.ok){let b=`[${m.stage}] ${m.error}`;(0,d.j2)(c,a,"failed",void 0,b),k.error("timer:send-failed",{timerId:a,stage:m.stage,error:m.error});return}(0,d.j2)(c,a,"sent",Date.now()),k.info("timer:sent",{timerId:a,worktreeId:b.worktreeId})}catch(e){let b=e instanceof Error?e.message:String(e);try{(0,d.j2)(c,a,"failed",void 0,b)}catch{}k.error("timer:send-failed",{timerId:a,error:b})}finally{b.timers.delete(a),b.timerWorktrees.delete(a)}}function n(a,b,c){let d=l(),e=setTimeout(()=>{m(a)},c);d.timers.set(a,e),d.timerWorktrees.set(a,b)}function o(a){let b=l(),c=b.timers.get(a);c&&(clearTimeout(c),b.timers.delete(a),b.timerWorktrees.delete(a));let e=(0,f.getDbInstance)();(0,d.Ud)(e,a)}function p(a){let b=l(),c=(0,f.getDbInstance)();for(let[c,d]of b.timerWorktrees)if(d===a){let a=b.timers.get(c);a&&clearTimeout(a),b.timers.delete(c),b.timerWorktrees.delete(c)}(0,d.$$)(c,a)}},95220:(a,b,c)=>{c.r(b),c.d(b,{accumulateTuiContent:()=>g.IZ,cleanClaudeResponse:()=>f.NN,cleanCopilotResponse:()=>f.LH,cleanGeminiResponse:()=>f.IS,cleanOpenCodeResponse:()=>f.aW,clearPromptHashCache:()=>h.iX,clearTuiAccumulator:()=>g.q1,extractCopilotContentLines:()=>g.o0,extractTuiContentLines:()=>g.K0,findOverlapIndex:()=>g.vQ,getAccumulatedContent:()=>g.Uz,getActivePollers:()=>d.KQ,initTuiAccumulator:()=>g.tb,isDuplicatePrompt:()=>h.gv,isOpenCodeComplete:()=>e.bE,migrateResponsePollerWorktreeIds:()=>d.sR,normalizeCopilotLine:()=>g.IW,normalizePromptForDedup:()=>h.zm,renamePromptHashCacheKey:()=>h.i2,resolveExtractionStartIndex:()=>e.QM,startPolling:()=>d.g8,stopAllPolling:()=>d.fq,stopPolling:()=>d.Et,truncateMessage:()=>f.Sj});var d=c(45146),e=c(60),f=c(82450),g=c(13033),h=c(72457)}};
@@ -1,4 +0,0 @@
1
- "use strict";exports.id=6808,exports.ids=[6808],exports.modules={640:(a,b,c)=>{function d(a){return`[from ${a.alias} / ${a.worktreeId}]`}function e(a,b,c=null){let f=b.trim();return null!==c?`${d(a)}
2
- ${c}
3
- ${""===f?"(no reply body)":f}`:""===f?`${d(a)} (no reply body)`:`${d(a)} ${f}`}c.d(b,{Hr:()=>j,KA:()=>l,Nl:()=>n,Py:()=>g,z0:()=>e});let f={en:"Note: this reply may have been processed in the same turn as another request (overlap={overlap}).",ja:"注意: この返答は、別の依頼と同じターンで処理された可能性があります(overlap={overlap})。"};function g(a,b){return null===b||"none"===b?null:`[CommandMate relay] ${f[a].replace("{overlap}",b)}`}function h(a,b){let c=a.replace(/\s+/g," ").trim();return c.length<=b?c:`${c.slice(0,b-1)}…`}let i={en:{waiting:"is waiting for a confirmation:",options:"Options:",more:"(+{n} more)"},ja:{waiting:"確認待ちです:",options:"選択肢:",more:"(他 {n} 件)"}};function j(a,b,c){let e=i[a],f=`${d(b)} ${e.waiting} ${h(c.question,200)}`;if(0===c.options.length)return f;let g=c.options.slice(0,9),j=c.options.length-g.length,k=g.map(a=>`${a.key}) ${h(a.label,60)}`).join(" "),l=j>0?` ${e.more.replace("{n}",String(j))}`:"";return`${f}
4
- ${e.options} ${k}${l}`}let k={en:"The reply you were waiting for did not arrive within {hours}h; the relay has expired.",ja:"待っていた返信が {hours} 時間以内に届かなかったため、委任は期限切れになりました。"};function l(a,b,c){let e=Math.max(1,Math.round(c/36e5));return`${d(b)} ${k[a].replace("{hours}",String(e))}`}let m={en:{requested:"Delegated to {alias}; waiting for the reply.",replied:"Reply from {alias}.",waiting:"{alias} is waiting for a confirmation.",expired:"The delegation to {alias} expired without a reply."},ja:{requested:"{alias} へ委任、返信待ち",replied:"{alias} から返信",waiting:"{alias} が確認待ち",expired:"{alias} への委任が返信のないまま期限切れ"}};function n(a,b,c,d={}){let e=m[a][b].replace("{alias}",c),f=[];return d.overlap&&f.push(`overlap=${d.overlap}`),d.holdReason&&f.push(`hold=${d.holdReason}`),0===f.length?e:`${e} (${f.join(", ")})`}},3421:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},7329:(a,b,c)=>{c.d(b,{Hv:()=>o,W3:()=>m,uK:()=>n});var d=c(69198),e=c(52660),f=c(18201),g=c(25539),h=c(23854),i=c(85016),j=c(49798),k=c(67164);let l=(0,c(72626).h)("relay-service");function m(a,b){for(let c of[b.from.worktreeId,b.to.worktreeId])if(!(0,j.r)(a,c))return{ok:!1,refusal:{code:"RELAY_WORKTREE_NOT_FOUND",message:`Worktree '${c}' not found`,worktreeId:c}};let c=(0,h.$G)({from:b.from,to:b.to,parentHops:function(a,b){try{let g=(0,j.S)(a,b),h=(0,e.getMessages)(a,b.worktreeId,{limit:5,limitUnit:"pairs",cliToolId:g.cliToolId,instanceId:b.instanceId,matchResolvedInstance:!0}).filter(a=>"user"===a.role),i=h.findIndex(a=>"relay"===a.messageType);if(-1===i)return null;let k=h[i];for(let a=0;a<i;a+=1){var c;if(c=h[a],c.timestamp.getTime()<k.timestamp.getTime()||(0,f.pk)(c.content)!==(0,f.pk)(k.content))return null}let l=(0,e.parseRelayRequestId)(k.requestId);if(!l)return null;return(0,d.Ip)(a,l)?.hops??null}catch(a){return l.warn("relay-parent-lookup-failed",{worktreeId:b.worktreeId,instanceId:b.instanceId,error:a instanceof Error?a.message:String(a)}),null}}(a,b.from),allowRelayChain:!0===b.allowRelayChain,openBetween:(0,d.Oz)(a,b.from,b.to)});if((0,h.Qe)(c))return{ok:!1,refusal:c};let g=b.now??Date.now(),i=(0,d.CR)(a,{from:b.from,to:b.to,hops:c.hops,expiresAt:g+(0,h.AL)(b.ttlMs),now:g,bindMode:!0===b.bind?"bound":"legacy"});return l.info("relay-opened",{relayId:i.id,from:`${i.from.worktreeId}/${i.from.instanceId}`,to:`${i.to.worktreeId}/${i.to.instanceId}`,hops:i.hops,bindMode:i.bindMode}),(0,k._)(a,i.id,"requested",(0,j.S)(a,i.from),(0,j.S)(a,i.to),g),{ok:!0,relay:i}}function n(a,b,c=Date.now()){let e=(0,d.Ip)(a,b);return e?(0,g.Lo)(e.state)&&(0,i.p5)(b)?{ok:!1,reason:"delivering",relay:e}:(0,d.m_)(a,b,c)?(l.info("relay-cancelled",{relayId:b}),{ok:!0,relay:(0,d.Ip)(a,b)??e}):{ok:!1,reason:"already_closed",relay:e}:{ok:!1,reason:"not_found",relay:null}}function o(a,b){return(0,d.M4)(a,b)}},18201:(a,b,c)=>{c.d(b,{Ce:()=>i,pk:()=>g});var d=c(72626),e=c(85038);let f=(0,d.h)("lib/history/user-turn-recorder");function g(a){return a.replace(/\r\n?/g,"\n").split("\n").map(a=>a.replace(/[ \t ]+$/u,"")).join("\n").trim()}function h(a){return{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId}}async function i(a,b,d,j,k={}){let l=a.instanceId??a.cliToolId,m=g(d);if(0===b.length||0===m.length)return{outcome:"skipped",messageId:null,timestampMs:null};try{let[{getDbInstance:i},n,{broadcastMessage:o}]=await Promise.all([Promise.resolve().then(c.bind(c,88807)),Promise.resolve().then(c.bind(c,52660)),Promise.resolve().then(c.bind(c,43015))]),p=i(),q=n.findMessageByRequestId(p,a.worktreeId,b);if(q)return{outcome:"already-recorded",messageId:q.id,timestampMs:q.timestamp.getTime()};if(!(0,e.fp)(a))return f.info("user-turn-record-refused",{...h(a),requestId:b,generation:(0,e.Bh)()?.generation}),{outcome:"refused",messageId:null,timestampMs:null};let r=j>0?j:Date.now(),s=function(a,b,c,d,e,i,j,k){var l,m,n;let o=Math.min(j-12e4,k.adoptionFromMs??1/0),p=(l=a.findUnkeyedUserMessages(b,{worktreeId:c.worktreeId,cliToolId:c.cliToolId,instanceId:d,fromMs:o,toMs:j+12e4,includeRelayDelivered:!0}),m=i,n=j,l.filter(a=>g(a.content)===m).sort((a,b)=>Math.abs(a.timestamp.getTime()-n)-Math.abs(b.timestamp.getTime()-n)));for(let d of p)if(!d.requestId&&a.setMessageRequestId(b,d.id,e))return f.info("user-turn-adopted",{...h(c),requestId:e,messageId:d.id,driftMs:d.timestamp.getTime()-j}),{outcome:"adopted",messageId:d.id,timestampMs:d.timestamp.getTime()};let q=p.find(a=>a.requestId);return q?(f.info("user-turn-already-relayed",{...h(c),requestId:e,messageId:q.id,relayRequestId:q.requestId??null,driftMs:q.timestamp.getTime()-j}),{outcome:"already-recorded",messageId:q.id,timestampMs:q.timestamp.getTime()}):null}(n,p,a,l,b,m,r,k);if(s)return s;let t=n.createMessage(p,{worktreeId:a.worktreeId,role:"user",content:d,messageType:"normal",timestamp:new Date(r),cliToolId:a.cliToolId,instanceId:l,requestId:b});return o("message",{worktreeId:a.worktreeId,message:t}),f.info("user-turn-recorded",{...h(a),requestId:b,contentLength:d.length}),{outcome:"inserted",messageId:t.id,timestampMs:r}}catch(c){return f.error("user-turn-record-failed",{...h(a),requestId:b,error:c instanceof Error?c.message:String(c)}),{outcome:"failed",messageId:null,timestampMs:null}}}},49798:(a,b,c)=>{c.d(b,{S:()=>h,r:()=>i});var d=c(28274),e=c(73753),f=c(83530);let g=(0,c(72626).h)("relay-session-ref");function h(a,b){let c="claude",e=b.instanceId;try{c=(0,f.iK)(a,b.worktreeId,{instanceId:b.instanceId}).cliToolId;let g=(0,d.BN)(a,b.worktreeId,b.instanceId);g?.alias&&(e=g.alias)}catch(a){g.warn("relay-session-resolve-failed",{worktreeId:b.worktreeId,instanceId:b.instanceId,error:a instanceof Error?a.message:String(a)})}return{worktreeId:b.worktreeId,instanceId:b.instanceId,cliToolId:c,alias:e}}function i(a,b){try{return null!==(0,e.getWorktreeById)(a,b)}catch{return!1}}},67164:(a,b,c)=>{c.d(b,{_:()=>i});var d=c(52660),e=c(55233),f=c(43015),g=c(640);let h=(0,c(72626).h)("relay-system-line");function i(a,b,c,j,k,l=Date.now(),m={}){let n=`${d.RELAY_SYSTEM_REQUEST_ID_PREFIX}${b}:${c}`;try{if((0,d.findMessageByRequestId)(a,j.worktreeId,n))return!1;let i=(0,e.dV)(a),o=(0,d.createRelaySystemMessage)(a,{worktreeId:j.worktreeId,cliToolId:j.cliToolId,instanceId:j.instanceId,content:(0,g.Nl)(i,c,k.alias,m),relayId:b,kind:c,at:l});try{(0,f.broadcastMessage)("message",{worktreeId:j.worktreeId,message:{...o,cliToolId:j.cliToolId,instanceId:j.instanceId}})}catch(a){h.warn("relay-system-line-broadcast-failed",{relayId:b,kind:c,error:a instanceof Error?a.message:String(a)})}return!0}catch(a){return h.warn("relay-system-line-failed",{relayId:b,kind:c,error:a instanceof Error?a.message:String(a)}),!1}}},83530:(a,b,c)=>{c.d(b,{FH:()=>l,fV:()=>k,iK:()=>i,y4:()=>h});var d=c(73753),e=c(28274),f=c(15194);let g="claude",h="instance_tool_conflict";function i(a,b,c={}){let{instanceId:d,requestedCliTool:g}=c;if(!d)return g?{cliToolId:g,instanceId:g,resolvedBy:"explicit"}:j(a,b,void 0);let h=(0,e.BN)(a,b,d);if(h&&(0,f.hR)(h.cliTool)){let a={cliToolId:h.cliTool,instanceId:d,resolvedBy:"roster"};return g&&g!==h.cliTool&&(a.conflict={instanceId:d,rosterCliTool:h.cliTool,requestedCliTool:g}),a}return g?(0,f.hR)(d)&&g!==d?{cliToolId:d,instanceId:d,resolvedBy:"primary",conflict:{instanceId:d,rosterCliTool:d,requestedCliTool:g,primaryAnchor:!0}}:{cliToolId:g,instanceId:d,resolvedBy:"explicit"}:(0,f.hR)(d)?{cliToolId:d,instanceId:d,resolvedBy:"primary"}:j(a,b,d)}function j(a,b,c){let e=(0,d.getWorktreeById)(a,b),h=e?.cliToolId;return h&&(0,f.hR)(h)?{cliToolId:h,instanceId:c??h,resolvedBy:"worktree-default"}:{cliToolId:g,instanceId:c??g,resolvedBy:"fallback"}}function k(a,b,c={}){let d=i(a,b,c);return d.conflict?{ok:!1,error:h,conflict:d.conflict}:{ok:!0,target:d}}function l(a){return a.primaryAnchor?`Agent instance '${a.instanceId}' is the primary instance of ${a.rosterCliTool}, but ${a.requestedCliTool} was requested. Omit the agent, pass ${a.rosterCliTool}, or target a ${a.requestedCliTool} instance instead.`:`Agent instance '${a.instanceId}' is registered as ${a.rosterCliTool}, but ${a.requestedCliTool} was requested. Omit the agent, pass ${a.rosterCliTool}, or update the instance's roster entry.`}},85016:(a,b,c)=>{c.d(b,{dJ:()=>f,o5:()=>e,p5:()=>g});let d=(0,c(36925).v)("__relayDeliveryClaims",()=>new Set);function e(a){d.add(a)}function f(a){d.delete(a)}function g(a){return d.has(a)}},95736:(a,b,c)=>{a.exports=c(44870)}};
@@ -1,2 +0,0 @@
1
- "use strict";exports.id=7604,exports.ids=[7604],exports.modules={15044:(a,b,c)=>{c.d(b,{Dd:()=>z,Z1:()=>C,IW:()=>t,qM:()=>E,r0:()=>A,cY:()=>B,nP:()=>w,lm:()=>D,ic:()=>r,W5:()=>s});var d=c(24455),e=c(72626),f=c(91631),g=c(84297),h=c(91227);function i(a){return(0,f.j0)((0,f.Ev)((0,d.v7)(a.worktreeId,a.cliToolId,a.instanceId)))}function j(a,b){let c=i(a),d=(0,f.Bf)(a.worktreeId,a.cliToolId,a.instanceId,b);return null===d?{kind:"unattributed",generation:c,lastClosedTurnId:null}:null===d.closedAt&&null!==d.openedAt?{kind:"turn",generation:c,turnId:d.turnId}:null===d.closedAt&&(0,f.sp)(d,b)>0?{kind:"dialog-only",generation:c,recordTurnId:d.turnId,sessionId:d.sessionId}:{kind:"unattributed",generation:c,lastClosedTurnId:d.turnId}}var k=c(36261);function l(a,b){return"none"===a.kind||"none"===b.kind?a.kind===b.kind:a.at===b.at}let m={action:"none"},n=a=>({action:"close",reason:a});function o(a){return"none"===a.kind?null:a.turnId}let p=new Set(["opened","stopped","stop-without-turn","session-ended"]);var q=c(36925);function r(a,b,c){return{generation:i({worktreeId:a,cliToolId:b,instanceId:c}),version:(0,k.cx)(a,b,c)}}function s(a){let b=`${a}${d.CS}`,c=(0,k.fK)(a),e=new Map;for(let[a,c]of f.ZG)a.startsWith(b)&&e.set(a,c);return{startFor(b,g){let h=(0,d.v7)(a,b,g);return{generation:(0,f.j0)(e.get(h)??null),version:c.get(h)??0}}}}async function t(a){var b;let c={meta:null},d=Date.now();return{frame:await (0,q.v)("__captureFrameMetaSink",()=>new g.AsyncLocalStorage).run(a=>{c.meta=a},a),frameTime:(b=c.meta,null===b?{frameCapturedAt:0,frameFetchedAfterStart:!1}:{frameCapturedAt:Math.min(b.fetchStartedAt,d),frameFetchedAfterStart:"fetched"===b.source&&b.fetchStartedAt>=d})}}function u(a,b){return{kind:"screen",generation:a,originTurnId:b}}function v(a,b,c){return!0===a.freshPrompt&&null!=a.lastAnswer&&a.lastAnswer.episodeId===b.episodeId&&null!==c&&c!==a.lastAnswer.screenKey}function w(a){var b;let c=a.now??Date.now(),d={worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId},e=(0,k._v)(a.worktreeId,a.cliToolId,a.instanceId),f=i(d),g={observation:a,action:"ignored",episodeId:e?.episodeId??null,since:"waiting"===a.reading.kind?e?.since??null:null,next:null,binding:null,closeReason:null,ignoredBecause:null,at:c},m=a=>({...g,action:"ignored",ignoredBecause:a});if(!l(a.start.generation,f))return m("generation");let n=a.start.version!==(0,k.cx)(a.worktreeId,a.cliToolId,a.instanceId)&&!0!==a.freshPrompt,{reading:o}=a;if("waiting"!==o.kind){if(null===e)return m("nothing-open");if("unknown"===o.kind)return m("unknown-frame");let b=function(a,b){let{reading:c}=a;if("gone"===c.kind)return"session-gone";if("not-waiting"!==c.kind)return null;switch(a.observer){case"status-probe":return"screen-cleared";case"response-checker":return"response-recorded";case"auto-yes-poller":if("screen"===b.binding.kind)return a.frameCapturedAt>Math.max(b.openedAt,b.boundAt)?"screen-cleared":null;return null!=a.lastAnswer&&a.lastAnswer.episodeId===b.episodeId?"poller-answered":null;default:return a.observer,null}}(a,e);return null===b?m("not-this-observer"):n?m("version"):{...g,action:"closed",closeReason:b,since:null}}let p=null!==o.promptData?(0,h.c)(o.promptData):null,q=j(d,c),r=o.humanHeld?u(f,"turn"===q.kind?q.turnId:null):q,s=function(a,b,c,d,e,f){if(null===b)return{action:"opened",binding:d};let g=b.binding;if(!l(g.generation,f))return{action:"replaced",binding:d};if(c)return"screen"===g.kind?{action:"kept"}:{action:"rebound",binding:u(f,"turn"===g.kind?g.turnId:null)};switch(g.kind){case"turn":if("turn"===d.kind&&d.turnId===g.turnId)return v(a,b,e)?{action:"replaced",binding:d}:{action:"kept"};if("turn"===d.kind)return{action:"replaced",binding:d};return!0===a.freshPrompt&&null!==e&&e!==b.promptScreenKey?{action:"replaced",binding:d}:{action:"kept"};case"dialog-only":if("turn"===d.kind)return{action:"rebound",binding:d};if("dialog-only"===d.kind&&d.recordTurnId!==g.recordTurnId)return{action:"replaced",binding:d};return{action:"kept"};case"unattributed":if("unattributed"===d.kind)return v(a,b,e)?{action:"replaced",binding:d}:{action:"kept"};if("dialog-only"===d.kind)return{action:"rebound",binding:d};return null!==e&&e===b.promptScreenKey?{action:"rebound",binding:d}:{action:"replaced",binding:d};case"screen":return"turn"===d.kind&&d.turnId===g.originTurnId?{action:"rebound",binding:d}:{action:"replaced",binding:d};default:return{action:"kept"}}}(a,e,o.humanHeld,r,p,f);if("kept"===s.action)return{...g,action:"kept"};if(n)return m("version");let t=(0,k._0)(a.worktreeId,a.cliToolId,a.instanceId),w=!0===a.frameFetchedAfterStart&&a.start.version===(0,k.cx)(a.worktreeId,a.cliToolId,a.instanceId);if(null!==t&&!w&&a.frameCapturedAt<=t.at&&(null===p||p===t.promptScreenKey))return m("stale-frame");if("rebound"===s.action)return null!==e&&function(a,b){if(a.kind!==b.kind)return!1;switch(a.kind){case"turn":return a.turnId===b.turnId;case"dialog-only":return a.recordTurnId===b.recordTurnId;default:return!0}}(e.binding,s.binding)?{...g,action:"kept"}:{...g,action:"rebound",binding:s.binding};let x=s.binding,y=o.structuredSince,z="opened"===s.action||null===e?y??c:null!==y&&y>e.since?y:c,A={since:z,kind:o.waitingKind,binding:x,openedBy:a.observer,promptScreenKey:p};return{...g,action:s.action,since:z,next:A,closeReason:"replaced"===s.action&&null!==e?(b=e.binding,l(b.generation,f)?"turn"===x.kind||"dialog-only"===x.kind?"turn-superseded":"screen-cleared":"generation"):null}}let x=(0,e.h)("waiting-episode-binding"),y=(0,q.v)("__waitingHookStopGeneration",()=>new Map);function z(a,b,c=Date.now()){let e=[];try{let f=(0,d.v7)(a.worktreeId,a.cliToolId,a.instanceId);for(let d of b){("stopped"===d.kind||"stop-without-turn"===d.kind)&&y.set(f,d.generation);let b=(0,k._v)(a.worktreeId,a.cliToolId,a.instanceId);if(null===b){e.push({outcome:d.kind,action:"none",episodeId:null});continue}let g=function(a,b,c){if("generation-fenced"===a.kind)return"session-start"===a.source&&"screen"===b.kind?l(b.generation,a.generation)?m:{action:"rebind",binding:{...b,generation:a.generation}}:l(b.generation,a.generation)?m:n("generation");if(!l(b.generation,c))return p.has(a.kind)?n("generation"):m;switch(a.kind){case"opened":return function(a,b){let{previous:c,turnId:d,event:e}=a,f={kind:"turn",generation:a.generation,turnId:d};if("screen"===b.kind)return m;if("turn"===b.kind&&b.turnId===d)return{action:"unmatched"};let g=o(c),h="dialog-only"===c.kind||"display-only"===c.kind,i="dialog-only"===b.kind&&b.recordTurnId===g;return"open-same-session"===c.kind||"open-other-session"===c.kind?i?{action:"unmatched"}:n("turn-superseded"):"user_prompt_submit"===e||"turn"===b.kind?n("turn-superseded"):"dialog-only"===b.kind?i?h?{action:"rebind",binding:f}:{action:"unmatched"}:n("turn-superseded"):b.lastClosedTurnId===g?{action:"rebind",binding:f}:n("turn-superseded")}(a,b);case"restored":return"turn"===b.kind&&b.turnId===a.discardedTurnId?{action:"rebind",binding:{...b,turnId:a.restoredTurnId}}:m;case"stopped":return"turn"===b.kind&&b.turnId===a.turnId?n("turn-stop"):m;case"stop-without-turn":let{previous:d}=a,e=o(d);switch(d.kind){case"closed":if("turn"===b.kind&&b.turnId===e||"unattributed"===b.kind&&b.lastClosedTurnId===e)return n("turn-stop");if("dialog-only"===b.kind&&b.recordTurnId===e)return{action:"unmatched"};return m;case"dialog-only":if("dialog-only"===b.kind&&b.recordTurnId===e||"unattributed"===b.kind)return n("turn-stop");return m;case"display-only":case"none":if("dialog-only"===b.kind&&b.recordTurnId===e||"unattributed"===b.kind&&b.lastClosedTurnId===e)return n("turn-stop");return m;default:return{action:"unmatched"}}case"session-ended":return"turn"===b.kind&&b.turnId===a.turnId?n("turn-session-end"):m;case"decision-opened":return"dialog-only"===a.recordKind&&"unattributed"===b.kind?{action:"rebind",binding:{kind:"dialog-only",generation:c,recordTurnId:a.recordTurnId,sessionId:null}}:m;case"decision-answered":return 0===a.before||a.remaining>0?m:"turn"===b.kind&&b.turnId===a.recordTurnId||"dialog-only"===b.kind&&b.recordTurnId===a.recordTurnId?n("decision-settled"):m;default:return m}}(d,b.binding,i(a));e.push(function(a,b,c,d,e){let f={outcome:c.kind,episodeId:b.episodeId};if("close"===d.action){let g=(0,k._W)(a,b.episodeId,d.reason,e);return g&&x.info("waiting-episode-closed-by-turn",{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId,episodeId:b.episodeId,outcome:c.kind,reason:d.reason}),{...f,action:g?"closed":"none",...g?{reason:d.reason}:{}}}if("rebind"===d.action){let g=(0,k.Uh)(a,b.episodeId,d.binding,e);return g&&x.debug("waiting-episode-rebound",{worktreeId:a.worktreeId,instanceId:a.instanceId??a.cliToolId,episodeId:b.episodeId,outcome:c.kind,binding:d.binding.kind}),{...f,action:g?"rebound":"none"}}return"unmatched"===d.action&&x.warn("waiting-episode-unmatched",{worktreeId:a.worktreeId,instanceId:a.instanceId??a.cliToolId,episodeId:b.episodeId,outcome:c.kind,binding:b.binding.kind}),{...f,action:"none"}}(a,b,d,g,c))}}catch(b){x.warn("waiting-episode-turn-sync-failed",{worktreeId:a.worktreeId,instanceId:a.instanceId??a.cliToolId,error:b instanceof Error?b.message:String(b)})}return e}function A(a){let b=a.observation,c={worktreeId:b.worktreeId,cliToolId:b.cliToolId,instanceId:b.instanceId};try{switch(a.action){case"kept":if(null===a.episodeId||"waiting"!==b.reading.kind)return"ignored";return(0,k.jG)(c,a.episodeId,b.reading.waitingKind)?"kept":"ignored";case"opened":if(null===a.next||null!==(0,k._v)(b.worktreeId,b.cliToolId,b.instanceId))return"ignored";return(0,k.M_)(c,a.next,a.at),"opened";case"replaced":if(null===a.next||null===a.episodeId||null===a.closeReason)return"ignored";return null!==(0,k.yk)(c,a.episodeId,a.next,a.closeReason,a.at)?"replaced":"ignored";case"rebound":if(null===a.binding||null===a.episodeId)return"ignored";return(0,k.Uh)(c,a.episodeId,a.binding,a.at)?"rebound":"ignored";case"closed":if(null===a.episodeId||null===a.closeReason)return"ignored";return(0,k._W)(c,a.episodeId,a.closeReason,a.at)?"closed":"ignored";case"ignored":return("version"===a.ignoredBecause||"stale-frame"===a.ignoredBecause||"generation"===a.ignoredBecause)&&x.debug("waiting-observation-ignored",{worktreeId:b.worktreeId,instanceId:b.instanceId??b.cliToolId,observer:b.observer,reading:b.reading.kind,because:a.ignoredBecause}),"ignored";default:return a.action,"ignored"}}catch(a){return x.warn("waiting-observation-failed",{worktreeId:b.worktreeId,instanceId:b.instanceId??b.cliToolId,observer:b.observer,error:a instanceof Error?a.message:String(a)}),"ignored"}}function B(a){let b=w(a),c=A(b);return c===b.action?b:{...b,action:c}}function C(a,b,c){return{generation:i({worktreeId:a,cliToolId:b,instanceId:c}),episodeId:(0,k._v)(a,b,c)?.episodeId??null}}function D(a,b,c,e,f=Date.now()){try{let g={worktreeId:a,cliToolId:b,instanceId:c},h=(0,d.v7)(a,b,c),j=(0,k._v)(a,b,c);if(null===j)return"nothing-open";let m=i(g);if(null===e.episodeId||j.episodeId!==e.episodeId||!l(e.generation,m))return"target-gone";let n=y.get(h);if(void 0!==n&&l(n,m))return"hook-authority";if("screen"===j.binding.kind)return"screen";return(0,k._W)(g,j.episodeId,"legacy-stop",f)?"closed":"target-gone"}catch(d){return x.warn("waiting-episode-legacy-stop-failed",{worktreeId:a,instanceId:c??b,error:d instanceof Error?d.message:String(d)}),"nothing-open"}}function E(){y.clear()}(0,k.O_)(j),(0,f.i1)((a,b)=>{z(a,b)})},24581:(a,b,c)=>{c.d(b,{Cb:()=>f,Mu:()=>g,RY:()=>j,Tt:()=>i,Ui:()=>q,Xq:()=>m,ZV:()=>t,h_:()=>h,jF:()=>r,kT:()=>p,nY:()=>l,qX:()=>s,wt:()=>o});var d=c(62887),e=c(27870);let f=new Set(["user_prompt_submit","pre_tool_use","post_tool_use"]),g=18e5,h={predicted:2e4,confirmed:18e5},i=3,j=16,k={turnId:null,openedAt:null,closedAt:null,closedBy:null};function l(a){return null===a?k:{turnId:a.turnId,openedAt:a.openedAt,closedAt:a.closedAt,closedBy:a.closedBy}}function m(a){if("string"!=typeof a||0===a.length||a.length>128)return null;for(let b=0;b<a.length;b++){let c=a.charCodeAt(b);if(c<32||127===c)return null}return a}function n(a,b){return"string"!=typeof a||""===a?null:a.slice(0,b)}function o(a){return n(a,e.lY)}function p(a){return n(a,d.h9)}function q(a){if(!Array.isArray(a))return null;let b=[];for(let c of a)if("string"==typeof c&&""!==c&&(b.push(c.slice(0,200)),b.length>=8))break;return b.length>0?b:null}function r(a,b){let c=null===a.confirmedAt?h.predicted:h.confirmed;return b-a.at<c}function s(a,b,c){return null!==b&&c-a.at>=1e3*b}function t(a,b){return null===a.sessionId||null===b||a.sessionId===b}},26547:(a,b,c)=>{c.d(b,{Yz:()=>L,jw:()=>J});var d=c(51297),e=c(42422);let f=["minimal","low","medium","high","xhigh","max","ultra","persistent"];function g(){return{model:null,effort:null}}let h=/^[A-Za-z0-9][A-Za-z0-9._:@/-]*$/,i=/^[A-Za-z0-9][A-Za-z0-9 .()[\]_:@/-]*$/;function j(a){return a.length>0&&a.length<=64&&h.test(a)}function k(a){return a.length>0&&a.length<=64&&i.test(a)}function l(a,b={}){let c=a.trim().toLowerCase();if(""===c)return null;if(f.includes(c))return c;if(!b.allowTruncated||c.length<2)return null;let d=f.filter(a=>a.length===c.length+1&&a.startsWith(c));return 1===d.length?d[0]:null}let m=/^\s*([^\s·]+)(?:\s+(minimal|low|medium|high|xhigh|max|ultra|persistent)\b)?/i,n=/^\s*[^\s·]+\s+[A-Za-z][A-Za-z_-]*(?=\s|$)/,o=/^\s*\S[^·]*·\s*~?\/\S*(?:\s*·[^\n]*|[^\S\n]{2,}\S[^\n]*)$/;function p(a){if(!e.aW.test(a)&&!o.test(a))return null;let b=a.indexOf("\xb7");if(b<0)return null;let c=a.slice(0,b),d=m.exec(c);if(!d)return null;let f=d[1];if(!j(f))return null;let g=d[2]?l(d[2]):null;return null!==g||/\d/.test(f)?null===g&&n.test(c)?{model:f,effort:null,effortUnreadable:!0}:{model:f,effort:g}:null}let q=/^\s*[\u2500-\u259F][\s\u2500-\u259F]*(\S[^\u2500-\u259F]*?)\s+with\s+(minimal|low|medium|high|xhigh)\s+effort\b/i,r=/^\s*[\u2500-\u259F][\s\u2500-\u259F]*(\S[^\u2500-\u259F·]*?)\s+·\s+Claude\s+[A-Za-z]+\b/,s=/^\s*\S\s+([A-Za-z]+)\s+·\s+\/effort\s*$/;function t(a){let b=q.exec(a);if(b){let a=b[1].trim();return k(a)?{model:a,effort:l(b[2])}:null}let c=r.exec(a);if(!c)return null;let d=c[1].trim();return/\swith\s/i.test(d)||!k(d)?null:{model:d,effort:null}}function u(a){let b=s.exec(a);if(!b)return null;let c=l(b[1]);return null===c?null:{model:null,effort:c}}let v=/^\s*⎿\s+(?:Set model to|Kept model as)\s+(?!(?:and saved as your default|for this session only)\b)([A-Za-z0-9][A-Za-z0-9 .()[\]_:@/-]*?)(?:\s+(?:and saved as your default for new sessions|for this session only))?(?:\s+with\s+([A-Za-z]+)\s+effort\b[^·]*)?\s*(?:·.*)?$/;function w(a){let b=v.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:b[2]?l(b[2]):null}:null}let x=/^\s*(?:\?\s+for\s+shortcuts|esc\s+to\s+cancel)\b/i,y=/^\s*[\u2500-\u259F][\s\u2500-\u259F]*(\S[^\u2500-\u259F]*?)\s+\((minimal|low|medium|high|xhigh)\)\s*$/i;function z(a){if(!x.test(a))return null;let b=a.lastIndexOf("\xb7");if(b<0)return null;let c=l(a.slice(b+1),{allowTruncated:!0});if(!c)return null;let d=a.slice(0,b).trimEnd().split(/\s{2,}/),e=(d[d.length-1]??"").trim();return{model:k(e)?e:null,effort:c}}function A(a){let b=y.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:l(b[2])}:null}let B=/^\s*[●◉◎○]\s+Model\s+changed\s+from\s+\S+(?:\s+\([^)]*\))?\s+to\s+(\S+)(?:\s+\((minimal|low|medium|high|xhigh)\))?\s+for\s+this\s+session\b/i;function C(a){let b=B.exec(a);if(!b)return null;let c=b[1];return j(c)?{model:c,effort:b[2]?l(b[2]):null}:null}let D=/^\s*▣\s+[A-Za-z][A-Za-z0-9-]*\s+·\s+([^·]+?)(?:\s+·\s+[\d.]+\s?m?s)?\s*$/,E=/^\s*[A-Za-z][A-Za-z0-9-]*\s+·\s+([^·]+?)\s+·\s+[\d.]+\s?m?s\s*$/,F=/^\s*[┃╹]/,G=/^\s*#\s+models:\s*([^·]+?)(?:\s+with\s+([A-Za-z]+)\s+effort)?\s*(?:·|$)/i;function H(a){let b=G.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:b[2]?l(b[2]):null}:null}function I(a,b){let c=a.split("\n");for(let a=c.length-1;a>=0;a--){let e=b((0,d.aJ)(c[a]));if(e)return e}return null}function J(a,b){if(!b)return g();switch(a){case"codex":return I(b,p)??g();case"claude":return function(a){let b=I(a,t);if(!b||null!==b.effort)return b;let c=I(a,u);return c?{model:b.model,effort:c.effort}:b}(b)??I(b,w)??g();case"antigravity":return I(b,z)??I(b,A)??g();case"copilot":{let a=function(a){let b=a.split("\n");for(let a=b.length-1;a>=0;a--){let c=(0,d.aJ)(b[a]);if(""!==c.trim()){if(!e.Ub.test(c)&&!e.tJ.test(c))return null;let a=c.trim().split(/\s{2,}/);if(a.length<2)return null;let b=a[a.length-1].split("\xb7").map(a=>a.trim());if(b.length>2)return null;let d=b[0];if(!k(d))return null;if(1===b.length)return{model:d,effort:null};let f=l(b[1]);return null===f?null:{model:d,effort:f}}}return null}(b),c=I(b,C);if(!a)return c??g();if(null!==a.effort||null===c||null===c.effort)return a;return!function(a,b){let c=a=>a.toLowerCase().replace(/[^a-z0-9]/g,"");return c(a)===c(b)}(a.model,c.model)?a:{model:a.model,effort:c.effort}}case"opencode":case"opencode-v2":return function(a){let b=a.split("\n").map(a=>(0,d.aJ)(a));for(let a=b.length-1;a>=0;a--){let c=function(a){let b=D.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:null}:null}(b[a])??function(a,b){let c=E.exec(a[b]);if(!c)return null;let d=c[1].trim();if(!k(d))return null;for(let c=b+1;c<a.length;c++)if(""!==a[c].trim())return F.test(a[c])?{model:d,effort:null}:null;return null}(b,a);if(c)return c}return null}(b)??g();case"command-code":return I(b,H)??g();default:return g()}}let K=/-(low|medium|high)$/i;function L(a,b,c,d){let e=(b||null)??c?.model??null,f=c?.effort??null,g="antigravity"===a?function(a){if(!a)return null;let b=K.exec(a);return b?b[1].toLowerCase():null}(e)??f:f;return{model:e,effort:(d||null)??g}}},27675:(a,b,c)=>{c.d(b,{GR:()=>g,MR:()=>i,NR:()=>k,cr:()=>n,eZ:()=>m,vR:()=>j});var d=c(85726),e=c(24455),f=c(36925);function g(a){let b="multiple_choice"===a.type?a.options.map(a=>`${a.number}.${a.label}`):a.options;return[(0,d.J)(a),...b].join("\0")}let h=(0,f.v)("__autoYesEnterFallbacks",()=>new Map);function i(a){h.delete(a)}function j(a){for(let b of(0,e._9)([...h.keys()],a))h.delete(b)}function k(){h.clear()}let l=(0,f.v)("__autoYesEnterFallbackEpochs",()=>new Map);function m(a,b,c){let d=(0,e.v7)(a,b,c);h.delete(d),l.set(d,(l.get(d)??0)+1)}function n(a){return l.get(a)??0}},27870:(a,b,c)=>{c.d(b,{lY:()=>h,QB:()=>e,Yo:()=>m,fO:()=>n,LF:()=>j,PP:()=>i,T5:()=>g});var d=c(81254);let e=[{number:1,label:"Allow once",reply:"once"},{number:2,label:"Allow always",reply:"always"},{number:3,label:"Reject",reply:"reject"}],f={"opencode-v2":{once:"Allow once",always:"Always allow",reject:"Reject"}};function g(a){let b=f[a];return b?e.map(a=>b[a.reply]?{...a,label:b[a.reply]}:a):e}let h=500;function i(a){return"string"==typeof a&&""!==a}function j(a,b){return"permission-id"===a&&b.some(a=>i(a.id)&&!a.deliveryExpired)}let k={notification:"Notification(permission_prompt)","permission-request":"PermissionRequest (no decision)"};function l(a,b){let c=[`A dialog is open in ${a}: the agent reported it via ${k[b.source]}${b.toolName?` for ${b.toolName}`:""}, but the detection layer published no options for it.`];if(b.decisionOptions&&b.decisionOptions.length>0?c.push(`Answer it with \`commandmate respond ${a} <number>\`: `+b.decisionOptions.map(a=>`${a.number} = ${a.label} (${a.reply})`).join(", ")+". The reply goes to the agent's own API, so no keys are sent to the terminal "+`and the label works too (\`respond ${a} "Allow once"\`).`):c.push(`Answer it in the terminal, or send the option NUMBER with \`commandmate respond ${a} <number>\` — yes/no is not resolved on a numbered dialog (Issue #1681).`),b.message&&c.push(`Agent message: "${b.message}"`),b.askUserQuestion){let{question:d,labels:e,questionCount:f}=b.askUserQuestion,g=i(b.decisionId)&&1===f&&!(b.decisionOptions&&b.decisionOptions.length>0);c.push(`The agent asked${f>1?` ${f} questions, the first being`:""}: "${d}" — offering: ${e.join(" / ")}. `+(g?`Answer it with \`commandmate respond ${a} <number>\`: `+e.map((a,b)=>`${b+1} = ${a}`).join(", ")+". The number is this list's own position and the reply goes to the agent's own API, so no keys are sent to the terminal (the label works too).":"The picker renumbers and adds its own entries, so read the option NUMBER off the terminal rather than counting this list."))}return c.join(" ")}function m(a,b){return{type:d.LT,status:"pending",question:l(a,b),options:[],source:b.source,...b.message?{message:b.message}:{},...b.toolName?{toolName:b.toolName}:{},...b.askUserQuestion?{askUserQuestion:b.askUserQuestion}:{},...b.decisionOptions&&b.decisionOptions.length>0?{decisionOptions:b.decisionOptions}:{},decisionId:i(b.decisionId)?b.decisionId:null,...b.patterns&&b.patterns.length>0?{patterns:[...b.patterns]}:{}}}function n(a,b){return{type:d.LT,status:"unclassified",question:l(a,b),options:[],source:b.source,...b.message?{message:b.message}:{},...b.toolName?{toolName:b.toolName}:{},...b.askUserQuestion?{askUserQuestion:b.askUserQuestion}:{}}}},27939:(a,b,c)=>{c.d(b,{F_:()=>t,KA:()=>u,XO:()=>x,Y2:()=>n,jp:()=>m,lr:()=>v,pr:()=>w});var d=c(29021),e=c(21820),f=c(33873),g=c(8004),h=c(24455),i=c(72626),j=c(36925);let k=(0,i.h)("lib/session/opencode-session-store"),l=/^ses[A-Za-z0-9_-]{1,128}$/;function m(a){return"string"==typeof a&&l.test(a)}let n=200,o=(0,j.v)("__opencodeSessionMemories",()=>new Map);function p(a){return(0,h.v7)(a.worktreeId,a.cliToolId,a.instanceId)}function q(){let a=(0,f.join)((0,e.homedir)(),".commandmate","opencode-sessions.json");return(0,g.T)(process.env.CM_OPENCODE_SESSION_FILE,a,"CM_OPENCODE_SESSION_FILE")}function r(){try{let a=JSON.parse((0,d.readFileSync)(q(),"utf8"));if("object"!=typeof a||null===a||Array.isArray(a))return{};let b={};for(let[c,d]of Object.entries(a))!("object"!=typeof d||null===d||Array.isArray(d))&&m(d.sessionId)&&"string"==typeof d.worktreePath&&d.worktreePath.length>0&&(b[c]={sessionId:d.sessionId,title:"string"==typeof d.title?d.title:null,worktreePath:d.worktreePath,updatedAt:"number"==typeof d.updatedAt?d.updatedAt:0});return b}catch{return{}}}function s(a){let b=q();try{(0,d.mkdirSync)((0,f.dirname)(b),{recursive:!0}),(0,d.writeFileSync)(b,`${JSON.stringify(a,null,2)}
2
- `,{mode:384})}catch(a){k.warn("opencode-session-file-write-failed",{path:b,error:a instanceof Error?a.message:String(a)})}}function t(a,b,c=Date.now()){if(!m(b.sessionId))return k.warn("opencode-session-id-rejected",{worktreeId:a.worktreeId,instanceId:a.instanceId??a.cliToolId}),!1;if(0===b.worktreePath.length)return!1;let d={sessionId:b.sessionId,title:"string"==typeof b.title?b.title.slice(0,n):null,worktreePath:b.worktreePath,updatedAt:c},e=p(a);o.set(e,d);let f=r();return f[e]=d,s(f),!0}function u(a){let b=p(a),c=o.get(b);if(c)return c;let d=r()[b];return d?(o.set(b,d),d):null}function v(a){let b=p(a);o.delete(b);let c=r();b in c&&(delete c[b],s(c))}function w(a,b){let c=u(a);return c?c.worktreePath!==b?(k.info("opencode-session-recovery-path-mismatch",{worktreeId:a.worktreeId,instanceId:a.instanceId??a.cliToolId,recorded:c.worktreePath}),null):m(c.sessionId)?c.sessionId:null:null}function x(a,b){return m(b)?`${a} -s ${b}`:a}},36261:(a,b,c)=>{c.d(b,{_W:()=>E,cx:()=>y,_0:()=>A,Jp:()=>B,_v:()=>x,Te:()=>C,Bf:()=>t,wN:()=>s,M_:()=>D,Uh:()=>G,O_:()=>I,yk:()=>F,fK:()=>z,jG:()=>H});var d=c(72626),e=c(24455),f=c(36925);let g=(0,d.h)("waiting-episode-state"),h=(0,f.v)("__sessionWaitingEpisodes",()=>new Map),i=(0,f.v)("__sessionWaitingTransitionListeners",()=>new Set),j=(0,f.v)("__sessionWaitingEpisodeMeta",()=>new WeakMap),k=(0,f.v)("__sessionWaitingEpisodeVersions",()=>new Map),l=(0,f.v)("__sessionWaitingEpisodeLastClosed",()=>new Map),m=(0,f.v)("__sessionWaitingEpisodeSeq",()=>({value:0,nonce:Math.random().toString(36).slice(2,10)})),n=(0,f.v)("__sessionWaitingEpisodeListeners",()=>new Set),o={kind:"unattributed",generation:{kind:"none"},lastClosedTurnId:null};function p(){return m.value+=1,`wep-${m.nonce}-${m.value}`}function q(a){return(0,e.v7)(a.worktreeId,a.cliToolId,a.instanceId)}function r(a){k.set(a,(k.get(a)??0)+1)}function s(a){return i.add(a),()=>{i.delete(a)}}function t(a){return n.add(a),()=>{n.delete(a)}}function u(a){let{cause:b,episodeId:c,previousEpisodeId:d,closeReason:e,...f}=a;for(let b of i)try{b(f)}catch(b){v(a,b)}for(let b of n)try{b(a)}catch(b){v(a,b)}}function v(a,b){g.error("waiting-transition-listener-failed",{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId,waiting:a.waiting,error:b instanceof Error?b.message:String(b)})}function w(a){let b=j.get(a);return void 0===b&&(b={episodeId:p(),openedAt:a.since,boundAt:a.since,binding:o,openedBy:"legacy-edge",promptScreenKey:null},j.set(a,b)),b}function x(a,b,c){let d=h.get((0,e.v7)(a,b,c));if(void 0===d)return null;let f=w(d);return{since:d.since,kind:d.kind,...f,binding:f.binding}}function y(a,b,c){return k.get((0,e.v7)(a,b,c))??0}function z(a){let b=`${a}${e.CS}`,c=new Map;for(let[a,d]of k)a.startsWith(b)&&c.set(a,d);return c}function A(a,b,c){return l.get((0,e.v7)(a,b,c))??null}function B(a,b,c){return h.get((0,e.v7)(a,b,c))??null}function C(a){let b=`${a}${e.CS}`;for(let a of h.keys())if(a.startsWith(b))return!0;return!1}function D(a,b,c){let d=q(a),e={since:b.since,kind:b.kind},f={episodeId:p(),openedAt:c,boundAt:c,binding:b.binding,openedBy:b.openedBy,promptScreenKey:b.promptScreenKey??null};return h.set(d,e),j.set(e,f),r(d),u({worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId,waiting:!0,since:e.since,kind:e.kind,at:c,cause:"opened",episodeId:f.episodeId,previousEpisodeId:null,closeReason:null}),{...e,...f}}function E(a,b,c,d){let e=q(a),f=h.get(e);if(void 0===f)return!1;let g=w(f);return g.episodeId===b&&(h.delete(e),l.set(e,{at:d,promptScreenKey:g.promptScreenKey}),r(e),u({worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId,waiting:!1,since:null,kind:null,at:d,cause:"closed",episodeId:null,previousEpisodeId:g.episodeId,closeReason:c}),!0)}function F(a,b,c,d,e){let f=q(a),g=h.get(f);if(void 0===g)return null;let i=w(g);if(i.episodeId!==b)return null;l.set(f,{at:e,promptScreenKey:i.promptScreenKey});let k={since:c.since,kind:c.kind},m={episodeId:p(),openedAt:e,boundAt:e,binding:c.binding,openedBy:c.openedBy,promptScreenKey:c.promptScreenKey??null};return h.set(f,k),j.set(k,m),r(f),u({worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId,waiting:!0,since:k.since,kind:k.kind,at:e,cause:"replaced",episodeId:m.episodeId,previousEpisodeId:i.episodeId,closeReason:d}),{...k,...m}}function G(a,b,c,d){let e=q(a),f=h.get(e);if(void 0===f)return!1;let g=w(f);return g.episodeId===b&&(g.binding=c,g.boundAt=d,r(e),!0)}function H(a,b,c){let d=h.get(q(a));return void 0!==d&&w(d).episodeId===b&&(d.kind=c,!0)}function I(a){globalThis.__sessionWaitingEpisodeBindingResolver=a}(0,d.h)("waiting-episode-state")},39532:(a,b,c)=>{c.d(b,{HO:()=>m,Vi:()=>i,mt:()=>n,vQ:()=>j,z2:()=>k});var d=c(36925),e=c(682);let f=(0,d.v)("__promptObservationScreenAppearances",()=>new Map);function g(a){return null===a?null:a.replace(/\s+/g," ").trim()}let h=/^[ \t]*[>\u276F\u203A\u25CF]?[ \t]*/u;function i(a,b,c){let d=a.split("\n"),f=(0,e.c)(d,d.length,12);if(null===f)return null;let g=[...f.options],i=g.length-1;if(""!==f.footer&&(g[i]=[g[i],...f.footer.split("\n")].join(" ").trim()),g.length!==b.length||g.some((a,d)=>!c(a,b[d])))return null;let j=function(a,b){let c=[b.lastRow];for(let d=b.lastRow;c.length<b.options.length-1;){let f=(0,e.c)(a,d,a.length);if(null===f||f.firstRow!==b.firstRow||f.lastRow>=d)return null;c.unshift(f.lastRow),d=f.lastRow}return c.unshift(b.firstRow),c.length===b.options.length?c:null}(d,f);if(null===j)return null;let k=new Set(j);return d.map((a,b)=>k.has(b)?a.replace(h," "):a).join("\n")}function j(a,b,c){return null===b||"antigravity-permission"!==a?b:i(b,c,(a,b)=>a===b)??b}function k(a){return JSON.stringify([a.sessionName,a.sessionGeneration,a.kind,g(a.question),a.options.map(g),g(j(a.kind,a.approvalTarget,a.options))])}function l(a){return JSON.stringify([a.worktreeId,a.cliToolId,a.instanceId])}function m(a,b,c){let d=l(a),e=f.get(d);f.delete(d);let g=e?.fingerprint===b?e.firstSeenAt:Math.floor(c);for(f.set(d,{fingerprint:b,firstSeenAt:g});f.size>1024;){let a=f.keys().next().value;if(void 0===a)break;f.delete(a)}return g}function n(a){f.delete(l(a))}},41842:(a,b,c)=>{c.d(b,{$C:()=>r,Fw:()=>p,J2:()=>s,Mm:()=>u,Ou:()=>v,QL:()=>n,Y_:()=>x,n5:()=>o,pi:()=>y,qo:()=>w,r4:()=>l,sb:()=>k,u0:()=>j,wQ:()=>i,wx:()=>h});var d=c(55511),e=c(24455),f=c(24581),g=c(36925);let h=(0,g.v)("__agentEventDrops",()=>new Map),i=(0,g.v)("__agentEventRecentKeys",()=>new Map),j=(0,g.v)("__agentEventRecentIdentities",()=>new Map),k=3e3,l=512;function m(){return{dedupDropped:{identity:0,timeWindow:0},decisionEvicted:0,idsDiscarded:0,dialogTimedOut:0,decisionOverflow:0}}function n(a){let b=h.get(a);return b||(b=m(),h.set(a,b),x(h,l)),b}function o(a,b,c){let d=h.get((0,e.v7)(a,b,c));return d?{...d,dedupDropped:{...d.dedupDropped}}:m()}function p(a,b,c,d,g,h=Date.now(),j=null){var m,n;if(!g)return!1;let o=(0,e.v7)(a,b,c),r=q(o,d,j,g),s=i.get(r);return void 0!==s&&h-s<k||(i.set(r,h),f.Cb.has(d)?t(o,["stop"],g):"stop"===d&&(m=o,n=g,t(m,f.Cb,n)),function(a){for(let[b,c]of i)a-c>=k&&i.delete(b);for(;i.size>l;){let a=i.keys().next();if(a.done)break;i.delete(a.value)}}(h),!1)}function q(a,b,c,d){return[a,b,c??"",d].join(" ")}function r(a,b,c,d,f,g=null){if(!f)return null;let h=(0,e.v7)(a,b,c);return i.get(q(h,d,g,f))??null}function s(a){return(0,d.createHash)("sha256").update(a).digest("hex").slice(0,8)}function t(a,b,c){let d=Array.from(b,b=>`${a} ${b} `),e=` ${c}`,f=(a,b)=>a.length>=b.length+e.length&&a.startsWith(b);for(let a of i.keys())a.endsWith(e)&&d.some(b=>f(a,b))&&i.delete(a)}function u(){return i.size}let v=["stop","session_end"];function w(a){let b=(0,e.v7)(a.worktreeId,a.cliToolId,a.instanceId);if(null!==a.identityKind){let d=null===a.identity?null:(0,f.Xq)(a.identity);if(null!==a.identity&&null===d&&(n(b).idsDiscarded+=1),null!==d)return!function(a,b){let c=(0,e.v7)(a.worktreeId,a.cliToolId,a.instanceId),d=j.get(c);d||(d=new Map,j.set(c,d),x(j,l));let f=[a.event,a.detail??"",b].join(" ");return!!d.has(f)||(d.set(f,a.at),x(d,l),!1)}(a,d)?{duplicate:!1}:(n(b).dedupDropped.identity+=1,{duplicate:!0,by:"identity"});if(v.includes(a.event)){var c;return"stop"===a.event&&a.sessionId&&(c=a.sessionId,t(b,f.Cb,c)),{duplicate:!1}}}return p(a.worktreeId,a.cliToolId,a.instanceId,a.event,a.sessionId,a.at,a.detail)?(n(b).dedupDropped.timeWindow+=1,{duplicate:!0,by:"time-window"}):{duplicate:!1}}function x(a,b){for(;a.size>b;){let b=a.keys().next();if(b.done)break;a.delete(b.value)}}function y(a,b,c){if(void 0===a||void 0===b){let a=0;for(let b of j.values())a+=b.size;return a}return j.get((0,e.v7)(a,b,c))?.size??0}},49154:(a,b,c)=>{c.d(b,{GF:()=>e,Wk:()=>g,mW:()=>f});var d=c(13287);let e="question",f=[d.k$,e];function g(a){return null!==a&&f.includes(a)?"question":"permission"}},56791:(a,b,c)=>{c.r(b),c.d(b,{ACTIVE_FILTER:()=>d.ks,ACTIVE_TASK_STATUSES:()=>d.EL,AgentInstanceLimitError:()=>d.AC,CURRENT_SCHEMA_VERSION:()=>f.FT,DEFAULT_RUN_HISTORY_LIMIT:()=>d.Tu,InvalidAgentInstanceError:()=>d.ug,MAX_DISABLED_REPOSITORIES:()=>h.nc,MAX_RUN_HISTORY_DAYS:()=>d.eP,MAX_RUN_HISTORY_LIMIT:()=>d.mg,MemoDbError:()=>d.lm,NEW_SUBSCRIPTION_DEFAULTS:()=>d.s6,PUSH_DEFAULTS_VERSION:()=>d.VP,RepositoryDbError:()=>h.j8,TASK_STATUSES:()=>d.Hi,TERMINAL_TASK_STATUSES:()=>d.sA,VERIFICATION_GATE_SOURCES:()=>d.Dx,VERIFICATION_TRIGGERS:()=>d.af,WORKTREE_TODO_STATUSES:()=>d.KG,addAgentInstance:()=>d.Uq,cancelTimer:()=>d.Ud,cancelTimersByWorktree:()=>d.$$,cleanupOldTimers:()=>d.ul,clearInProgressMessageId:()=>d.YX,clearLastUserMessage:()=>d.cf,clearTimerHistory:()=>d.jf,closeDbInstance:()=>e.closeDbInstance,countAgentInstances:()=>d.fs,countDisabledRepositories:()=>h.QJ,countPushSubscriptionsForKind:()=>d.rC,countWorktreesByRepositoryPath:()=>h.kp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteWorktreeTodo:()=>d.vg,deleteWorktreesByIds:()=>d.Rm,disableExistingRepository:()=>h.eP,disableRepository:()=>h.l$,ensureEnvRepositoriesRegistered:()=>h.ES,filterExcludedPaths:()=>h.Ho,findMessageByRequestId:()=>d.Ow,finishGateResult:()=>d.C8,finishVerificationRun:()=>d.u$,getActiveCloneJobByUrl:()=>h.fD,getActiveTask:()=>d.__,getActiveTaskForInstance:()=>d.MH,getAgentInstance:()=>d.BN,getAgentInstances:()=>d.m0,getAliasedWorktreeIds:()=>d.r3,getAllPushSubscriptions:()=>d.Se,getAllRepositories:()=>h.Yg,getAllRepositoriesWithWorktreeCount:()=>h._D,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getCloneJob:()=>h.bM,getCloneJobsByStatus:()=>h.n_,getCurrentVersion:()=>f.Mj,getDailyReport:()=>d.ap,getDbInstance:()=>e.getDbInstance,getDefaultDbPath:()=>g.$b,getExcludedRepositories:()=>h.lS,getExcludedRepositoryPaths:()=>h.pr,getInitialBranch:()=>d.p4,getIssueDbPath:()=>g.zm,getLastAssistantMessageAt:()=>d.nP,getLastMessage:()=>d.sy,getLastUserMessage:()=>d.r8,getLegacyDbPaths:()=>q,getMemoById:()=>d.DN,getMemosByWorktreeId:()=>d.pZ,getMessageById:()=>d.kA,getMessages:()=>d.VL,getMessagesByDateRange:()=>d.lr,getMigrationHistory:()=>f.PS,getPendingTimerCountByWorktree:()=>d.GF,getPendingTimers:()=>d._O,getPushSubscriptionByEndpoint:()=>d.CF,getPushSubscriptionsForKind:()=>d.gn,getRepositories:()=>d.NV,getRepositoryById:()=>h.r,getRepositoryByNormalizedUrl:()=>h.Uj,getRepositoryByPath:()=>h.Dp,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodosByWorktreeId:()=>d.fr,getVerificationRun:()=>d.J6,getWorktreeAliases:()=>d.Q2,getWorktreeById:()=>d.Ui,getWorktreeIdsByRepository:()=>d.P9,getWorktreeTodoById:()=>d.eN,getWorktrees:()=>d.vi,getWorktreesByRepository:()=>d.uJ,initDatabase:()=>d.s4,isTerminalTaskStatus:()=>d.uB,isWorktreeTodoStatus:()=>d.yT,listRunningVerificationRuns:()=>d.Fi,listTaskEvents:()=>d.HB,listTasks:()=>d.Vk,listVerificationRuns:()=>d.Mt,listVerificationRunsForPeriod:()=>d.UE,markPendingPromptsAsAnswered:()=>d.PL,migrateDbIfNeeded:()=>r,migrateWorktreeIdPreservingChildren:()=>d._h,pushSubscriptionNeedsDefaultsNotice:()=>d.Zj,recomputeLastUserMessage:()=>d.jp,recordAnsweredPrompt:()=>d.pG,recordWorktreeAlias:()=>d.xJ,recoverStuckSendingTimers:()=>d.Xm,registerAndFilterRepositories:()=>h.$G,removeAgentInstance:()=>d.NU,reorderMemos:()=>d.nQ,reorderWorktreeTodos:()=>d.yb,resolveAndValidatePath:()=>p,resolveRepositoryPath:()=>h.mE,resolveWorktreeIdWithAlias:()=>d.l0,restoreRepository:()=>h.RS,rollbackMigrations:()=>f.Wy,runMigrations:()=>f.vI,saveDailyReport:()=>d.tt,saveInitialBranch:()=>d.GA,setAgentInstances:()=>d.Cs,setInProgressMessageId:()=>d.OF,setRepositoryEnabled:()=>h.iQ,updateCliToolId:()=>d.WU,updateCloneJob:()=>h.k5,updateDailyReportContent:()=>d.IF,updateFavorite:()=>d.O,updateLastUserMessage:()=>d.EU,updateLastViewedAt:()=>d.HZ,updateMemo:()=>d.UY,updateMessageContent:()=>d.e8,updatePromptData:()=>d.cw,updatePushSubscriptionPreferences:()=>d.jJ,updateRepository:()=>h.Ir,updateSelectedAgents:()=>d.DC,updateSessionState:()=>d.PP,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateVibeLocalContextWindow:()=>d.s,updateVibeLocalModel:()=>d.iu,updateWorktreeDescription:()=>d.hq,updateWorktreeLink:()=>d.z1,updateWorktreeTodo:()=>d.bl,upsertPushSubscription:()=>d.jA,upsertWorktree:()=>d.ZL,validateDbPath:()=>g.Sv,validateRepositoryPath:()=>h.Ux,validateSchema:()=>f.i6});var d=c(683),e=c(88807),f=c(55741),g=c(20416),h=c(10406),i=c(29021),j=c.n(i),k=c(33873),l=c.n(k),m=c(21820),n=c(7956);let o=(0,c(72626).h)("db-migration-path");function p(a,b){try{if(!j().existsSync(a))return null;let c=j().realpathSync(a);if((0,n.fW)(c))return o.warn(`[Security] ${b} points to system directory, skipping: ${c}`),null;return c}catch{return o.warn(`[Security] Failed to resolve ${b}: ${a}`),null}}function q(){let a=[];a.push(l().join(process.cwd(),"data","db.sqlite")),a.push(l().join(process.cwd(),"data","cm.db")),a.push(l().join((0,m.homedir)(),".commandmate","data","db.sqlite"));let b=process.env.DATABASE_PATH;if(b)try{let c=l().resolve(b);(0,n.fW)(c)?o.warn(`[Security] Skipping DATABASE_PATH in system directory: ${c}`):a.push(b)}catch{o.warn(`[Security] Invalid DATABASE_PATH: ${b}`)}return a}function r(a){let b=l().resolve(a);if((0,n.fW)(b))throw Error(`Security error: Target path cannot be in system directory: ${b}`);if(j().existsSync(a)){let b=p(a,"target path");if(b)return{migrated:!1,targetPath:b}}for(let a of q()){let c=p(a,"legacy path");if(!c)continue;let d=`${c}.bak`;j().copyFileSync(c,d),j().chmodSync(d,384);let e=l().dirname(b);return j().existsSync(e)||j().mkdirSync(e,{recursive:!0,mode:448}),j().copyFileSync(c,b),o.info(`[Migration] Database migrated from ${c} to ${b}`),o.info(`[Migration] Backup created at ${d}`),{migrated:!0,sourcePath:c,targetPath:b,backupPath:d}}return{migrated:!1,targetPath:b}}},67882:(a,b,c)=>{c.d(b,{DA:()=>e,O_:()=>f,Oh:()=>d,_K:()=>i,kA:()=>g,px:()=>h});let d={PROMPT_SUBMIT:"hook_prompt_submit",STOP:"hook_stop",PERMISSION_PROMPT:"hook_permission_prompt",PERMISSION_REQUEST:"hook_permission_request",IDLE_PROMPT:"hook_idle_prompt",PRE_TOOL_USE:"hook_pre_tool_use",POST_TOOL_USE:"hook_post_tool_use"};function e(a,b){switch(a){case"user_prompt_submit":return{status:"running",reason:d.PROMPT_SUBMIT};case"pre_tool_use":return{status:"running",reason:d.PRE_TOOL_USE};case"post_tool_use":return{status:"running",reason:d.POST_TOOL_USE};case"stop":return{status:"ready",reason:d.STOP};case"notification":if("permission_prompt"===b)return{status:"waiting",reason:d.PERMISSION_PROMPT};if("idle_prompt"===b)return{status:"ready",reason:d.IDLE_PROMPT};return null;default:return null}}function f(a,b=!1){switch(a){case"waiting":return{isWaitingForResponse:!0,isProcessing:!1};case"running":return{isWaitingForResponse:!1,isProcessing:!b};default:return{isWaitingForResponse:!1,isProcessing:!1}}}function g(a){return a?a.isWaitingForResponse?"waiting":a.isProcessing?"running":a.isRunning?"ready":"idle":"idle"}function h(a){return a?.isUnclassified===!0&&"ready"===g(a)}function i(a){return a.isSessionRunning?a.isWaitingForResponse?"waiting":a.isProcessing?"running":"ready":null}},81254:(a,b,c)=>{function d(a){return"answer_only"===a||"answer_then_enter"===a}c.d(b,{LT:()=>e,MI:()=>d,XF:()=>f});let e="unclassified";function f(a){return null!=a&&a.type!==e}},85322:(a,b,c)=>{c.d(b,{k:()=>d});let d="opencode"},85726:(a,b,c)=>{c.d(b,{J:()=>d});function d(a){return`${a.type}:${a.question}`}},91227:(a,b,c)=>{c.d(b,{c:()=>f});var d=c(85726),e=c(39532);function f(a){let b="multiple_choice"===a.type?a.options.map(a=>`${a.number}.${a.label}`).join("\n"):a.options.join("\n");return[(0,d.J)(a),b,function(a){let b=a.approvalTarget??"";return"multiple_choice"!==a.type?b:(0,e.Vi)(b,a.options.map(a=>a.label),(a,b)=>a.startsWith(b))??b.split("\n").map(a=>a.replace(/^[\s❯›>▶►●○◉→]+/u,"")).join("\n")}(a)].join("\0")}},91631:(a,b,c)=>{c.d(b,{$M:()=>B,BZ:()=>k,Bf:()=>w,Dy:()=>G,Ev:()=>q,Ln:()=>s,NW:()=>v,Or:()=>j,SQ:()=>I,Yb:()=>A,ZG:()=>i,_i:()=>z,fY:()=>x,i1:()=>m,j0:()=>n,nC:()=>H,pO:()=>u,rT:()=>D,sp:()=>o,zM:()=>y});var d=c(24455),e=c(62887),f=c(24581),g=c(41842),h=c(36925);let i=(0,h.v)("__agentEventGenerationStartedAt",()=>new Map),j=(0,h.v)("__agentEventTurns",()=>new Map),k=(0,h.v)("__agentEventReopenedTurns",()=>new Map),l=(0,h.v)("__agentEventTurnSeq",()=>({value:0}));function m(a){globalThis.__agentEventTurnOutcomeSink=a}function n(a){return null===a?{kind:"none"}:{kind:"opened",at:a}}function o(a,b){return a.pendingDecisions.filter(a=>(0,f.jF)(a,b)).length}function p(a,b,c){if(null===a)return{kind:"none"};if(null!==a.closedAt)return{kind:"closed",turnId:a.turnId,closedBy:a.closedBy??"stop"};if(null===a.openedAt){let b=o(a,c);return b>0?{kind:"dialog-only",turnId:a.turnId,decisions:b,sessionId:a.sessionId}:{kind:"display-only",turnId:a.turnId}}return(0,f.ZV)(a,b)?{kind:"open-same-session",turnId:a.turnId}:{kind:"open-other-session",turnId:a.turnId}}function q(a){return i.get(a)??null}function r(a){let b=j.get(a);return b&&b.generationAt===q(a)?b:null}function s(a,b){let c=r(a);return null===c?null:(null===c.closedAt&&b-c.displayEvent.at>=f.Mu&&(c.closedAt=c.displayEvent.at+f.Mu,c.closedBy="stale"),c)}function t(a){return l.value+=1,`turn-${a}-${l.value}`}function u(a,b,c){let d=b.pendingDecisions.filter(a=>(0,f.jF)(a,c)),e=b.pendingDecisions.length-d.length;return e>0&&((0,g.QL)(a).dialogTimedOut+=e,b.pendingDecisions=d),d}function v(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=s(f,e);return null===g?[]:u(f,g,e)}function w(a,b,c,e=Date.now()){return s((0,d.v7)(a,b,c),e)}function x(a,b,c,d=Date.now()){return(0,f.nY)(w(a,b,c,d))}function y(a,b,c,e,f=Date.now()){let g=r((0,d.v7)(a,b,c));return null!==g&&null===g.closedAt&&(g.closedAt=f,g.closedBy=e,!0)}function z(a,b,c,e,g=Date.now(),h=!0){let i=r((0,d.v7)(a,b,c));return null!==i&&null===i.closedAt&&(e?(i.scraperCompletionPolls+=1,!(i.scraperCompletionPolls<f.Tt)&&!!h&&(i.closedAt=g,i.closedBy="scraper_evidence",!0)):(i.scraperCompletionPolls=0,!1))}function A(a,b,c="session-start"){let d=j.get(a),e={kind:"generation-fenced",source:c,generation:n(q(a)),fencedTurnId:d?.turnId??null};return d?(0!==d.pendingDecisions.length&&((0,g.QL)(a).decisionEvicted+=d.pendingDecisions.length,d.pendingDecisions=[]),null!==d.closedAt||(d.closedAt=b,d.closedBy="generation",d.generationAt=b),e):e}function B(a,b){let c=q(a);if(null!==c&&b.at<c)return"stop"===b.event?{kind:"stop-rejected",reason:"before-generation"}:"session_end"===b.event?{kind:"session-end-rejected",reason:"before-generation"}:{kind:"none"};switch(b.event){case"user_prompt_submit":{let d=F(a,b,"user_prompt_submit",c,{continueOpen:!0===b.joinsOpenTurn});return I(a),d}case"post_tool_use":{let d=F(a,b,"post_tool_use",c,{continueOpen:!0});return I(a),d}case"pre_tool_use":if(!0===b.promptOpensTurns&&C(a))return{kind:"none"};return F(a,b,"pre_tool_use",c,{continueOpen:!0});case"stop":var d=a,g=b,h=c;let i=r(d);if(null!==i&&null===i.closedAt&&null!==i.openedAt)return(0,f.ZV)(i,g.sessionId)?(i.closedAt=g.at,i.closedBy="stop",i.displayEvent=E(g),I(d),{kind:"stopped",turnId:i.turnId,generation:n(h)}):{kind:"stop-rejected",reason:"other-session"};let k=p(i,g.sessionId,g.at);if("dialog-only"===k.kind&&null!==k.sessionId&&null!==g.sessionId&&k.sessionId!==g.sessionId)return{kind:"stop-rejected",reason:"other-session"};let l=t(g.at);return j.set(d,{turnId:l,sessionId:g.sessionId,openedAt:null,closedAt:g.at,closedBy:"stop",generationAt:h,displayEvent:E(g),pendingDecisions:[],scraperCompletionPolls:0}),K(),{kind:"stop-without-turn",recordTurnId:l,generation:n(h),previous:k};case"session_end":{let c=function(a,b){let c=r(a);return null===c?{kind:"session-end-rejected",reason:"no-turn"}:(0,f.ZV)(c,b.sessionId)?(c.closedAt=b.at,c.closedBy="session_end",{kind:"session-ended",turnId:c.turnId}):{kind:"session-end-rejected",reason:"other-session"}}(a,b);return I(a),c}case"session_start":return{kind:"none"};case"notification":var m=a,o=b,s=c;if("permission_prompt"===o.detail)return!0===o.promptSettled?J(m,o):{kind:"decision-opened",...H(m,s,{source:"notification",at:o.at,message:o.message??null,toolName:o.toolName??null,patterns:o.decisionPatterns??null,decisionId:o.decisionId??null,bootstrapDisplay:E(o),sessionId:o.sessionId})};if(o.detail===e.KC)return!0===o.promptSettled?J(m,o):{kind:"none"};if("idle_prompt"===o.detail){I(m);let a=r(m);if(null!==a&&null===a.closedAt)return a.displayEvent=E(o),{kind:"none"};if(null!==a)return{kind:"none"};j.set(m,{turnId:t(o.at),sessionId:o.sessionId,openedAt:null,closedAt:null,closedBy:null,generationAt:s,displayEvent:E(o),pendingDecisions:[],scraperCompletionPolls:0}),K()}return{kind:"none"};default:return b.event,{kind:"none"}}}function C(a){let b=r(a);return null!==b&&null!==b.closedAt&&"stop"===b.closedBy}function D(a,b,c,e){return e&&C((0,d.v7)(a,b,c))}function E(a){return{event:a.event,at:a.at,detail:a.detail}}function F(a,b,c,d,{continueOpen:e}){let h=r(a),i=p(h,b.sessionId,b.at),l=null!==h&&null===h.closedAt&&null!==h.openedAt&&(0,f.ZV)(h,b.sessionId);if(e&&l)return h.displayEvent=E(b),h.sessionId??=b.sessionId,h.scraperCompletionPolls=0,{kind:"continued",turnId:h.turnId};let m=null!==h&&null===h.openedAt&&null===h.closedAt?h.pendingDecisions:[],o={turnId:t(b.at),sessionId:b.sessionId,openedAt:b.at,closedAt:null,closedBy:null,generationAt:d,displayEvent:E(b),pendingDecisions:m,scraperCompletionPolls:0};return j.set(a,o),K(),"user_prompt_submit"===b.event&&l&&(k.set(a,{turnId:o.turnId,replaced:h}),(0,g.Y_)(k,g.r4)),{kind:"opened",turnId:o.turnId,event:c,generation:n(d),previous:i}}function G(a,b,c,e){if("user_prompt_submit"!==e.event||!0!==e.joinsOpenTurn)return!1;let g=(0,d.v7)(a,b,c),h=k.get(g),i=r(g);if(!h||null===i||i.turnId!==h.turnId||null!==i.closedAt||!(0,f.ZV)(i,e.sessionId))return!1;let{replaced:l}=h;return l.generationAt===i.generationAt&&(j.set(g,{...l,closedAt:null,closedBy:null,displayEvent:i.displayEvent,pendingDecisions:i.pendingDecisions,scraperCompletionPolls:0}),k.delete(g),globalThis.__agentEventTurnOutcomeSink?.({worktreeId:a,cliToolId:b,instanceId:c},[{kind:"restored",restoredTurnId:l.turnId,discardedTurnId:i.turnId}]),!0)}function H(a,b,c){let d=r(a);null===d||null!==d.closedAt?(d={turnId:t(c.at),sessionId:c.sessionId??null,openedAt:null,closedAt:null,closedBy:null,generationAt:b,displayEvent:c.bootstrapDisplay,pendingDecisions:[],scraperCompletionPolls:0},j.set(a,d),K()):null===d.openedAt&&null===d.sessionId&&(d.sessionId=c.sessionId??null);let e={recordTurnId:d.turnId,recordKind:null!==d.openedAt?"turn":"dialog-only"},h=null===c.decisionId?null:(0,f.Xq)(c.decisionId);null!==c.decisionId&&null===h&&((0,g.QL)(a).idsDiscarded+=1);let i="notification"===c.source,k=null!==h?d.pendingDecisions.find(a=>a.decisionId===h)??d.pendingDecisions.find(a=>null===a.decisionId&&"permission-request"===a.source):d.pendingDecisions.find(a=>null===a.decisionId);return k?(k.message=(0,f.wt)(c.message)??k.message,k.toolName=(0,f.kT)(c.toolName)??k.toolName,k.patterns=(0,f.Ui)(c.patterns)??k.patterns,k.decisionId??=h,i&&(k.source="notification",k.confirmedAt??=c.at)):d.pendingDecisions.length>=f.RY?(0,g.QL)(a).decisionOverflow+=1:d.pendingDecisions.push({decisionId:h,at:c.at,source:c.source,message:(0,f.wt)(c.message),toolName:(0,f.kT)(c.toolName),patterns:(0,f.Ui)(c.patterns),confirmedAt:i?c.at:null,scraperCorroborated:!1,recorded:!1}),e}function I(a){let b=r(a);null!==b&&(b.pendingDecisions=[])}function J(a,b){let c=r(a);if(null===c||0===c.pendingDecisions.length)return{kind:"none"};let d=c.pendingDecisions.length,e=null===b.decisionId||void 0===b.decisionId?null:(0,f.Xq)(b.decisionId);return null===e?c.pendingDecisions=[]:c.pendingDecisions=c.pendingDecisions.filter(a=>null!==a.decisionId&&a.decisionId!==e),{kind:"decision-answered",recordTurnId:c.turnId,recordKind:null!==c.openedAt?"turn":"dialog-only",before:d,remaining:c.pendingDecisions.length}}function K(){(0,g.Y_)(j,g.r4)}},95375:(a,b,c)=>{c.r(b),c.d(b,{AGENT_EVENT_DEDUP_WINDOW_MS:()=>f.sb,AGENT_MODEL_EFFORT_SUFFIX_PATTERN:()=>p,LIFECYCLE_AGENT_EVENT_TYPES:()=>f.Ou,STRUCTURED_PROMPT_PROVISIONAL_MAX_AGE_MS:()=>ad,STRUCTURED_STATE_MAX_AGE_MS:()=>L,agentEventKeyClaimedAt:()=>f.$C,beginAgentEventGeneration:()=>aa,classifyAgentEventDelivery:()=>f.qo,clearAgentStopEvents:()=>ak,clearAskUserQuestion:()=>U,clearStructuredPromptWaiting:()=>aj,closeAgentTurn:()=>I.zM,corroborateStructuredPromptWaiting:()=>ah,discardAgentEventState:()=>ac,getAgentEventDropCounts:()=>f.n5,getAgentEventGenerationStartedAt:()=>ab,getAgentModelBaseline:()=>u,getAgentTurn:()=>I.Bf,getAskUserQuestion:()=>T,getAwaitingInstruction:()=>O,getLastAgentEvent:()=>_,getLastCapturedModelInfo:()=>A,getLastKnownAgentEffort:()=>G,getLastKnownAgentModel:()=>x,getLastReportedAgentEffort:()=>F,getLastStopEventAt:()=>Y,getPendingDecisions:()=>I.NW,getPublishedAgentTurn:()=>I.fY,getRecentEventIdentityCount:()=>f.pi,getRecentEventKeyCount:()=>f.Mm,getResolvedAgentModelInfo:()=>B,getStructuredPromptWaiting:()=>ag,getStructuredSessionState:()=>M,isAwaitingInstruction:()=>P,isDuplicateAgentEvent:()=>f.Fw,isPreToolUseOutsideTurn:()=>I.rT,isSameAgentModelName:()=>s,joinOpenTurnFromDuplicate:()=>I.Dy,markStructuredPromptRecorded:()=>ai,observeScraperCompletionEvidence:()=>I._i,onAgentModelChange:()=>t,recordAgentEvent:()=>$,recordAgentReportedEffort:()=>E,recordAgentReportedModel:()=>y,recordAgentStopEvent:()=>X,recordAskUserQuestion:()=>S,recordCapturedModelInfo:()=>z,reportPermissionRequestPending:()=>ae,reportQuestionPending:()=>af,shortSessionTag:()=>f.J2});var d=c(24455),e=c(27675),f=c(41842),g=c(62887),h=c(26547),i=c(36925);let j=(0,i.v)("__agentEventLastModel",()=>new Map),k=(0,i.v)("__agentEventLastModelAt",()=>new Map),l=(0,i.v)("__agentCapturedModelInfo",()=>new Map),m=(0,i.v)("__agentEventLastEffort",()=>new Map),n=(0,i.v)("__agentModelBaseline",()=>new Map),o=(0,i.v)("__agentModelChangeListeners",()=>new Set),p=/[-_ ](?:minimal|low|medium|high|xhigh)$/i,q=/\bcontext\b/gi;function r(a){return a.replace(p,"").replace(q,"").toLowerCase().replace(/[^a-z0-9]/g,"")}function s(a,b,c={}){let d=r(a),e=r(b);return d===e||!!c.crossSource&&0!==d.length&&0!==e.length&&(d.includes(e)||e.includes(d))}function t(a){return o.add(a),()=>{o.delete(a)}}function u(a,b,c){return n.get((0,d.v7)(a,b,c))??null}function v(a,b,c,e,g){let h=(0,d.v7)(a,b,c),{info:i,source:j}=D(h,b),k=i.model;if(null===k||null===j)return;let l=n.get(h),m={model:k,source:j};if(void 0===l){n.set(h,m),(0,f.Y_)(n,f.r4);return}if(s(l.model,k,{crossSource:l.source!==j}))return void n.set(h,m);n.set(h,m);var p={worktreeId:a,cliToolId:b,instanceId:c??b,from:l.model,to:k,source:e,at:g};for(let a of o)try{a(p)}catch{}}function w(a,b){"string"==typeof b.model&&""!==b.model&&(j.set(a,b.model.slice(0,g.h9)),k.set(a,b.at))}function x(a,b,c){return j.get((0,d.v7)(a,b,c))??null}function y(a,b,c,e,f=Date.now()){if("string"!=typeof e||""===e)return;let h=(0,d.v7)(a,b,c);j.set(h,e.slice(0,g.h9)),k.set(h,f),v(a,b,c,"hook",f)}function z(a,b,c,e,f=Date.now()){if(!e.model&&!e.effort)return;let h=(0,d.v7)(a,b,c),i=l.get(h),j=e.model?e.model.slice(0,g.h9):i?.model??null;l.set(h,{model:j,effort:e.effortUnreadable?null:e.effort??i?.effort??null,modelChangedAt:null===j?null:j===(i?.model??null)?i?.modelChangedAt??f:f}),e.model&&v(a,b,c,"frame",f)}function A(a,b,c){let e=l.get((0,d.v7)(a,b,c));return{model:e?.model??null,effort:e?.effort??null}}function B(a,b,c){return D((0,d.v7)(a,b,c),b).info}let C=new Set(["claude"]);function D(a,b){let c=j.get(a)??null,d=l.get(a),e={model:d?.model??null,effort:d?.effort??null},f=m.get(a)??null,g=d?.modelChangedAt??null,i=null!==c&&null!==e.model&&null!==g&&C.has(b)&&g>(k.get(a)??0)&&!s(c,e.model,{crossSource:!0}),n=(0,h.Yz)(b,i?null:c,e,f);return null===n.model?{info:n,source:null}:{info:n,source:null===c||i?"frame":"hook"}}function E(a,b,c,e){"string"==typeof e&&""!==e&&m.set((0,d.v7)(a,b,c),e.slice(0,g.h9))}function F(a,b,c){return m.get((0,d.v7)(a,b,c))??null}function G(a,b,c){return B(a,b,c).effort}var H=c(24581),I=c(91631),J=c(15044),K=c(67882);let L=H.Mu;function M(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=(0,I.Ln)(f,e);if(null===g)return null;let h=g.displayEvent;if(e-h.at>=L)return null;let i={event:h.event,at:h.at,detail:h.detail},j=(0,I.pO)(f,g,e);if(j.length>0)return{status:"waiting",reason:"notification"===j[0].source?K.Oh.PERMISSION_PROMPT:K.Oh.PERMISSION_REQUEST,...i};if(null!==g.closedAt)return"stop"===g.closedBy?{status:"ready",reason:K.Oh.STOP,...i}:null;let k=(0,K.DA)(h.event,h.detail);return null===k||"waiting"===k.status?null===g.openedAt?null:{status:"running",reason:K.Oh.PROMPT_SUBMIT,...i}:{...k,...i}}let N=(0,i.v)("__agentEventAwaitingInstruction",()=>new Map);function O(a,b,c){let e=(0,d.v7)(a,b,c),f=N.get(e);if(!f)return null;let g=I.ZG.get(e);return void 0!==g&&f.at<g?null:f}function P(a,b,c){return null!==O(a,b,c)}var Q=c(49154);let R=(0,i.v)("__agentEventAskUserQuestion",()=>new Map);function S(a,b,c,e,f=Date.now()){R.set((0,d.v7)(a,b,c),{at:f,spec:e})}function T(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=R.get(f);if(!g)return null;let h=I.ZG.get(f);return void 0!==h&&g.at<h||e-g.at>=L?null:g}function U(a,b,c){R.delete((0,d.v7)(a,b,c))}let V=(0,i.v)("__agentEventLastStopAt",()=>new Map),W=(0,i.v)("__agentEventLast",()=>new Map);function X(a,b,c,e=Date.now()){V.set((0,d.v7)(a,b,c),e)}function Y(a,b,c){return V.get((0,d.v7)(a,b,c))??null}let Z=["running","waiting"];function $(a,b,c,f,g={}){let h=(0,d.v7)(a,b,c);if(function(a,b,c,e,f){if("session_start"!==e.event||!0!==f.sessionStartMayArriveLate)return!1;let g=M(a,b,c,e.at);if(null===g||!Z.includes(g.status))return!1;let h=W.get((0,d.v7)(a,b,c))?.sessionId??null;return null===h||null==e.sessionId||e.sessionId===h}(a,b,c,f,g))return w(h,f),v(a,b,c,"hook",f.at),{recorded:!1,skipped:"late-session-start"};W.set(h,f);let i=[];return"session_start"===f.event&&n.delete(h),w(h,f),v(a,b,c,"hook",f.at),!function(a,b){switch(b.event){case"pre_tool_use":Q.mW.includes(b.detail??"")||R.delete(a);return;case"notification":"idle_prompt"===b.detail&&R.delete(a);return;case"post_tool_use":case"stop":case"user_prompt_submit":case"session_start":case"session_end":R.delete(a);return;default:b.event;return}}(h,f),"session_start"===f.event&&(I.ZG.set(h,f.at),(0,e.eZ)(a,b,c),i.push((0,I.Yb)(h,f.at,"session-start"))),i.push((0,I.$M)(h,f)),!function(a,b){switch(b.event){case"notification":"idle_prompt"===b.detail&&N.set(a,{at:b.at,message:b.message??null});return;case"user_prompt_submit":case"session_start":case"session_end":N.delete(a);return;case"stop":case"pre_tool_use":case"post_tool_use":return;default:b.event;return}}(h,f),(0,J.Dd)({worktreeId:a,cliToolId:b,instanceId:c},i),{recorded:!0}}function _(a,b,c){return W.get((0,d.v7)(a,b,c))??null}function aa(a,b,c,e=Date.now()){let g=(0,d.v7)(a,b,c);I.ZG.set(g,e);let h=(0,I.Yb)(g,e,"process-start");R.delete(g),N.delete(g),j.delete(g),k.delete(g),l.delete(g),m.delete(g),n.delete(g),f.u0.delete(g),(0,J.Dd)({worktreeId:a,cliToolId:b,instanceId:c},[h],e)}function ab(a,b,c){return I.ZG.get((0,d.v7)(a,b,c))??null}function ac(a,b,c){let e=(0,d.v7)(a,b,c);W.delete(e),I.ZG.delete(e),I.Or.delete(e),f.wx.delete(e),R.delete(e),N.delete(e),j.delete(e),k.delete(e),l.delete(e),m.delete(e),n.delete(e),f.u0.delete(e)}let ad=H.h_.predicted;function ae(a,b,c,e,f=Date.now()){let g=(0,d.v7)(a,b,c),h=(0,I.nC)(g,(0,I.Ev)(g),{source:"permission-request",at:f,message:null,toolName:e,patterns:null,decisionId:null,bootstrapDisplay:{event:"notification",at:f,detail:"permission_prompt"}});(0,J.Dd)({worktreeId:a,cliToolId:b,instanceId:c},[{kind:"decision-opened",...h}])}function af(a,b,c,e,f=Date.now()){let g=(0,d.v7)(a,b,c),h=(0,I.nC)(g,(0,I.Ev)(g),{source:"notification",at:f,message:null,toolName:e.toolName,patterns:null,decisionId:e.decisionId,bootstrapDisplay:{event:"notification",at:f,detail:e.detail}});(0,J.Dd)({worktreeId:a,cliToolId:b,instanceId:c},[{kind:"decision-opened",...h}])}function ag(a,b,c,d=Date.now()){return(0,I.NW)(a,b,c,d)[0]??null}function ah(a,b,c,d=Date.now()){let e=ag(a,b,c,d);e&&(e.scraperCorroborated=!0,e.confirmedAt??=d)}function ai(a,b,c){let d=ag(a,b,c);d&&(d.recorded=!0)}function aj(a,b,c){(0,I.SQ)((0,d.v7)(a,b,c))}function ak(){V.clear(),W.clear(),f.wQ.clear(),f.u0.clear(),I.ZG.clear(),I.Or.clear(),I.BZ.clear(),f.wx.clear(),R.clear(),N.clear(),j.clear(),k.clear(),l.clear(),m.clear(),n.clear(),(0,J.qM)()}}};
@@ -1,144 +0,0 @@
1
- "use strict";exports.id=9198,exports.ids=[9198],exports.modules={25539:(a,b,c)=>{c.d(b,{Ho:()=>f,Lo:()=>e,O7:()=>d});let d=["pending","prompt"];function e(a){return d.includes(a)}function f(){return{pending:0,delivered:0,prompt:0,expired:0,cancelled:0}}},69198:(a,b,c)=>{c.d(b,{EG:()=>x,m_:()=>R,UA:()=>y,uJ:()=>m,wE:()=>D,Oz:()=>L,_7:()=>S,CR:()=>G,C$:()=>t,Yt:()=>E,TN:()=>q,Ip:()=>H,V9:()=>n,GC:()=>O,M4:()=>J,s7:()=>Q,hA:()=>r,pT:()=>K,ix:()=>I,uG:()=>l,Bf:()=>M,Cz:()=>P,UC:()=>N,jn:()=>B,bT:()=>u,T:()=>C,Iq:()=>A,ZR:()=>s,FO:()=>w,nR:()=>z,ky:()=>v,be:()=>k});var d=c(55511),e=c(25539),f=c(72626);let g=`
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
- `,h=`
8
- bind_attempt_id, bind_owner, obs_source, input_message_id,
9
- held_candidates, pending_reply, payload_id
10
- `;function i(a){return{id:a.id,from:{worktreeId:a.from_worktree_id,instanceId:a.from_instance_id},to:{worktreeId:a.to_worktree_id,instanceId:a.to_instance_id},state:a.state,hops:a.hops,sentRequestId:a.sent_request_id,pendingKind:a.pending_kind??null,createdAt:a.created_at,updatedAt:a.updated_at,expiresAt:a.expires_at,deliveredAt:a.delivered_at,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}}let j=e.O7.map(()=>"?").join(", ");function k(a,b,c,f,g=Date.now(),h={}){let i=h.payloadId??(0,d.randomUUID)();return 1===a.prepare(`
11
- UPDATE session_relays
12
- SET pending_kind = ?, pending_body = ?, payload_id = ?,
13
- overlap = COALESCE(?, overlap), updated_at = ?
14
- WHERE id = ? AND pending_kind IS NULL
15
- AND state IN (${j})
16
- `).run(c,f,i,h.overlap??null,g,b,...e.O7).changes}function l(a){return a.prepare(`
17
- SELECT ${g} FROM session_relays
18
- WHERE pending_kind IS NOT NULL
19
- ORDER BY updated_at ASC
20
- `).all().filter(a=>null!==a.pending_body&&null!==a.pending_kind).map(a=>({relay:i(a),kind:a.pending_kind,body:a.pending_body}))}function m(a,b,c=Date.now(),d){return 1===(void 0===d?a.prepare(`
21
- UPDATE session_relays
22
- SET pending_kind = NULL, pending_body = NULL, payload_id = NULL, updated_at = ?
23
- WHERE id = ?
24
- `).run(c,b):a.prepare(`
25
- UPDATE session_relays
26
- SET pending_kind = NULL, pending_body = NULL, payload_id = NULL, updated_at = ?
27
- WHERE id = ? AND payload_id IS ?
28
- `).run(c,b,d)).changes}function n(a,b){let c=a.prepare(`SELECT ${g}, payload_id FROM session_relays WHERE id = ?`).get(b);return c&&null!==c.pending_kind&&null!==c.pending_body?{relay:i(c),kind:c.pending_kind,body:c.pending_body,payloadId:c.payload_id}:null}function o(a,b){if(null===a)return b;try{return JSON.parse(a)}catch{return b}}function p(a){return{relay:i(a),bindAttemptId:a.bind_attempt_id,bindOwner:a.bind_owner,obsSource:a.obs_source,inputMessageId:a.input_message_id,heldCandidates:o(a.held_candidates,[]),pendingReply:o(a.pending_reply,null),payloadId:a.payload_id,pendingKind:a.pending_kind??null}}function q(a,b){let c=a.prepare(`SELECT ${g}, ${h} FROM session_relays WHERE id = ?`).get(b);return c?p(c):null}function r(a){return a.prepare(`
29
- SELECT ${g}, ${h} FROM session_relays
30
- WHERE bind_mode = 'bound' AND state IN (${j})
31
- ORDER BY created_at ASC
32
- `).all(...e.O7).map(p)}function s(a,b){let c=b.now??Date.now();return 1===a.prepare(`
33
- UPDATE session_relays SET bind_attempt_id = ?, bind_owner = ?, updated_at = ?
34
- WHERE id = ? AND bind_mode = 'bound' AND state = 'pending' AND send_state = 'awaiting'
35
- AND bind_attempt_id IS NULL AND expires_at > ?
36
- AND to_worktree_id = ? AND to_instance_id = ?
37
- `).run(b.attemptId,b.owner,c,b.relayId,c,b.worktreeId,b.instanceId).changes}function t(a,b,c,d,e=Date.now()){let f=q(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 u(a,b){let c=b.now??Date.now();return 1===a.prepare(`
38
- UPDATE session_relays
39
- SET send_state = 'input_started', input_boundary_at = ?, boundary_kind = ?,
40
- turn_open_at_send = ?, obs_state = ?, obs_source = ?, updated_at = ?
41
- WHERE id = ? AND bind_attempt_id = ? AND state = 'pending' AND expires_at > ?
42
- AND (send_state = 'awaiting'
43
- OR (? = 1 AND send_state = 'input_started' AND boundary_kind = 'dispatch'))
44
- `).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 v(a,b){let c=b.now??Date.now(),d=b.from.map(()=>"?").join(", ");return 1===a.prepare(`
45
- UPDATE session_relays
46
- SET send_state = ?,
47
- hold_reason = CASE WHEN ? = 1 THEN NULL ELSE COALESCE(?, hold_reason) END,
48
- input_message_id = COALESCE(?, input_message_id),
49
- obs_state = CASE WHEN ? = 1 THEN 'invalid' ELSE obs_state END,
50
- updated_at = ?
51
- WHERE id = ? AND bind_attempt_id = ? AND send_state IN (${d})
52
- AND state IN (${j})
53
- `).run(b.to,+!!b.clearHoldReason,b.holdReason??null,b.inputMessageId??null,+!!b.invalidateObservation,c,b.relayId,b.attemptId,...b.from,...e.O7).changes}function w(a,b,c,d={}){a.prepare(`
54
- UPDATE session_relays
55
- SET hold_reason = ?, obs_state = CASE WHEN ? = 1 THEN 'invalid' ELSE obs_state END, updated_at = ?
56
- WHERE id = ?
57
- `).run(c,+!!d.invalidate,d.now??Date.now(),b)}function x(a,b,c,d=Date.now()){return a.transaction(()=>{let f=a.prepare(`
58
- SELECT held_candidates FROM session_relays
59
- WHERE id = ? AND bind_mode = 'bound' AND send_state IN ('awaiting','input_started')
60
- AND state IN (${j})
61
- `).get(b,...e.O7);if(!f)return!1;let g=o(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 y(a,b){a.prepare("UPDATE session_relays SET held_candidates = NULL WHERE id = ?").run(b)}function z(a,b,c,d=Date.now()){return 1===a.prepare(`
62
- UPDATE session_relays SET pending_reply = ?, updated_at = ?
63
- WHERE id = ? AND pending_kind = 'prompt' AND pending_reply IS NULL
64
- AND state IN (${j})
65
- `).run(JSON.stringify(c),d,b,...e.O7).changes}function A(a,b,c,d,f=Date.now()){return 1===a.prepare(`
66
- UPDATE session_relays
67
- SET pending_kind = 'reply', pending_body = ?, payload_id = ?, overlap = ?, updated_at = ?
68
- WHERE id = ? AND pending_kind = 'prompt' AND payload_id IS ?
69
- AND state IN (${j})
70
- `).run(d.body,d.payloadId,d.overlap,f,b,c,...e.O7).changes}function B(a,b,c=Date.now()){return a.transaction(()=>{let d=a.prepare(`
71
- SELECT pending_reply FROM session_relays
72
- WHERE id = ? AND pending_kind IS NULL AND pending_reply IS NOT NULL
73
- AND state IN (${j})
74
- `).get(b,...e.O7);if(!d)return!1;let f=o(d.pending_reply,null);return f?(a.prepare(`
75
- UPDATE session_relays
76
- SET pending_kind = 'reply', pending_body = ?, payload_id = ?, overlap = ?,
77
- pending_reply = NULL, updated_at = ?
78
- WHERE id = ?
79
- `).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 C(a,b,c,d=Date.now()){return a.transaction(()=>{let f=a.prepare(`
80
- SELECT pending_reply FROM session_relays
81
- WHERE id = ? AND pending_kind = 'prompt' AND payload_id IS ? AND pending_reply IS NOT NULL
82
- AND state IN (${j})
83
- `).get(b,c,...e.O7);if(!f)return!1;let g=o(f.pending_reply,null);return!!g&&(a.prepare(`
84
- UPDATE session_relays
85
- SET pending_kind = 'reply', pending_body = ?, payload_id = ?, overlap = ?,
86
- pending_reply = NULL, updated_at = ?
87
- WHERE id = ?
88
- `).run(g.body,g.payloadId,g.overlap,d,b),!0)})()}function D(a,b,c=Date.now()){a.prepare("UPDATE session_relays SET pending_reply = NULL, updated_at = ? WHERE id = ?").run(c,b)}function E(a,b,c,d,f=Date.now()){return 1===a.prepare(`
89
- UPDATE session_relays
90
- SET send_state = 'failed', state = 'cancelled', hold_reason = ?,
91
- pending_kind = NULL, pending_body = NULL, payload_id = NULL, pending_reply = NULL,
92
- updated_at = ?
93
- WHERE id = ? AND bind_attempt_id = ? AND send_state = 'awaiting'
94
- AND state IN (${j})
95
- `).run(d,f,b,c,...e.O7).changes}let F=(0,f.h)("relay-db");function G(a,b){let c=(0,d.randomUUID)(),e=b.now??Date.now(),f=b.bindMode??"legacy",g="bound"===f?"awaiting":null;return a.prepare(`
96
- INSERT INTO session_relays
97
- (id, from_worktree_id, from_instance_id, to_worktree_id, to_instance_id,
98
- state, hops, sent_request_id, pending_kind, pending_body, prompt_signature,
99
- created_at, updated_at, expires_at, delivered_at, bind_mode, send_state)
100
- VALUES (?, ?, ?, ?, ?, 'pending', ?, NULL, NULL, NULL, NULL, ?, ?, ?, NULL, ?, ?)
101
- `).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}}function H(a,b){let c=a.prepare(`SELECT ${g} FROM session_relays WHERE id = ?`).get(b);return c?i(c):null}function I(a,b){return a.prepare(`
102
- SELECT ${g} FROM session_relays
103
- WHERE to_worktree_id = ? AND to_instance_id = ?
104
- AND state IN (${j})
105
- ORDER BY created_at ASC
106
- `).all(b.worktreeId,b.instanceId,...e.O7).map(i)}function J(a,b){return{owed:I(a,b),awaiting:a.prepare(`
107
- SELECT ${g} FROM session_relays
108
- WHERE from_worktree_id = ? AND from_instance_id = ?
109
- AND state IN (${j})
110
- ORDER BY created_at ASC
111
- `).all(b.worktreeId,b.instanceId,...e.O7).map(i)}}function K(a,b){return a.prepare(`
112
- SELECT ${g} FROM session_relays
113
- WHERE (from_worktree_id = ? OR to_worktree_id = ?)
114
- AND state IN (${j})
115
- ORDER BY created_at ASC
116
- `).all(b,b,...e.O7).map(i)}function L(a,b,c){return a.prepare(`
117
- SELECT COUNT(*) AS n FROM session_relays
118
- WHERE from_worktree_id = ? AND from_instance_id = ?
119
- AND to_worktree_id = ? AND to_instance_id = ?
120
- AND state IN (${j})
121
- `).get(b.worktreeId,b.instanceId,c.worktreeId,c.instanceId,...e.O7).n}function M(a,b,c,d=Date.now()){try{let f=a.prepare(`
122
- UPDATE session_relays
123
- SET state = 'delivered', sent_request_id = ?, delivered_at = ?,
124
- pending_kind = NULL, pending_body = NULL, payload_id = NULL, updated_at = ?
125
- WHERE id = ? AND sent_request_id IS NULL
126
- AND state IN (${j})
127
- `).run(c,d,d,b,...e.O7);return 1===f.changes}catch(a){return F.warn("relay-deliver-conflict",{relayId:b,error:a instanceof Error?a.message:String(a)}),!1}}function N(a,b,c,d=Date.now()){a.prepare(`
128
- UPDATE session_relays
129
- SET state = 'prompt', prompt_signature = ?, updated_at = ?
130
- WHERE id = ?
131
- `).run(c,d,b)}function O(a,b){let c=a.prepare("SELECT prompt_signature FROM session_relays WHERE id = ?").get(b);return c?.prompt_signature??null}function P(a,b,c=Date.now()){return 1===a.prepare(`
132
- UPDATE session_relays
133
- SET state = 'expired', updated_at = ?
134
- WHERE id = ? AND state IN (${j})
135
- `).run(c,b,...e.O7).changes}function Q(a,b=Date.now()){return a.prepare(`
136
- SELECT ${g} FROM session_relays
137
- WHERE state IN (${j}) AND expires_at <= ?
138
- ORDER BY expires_at ASC
139
- `).all(...e.O7,b).map(i)}function R(a,b,c=Date.now()){return 1===a.prepare(`
140
- UPDATE session_relays
141
- SET state = 'cancelled', pending_kind = NULL, pending_body = NULL, payload_id = NULL,
142
- pending_reply = NULL, updated_at = ?
143
- WHERE id = ? AND state IN (${j})
144
- `).run(c,b,...e.O7).changes}function S(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}}};