commandmate 0.30.1 → 0.31.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 (442) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +164 -164
  3. package/.next/app-path-routes-manifest.json +28 -28
  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 +3 -3
  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 +4 -4
  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 +1 -1
  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/remote/pair/route_client-reference-manifest.js +1 -1
  61. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  64. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  65. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  66. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  67. package/.next/server/app/api/repositories/clone/route.js +1 -1
  68. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  69. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  70. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/repositories/restore/route.js +1 -1
  72. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  73. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/repositories/route.js +1 -1
  75. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  76. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/repositories/scan/route.js +1 -1
  78. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  79. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/repositories/sync/route.js +1 -1
  81. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  82. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  85. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  86. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/skills/[id]/route.js +1 -1
  90. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/skills/route.js +1 -1
  95. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/slash-commands/route.js +1 -1
  97. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  107. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  110. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  113. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.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_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  119. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  150. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  153. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  156. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  168. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  172. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  175. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +4 -3
  177. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/schedules/route.js +4 -3
  180. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  184. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +2 -2
  186. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  187. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  199. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  203. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  207. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  209. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  211. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  212. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  215. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  218. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  220. package/.next/server/app/api/worktrees/route.js +1 -1
  221. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  222. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/chat/page.js +2 -2
  224. package/.next/server/app/chat/page.js.nft.json +1 -1
  225. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  226. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  227. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  228. package/.next/server/app/more/page.js +2 -2
  229. package/.next/server/app/more/page.js.nft.json +1 -1
  230. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  231. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  232. package/.next/server/app/page.js +1 -1
  233. package/.next/server/app/page.js.nft.json +1 -1
  234. package/.next/server/app/page_client-reference-manifest.js +1 -1
  235. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  236. package/.next/server/app/repositories/page.js +2 -2
  237. package/.next/server/app/repositories/page.js.nft.json +1 -1
  238. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  239. package/.next/server/app/review/page.js +1 -1
  240. package/.next/server/app/review/page.js.nft.json +1 -1
  241. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  242. package/.next/server/app/sessions/page.js +1 -1
  243. package/.next/server/app/sessions/page.js.nft.json +1 -1
  244. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  245. package/.next/server/app/skills/[skillId]/page.js +2 -2
  246. package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -1
  247. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  248. package/.next/server/app/skills/installed/page.js +2 -2
  249. package/.next/server/app/skills/installed/page.js.nft.json +1 -1
  250. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  251. package/.next/server/app/skills/page.js +1 -1
  252. package/.next/server/app/skills/page.js.nft.json +1 -1
  253. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  254. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  255. package/.next/server/app/worktrees/[id]/page.js +10 -10
  256. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  257. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  258. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  259. package/.next/server/app-paths-manifest.json +28 -28
  260. package/.next/server/chunks/1058.js +1 -1
  261. package/.next/server/chunks/1068.js +1 -1
  262. package/.next/server/chunks/1262.js +1 -1
  263. package/.next/server/chunks/1886.js +3 -3
  264. package/.next/server/chunks/1990.js +103 -0
  265. package/.next/server/chunks/2119.js +1 -1
  266. package/.next/server/chunks/2328.js +1 -1
  267. package/.next/server/chunks/2404.js +1 -1
  268. package/.next/server/chunks/2445.js +1 -1
  269. package/.next/server/chunks/261.js +1 -1
  270. package/.next/server/chunks/3123.js +1 -1
  271. package/.next/server/chunks/3241.js +1 -1
  272. package/.next/server/chunks/3480.js +5 -4
  273. package/.next/server/chunks/4299.js +1 -1
  274. package/.next/server/chunks/4393.js +1 -1
  275. package/.next/server/chunks/4443.js +1 -5
  276. package/.next/server/chunks/5017.js +1 -1
  277. package/.next/server/chunks/5043.js +1 -1
  278. package/.next/server/chunks/5164.js +1 -1
  279. package/.next/server/chunks/552.js +2 -2
  280. package/.next/server/chunks/6072.js +1 -1
  281. package/.next/server/chunks/6130.js +1 -1
  282. package/.next/server/chunks/663.js +4 -3
  283. package/.next/server/chunks/6894.js +2 -2
  284. package/.next/server/chunks/7187.js +1 -0
  285. package/.next/server/chunks/7472.js +1 -1
  286. package/.next/server/chunks/{880.js → 7859.js} +6 -6
  287. package/.next/server/chunks/7905.js +1 -1
  288. package/.next/server/chunks/8800.js +2 -2
  289. package/.next/server/chunks/8918.js +7 -0
  290. package/.next/server/chunks/9123.js +2 -2
  291. package/.next/server/chunks/9130.js +4 -4
  292. package/.next/server/chunks/9627.js +1 -1
  293. package/.next/server/chunks/9696.js +2 -2
  294. package/.next/server/chunks/9798.js +1 -1
  295. package/.next/server/middleware-manifest.json +5 -5
  296. package/.next/server/pages/500.html +1 -1
  297. package/.next/server/server-reference-manifest.json +1 -1
  298. package/.next/static/chunks/1783-11c9b4d8a52ebd91.js +1 -0
  299. package/.next/static/chunks/4718-de1224c9e8a6e7fc.js +1 -0
  300. package/.next/static/chunks/6022-2fa0b5a82d4ce7b6.js +1 -0
  301. package/.next/static/chunks/{5229-6c89475b61bd2c8b.js → 6170-951b9f5fe6b4b3b5.js} +1 -1
  302. package/.next/static/chunks/app/chat/{page-9aa2011410895b0d.js → page-37d7615d17d7e2a0.js} +1 -1
  303. package/.next/static/chunks/app/layout-4c2f21e3f653ee4c.js +1 -0
  304. package/.next/static/chunks/app/more/{page-333bba1c8bbc9c11.js → page-353a3924e6d7968e.js} +1 -1
  305. package/.next/static/chunks/app/{page-214f7ffa13a0cf10.js → page-c2bf871d953a1d6f.js} +1 -1
  306. package/.next/static/chunks/app/repositories/{page-4951cac905e50224.js → page-7d0f26df0537254c.js} +1 -1
  307. package/.next/static/chunks/app/review/{page-a0899b2d285318c3.js → page-e3f141b2829973e9.js} +1 -1
  308. package/.next/static/chunks/app/sessions/{page-fb36145ec732092a.js → page-53f188ed9ca49e5f.js} +1 -1
  309. package/.next/static/chunks/app/skills/[skillId]/{page-9099e26b60442873.js → page-80569b720aea59cc.js} +1 -1
  310. package/.next/static/chunks/app/skills/installed/{page-182e32368696d824.js → page-dbd2690ad72da95b.js} +1 -1
  311. package/.next/static/chunks/app/skills/{page-d3fdc88239ebe0ab.js → page-dacd36f9c11aa7da.js} +1 -1
  312. package/.next/static/chunks/app/worktrees/[id]/page-97205088520255a5.js +1 -0
  313. package/.next/static/css/5c13ea243dfdcb66.css +1 -0
  314. package/.next/trace +13 -13
  315. package/README.md +37 -11
  316. package/dist/cli/commands/attach.d.ts +50 -0
  317. package/dist/cli/commands/attach.d.ts.map +1 -0
  318. package/dist/cli/commands/attach.js +204 -0
  319. package/dist/cli/commands/capture.d.ts.map +1 -1
  320. package/dist/cli/commands/capture.js +114 -0
  321. package/dist/cli/commands/instances.d.ts.map +1 -1
  322. package/dist/cli/commands/instances.js +23 -2
  323. package/dist/cli/commands/ls.d.ts.map +1 -1
  324. package/dist/cli/commands/ls.js +41 -1
  325. package/dist/cli/config/cli-dependencies.d.ts.map +1 -1
  326. package/dist/cli/config/cli-dependencies.js +34 -0
  327. package/dist/cli/program.d.ts.map +1 -1
  328. package/dist/cli/program.js +5 -0
  329. package/dist/cli/types/index.d.ts +36 -0
  330. package/dist/cli/types/index.d.ts.map +1 -1
  331. package/dist/config/tmux-pane-config.d.ts +153 -0
  332. package/dist/config/tmux-pane-config.d.ts.map +1 -0
  333. package/dist/config/tmux-pane-config.js +172 -0
  334. package/dist/lib/cli-tools/session-name.d.ts +44 -0
  335. package/dist/lib/cli-tools/session-name.d.ts.map +1 -0
  336. package/dist/lib/cli-tools/session-name.js +57 -0
  337. package/dist/lib/cli-tools/types.d.ts +1 -1
  338. package/dist/lib/cli-tools/types.d.ts.map +1 -1
  339. package/dist/lib/cli-tools/types.js +6 -1
  340. package/dist/lib/cli-tools/validation.d.ts +34 -0
  341. package/dist/lib/cli-tools/validation.d.ts.map +1 -0
  342. package/dist/lib/cli-tools/validation.js +41 -0
  343. package/dist/lib/detection/status-reason.d.ts +18 -0
  344. package/dist/lib/detection/status-reason.d.ts.map +1 -1
  345. package/dist/lib/detection/status-reason.js +18 -0
  346. package/dist/lib/detection/tools/verified-against.d.ts +57 -7
  347. package/dist/lib/detection/tools/verified-against.d.ts.map +1 -1
  348. package/dist/lib/detection/tools/verified-against.js +59 -8
  349. package/dist/lib/detection/version-probes.d.ts +26 -5
  350. package/dist/lib/detection/version-probes.d.ts.map +1 -1
  351. package/dist/lib/detection/version-probes.js +28 -6
  352. package/dist/lib/session/tmux-session-surface.d.ts +369 -0
  353. package/dist/lib/session/tmux-session-surface.d.ts.map +1 -0
  354. package/dist/lib/session/tmux-session-surface.js +525 -0
  355. package/dist/server/src/config/cli-tool-timing-config.js +12 -1
  356. package/dist/server/src/config/detection-evidence-config.js +5 -0
  357. package/dist/server/src/config/schedule-config.js +28 -1
  358. package/dist/server/src/lib/cli-tools/antigravity.js +2 -2
  359. package/dist/server/src/lib/cli-tools/base.js +13 -8
  360. package/dist/server/src/lib/cli-tools/claude.js +20 -0
  361. package/dist/server/src/lib/cli-tools/codex.js +205 -61
  362. package/dist/server/src/lib/cli-tools/command-code.js +349 -0
  363. package/dist/server/src/lib/cli-tools/composer-spec.js +6 -0
  364. package/dist/server/src/lib/cli-tools/copilot.js +2 -2
  365. package/dist/server/src/lib/cli-tools/gemini.js +2 -2
  366. package/dist/server/src/lib/cli-tools/graceful-exit.js +16 -1
  367. package/dist/server/src/lib/cli-tools/index.js +4 -1
  368. package/dist/server/src/lib/cli-tools/install-hints.js +131 -0
  369. package/dist/server/src/lib/cli-tools/liveness-spec.js +18 -0
  370. package/dist/server/src/lib/cli-tools/manager.js +2 -0
  371. package/dist/server/src/lib/cli-tools/opencode.js +2 -2
  372. package/dist/server/src/lib/cli-tools/start-availability.js +18 -11
  373. package/dist/server/src/lib/cli-tools/types.js +6 -1
  374. package/dist/server/src/lib/cli-tools/vibe-local.js +2 -2
  375. package/dist/server/src/lib/cmate-parser.js +6 -0
  376. package/dist/server/src/lib/detection/cli-patterns.js +441 -8
  377. package/dist/server/src/lib/detection/opencode-modal-overlay.js +66 -100
  378. package/dist/server/src/lib/detection/selection-shape.js +341 -0
  379. package/dist/server/src/lib/detection/sgr-background.js +210 -0
  380. package/dist/server/src/lib/detection/status-detector.js +6 -0
  381. package/dist/server/src/lib/detection/status-reason.js +18 -0
  382. package/dist/server/src/lib/detection/tools/antigravity/detect.js +38 -15
  383. package/dist/server/src/lib/detection/tools/codex/cli-patterns.js +392 -0
  384. package/dist/server/src/lib/detection/tools/codex/detect.js +83 -2
  385. package/dist/server/src/lib/detection/tools/command-code/detect.js +159 -0
  386. package/dist/server/src/lib/detection/tools/registry.js +6 -4
  387. package/dist/server/src/lib/detection/tools/verified-against.js +59 -8
  388. package/dist/server/src/lib/detection/version-probes.js +28 -6
  389. package/dist/server/src/lib/hooks/sources/antigravity/history.js +101 -21
  390. package/dist/server/src/lib/hooks/sources/antigravity/transcript.js +39 -0
  391. package/dist/server/src/lib/hooks/sources/claude/history.js +245 -21
  392. package/dist/server/src/lib/hooks/sources/claude/transcript.js +175 -13
  393. package/dist/server/src/lib/hooks/sources/codex/history.js +84 -15
  394. package/dist/server/src/lib/hooks/sources/codex/hooks-config.js +130 -17
  395. package/dist/server/src/lib/hooks/sources/codex/relay-install.js +145 -0
  396. package/dist/server/src/lib/hooks/sources/command-code/history.js +865 -0
  397. package/dist/server/src/lib/hooks/sources/command-code/hooks-config.js +390 -0
  398. package/dist/server/src/lib/hooks/sources/command-code/source.js +290 -0
  399. package/dist/server/src/lib/hooks/sources/command-code/tool-id.js +18 -0
  400. package/dist/server/src/lib/hooks/sources/command-code/transcript.js +604 -0
  401. package/dist/server/src/lib/hooks/sources/index.js +3 -1
  402. package/dist/server/src/lib/hooks/sources/opencode/history.js +57 -3
  403. package/dist/server/src/lib/hooks/sources/opencode/transcript.js +24 -28
  404. package/dist/server/src/lib/hooks/sources/registry.js +4 -0
  405. package/dist/server/src/lib/hooks/sources/turn-body.js +77 -19
  406. package/dist/server/src/lib/hooks/stop-history-capture.js +58 -25
  407. package/dist/server/src/lib/job-executor.js +12 -0
  408. package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +6 -0
  409. package/dist/server/src/lib/polling/response-checker.js +112 -7
  410. package/dist/server/src/lib/polling/structured-history-gate.js +15 -8
  411. package/dist/server/src/lib/realtime/types.js +15 -5
  412. package/dist/server/src/lib/response-cleaner.js +24 -1
  413. package/dist/server/src/lib/response-extractor.js +11 -0
  414. package/dist/server/src/lib/session/claude-executor.js +223 -4
  415. package/dist/server/src/lib/session/cli-session.js +52 -0
  416. package/dist/server/src/lib/session/tmux-session-surface.js +525 -0
  417. package/dist/server/src/lib/skills/compatibility-matrix.js +117 -1
  418. package/dist/server/src/lib/tmux/geometry-delegation.js +143 -0
  419. package/dist/server/src/lib/tmux/read-mode-pager.js +76 -10
  420. package/dist/server/src/lib/tmux/read-mode.js +44 -2
  421. package/dist/server/src/lib/tmux/session-hook-scripts.js +249 -0
  422. package/dist/server/src/lib/tmux/session-hooks.js +122 -0
  423. package/dist/server/src/lib/tmux/session-status-options.js +213 -0
  424. package/dist/server/src/lib/tmux/tmux.js +79 -2
  425. package/dist/server/src/lib/version-checker.js +110 -0
  426. package/dist/server/src/lib/ws-server.js +16 -10
  427. package/dist/server/src/types/agent-transcript.js +73 -1
  428. package/dist/server/src/types/terminal-keys.js +131 -3
  429. package/dist/types/terminal-keys.d.ts +100 -3
  430. package/dist/types/terminal-keys.d.ts.map +1 -1
  431. package/dist/types/terminal-keys.js +131 -3
  432. package/package.json +1 -1
  433. package/.next/server/chunks/3099.js +0 -5
  434. package/.next/server/chunks/7824.js +0 -1
  435. package/.next/static/chunks/3916-0e929d089282dc5d.js +0 -1
  436. package/.next/static/chunks/6022-7a7d1760fc9814c7.js +0 -1
  437. package/.next/static/chunks/6381-dbf04a99647f6018.js +0 -1
  438. package/.next/static/chunks/app/layout-6a26ea22d5cf03dc.js +0 -1
  439. package/.next/static/chunks/app/worktrees/[id]/page-aac399392ec8c273.js +0 -1
  440. package/.next/static/css/23f9c40ecc458c77.css +0 -1
  441. /package/.next/static/{pcpB4K6KreMzu2qbhvuRY → nXW4dPkpE_9xUf_9ySRff}/_buildManifest.js +0 -0
  442. /package/.next/static/{pcpB4K6KreMzu2qbhvuRY → nXW4dPkpE_9xUf_9ySRff}/_ssgManifest.js +0 -0
