commandmate 0.33.3 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +146 -146
  3. package/.next/app-path-routes-manifest.json +29 -29
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +9 -9
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/update-check/route.js +1 -1
  12. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/assistant/conversation/route.js +1 -1
  14. package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
  15. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/assistant/current-output/route.js +1 -1
  17. package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
  18. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/assistant/messages/route.js +1 -1
  20. package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
  21. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/assistant/session/route.js +1 -1
  23. package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
  24. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/assistant/start/route.js +2 -2
  26. package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
  27. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/assistant/terminal/route.js +3 -3
  29. package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
  30. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/assistant/tools/route.js +1 -1
  32. package/.next/server/app/api/assistant/tools/route.js.nft.json +1 -1
  33. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/capabilities/route.js +1 -1
  38. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  43. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/hooks/agent-event/route.js +1 -1
  47. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  48. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/hooks/claude-done/route.js +2 -2
  50. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  51. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  52. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  53. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  54. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  55. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -1
  61. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
  62. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/relays/route.js +1 -1
  64. package/.next/server/app/api/relays/route.js.nft.json +1 -1
  65. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  67. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  70. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  71. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  72. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/repositories/clone/route.js +1 -1
  74. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  75. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/repositories/restore/route.js +1 -1
  78. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  79. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/repositories/route.js +1 -1
  81. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  82. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/repositories/scan/route.js +1 -1
  84. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  85. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/repositories/sync/route.js +1 -1
  87. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  88. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  91. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  92. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  110. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  113. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  116. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  122. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  153. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  156. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  159. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  171. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  176. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  179. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/schedules/route.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  188. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +2 -2
  190. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  191. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  202. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/tasks/route.js +2 -2
  204. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/terminal/route.js +2 -2
  206. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  207. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  209. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  211. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  212. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  215. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
  218. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  221. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  222. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  224. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  225. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  226. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  227. package/.next/server/app/api/worktrees/route.js +1 -1
  228. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  229. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  230. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  231. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  232. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  233. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  234. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  235. package/.next/server/app/page.js +1 -1
  236. package/.next/server/app/page_client-reference-manifest.js +1 -1
  237. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  238. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  239. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  240. package/.next/server/app/sessions/page.js +1 -1
  241. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  242. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  243. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  244. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  245. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  246. package/.next/server/app/worktrees/[id]/page.js +8 -8
  247. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  248. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  249. package/.next/server/app-paths-manifest.json +29 -29
  250. package/.next/server/chunks/1049.js +1 -0
  251. package/.next/server/chunks/1501.js +4 -4
  252. package/.next/server/chunks/1886.js +2 -2
  253. package/.next/server/chunks/2119.js +1 -1
  254. package/.next/server/chunks/2404.js +1 -1
  255. package/.next/server/chunks/2445.js +1 -1
  256. package/.next/server/chunks/3241.js +1 -1
  257. package/.next/server/chunks/3323.js +1 -1
  258. package/.next/server/chunks/3480.js +2 -2
  259. package/.next/server/chunks/4443.js +1 -1
  260. package/.next/server/chunks/4802.js +1 -1
  261. package/.next/server/chunks/5164.js +1 -1
  262. package/.next/server/chunks/5571.js +1 -1
  263. package/.next/server/chunks/595.js +1 -1
  264. package/.next/server/chunks/6130.js +1 -1
  265. package/.next/server/chunks/6285.js +1 -1
  266. package/.next/server/chunks/6286.js +7 -7
  267. package/.next/server/chunks/6337.js +1 -1
  268. package/.next/server/chunks/650.js +1 -1
  269. package/.next/server/chunks/663.js +1 -1
  270. package/.next/server/chunks/6677.js +25 -0
  271. package/.next/server/chunks/7075.js +1 -0
  272. package/.next/server/chunks/7905.js +1 -1
  273. package/.next/server/chunks/8583.js +1 -0
  274. package/.next/server/chunks/8918.js +4 -2
  275. package/.next/server/chunks/9080.js +1 -0
  276. package/.next/server/chunks/964.js +1 -0
  277. package/.next/server/middleware-manifest.json +5 -5
  278. package/.next/server/pages/500.html +1 -1
  279. package/.next/server/server-reference-manifest.json +1 -1
  280. package/.next/static/chunks/2053-9ac860ab4e92ac89.js +1 -0
  281. package/.next/static/chunks/2652-18b8fea64413467e.js +1 -0
  282. package/.next/static/chunks/{4718-814f4ecfd7fcc513.js → 4718-2d9f0397a8f931c4.js} +1 -1
  283. package/.next/static/chunks/{8361-9bb887203c456edb.js → 8361-0142beb59be2abf3.js} +1 -1
  284. package/.next/static/chunks/app/{page-022090bf6f932818.js → page-26a42881c8648cd3.js} +1 -1
  285. package/.next/static/chunks/app/sessions/page-a3ab6f122ec60d5a.js +1 -0
  286. package/.next/static/chunks/app/worktrees/[id]/page-a39ec2a0732d11a6.js +1 -0
  287. package/.next/static/css/b09bede85744e1cf.css +1 -0
  288. package/.next/trace +13 -13
  289. package/dist/cli/commands/ask.d.ts.map +1 -1
  290. package/dist/cli/commands/ask.js +11 -2
  291. package/dist/cli/commands/respond.d.ts.map +1 -1
  292. package/dist/cli/commands/respond.js +8 -4
  293. package/dist/cli/commands/send.d.ts.map +1 -1
  294. package/dist/cli/commands/send.js +18 -0
  295. package/dist/cli/commands/wait.d.ts +18 -3
  296. package/dist/cli/commands/wait.d.ts.map +1 -1
  297. package/dist/cli/commands/wait.js +137 -2
  298. package/dist/cli/docs/agent-operations.d.ts +2 -2
  299. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  300. package/dist/cli/docs/agent-operations.js +41 -1
  301. package/dist/cli/utils/session-target.d.ts +23 -6
  302. package/dist/cli/utils/session-target.d.ts.map +1 -1
  303. package/dist/cli/utils/session-target.js +33 -5
  304. package/dist/server/locales/en/worktree.json +21 -2
  305. package/dist/server/locales/ja/worktree.json +21 -2
  306. package/dist/server/src/config/schedule-config.js +45 -3
  307. package/dist/server/src/lib/cli-tools/antigravity.js +95 -10
  308. package/dist/server/src/lib/cli-tools/submit-verified-sender.js +377 -16
  309. package/dist/server/src/lib/cmate-parser.js +8 -1
  310. package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +140 -19
  311. package/dist/server/src/lib/detection/tools/claude/detect.js +13 -2
  312. package/dist/server/src/lib/detection/tools/claude/picker-chrome.js +239 -0
  313. package/dist/server/src/lib/detection/tools/claude/prompt.js +74 -6
  314. package/dist/server/src/lib/hooks/sources/claude/history.js +391 -34
  315. package/dist/server/src/lib/hooks/sources/claude/transcript.js +91 -0
  316. package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +114 -11
  317. package/dist/server/src/lib/polling/response-checker.js +82 -3
  318. package/dist/server/src/lib/schedule-manager.js +178 -19
  319. package/dist/server/src/lib/session/ask-user-question-prompt.js +4 -2
  320. package/dist/server/src/lib/session/claude-executor.js +33 -2
  321. package/dist/server/src/lib/session/resolve-session-target.js +37 -9
  322. package/dist/server/src/lib/verification/env-clean-gate.js +81 -4
  323. package/dist/server/src/types/agent-transcript.js +143 -1
  324. package/package.json +1 -1
  325. package/.next/server/chunks/1068.js +0 -1
  326. package/.next/server/chunks/6808.js +0 -1
  327. package/.next/server/chunks/7875.js +0 -25
  328. package/.next/server/chunks/9553.js +0 -1
  329. package/.next/static/chunks/2053-3f299a7a2c7d6767.js +0 -1
  330. package/.next/static/chunks/8772-9be53a530950d804.js +0 -1
  331. package/.next/static/chunks/app/sessions/page-584adf11ae51df10.js +0 -1
  332. package/.next/static/chunks/app/worktrees/[id]/page-3af707e74a75172b.js +0 -1
  333. package/.next/static/css/acd46e25427a2080.css +0 -1
  334. /package/.next/static/{9x6U1h52hH_r6pOsGwI_p → gniPBCKoXtbIOQey8kNcx}/_buildManifest.js +0 -0
  335. /package/.next/static/{9x6U1h52hH_r6pOsGwI_p → gniPBCKoXtbIOQey8kNcx}/_ssgManifest.js +0 -0