@@ -320,6 +320,47 @@ async function publishOpencodeTurnProgress(target, turn) {
320
320
  });
321
321
  }
322
322
  }
323
+ /**
324
+ * When each backfilled turn's last assistant message finished (Issue #2273).
325
+ *
326
+ * `info.time.completed` on every `role: "assistant"` message, folded onto the
327
+ * turn key (`parentID`) with `Math.max` — a tool-calling turn produces more than
328
+ * one assistant message (measured: two, in turn 2 of the captured session) and
329
+ * the turn ended when the last of them did. `time.created` is the fallback for a
330
+ * message opencode has not marked complete.
331
+ *
332
+ * Read here rather than on the accumulator because `./transcript` is not this
333
+ * Issue's to change, and read defensively for the reason everything in this
334
+ * subsystem is: a shape opencode changes must cost the timestamp, not the row.
335
+ *
336
+ * @returns `parentID` → epoch ms; absent for a turn with no usable clock
337
+ */
338
+ function lastOpencodeCompletedAt(body) {
339
+ const at = new Map();
340
+ if (!Array.isArray(body))
341
+ return at;
342
+ for (const entry of body) {
343
+ if (!(0, event_mapper_1.isPlainObject)(entry))
344
+ continue;
345
+ const info = (0, event_mapper_1.isPlainObject)(entry.info) ? entry.info : null;
346
+ if (!info || info.role !== 'assistant')
347
+ continue;
348
+ const userMessageId = (0, event_mapper_1.readStringField)(info, transcript_1.OPENCODE_TURN_KEY_FIELD);
349
+ if (!userMessageId)
350
+ continue;
351
+ const time = (0, event_mapper_1.isPlainObject)(info.time) ? info.time : null;
352
+ const finished = readFiniteNumber(time?.completed) ?? readFiniteNumber(time?.created) ?? null;
353
+ if (finished === null)
354
+ continue;
355
+ if (finished > (at.get(userMessageId) ?? 0))
356
+ at.set(userMessageId, finished);
357
+ }
358
+ return at;
359
+ }
360
+ /** A finite number, or null. */
361
+ function readFiniteNumber(value) {
362
+ return typeof value === 'number' && Number.isFinite(value) ? value : null;
363
+ }
323
364
  /**
324
365
  * The turn currently open on this session, for tests and for callers that need
325
366
  * to know whether a flush would do anything.
@@ -342,9 +383,12 @@ function peekOpencodeTurn(target, sessionId) {
342
383
  *
343
384
  * @param target - The instance
344
385
  * @param sessionId - `ses_…` from the `session.idle` frame
386
+ * @param closedAt - When the turn ended, epoch ms. Defaults to now, which is
387
+ * what `session.idle` means: opencode's own end-of-turn frame is being handled
388
+ * (Issue #2273). A parameter only so a test need not move the clock.
345
389
  * @returns Whether a row was written
346
390
  */
347
- async function flushOpencodeTurn(target, sessionId) {
391
+ async function flushOpencodeTurn(target, sessionId, closedAt = Date.now()) {
348
392
  const turns = transcripts.get(keyOf(target));
349
393
  const turn = turns?.get(sessionId);
350
394
  if (!turn || !turns)
@@ -353,7 +397,12 @@ async function flushOpencodeTurn(target, sessionId) {
353
397
  // not find the accumulator still there and race a duplicate insert past the
354
398
  // existence check below.
355
399
  turns.delete(sessionId);
356
- return writeOpencodeTurn(target, (0, transcript_1.renderOpencodeTurn)(turn), turn.startedAt, 'stream');
400
+ // The turn's END and not its start (Issue #2273). A reply dated where the turn
401
+ // opened draws ABOVE the tool approvals that were written seconds into it, so
402
+ // the chat surface reads question → answer → approval for a turn that really
403
+ // went question → approval → answer. `Math.max` because a clock that went
404
+ // backwards must not put the reply before its own prompt.
405
+ return writeOpencodeTurn(target, (0, transcript_1.renderOpencodeTurn)(turn), Math.max(turn.startedAt, closedAt), 'stream');
357
406
  }
358
407
  /**
359
408
  * Forget everything held for one instance.
@@ -506,11 +555,16 @@ async function backfillOpencodeHistory(target, port, sessionId) {
506
555
  limit: exports.MAX_OPENCODE_BACKFILLED_TURNS,
507
556
  });
508
557
  }
558
+ // Issue #2273: the same rule the live flush follows, off the REST document's
559
+ // own clock. `time.completed` is when opencode finished the assistant
560
+ // message; the stream route has no equivalent field and uses the instant
561
+ // `session.idle` arrived, which is the same fact a moment later.
562
+ const completedAt = lastOpencodeCompletedAt(body);
509
563
  let written = 0;
510
564
  // Oldest of the kept ones first, so the rows are inserted in conversation
511
565
  // order and `updateWorktreeTimestamp` ends on the newest.
512
566
  for (const turn of [...kept].reverse()) {
513
- const saved = await writeOpencodeTurn(target, (0, transcript_1.renderOpencodeTurn)(turn), turn.startedAt, 'backfill');
567
+ const saved = await writeOpencodeTurn(target, (0, transcript_1.renderOpencodeTurn)(turn), Math.max(turn.startedAt, completedAt.get(turn.userMessageId) ?? 0), 'backfill');
514
568
  if (saved)
515
569
  written += 1;
516
570
  }
@@ -186,8 +186,14 @@ const OPENCODE_SILENT_PART_TYPES = new Set([
186
186
  'snapshot',
187
187
  'patch',
188
188
  ]);
189
- /** The label a reasoning block is folded behind. */
190
- exports.OPENCODE_REASONING_LABEL = 'Thinking';
189
+ /**
190
+ * The label a reasoning block is folded behind.
191
+ *
192
+ * An alias of `../turn-body`'s constant since #2272 rather than a second copy
193
+ * of the string: the section heading and this name have to stay equal or the
194
+ * chat surface's reader stops recognising the section it is meant to fold.
195
+ */
196
+ exports.OPENCODE_REASONING_LABEL = turn_body_1.TURN_REASONING_LABEL;
191
197
  /**
192
198
  * One tool call as a single Markdown line.
193
199
  *
@@ -218,33 +224,16 @@ function renderToolPart(part) {
218
224
  function collapseToLine(value) {
219
225
  return value.replace(/\s+/g, ' ').trim();
220
226
  }
221
- /**
222
- * Reasoning, folded.
223
- *
224
- * A blockquote rather than `<details>`, and the reason is a rendering decision
225
- * that belongs here because it decides what is *stored*: showing `<details>`
226
- * would mean running `rehype-raw` over agent output in `ConversationPairCard`,
227
- * and that costs every unfenced `<T>` in ordinary prose — the HTML parser eats
228
- * it as a tag. A blockquote is Markdown's own way of saying "subordinate", it
229
- * survives the sanitiser with no raw-HTML pass, and the card's existing
230
- * two-line collapse already keeps it out of the way.
231
- */
232
- function renderReasoningPart(text) {
233
- const quoted = text
234
- .trim()
235
- .split('\n')
236
- .map((line) => (line.length > 0 ? `> ${line}` : '>'))
237
- .join('\n');
238
- return `> **${exports.OPENCODE_REASONING_LABEL}**\n>\n${quoted}`;
239
- }
240
227
  /**
241
228
  * Render one turn to Markdown.
242
229
  *
243
- * Stream order within each kind — reasoning sits where the agent thought it and
244
- * the calls are in the order they were made. #2041 kept one stream for all of
245
- * them and #2234 split the tool calls out into a section of their own; the
246
- * layout is `../turn-body`'s, shared with the other three readers, and
247
- * {@link separateTurnBody} carries the reasoning for both halves of that.
230
+ * Stream order within each kind — the thoughts are in the order they were
231
+ * thought and the calls in the order they were made. #2041 kept one stream for
232
+ * all of them, #2234 split the tool calls out into a section of their own, and
233
+ * #2272 did the same for the reasoning: measured against 1.18.22, opencode
234
+ * emits a `reasoning` part in front of *every* text part, so leaving them
235
+ * inline meant a one-line answer whose bubble opened with `> **Thinking**` and a
236
+ * long one with four such quotes buried in it. The layout is `../turn-body`'s.
248
237
  *
249
238
  * @param turn - The accumulator, live or rebuilt from REST
250
239
  */
@@ -268,7 +257,9 @@ function renderOpencodeTurn(turn) {
268
257
  const text = part.text?.trim() ?? '';
269
258
  if (text.length === 0)
270
259
  continue;
271
- blocks.push({ kind: 'aside', text: renderReasoningPart(text) });
260
+ // Raw, not pre-quoted: `separateTurnBody` folds the whole run under one
261
+ // `Thinking (N)` heading and owns the quoting (Issue #2272).
262
+ blocks.push({ kind: 'reasoning', text });
272
263
  continue;
273
264
  }
274
265
  if (part.type === 'tool') {
@@ -284,7 +275,11 @@ function renderOpencodeTurn(turn) {
284
275
  if (!OPENCODE_SILENT_PART_TYPES.has(part.type))
285
276
  unknown.add(part.type);
286
277
  }
287
- let body = (0, turn_body_1.separateTurnBody)(blocks).body;
278
+ const separated = (0, turn_body_1.separateTurnBody)(blocks);
279
+ // The cap still counts the whole body, reasoning included — but the reasoning
280
+ // now sits behind the prose, so what a 200 kB turn loses is the tail of its
281
+ // thinking rather than the answer (Issue #2272).
282
+ let body = separated.body;
288
283
  if (body.length > exports.MAX_OPENCODE_TURN_BODY_LENGTH) {
289
284
  body =
290
285
  body.slice(0, exports.MAX_OPENCODE_TURN_BODY_LENGTH - exports.OPENCODE_TURN_TRUNCATION_MARKER.length) +
@@ -296,6 +291,7 @@ function renderOpencodeTurn(turn) {
296
291
  body,
297
292
  textParts,
298
293
  toolParts,
294
+ reasoningParts: separated.reasoningBlocks,
299
295
  unknownPartTypes: [...unknown],
300
296
  };
301
297
  }
@@ -40,6 +40,7 @@ const source_3 = require("./gemini/source");
40
40
  const source_4 = require("./antigravity/source");
41
41
  const source_5 = require("./codex/source");
42
42
  const source_6 = require("./opencode/source");
43
+ const source_7 = require("./command-code/source");
43
44
  const registered = (globalThis.__agentEventSources ??= new Map());
44
45
  /** Memoised compatibility sources, so repeated lookups return one object. */
45
46
  const legacy = (globalThis.__agentEventLegacySources ??= new Map());
@@ -109,3 +110,6 @@ registerAgentEventSource(source_3.geminiAgentEventSource);
109
110
  registerAgentEventSource(source_4.antigravityAgentEventSource);
110
111
  registerAgentEventSource(source_5.codexAgentEventSource);
111
112
  registerAgentEventSource(source_6.opencodeAgentEventSource);
113
+ // Issue #2251, Epic #2249 Phase B. The seventh, and the last line of "adding a
114
+ // tool" — its own directory plus this.
115
+ registerAgentEventSource(source_7.commandCodeAgentEventSource);
@@ -13,13 +13,32 @@
13
13
  * body in full, so those 141 bubbles opened with a tool log instead of a reply.
14
14
  *
15
15
  * This module is the one place that decides the layout, and every reader goes
16
- * through it. Two rules:
16
+ * through it. Three rules:
17
17
  *
18
- * 1. **Prose leads.** Text the agent wrote and the folded `Thinking` quotes
19
- * that sit between the sentences — keep their transcript order and come
18
+ * 1. **Prose leads.** Text the agent wrote keeps its transcript order and comes
20
19
  * first.
21
20
  * 2. **The tool log is one section, at the end**, in transcript order, folded
22
21
  * into a blockquote under a labelled heading.
22
+ * 3. **Reasoning is one section too** (Issue #2272), between the two, on the
23
+ * same shape — see {@link TURN_REASONING_LABEL}.
24
+ *
25
+ * ## Why reasoning became a section of its own (Issue #2272)
26
+ *
27
+ * #2234 moved the tool calls and deliberately left the folded `Thinking` quotes
28
+ * where they sat, on the argument that they are the agent's own words about the
29
+ * reply. Measured against opencode 1.18.22 that argument does not survive
30
+ * contact: opencode emits a `reasoning` part before *every* text part, so the
31
+ * body opens with `> **Thinking**` on a one-line answer and carries four such
32
+ * quotes on a long one — which is exactly the failure #2234 set out to fix, from
33
+ * the other producer.
34
+ *
35
+ * The distinction is therefore drawn on the **block kind**, not on the reader:
36
+ * `reasoning` carries the raw text and is folded into the trailing section,
37
+ * `aside` carries text a reader already folded itself and stays with the prose.
38
+ * The four readers that push `aside` (claude, codex, antigravity, command-code)
39
+ * are untouched by this Issue because none of them has been measured the way
40
+ * opencode has; they can move a block at a time by switching kind, with no
41
+ * change here.
23
42
  *
24
43
  * ## Why the order claim from #2041 / #2121 is narrowed rather than dropped
25
44
  *
@@ -46,7 +65,7 @@
46
65
  * @module lib/hooks/sources/turn-body
47
66
  */
48
67
  Object.defineProperty(exports, "__esModule", { value: true });
49
- exports.TURN_TOOL_LOG_LABEL = void 0;
68
+ exports.TURN_REASONING_LABEL = exports.TURN_TOOL_LOG_LABEL = void 0;
50
69
  exports.separateTurnBody = separateTurnBody;
51
70
  /**
52
71
  * The bold first line of the folded tool section.
@@ -58,15 +77,31 @@ exports.separateTurnBody = separateTurnBody;
58
77
  */
59
78
  exports.TURN_TOOL_LOG_LABEL = 'Tool calls';
60
79
  /**
61
- * Quote one already-rendered tool line.
80
+ * The bold first line of the folded reasoning section (Issue #2272).
62
81
  *
63
- * The four readers all render a call as a **single-line** list item their
64
- * detail readers collapse whitespace precisely so a heredoc in a shell command
65
- * cannot put a newline here so one prefix per line is enough and the split is
66
- * a guard rather than a case that is expected to fire.
82
+ * The same string the five readers already used for their own inline quotes, on
83
+ * purpose: it is baked into `chat_messages.content` at read time, so the rows
84
+ * written before this Issue carry `> **Thinking**` and the rows written after it
85
+ * carry `> **Thinking (N)**`. Keeping the label identical is what lets one
86
+ * reader on the chat surface fold both shapes — see `splitChatThinking` in
87
+ * `components/worktree/ChatMessageBubble`.
67
88
  */
68
- function quoteToolLine(line) {
69
- return line
89
+ exports.TURN_REASONING_LABEL = 'Thinking';
90
+ /**
91
+ * Put one block inside a blockquote, line by line.
92
+ *
93
+ * Every line gets its own `> ` because a blockquote ends at the first line that
94
+ * has none — a lazy continuation would work in CommonMark for a paragraph and
95
+ * would NOT for the list items the tool log is made of.
96
+ *
97
+ * For a tool line the split is a guard rather than a case that is expected to
98
+ * fire: the five readers all render a call as a single-line list item and
99
+ * collapse whitespace precisely so a heredoc in a shell command cannot put a
100
+ * newline here. For a reasoning block it is the normal path — that text is
101
+ * paragraphs.
102
+ */
103
+ function quoteBlock(text) {
104
+ return text
70
105
  .split('\n')
71
106
  .map((part) => (part.length > 0 ? `> ${part}` : '>'))
72
107
  .join('\n');
@@ -80,21 +115,25 @@ function quoteToolLine(line) {
80
115
  * (#2199) agree — both reach this function through the same renderer, so the
81
116
  * text a reader watches being written is the text that settles.
82
117
  *
83
- * A turn with no tool calls comes out **byte-identical** to what the readers
84
- * produced before this Issue: the whole change is the section this adds.
118
+ * A turn with neither a tool call nor a `reasoning` block comes out
119
+ * **byte-identical** to what the readers produced before #2234 / #2272: the
120
+ * whole change is the sections this adds.
85
121
  *
86
122
  * @param blocks - Rendered pieces in transcript order; empty text is the
87
123
  * caller's to drop
88
- * @returns The body and the two halves it was built from
124
+ * @returns The body and the three parts it was built from
89
125
  */
90
126
  function separateTurnBody(blocks) {
91
127
  const prose = [];
128
+ const reasoning = [];
92
129
  const tools = [];
93
130
  for (const block of blocks) {
94
131
  if (block.text.length === 0)
95
132
  continue;
96
133
  if (block.kind === 'tool')
97
134
  tools.push(block.text);
135
+ else if (block.kind === 'reasoning')
136
+ reasoning.push(block.text);
98
137
  else
99
138
  prose.push(block.text);
100
139
  }
@@ -104,15 +143,34 @@ function separateTurnBody(blocks) {
104
143
  // stayed one Markdown list — which is gone because no tool line reaches this
105
144
  // list any more.
106
145
  const proseText = prose.join('\n\n');
146
+ // One heading for the whole run, and a bare `>` between the blocks so two
147
+ // consecutive thoughts stay two paragraphs inside the quote rather than
148
+ // running into one another.
149
+ const reasoningLog = reasoning.length === 0
150
+ ? ''
151
+ : [
152
+ `> **${exports.TURN_REASONING_LABEL} (${reasoning.length})**`,
153
+ '>',
154
+ reasoning.map(quoteBlock).join('\n>\n'),
155
+ ].join('\n');
107
156
  const toolLog = tools.length === 0
108
157
  ? ''
109
158
  : [
110
159
  `> **${exports.TURN_TOOL_LOG_LABEL} (${tools.length})**`,
111
160
  '>',
112
- ...tools.map(quoteToolLine),
161
+ ...tools.map(quoteBlock),
113
162
  ].join('\n');
114
- const body = proseText.length > 0 && toolLog.length > 0
115
- ? `${proseText}\n\n${toolLog}`
116
- : `${proseText}${toolLog}`;
117
- return { body, prose: proseText, toolLog, toolCalls: tools.length };
163
+ // Prose, then reasoning, then the tool log. The tool log stays last because
164
+ // #2234 put it there and the readers' rows are matched on `request_id` rather
165
+ // than rewritten, so moving it would split History into two layouts for no
166
+ // gain.
167
+ const body = [proseText, reasoningLog, toolLog].filter((part) => part.length > 0).join('\n\n');
168
+ return {
169
+ body,
170
+ prose: proseText,
171
+ reasoningLog,
172
+ reasoningBlocks: reasoning.length,
173
+ toolLog,
174
+ toolCalls: tools.length,
175
+ };
118
176
  }
@@ -20,6 +20,15 @@
20
20
  * The agent itself knows the boundary exactly, and has been telling us: the
21
21
  * `stop` hook. This module is that second trigger.
22
22
  *
23
+ * ## Knowing the boundary is not the same as the file having reached it
24
+ *
25
+ * The `stop` post and the transcript's last append are two events with no
26
+ * ordering between them, and Issue #2264 is what happens when the reader is
27
+ * asked in the gap. The reader now refuses a turn it cannot prove is closed, so
28
+ * the cost of asking too early is a `false` rather than a truncated row — and
29
+ * this module's answer to a `false` is to ask again, up to
30
+ * {@link STOP_TRANSCRIPT_MAX_ATTEMPTS} times, before handing the turn back.
31
+ *
23
32
  * ## What it does not do
24
33
  *
25
34
  * **It does not replace the poller's call.** A session with no hooks — or with
@@ -70,27 +79,42 @@ var __importStar = (this && this.__importStar) || (function () {
70
79
  };
71
80
  })();
72
81
  Object.defineProperty(exports, "__esModule", { value: true });
73
- exports.STOP_TRANSCRIPT_RETRY_DELAY_MS = void 0;
82
+ exports.STOP_TRANSCRIPT_MAX_ATTEMPTS = exports.STOP_TRANSCRIPT_RETRY_DELAY_MS = void 0;
74
83
  exports.captureTranscriptTurnOnStop = captureTranscriptTurnOnStop;
75
84
  const logger_1 = require("../../lib/logger");
76
85
  const logger = (0, logger_1.createLogger)('lib/hooks/stop-history-capture');
77
86
  /**
78
- * How long to wait before asking a second time.
87
+ * How long to wait before asking again.
79
88
  *
80
89
  * The `stop` hook fires when the agent considers the turn over, and the last
81
90
  * assistant record is appended to the transcript around — not necessarily
82
- * before — that instant. A reader that arrives in the gap sees the prompt
83
- * record and no body, answers false (correctly: an empty row would be a blank
84
- * reply forever) and, without a retry, hands a turn the agent has definitely
85
- * finished back to the scraper.
91
+ * before — that instant. A reader that arrives in the gap sees a turn that is
92
+ * not closed, answers false (correctly: the row it would write is a reply with
93
+ * its last paragraph missing, frozen under the turn key forever) and, without a
94
+ * retry, hands a turn the agent has definitely finished back to the scraper.
86
95
  *
87
96
  * Half a second is chosen against what the gap actually is — a file append that
88
- * has already been issued — rather than against a timeout. One retry and not a
89
- * loop, because the poller's own trigger is still behind this: if the file is
90
- * still empty after the retry, the next poll is the right place to notice, and
91
- * a hook handler that waits on a file is a hook handler that can hang a turn.
97
+ * has already been issued — rather than against a timeout.
92
98
  */
93
99
  exports.STOP_TRANSCRIPT_RETRY_DELAY_MS = 500;
100
+ /**
101
+ * How many times the reader is asked in total (Issue #2264).
102
+ *
103
+ * #2246 asked twice, on the reading that the only thing a retry waits for is one
104
+ * append that has already been issued. The incident #2264 was reported for says
105
+ * that is not always one append: the measured gap between the `stop` post and
106
+ * the last `text` record was around 100 ms in the fast case, but the turns that
107
+ * were saved short had *tool* records still arriving, and a single 500 ms retry
108
+ * lands inside that run rather than after it.
109
+ *
110
+ * Three and not a loop, because the poller's own trigger is still behind this:
111
+ * if the turn is still open after the third ask, the next poll is the right
112
+ * place to notice — it runs when the pane returns to the composer, by which time
113
+ * the transcript is written — and a hook handler that waits on a file is a hook
114
+ * handler that can hang a turn. The worst case this bounds is 1 s of the agent's
115
+ * stop path, spent only on an instance that has a transcript and an open turn.
116
+ */
117
+ exports.STOP_TRANSCRIPT_MAX_ATTEMPTS = 3;
94
118
  function sleep(ms) {
95
119
  return new Promise((resolve) => {
96
120
  setTimeout(resolve, ms);
@@ -130,24 +154,33 @@ async function captureTranscriptTurnOnStop(worktree, cliToolId, instanceId, opti
130
154
  const retryDelayMs = options.retryDelayMs ?? exports.STOP_TRANSCRIPT_RETRY_DELAY_MS;
131
155
  if (retryDelayMs <= 0)
132
156
  return false;
133
- // The retry is for one failure and one only: the turn's last assistant
134
- // record had not been appended yet. Every other reason the capture answers
135
- // false — no session pointer, no transcript, the operator never wired hooks
136
- // for this tool — is a reason waiting cannot fix, and this handler is on the
137
- // agent's own stop path, so half a second spent for nothing is half a second
138
- // added to every turn it is spent on.
157
+ // The retry is for one failure and one only: the turn is not closed yet
158
+ // because its remaining assistant records have not been appended. Every
159
+ // other reason the capture answers false — no session pointer, no
160
+ // transcript, the operator never wired hooks for this tool — is a reason
161
+ // waiting cannot fix, and this handler is on the agent's own stop path, so
162
+ // half a second spent for nothing is half a second added to every turn it is
163
+ // spent on. Asked once, before the first sleep: a transcript that exists
164
+ // does not stop existing between attempts.
139
165
  if (!(await hasStructuredHistoryTranscript(worktree.id, cliToolId, instanceId, capture))) {
140
166
  return false;
141
167
  }
142
- await sleep(retryDelayMs);
143
- const captured = await captureStructuredHistoryTurn(worktree.id, cliToolId, instanceId, capture);
144
- logger.debug('stop-history-capture-retried', {
145
- worktreeId: worktree.id,
146
- cliToolId,
147
- instanceId,
148
- captured,
149
- });
150
- return captured;
168
+ const maxAttempts = Math.max(1, options.maxAttempts ?? exports.STOP_TRANSCRIPT_MAX_ATTEMPTS);
169
+ for (let attempt = 2; attempt <= maxAttempts; attempt += 1) {
170
+ await sleep(retryDelayMs);
171
+ const captured = await captureStructuredHistoryTurn(worktree.id, cliToolId, instanceId, capture);
172
+ logger.debug('stop-history-capture-retried', {
173
+ worktreeId: worktree.id,
174
+ cliToolId,
175
+ instanceId,
176
+ attempt,
177
+ maxAttempts,
178
+ captured,
179
+ });
180
+ if (captured)
181
+ return true;
182
+ }
183
+ return false;
151
184
  }
152
185
  catch (error) {
153
186
  logger.warn('stop-history-capture-failed', {
@@ -7,6 +7,11 @@
7
7
  * This module manages the DB logging lifecycle (create/update execution logs)
8
8
  * and delegates actual command execution to claude-executor.
9
9
  *
10
+ * Scheduled tools: claude, codex, gemini, vibe-local, opencode, copilot,
11
+ * antigravity, command-code (Issue #2253). Which flags each one is launched
12
+ * with, and how its stdout is decoded back into an answer, is claude-executor's
13
+ * business — this module only records the verdict.
14
+ *
10
15
  * Trust boundary: All inputs are DB-derived from schedule-manager.ts (trusted).
11
16
  */
12
17
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -186,6 +191,13 @@ async function executeSchedule(state) {
186
191
  // Resolve the CLI options via the centralized helper (DR1-004, #2044)
187
192
  const options = resolveScheduleExecuteOptions(state.entry, worktree);
188
193
  const result = await (0, claude_executor_1.executeClaudeCommand)(state.entry.message, worktree.path, state.entry.cliToolId, state.entry.permission, options);
194
+ // Issue #2253: `result.status` is not always "did the process exit 0".
195
+ // command-code writes a `{"type":"result","subtype":…}` line even on a
196
+ // non-zero exit and can pair `subtype: "success"` with exit 9, so
197
+ // claude-executor reads both halves and folds the verdict into `status` and
198
+ // into the head of `output` (a `Reason: command-code exit N (…)` line).
199
+ // This row is therefore the failure reason as well as the transcript, and
200
+ // must keep writing `result.output` verbatim rather than a summary of it.
189
201
  updateExecutionLog(logId, result.status, result.output, result.exitCode);
190
202
  updateScheduleLastExecuted(state.scheduleId);
191
203
  logger.info('execution:completed', { name: state.entry.name, status: result.status });
@@ -94,6 +94,12 @@ exports.AUTO_YES_DIALOG_GATE_DEFAULT_MODE = {
94
94
  gemini: 'legacy',
95
95
  antigravity: 'legacy',
96
96
  'vibe-local': 'legacy',
97
+ // Issue #2250 / Epic #2249 決定 3: Command Code's Auto-Yes stays on the legacy
98
+ // numbered-response path. Its `PreToolUse` hook fires AFTER the permission
99
+ // dialog is answered (measured: dialog 00:11:37, answer 00:11:46, hook
100
+ // 00:11:46), so a `permissionDecision` cannot dismiss the dialog and there is
101
+ // no measured dialog rule to gate on.
102
+ 'command-code': 'legacy',
97
103
  };
98
104
  /**
99
105
  * The kill switch (§13.1 DR3-016).