@@ -27,9 +27,12 @@
27
27
  *
28
28
  * The roster outranks the explicit request because it is the user-maintained
29
29
  * declaration of what a named instance is; a contradiction is reported rather
30
- * than silently resolved. Callers decide what to do with it: routes with a side
31
- * effect answer 400, read-only routes answer 200 and surface the conflict in
32
- * the payload (design §4 D5 / DR3-015).
30
+ * than silently resolved. A tool-named instance id is a declaration too the
31
+ * id `codex` says which agent it is so with no roster row an explicit request
32
+ * for another tool is reported against the primary anchor the same way (Issue
33
+ * #2487). Callers decide what to do with it: routes with a side effect answer
34
+ * 400, read-only routes answer 200 and surface the conflict in the payload
35
+ * (design §4 D5 / DR3-015).
33
36
  */
34
37
  Object.defineProperty(exports, "__esModule", { value: true });
35
38
  exports.INSTANCE_TOOL_CONFLICT = exports.DEFAULT_SESSION_CLI_TOOL = void 0;
@@ -61,7 +64,8 @@ exports.INSTANCE_TOOL_CONFLICT = 'instance_tool_conflict';
61
64
  * @param db - Database instance
62
65
  * @param worktreeId - Worktree ID (already canonicalized and validated)
63
66
  * @param options - Targeting signals carried by the request
64
- * @returns The resolved target, with `conflict` set when the request contradicts the roster
67
+ * @returns The resolved target, with `conflict` set when the request contradicts
68
+ * the roster or the primary-instance anchor
65
69
  */
66
70
  function resolveSessionTarget(db, worktreeId, options = {}) {
67
71
  const { instanceId, requestedCliTool } = options;
@@ -94,9 +98,27 @@ function resolveSessionTarget(db, worktreeId, options = {}) {
94
98
  }
95
99
  return target;
96
100
  }
97
- // The roster does not know this instance (the ad-hoc `send --instance <new-id>`
98
- // flow), so an explicit tool is the only declaration there is.
101
+ // The roster does not know this instance, so for an ad-hoc id (the
102
+ // `send --instance <new-id>` flow) an explicit tool is the only declaration
103
+ // there is. A tool-named id declares itself (#868, below), and a request for
104
+ // a different tool contradicts that exactly as it would a roster row (Issue
105
+ // #2487). Taking the request instead started `mcbd-<requested>-<wt>-<id>`, a
106
+ // session nothing that names the id alone ever reads: `ask --instance
107
+ // antigravity --agent command-code` sent there, then waited on agy.
99
108
  if (requestedCliTool) {
109
+ if ((0, types_1.isCliToolType)(instanceId) && requestedCliTool !== instanceId) {
110
+ return {
111
+ cliToolId: instanceId,
112
+ instanceId,
113
+ resolvedBy: 'primary',
114
+ conflict: {
115
+ instanceId,
116
+ rosterCliTool: instanceId,
117
+ requestedCliTool,
118
+ primaryAnchor: true,
119
+ },
120
+ };
121
+ }
100
122
  return { cliToolId: requestedCliTool, instanceId, resolvedBy: 'explicit' };
101
123
  }
102
124
  // #868: an instance id that names a CLI tool *is* that tool's primary
@@ -145,11 +167,17 @@ function resolveSessionTargetStrict(db, worktreeId, options = {}) {
145
167
  return { ok: true, target };
146
168
  }
147
169
  /**
148
- * The sentence shown to a human when the roster and the request disagree.
149
- * Names both declarations and the three ways out, because the operator has to
150
- * pick which one is wrong.
170
+ * The sentence shown to a human when the instance's declaration and the
171
+ * request disagree. Names both declarations and the three ways out, because the
172
+ * operator has to pick which one is wrong. A primary-anchor conflict has no
173
+ * roster entry to update, so its third way out is another instance.
151
174
  */
152
175
  function describeSessionTargetConflict(conflict) {
176
+ if (conflict.primaryAnchor) {
177
+ return (`Agent instance '${conflict.instanceId}' is the primary instance of ${conflict.rosterCliTool}, `
178
+ + `but ${conflict.requestedCliTool} was requested. `
179
+ + `Omit the agent, pass ${conflict.rosterCliTool}, or target a ${conflict.requestedCliTool} instance instead.`);
180
+ }
153
181
  return (`Agent instance '${conflict.instanceId}' is registered as ${conflict.rosterCliTool}, `
154
182
  + `but ${conflict.requestedCliTool} was requested. `
155
183
  + `Omit the agent, pass ${conflict.rosterCliTool}, or update the instance's roster entry.`);
@@ -20,7 +20,9 @@
20
20
  * the pkill (#1739) and `kill-server` (#1624) case. New things are a
21
21
  * violation *unless they are attributable to another worker*, because
22
22
  * parallel delegations legitimately start their own sessions and servers
23
- * inside each other's measurement windows.
23
+ * inside each other's measurement windows — or unless they are the one
24
+ * agent session the delegation itself started (#2472), which the baseline
25
+ * names and which is excused by that exact name only.
24
26
  *
25
27
  * Server-only: consumes snapshots produced by env-snapshot.
26
28
  *
@@ -31,11 +33,15 @@ exports.ENV_CLEAN_GUIDANCE = exports.MAX_REPORTED_ENV_CHANGES = exports.REQUIRE_
31
33
  exports.resolveRequireEnvClean = resolveRequireEnvClean;
32
34
  exports.attributeSessionName = attributeSessionName;
33
35
  exports.attributeAnchor = attributeAnchor;
36
+ exports.resolveTaskSessionName = resolveTaskSessionName;
37
+ exports.recordTaskSession = recordTaskSession;
38
+ exports.readTaskSession = readTaskSession;
34
39
  exports.diffEnvSnapshots = diffEnvSnapshots;
35
40
  exports.formatEnvCleanReport = formatEnvCleanReport;
36
41
  exports.envCleanNoBaseline = envCleanNoBaseline;
37
42
  exports.evaluateEnvClean = evaluateEnvClean;
38
43
  const path_1 = require("path");
44
+ const session_name_1 = require("../../lib/cli-tools/session-name");
39
45
  const types_1 = require("../../lib/cli-tools/types");
40
46
  const env_snapshot_1 = require("./env-snapshot");
41
47
  const verify_config_1 = require("./verify-config");
@@ -139,6 +145,41 @@ function attributeEntry(probeId, entry, context) {
139
145
  return 'unattributed';
140
146
  }
141
147
  }
148
+ /**
149
+ * The tmux session a task's delegation runs in.
150
+ *
151
+ * `resolveSessionName` is the function that names the session when it is
152
+ * started, so the naming rule stays in one place: a second copy here would be
153
+ * free to drift, and the drift would read as a leak.
154
+ *
155
+ * @returns null when the row cannot name a session — a CLI tool id this build
156
+ * does not know, or a name `validateSessionName` refuses
157
+ */
158
+ function resolveTaskSessionName(task) {
159
+ if (!(0, types_1.isCliToolType)(task.cliToolId))
160
+ return null;
161
+ try {
162
+ return (0, session_name_1.resolveSessionName)(task.cliToolId, task.worktreeId, task.instanceId ?? undefined);
163
+ }
164
+ catch {
165
+ return null;
166
+ }
167
+ }
168
+ /** A freshly captured baseline, stamped with its task's own agent session. */
169
+ function recordTaskSession(snapshot, task) {
170
+ return { ...snapshot, taskSession: resolveTaskSessionName(task) };
171
+ }
172
+ /**
173
+ * The session a baseline excuses: its name, `null` when it was recorded as
174
+ * unresolvable, or `undefined` when the baseline predates the field. Only a
175
+ * non-empty string excuses anything.
176
+ */
177
+ function readTaskSession(baseline) {
178
+ if (!('taskSession' in baseline))
179
+ return undefined;
180
+ const recorded = baseline.taskSession;
181
+ return typeof recorded === 'string' && recorded !== '' ? recorded : null;
182
+ }
142
183
  function toChange(entry, owner) {
143
184
  return { key: entry.key, detail: entry.detail, owner };
144
185
  }
@@ -151,6 +192,7 @@ function toChange(entry, owner) {
151
192
  * than useless, and treating it as equal would be the fail-open.
152
193
  */
153
194
  function diffEnvSnapshots(baseline, final, context) {
195
+ const taskSession = readTaskSession(baseline);
154
196
  const probes = env_snapshot_1.ENV_PROBE_IDS.map((probeId) => {
155
197
  const before = baseline.probes[probeId];
156
198
  const after = final.probes[probeId];
@@ -161,6 +203,7 @@ function diffEnvSnapshots(baseline, final, context) {
161
203
  reason: `baseline probe unavailable: ${before?.reason ?? 'not recorded'}`,
162
204
  added: [],
163
205
  ignoredAdded: [],
206
+ taskSessionAdded: [],
164
207
  removed: [],
165
208
  };
166
209
  }
@@ -171,6 +214,7 @@ function diffEnvSnapshots(baseline, final, context) {
171
214
  reason: `current probe unavailable: ${after?.reason ?? 'not recorded'}`,
172
215
  added: [],
173
216
  ignoredAdded: [],
217
+ taskSessionAdded: [],
174
218
  removed: [],
175
219
  };
176
220
  }
@@ -178,10 +222,17 @@ function diffEnvSnapshots(baseline, final, context) {
178
222
  const afterKeys = new Set(after.entries.map((entry) => entry.key));
179
223
  const added = [];
180
224
  const ignoredAdded = [];
225
+ const taskSessionAdded = [];
181
226
  for (const entry of after.entries) {
182
227
  if (beforeKeys.has(entry.key))
183
228
  continue;
184
229
  const owner = attributeEntry(probeId, entry, context);
230
+ if (probeId === 'tmux-sessions' && taskSession && entry.key === taskSession) {
231
+ // Additions only: a task session that existed at task start and is gone
232
+ // falls through to `removed` below like everything else (#1624).
233
+ taskSessionAdded.push(toChange(entry, owner));
234
+ continue;
235
+ }
185
236
  (owner === 'other' ? ignoredAdded : added).push(toChange(entry, owner));
186
237
  }
187
238
  const removed = before.entries
@@ -193,6 +244,7 @@ function diffEnvSnapshots(baseline, final, context) {
193
244
  reason: null,
194
245
  added,
195
246
  ignoredAdded,
247
+ taskSessionAdded,
196
248
  removed,
197
249
  };
198
250
  });
@@ -204,7 +256,7 @@ function diffEnvSnapshots(baseline, final, context) {
204
256
  : probes.some((probe) => probe.status === 'unknown')
205
257
  ? 'unknown'
206
258
  : 'clean';
207
- return { status, probes };
259
+ return { status, taskSession, probes };
208
260
  }
209
261
  // =============================================================================
210
262
  // Reporting
@@ -217,7 +269,9 @@ exports.MAX_REPORTED_ENV_CHANGES = 25;
217
269
  * different actions.
218
270
  */
219
271
  exports.ENV_CLEAN_GUIDANCE = 'Anything listed under "+" was started or created during this task and left behind — ' +
220
- 'stop it by PID and remove it. Anything under "-" existed when the task started and is ' +
272
+ 'stop it by PID and remove it. The one exception is a "+" line marked "task session, ' +
273
+ 'excused": that is the agent session this delegation itself started, it is not counted, ' +
274
+ 'and it must be left running. Anything under "-" existed when the task started and is ' +
221
275
  'now gone — it was killed or deleted; restart or restore it. Never stop a process by ' +
222
276
  'pattern (`pkill -f`): it takes every process whose command line matches, which is how ' +
223
277
  'the production server was stopped in #1739.';
@@ -232,6 +286,27 @@ function formatChanges(sign, changes) {
232
286
  lines.push(` ... and ${remainder} more`);
233
287
  return lines;
234
288
  }
289
+ /**
290
+ * The excused task session, listed rather than dropped (#2472): a verdict that
291
+ * silently discounted a session would read exactly like one that never saw it.
292
+ */
293
+ function formatTaskSessionChanges(changes) {
294
+ return changes.map((change) => {
295
+ const detail = change.detail ? ` ${change.detail}` : '';
296
+ return ` + ${change.key}${detail} [task session, excused]`;
297
+ });
298
+ }
299
+ /**
300
+ * The header's account of what could be excused, so a report judged against a
301
+ * baseline written before #2472 says why the task's own session was not.
302
+ */
303
+ function describeTaskSession(taskSession) {
304
+ if (taskSession === undefined)
305
+ return 'unrecorded (baseline predates #2472; nothing excused)';
306
+ if (taskSession === null)
307
+ return 'unresolved (nothing excused)';
308
+ return taskSession;
309
+ }
235
310
  /** Render a diff for `log_tail`. */
236
311
  function formatEnvCleanReport(diff) {
237
312
  const lines = [];
@@ -246,11 +321,13 @@ function formatEnvCleanReport(diff) {
246
321
  ? ` (${probe.ignoredAdded.length} addition(s) attributed to another worktree)`
247
322
  : '';
248
323
  lines.push(` ${probe.probeId} clean (${label})${excused}`);
324
+ lines.push(...formatTaskSessionChanges(probe.taskSessionAdded));
249
325
  continue;
250
326
  }
251
327
  lines.push(` ${probe.probeId} VIOLATED (${label}): +${probe.added.length} -${probe.removed.length}`);
252
328
  lines.push(...formatChanges('+', probe.added));
253
329
  lines.push(...formatChanges('-', probe.removed));
330
+ lines.push(...formatTaskSessionChanges(probe.taskSessionAdded));
254
331
  for (const excused of probe.ignoredAdded) {
255
332
  lines.push(` · ${excused.key} (ignored: belongs to another worktree)`);
256
333
  }
@@ -308,7 +385,7 @@ async function evaluateEnvClean(input) {
308
385
  }
309
386
  const diff = diffEnvSnapshots(input.baseline, final, input);
310
387
  const header = `${verify_config_1.ENV_CLEAN_GATE_ID}: baseline=${new Date(input.baseline.capturedAt).toISOString()} ` +
311
- `status=${diff.status}`;
388
+ `status=${diff.status} task-session=${describeTaskSession(diff.taskSession)}`;
312
389
  const report = `${header}\n${formatEnvCleanReport(diff)}`;
313
390
  if (diff.status === 'clean')
314
391
  return done('passed', report, 0);
@@ -39,17 +39,20 @@
39
39
  * @module types/agent-transcript
40
40
  */
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.AGENT_MARKDOWN_REQUEST_ID_PREFIXES = exports.COMMAND_CODE_PROMPT_REQUEST_ID_PREFIX = exports.COMMAND_CODE_MARKDOWN_REQUEST_ID_PREFIX = exports.ANTIGRAVITY_PROMPT_REQUEST_ID_PREFIX = exports.ANTIGRAVITY_MARKDOWN_REQUEST_ID_PREFIX = exports.CODEX_PROMPT_REQUEST_ID_PREFIX = exports.CODEX_MARKDOWN_REQUEST_ID_PREFIX = exports.CLAUDE_PROMPT_REQUEST_ID_PREFIX = exports.CLAUDE_MARKDOWN_REQUEST_ID_PREFIX = exports.AGENT_MARKDOWN_REQUEST_ID_PREFIX = void 0;
42
+ exports.CLAUDE_HEADLESS_TURN_ID_PREFIX = exports.AGENT_MARKDOWN_REQUEST_ID_PREFIXES = exports.COMMAND_CODE_PROMPT_REQUEST_ID_PREFIX = exports.COMMAND_CODE_MARKDOWN_REQUEST_ID_PREFIX = exports.ANTIGRAVITY_PROMPT_REQUEST_ID_PREFIX = exports.ANTIGRAVITY_MARKDOWN_REQUEST_ID_PREFIX = exports.CODEX_PROMPT_REQUEST_ID_PREFIX = exports.CODEX_MARKDOWN_REQUEST_ID_PREFIX = exports.CLAUDE_PROMPT_REQUEST_ID_PREFIX = exports.CLAUDE_MARKDOWN_REQUEST_ID_PREFIX = exports.AGENT_MARKDOWN_REQUEST_ID_PREFIX = void 0;
43
43
  exports.isAgentAuthoredMarkdown = isAgentAuthoredMarkdown;
44
44
  exports.opencodeTurnRequestId = opencodeTurnRequestId;
45
45
  exports.claudeTurnRequestId = claudeTurnRequestId;
46
46
  exports.claudePromptRequestId = claudePromptRequestId;
47
+ exports.claudeHeadlessTurnId = claudeHeadlessTurnId;
47
48
  exports.codexTurnRequestId = codexTurnRequestId;
48
49
  exports.codexPromptRequestId = codexPromptRequestId;
49
50
  exports.antigravityTurnRequestId = antigravityTurnRequestId;
50
51
  exports.antigravityPromptRequestId = antigravityPromptRequestId;
51
52
  exports.commandCodeTurnRequestId = commandCodeTurnRequestId;
52
53
  exports.commandCodePromptRequestId = commandCodePromptRequestId;
54
+ exports.resolveAgentTurnKey = resolveAgentTurnKey;
55
+ exports.correlatedPromptRequestId = correlatedPromptRequestId;
53
56
  /**
54
57
  * Prefix on `chat_messages.request_id` for a row whose `content` is opencode's
55
58
  * own Markdown rather than a scrape of its terminal.
@@ -269,6 +272,53 @@ function claudeTurnRequestId(promptUuid) {
269
272
  function claudePromptRequestId(promptUuid) {
270
273
  return `${exports.CLAUDE_PROMPT_REQUEST_ID_PREFIX}${promptUuid}`;
271
274
  }
275
+ /**
276
+ * The segment a Claude turn id opens with when no prompt record names the turn
277
+ * (Issue #2199, made durable by Issue #2470).
278
+ *
279
+ * `partial:` cannot be the start of a UUID, so no turn id built on it can equal
280
+ * a prompt record's `uuid` — which is what keeps every key built on it apart
281
+ * from {@link claudeTurnRequestId} of a real prompt.
282
+ */
283
+ exports.CLAUDE_HEADLESS_TURN_ID_PREFIX = 'partial:';
284
+ /**
285
+ * The turn id for a Claude reply whose prompt record could not be read (Issue #2470).
286
+ *
287
+ * `partial:<sessionId>:<closingRecordUuid>`, handed to {@link claudeTurnRequestId}
288
+ * where a prompt `uuid` would otherwise go. A turn longer than the widest window
289
+ * `lib/hooks/sources/claude/history` reads back has no prompt record in reach,
290
+ * and #2470 saves what can be read of it rather than nothing. That row still
291
+ * needs a key that does both jobs every key in this module does — idempotency
292
+ * and provenance — without the record that normally provides one.
293
+ *
294
+ * Three candidates were available, and the other two fail on the first job:
295
+ *
296
+ * - **`partial:<sessionId>`**, the live bubble's key (#2199). One per session,
297
+ * so a second long turn in the same session would find the first one's row,
298
+ * read "already saved" and be lost. It stays the live key and only that.
299
+ * - **The first assistant record in the window.** The window is the file's last
300
+ * N bytes, and Claude keeps appending after a turn closes — measured on
301
+ * 2026-09-11 over 298 transcripts, the records between a closing `end_turn`
302
+ * and the next prompt were `attachment` (1,929), `system:turn_duration`
303
+ * (1,927), `system:stop_hook_summary` (1,923), `queue-operation` (1,487) and
304
+ * more. Every one of them moves the window's head, so two reads of one
305
+ * finished turn could name two different records and write the reply twice.
306
+ * - **The record that closed the turn** — its last assistant record. In the
307
+ * same census, across 1,973 closed turns, not one assistant record followed a
308
+ * closing `end_turn` before the next prompt. Every read that can see the turn
309
+ * at all therefore names the same record, and no two turns share one.
310
+ *
311
+ * The second `:` is what separates this from the live key: a session id is a
312
+ * UUID and has none. {@link correlatedPromptRequestId} turns it into a
313
+ * `claude-prompt:partial:…` id that no writer produces, which is correct — a
314
+ * turn with no prompt record in reach gets no user row.
315
+ *
316
+ * @param sessionId - The session the turn was read from
317
+ * @param closingRecordUuid - `uuid` of the turn's last assistant record
318
+ */
319
+ function claudeHeadlessTurnId(sessionId, closingRecordUuid) {
320
+ return `${exports.CLAUDE_HEADLESS_TURN_ID_PREFIX}${sessionId}:${closingRecordUuid}`;
321
+ }
272
322
  /**
273
323
  * The row id for one codex turn (Issue #2197).
274
324
  *
@@ -386,3 +436,95 @@ function commandCodeTurnRequestId(promptId) {
386
436
  function commandCodePromptRequestId(promptId) {
387
437
  return `${exports.COMMAND_CODE_PROMPT_REQUEST_ID_PREFIX}${promptId}`;
388
438
  }
439
+ // ============================================================================
440
+ // Turn keys, read back off a saved row (Issue #2458)
441
+ // ============================================================================
442
+ /**
443
+ * Every turn prefix paired with the **prompt** prefix that names the same turn.
444
+ *
445
+ * Three tools, and the two that are absent are absent for a reason rather than
446
+ * by oversight:
447
+ *
448
+ * - **codex** keys its assistant row on `turn_id` and its user row on the
449
+ * `UserMessage` item's own id (see {@link CODEX_PROMPT_REQUEST_ID_PREFIX} for
450
+ * the measurement that forces that). The two are different ids in the
451
+ * database, so there is no string this map could produce that would find the
452
+ * prompt, and producing one anyway would silently correlate a turn with
453
+ * whatever row happened to carry that id.
454
+ * - **opencode** names a turn by the user message it answers
455
+ * ({@link opencodeTurnRequestId}), but the user row itself is not written
456
+ * with a matching `oc-prompt:` marker — there is no such constant — so the
457
+ * same objection applies.
458
+ *
459
+ * Issue #2458 therefore shows a turn boundary for all five tools and a
460
+ * start-side time for these three only. That asymmetry is the contract, not a
461
+ * gap in it: the alternative is guessing which prompt opened a turn, and a
462
+ * guessed clock time is worse than no clock time.
463
+ */
464
+ const TURN_PREFIX_TO_PROMPT_PREFIX = [
465
+ [exports.CLAUDE_MARKDOWN_REQUEST_ID_PREFIX, exports.CLAUDE_PROMPT_REQUEST_ID_PREFIX],
466
+ [exports.ANTIGRAVITY_MARKDOWN_REQUEST_ID_PREFIX, exports.ANTIGRAVITY_PROMPT_REQUEST_ID_PREFIX],
467
+ [exports.COMMAND_CODE_MARKDOWN_REQUEST_ID_PREFIX, exports.COMMAND_CODE_PROMPT_REQUEST_ID_PREFIX],
468
+ ];
469
+ /**
470
+ * The turn a saved row belongs to, as a comparable key, or `null`.
471
+ *
472
+ * The key is the **whole `request_id`**, prefix included, and that is
473
+ * load-bearing: `antigravity-turn:53b7…#0` and `claude-turn:53b7…#0` are
474
+ * different turns even if the suffixes ever collided, and comparing suffixes
475
+ * alone would fold two tools' turns into one. It also means a caller never
476
+ * needs to know which prefix matched — which is the point of this helper
477
+ * existing at all, since Issue #2458's rule ("the key CHANGED") is a string
478
+ * comparison and nothing more.
479
+ *
480
+ * Conservative in exactly the way {@link isAgentAuthoredMarkdown} is:
481
+ *
482
+ * - a non-string (`undefined`, `null`, or a number that survived a bad
483
+ * round-trip) is unknown;
484
+ * - an unrecognised prefix — the scraper's `req_…`, a `claude-prompt:` user
485
+ * row, anything a future producer invents — is unknown;
486
+ * - a recognised prefix with an EMPTY or whitespace-only suffix is unknown.
487
+ * `claude-turn:` on its own names no turn, and treating it as one would make
488
+ * every such row read as the same turn as every other such row.
489
+ *
490
+ * "Unknown" never means "a new turn" at the call site: see
491
+ * `buildChatTranscriptRows`, which carries the last known key across unknown
492
+ * rows rather than letting one split a reply in half.
493
+ *
494
+ * @param requestId - `ChatMessage.requestId`, which is usually absent
495
+ * @returns The full `request_id`, or `null` when it names no known turn
496
+ */
497
+ function resolveAgentTurnKey(requestId) {
498
+ if (typeof requestId !== 'string')
499
+ return null;
500
+ for (const prefix of exports.AGENT_MARKDOWN_REQUEST_ID_PREFIXES) {
501
+ if (!requestId.startsWith(prefix))
502
+ continue;
503
+ return requestId.slice(prefix.length).trim().length === 0 ? null : requestId;
504
+ }
505
+ return null;
506
+ }
507
+ /**
508
+ * The `request_id` the **user row** of this turn would carry, or `null`.
509
+ *
510
+ * `claude-turn:<uuid>` → `claude-prompt:<uuid>`, and the same for antigravity
511
+ * and Command Code. `null` for codex, for opencode, and for anything that is
512
+ * not a turn key at all — see {@link TURN_PREFIX_TO_PROMPT_PREFIX} for why
513
+ * those two are refused rather than approximated.
514
+ *
515
+ * This is a pure rename of the id, not a lookup: whether a row with that id
516
+ * exists, is in the same scope, is on screen and is older than the reply are
517
+ * four separate questions the caller answers against the rows it actually has.
518
+ *
519
+ * @param turnKey - A key from {@link resolveAgentTurnKey}
520
+ * @returns The correlated prompt `request_id`, or `null` when none can be named
521
+ */
522
+ function correlatedPromptRequestId(turnKey) {
523
+ for (const [turnPrefix, promptPrefix] of TURN_PREFIX_TO_PROMPT_PREFIX) {
524
+ if (!turnKey.startsWith(turnPrefix))
525
+ continue;
526
+ const suffix = turnKey.slice(turnPrefix.length);
527
+ return suffix.trim().length === 0 ? null : `${promptPrefix}${suffix}`;
528
+ }
529
+ return null;
530
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commandmate",
3
- "version": "0.33.3",
3
+ "version": "0.34.0",
4
4
  "description": "A local control plane for agent CLIs — orchestration and visibility for Claude Code, Codex, Gemini CLI, and more across Git worktrees",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -1 +0,0 @@
1
- "use strict";exports.id=1068,exports.ids=[1068,2839,5220],exports.modules={23197:(a,b,c)=>{c.d(b,{$M:()=>e,H1:()=>d,q5:()=>f});let d="__global__",e=2e3,f=900},39687:(a,b,c)=>{c.d(b,{d:()=>p});var d=c(56791),e=c(43234),f=c(15194),g=c(95220),h=c(12462),i=c(49640),j=c(54325),k=c(72626),l=c(58707),m=c(41466);let n=(0,k.h)("session/send-user-message");function o(a){return a instanceof Error?a.message:String(a)}async function p(a,b){let{worktreeId:c,content:k,cliToolId:p,instanceId:q,absoluteImagePath:r,copilotModel:s}=b,t=b.messageType??"normal",u=q??p,v=e.CLIToolManager.getInstance().getTool(p),w=await (0,l.a3)(c,p,q,{ignoreStructured:b.ignoreStructuredPromptGuard});if(w.waiting)return n.info("send-refused-prompt-waiting",{worktreeId:c,cliToolId:p,reason:w.reason,blockedBy:w.blockedBy}),{ok:!1,stage:"prompt_waiting",error:(0,l.br)(c,w.blockedBy)};let x=new Date;try{await (0,h.o4)(a,c,p,x,q)}catch(a){n.error("failed-to-save-pending-assistant-response:",{error:o(a)})}let y=null;try{let b=(0,d.getMessages)(a,c,{limit:1,cliToolId:p,instanceId:u,matchResolvedInstance:!0});b.length>0&&"user"===b[0].role&&b[0].content===k&&(y=b[0].id)}catch(a){n.error("failed-to-detect-orphaned-messages:",{error:o(a)})}if(s&&"copilot"===p)try{await v.sendModelCommand(c,s,q),n.info("copilot-model-command-sent",{model:s})}catch(a){return n.error("failed-to-send-model-command:",{error:o(a)}),{ok:!1,stage:"model",error:o(a)}}try{r?(0,f._J)(v)?await v.sendMessageWithImage(c,k,r,q):await v.sendMessage(c,(0,m.TZ)(k,r),q):await v.sendMessage(c,k,q)}catch(a){return n.error("failed-to-send-message-to:",{error:o(a)}),{ok:!1,stage:"send",error:o(a)}}let z=(0,d.createMessage)(a,{worktreeId:c,role:"user",content:k,messageType:t,timestamp:x,cliToolId:p,instanceId:q,requestId:b.requestId});try{(0,i.broadcastMessage)("message",{worktreeId:c,message:{...z,cliToolId:p,instanceId:u}})}catch(a){n.warn("user-message-broadcast-failed",{error:o(a)})}if(y)try{if((0,d.deleteMessageById)(a,y)){n.info("cleaned-up-orphaned-user");try{(0,i.broadcastMessage)(j.dz,{worktreeId:c,cliToolId:p,instanceId:u,reason:"orphan_cleanup"})}catch(a){n.warn("orphan-cleanup-broadcast-failed",{error:o(a)})}}}catch(a){n.error("failed-to-clean-up-orphaned-message:",{error:o(a)})}return(0,d.updateLastUserMessage)(a,c,k,x),(0,d.clearInProgressMessageId)(a,c,p,q),n.info("cleared-in-progress-message-for"),(0,g.startPolling)(c,p,q),{ok:!0,message:z}}},58707:(a,b,c)=>{c.d(b,{$n:()=>k,a3:()=>l,br:()=>m});var d=c(43234),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).`}},61068:(a,b,c)=>{c.d(b,{Nz:()=>u,EB:()=>v,l7:()=>x});var d=c(95220),e=c(45017),f=c(11099),g=c(85775),h=c(72626),i=c(43234),j=c(79892);let k=(0,h.h)("global-session-poller"),l=new Map,m=new Map;var n=c(93997),o=c(15194),p=c(23197),q=c(77093),r=c(82325);let s=(0,h.h)("session-cleanup");async function t(a,b){let c={worktreeId:a,sessionsKilled:[],sessionErrors:[],pollersStopped:[],pollerErrors:[]};for(let e of((0,n.pc)(),o.XH)){try{await b(a,e)&&(c.sessionsKilled.push(e),s.info("session:killed",{worktreeId:a,cliToolId:e}))}catch(d){let b=`${e}: ${(0,q.u1)(d)}`;c.sessionErrors.push(b),s.warn("session:kill-failed",{worktreeId:a,cliToolId:e,error:d instanceof Error?d.message:String(d)})}try{(0,d.stopPolling)(a,e),c.pollersStopped.push(`response-poller:${e}`)}catch(d){let b=`response-poller:${e}: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("response-poller:stop-failed",{worktreeId:a,cliToolId:e,error:d instanceof Error?d.message:String(d)})}}try{(0,e._C)(a),c.pollersStopped.push("auto-yes-poller")}catch(d){let b=`auto-yes-poller: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("auto-yes-poller:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}try{(0,e.LP)(a),c.pollersStopped.push("auto-yes-state")}catch(d){let b=`auto-yes-state: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("auto-yes-state:delete-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}try{(0,f.Yg)(a),c.pollersStopped.push("schedule-manager")}catch(d){let b=`schedule-manager: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("schedule-manager:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}try{(0,g.Tm)(a),c.pollersStopped.push("timer-manager")}catch(d){let b=`timer-manager: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("timer-manager:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}return c}async function u(a,b){let c=await Promise.allSettled(a.map(a=>t(a,b))),d=[],e=[];for(let b=0;b<c.length;b++){let f=c[b],g=a[b];if("fulfilled"===f.status){let a=f.value;for(let b of(d.push(a),a.sessionErrors))e.push(`Session kill error (${g}): ${b}`);for(let b of a.pollerErrors)e.push(`Poller stop error (${g}): ${b}`)}else e.push(`Cleanup failed (${g}): ${(0,q.u1)(f.reason)}`)}return{results:d,warnings:e}}async function v(a,b){try{let c=i.CLIToolManager.getInstance().getTool(b);if(!await c.isRunning(a))return!1;let e=`${a}:${b}`;(0,d.clearPromptHashCache)(e);let f=c.getSessionName(a);return(0,j.fY)(f)}catch{return!1}}async function w(){for(let a of l.keys()){let b=l.get(a);b&&clearTimeout(b)}l.clear(),m.clear(),k.info("poll:all-stopped");let a=0,b=i.CLIToolManager.getInstance();for(let c of o.XH)try{let d=b.getTool(c).getSessionName(p.H1);await (0,j.N)(d)&&await (0,j.fY)(d)&&(a++,s.info("global-session:killed",{cliToolId:c,sessionName:d}))}catch(a){s.warn("global-session:kill-failed",{cliToolId:c,error:(0,q.u1)(a)})}return a}async function x(a,b){let c=(0,r.L0)(a,b);try{await w()}catch(a){s.warn("sync:global-cleanup-failed",{error:(0,q.u1)(a)})}let d=[];if(c.deletedIds.length>0)try{let a=await u(c.deletedIds,v);a.warnings.length>0&&(s.warn("sync:cleanup-warnings",{warnings:a.warnings}),d=[`${a.warnings.length} session cleanup warning(s) occurred`])}catch(a){s.error("sync:cleanup-failed",{error:(0,q.u1)(a)}),d=["Session cleanup encountered an error"]}return{syncResult:c,cleanupWarnings:d}}},82325:(a,b,c)=>{c.d(b,{Hz:()=>o,L0:()=>r,Mg:()=>s,YM:()=>p,Yp:()=>q});var d=c(79646),e=c(28354),f=c(29021),g=c.n(f),h=c(33873),i=c.n(h),j=c(23718),k=c(56791),l=c(72626),m=c(64185);let n=(0,l.h)("worktrees");function o(){let a=process.env.WORKTREE_REPOS;return a&&a.trim()?a.split(",").map(a=>a.trim()).filter(a=>a.length>0):[]}async function p(a){let b=(0,e.promisify)(d.exec);if(function(a){if(!a)return!1;try{return g().lstatSync(a),!1}catch(b){let a=b.code;return"ENOENT"===a||"ENOTDIR"===a}}(a))return n.warn("repository:scan-skipped-missing-dir",{repoPath:a}),[];try{let{stdout:c}=await b("git worktree list",{cwd:a}),d=function(a){if(!a||""===a.trim())return[];let b=a.trim().split("\n"),c=[];for(let a of b){let b=a.trim();if(!b)continue;let d=b.match(/^(.+?)\s+([a-z0-9]+)\s+(?:\[(.+?)\]|\(detached HEAD\))/);if(d){let[,a,b,e]=d;c.push({path:a.trim(),branch:e||`detached-${b}`,commit:b})}}return c}(c),e=i().resolve(a),f=i().basename(e);return(0,m.oZ)(e),d.map(a=>{let b=i().resolve(a.path);return{id:(0,j.ko)(b),name:a.branch,branch:a.branch,path:b,repositoryPath:e,repositoryName:f}}).filter(a=>["/etc","/root","/sys","/proc","/dev","/boot","/bin","/sbin","/usr/bin","/usr/sbin"].some(b=>a.path.startsWith(b))?(n.warn("worktree:unsafe-path-skipped",{path:a.path}),!1):!(a.path.includes("\0")||a.path.includes(".."))||(n.warn("worktree:malicious-path-skipped",{path:a.path}),!1))}catch(c){let a=c instanceof Error?c.message:String(c),b=c.code;if(a?.includes("not a git repository")||128===b)return[];throw c}}async function q(a){let b=await Promise.allSettled(a.map(async a=>{n.info("repository:scan-start",{repoPath:a});let b=await p(a);return n.info("repository:scan-complete",{repoPath:a,worktreeCount:b.length}),b})),c=[];for(let d=0;d<b.length;d++){let e=b[d];"fulfilled"===e.status?c.push(...e.value):n.error("repository:scan-failed",{repoPath:a[d],error:e.reason instanceof Error?e.reason.message:String(e.reason)})}return c}function r(a,b){if(0===b.length)return{deletedIds:[],upsertedCount:0};let c=[],d=0,e=new Map;for(let a of b){let b=a.repositoryPath||"";e.has(b)||e.set(b,[]),e.get(b).push(a)}let f=new Set([...(0,k.getAllWorktreeIds)(a),...(0,k.getAliasedWorktreeIds)(a)]),g=new Map((0,k.getAllWorktreePathIds)(a).map(a=>[i().resolve(a.path),a.id])),h=new Map,l=new Map;for(let[a,b]of g)h.set(a,new Set([b])),l.set(b,a);for(let b of(0,k.getAllWorktreeAliases)(a)){let a=l.get(b.worktreeId);a&&h.get(a)?.add(b.oldId)}let m=new Set(b.map(a=>i().resolve(a.path)));for(let[b,o]of e){if(!b)continue;let e=(0,k.getWorktreesByRepository)(a,b).filter(a=>!m.has(i().resolve(a.path))).map(a=>a.id);if(e.length>0){let b=(0,k.deleteWorktreesByIds)(a,e);for(let a of(c.push(...e),e)){f.delete(a);let b=l.get(a);void 0!==b&&(g.delete(b),h.delete(b))}n.info("worktree:cleanup",{deletedCount:b.deletedCount})}for(let b of o){let c=i().resolve(b.path),e=g.get(c),m=b.id,n=e??(m&&!f.has(m)?m:function(a,b,c){if(!c||0===c.size)return(0,j.ko)(a,b);let d=new Set(b);for(let a of c)d.delete(a);return(0,j.ko)(a,d)}(c,f,h.get(c)));f.add(n),g.set(c,n),l.set(n,c),(0,k.upsertWorktree)(a,{...b,id:n,name:b.branch??b.name}),d++}}return{deletedIds:c,upsertedCount:d}}function s(a,b){let c=new Set(b.map(a=>a.repositoryPath).filter(a=>!!a)),d=[];for(let b of(0,k.getRepositories)(a)){let e=b.path;if(!e||c.has(e)||function(a){if(!a)return!1;try{return g().existsSync(a)&&g().existsSync(i().join(a,".git"))}catch{return!0}}(e))continue;let f=(0,k.getWorktreesByRepository)(a,e).map(a=>a.id);if(0===f.length)continue;let h=(0,k.deleteWorktreesByIds)(a,f);d.push(...f),n.info("worktree:stale-repo-pruned",{repoPath:e,deletedCount:h.deletedCount})}return d}},85775:(a,b,c)=>{c.d(b,{Tm:()=>o,x4:()=>m,xJ:()=>n});var d=c(34129),e=c(43234),f=c(88807),g=c(72626),h=c(87374),i=c(39687);let j=(0,g.h)("timer-manager");function k(){return globalThis.__timerManagerState||(globalThis.__timerManagerState={timers:new Map,timerWorktrees:new Map,initialized:!1}),globalThis.__timerManagerState}async function l(a){let b=k(),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;if(!await f.isRunning(b.worktreeId,g)){j.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 k=await (0,i.d)(c,{worktreeId:b.worktreeId,content:b.message,cliToolId:b.cliToolId,instanceId:g});if(!k.ok){let b=`[${k.stage}] ${k.error}`;(0,d.j2)(c,a,"failed",void 0,b),j.error("timer:send-failed",{timerId:a,stage:k.stage,error:k.error});return}(0,d.j2)(c,a,"sent",Date.now()),j.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{}j.error("timer:send-failed",{timerId:a,error:b})}finally{b.timers.delete(a),b.timerWorktrees.delete(a)}}function m(a,b,c){let d=k(),e=setTimeout(()=>{l(a)},c);d.timers.set(a,e),d.timerWorktrees.set(a,b)}function n(a){let b=k(),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 o(a){let b=k(),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 +0,0 @@
1
- "use strict";exports.id=6808,exports.ids=[6808],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()}}},7329:(a,b,c)=>{c.d(b,{Hv:()=>m,W3:()=>k,uK:()=>l});var d=c(90787),e=c(52660),f=c(18201),g=c(23854),h=c(49798),i=c(67164);let j=(0,c(72626).h)("relay-service");function k(a,b){for(let c of[b.from.worktreeId,b.to.worktreeId])if(!(0,h.r)(a,c))return{ok:!1,refusal:{code:"RELAY_WORKTREE_NOT_FOUND",message:`Worktree '${c}' not found`,worktreeId:c}};let c=(0,g.$G)({from:b.from,to:b.to,parentHops:function(a,b){try{let g=(0,h.S)(a,b),i=(0,e.getMessages)(a,b.worktreeId,{limit:5,limitUnit:"pairs",cliToolId:g.cliToolId,instanceId:b.instanceId,matchResolvedInstance:!0}).filter(a=>"user"===a.role),j=i.findIndex(a=>"relay"===a.messageType);if(-1===j)return null;let k=i[j];for(let a=0;a<j;a+=1){var c;if(c=i[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 j.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,g.Qe)(c))return{ok:!1,refusal:c};let k=b.now??Date.now(),l=(0,d.CR)(a,{from:b.from,to:b.to,hops:c.hops,expiresAt:k+(0,g.AL)(b.ttlMs),now:k});return j.info("relay-opened",{relayId:l.id,from:`${l.from.worktreeId}/${l.from.instanceId}`,to:`${l.to.worktreeId}/${l.to.instanceId}`,hops:l.hops}),(0,i._)(a,l.id,"requested",(0,h.S)(a,l.from),(0,h.S)(a,l.to),k),{ok:!0,relay:l}}function l(a,b,c=Date.now()){let e=(0,d.Ip)(a,b);return e?(0,d.m_)(a,b,c)?(j.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 m(a,b){return(0,d.M4)(a,b)}},18201:(a,b,c)=>{c.d(b,{Ce:()=>g,pk:()=>e});let d=(0,c(72626).h)("lib/history/user-turn-recorder");function e(a){return a.replace(/\r\n?/g,"\n").split("\n").map(a=>a.replace(/[ \t ]+$/u,"")).join("\n").trim()}function f(a){return{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId}}async function g(a,b,h,i,j={}){let k=a.instanceId??a.cliToolId,l=e(h);if(0===b.length||0===l.length)return{outcome:"skipped",messageId:null,timestampMs:null};try{let[{getDbInstance:g},m,{broadcastMessage:n}]=await Promise.all([Promise.resolve().then(c.bind(c,88807)),Promise.resolve().then(c.bind(c,52660)),Promise.resolve().then(c.bind(c,49640))]),o=g(),p=m.findMessageByRequestId(o,a.worktreeId,b);if(p)return{outcome:"already-recorded",messageId:p.id,timestampMs:p.timestamp.getTime()};let q=i>0?i:Date.now(),r=function(a,b,c,g,h,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:g,fromMs:o,toMs:j+12e4,includeRelayDelivered:!0}),m=i,n=j,l.filter(a=>e(a.content)===m).sort((a,b)=>Math.abs(a.timestamp.getTime()-n)-Math.abs(b.timestamp.getTime()-n)));for(let e of p)if(!e.requestId&&a.setMessageRequestId(b,e.id,h))return d.info("user-turn-adopted",{...f(c),requestId:h,messageId:e.id,driftMs:e.timestamp.getTime()-j}),{outcome:"adopted",messageId:e.id,timestampMs:e.timestamp.getTime()};let q=p.find(a=>a.requestId);return q?(d.info("user-turn-already-relayed",{...f(c),requestId:h,messageId:q.id,relayRequestId:q.requestId??null,driftMs:q.timestamp.getTime()-j}),{outcome:"already-recorded",messageId:q.id,timestampMs:q.timestamp.getTime()}):null}(m,o,a,k,b,l,q,j);if(r)return r;let s=m.createMessage(o,{worktreeId:a.worktreeId,role:"user",content:h,messageType:"normal",timestamp:new Date(q),cliToolId:a.cliToolId,instanceId:k,requestId:b});return n("message",{worktreeId:a.worktreeId,message:s}),d.info("user-turn-recorded",{...f(a),requestId:b,contentLength:h.length}),{outcome:"inserted",messageId:s.id,timestampMs:q}}catch(c){return d.error("user-turn-record-failed",{...f(a),requestId:b,error:c instanceof Error?c.message:String(c)}),{outcome:"failed",messageId:null,timestampMs:null}}}},95736:(a,b,c)=>{a.exports=c(44870)}};