commandmate 0.17.0 → 0.19.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 (264) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +120 -120
  3. package/.next/app-path-routes-manifest.json +19 -19
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +12 -12
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/app/update-check/route.js +1 -1
  10. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  18. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/push/subscriptions/route.js +1 -1
  33. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js +1 -1
  37. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
  39. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  43. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  52. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  54. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  55. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
  57. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/todos/route.js +1 -1
  61. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
  63. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  64. package/.next/server/app/api/verification/runs/route.js +1 -1
  65. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  67. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  70. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
  72. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  75. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +1 -1
  77. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
  82. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  85. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
  87. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
  90. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  94. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  96. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
  98. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
  101. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/logs/route.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/schedules/route.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/tasks/route.js +2 -2
  152. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/tree/route.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  174. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  176. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  177. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  179. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  180. package/.next/server/app/page_client-reference-manifest.js +1 -1
  181. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  183. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  184. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  185. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  186. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  187. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  188. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  189. package/.next/server/app/worktrees/[id]/page.js +1 -1
  190. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  191. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  192. package/.next/server/app-paths-manifest.json +19 -19
  193. package/.next/server/chunks/1117.js +1 -1
  194. package/.next/server/chunks/3042.js +1 -1
  195. package/.next/server/chunks/3753.js +19 -23
  196. package/.next/server/chunks/5959.js +3 -3
  197. package/.next/server/chunks/6130.js +1 -1
  198. package/.next/server/chunks/6274.js +10 -9
  199. package/.next/server/chunks/6283.js +1 -1
  200. package/.next/server/chunks/8681.js +1 -1
  201. package/.next/server/chunks/8807.js +492 -485
  202. package/.next/server/chunks/8856.js +1 -1
  203. package/.next/server/middleware-manifest.json +5 -5
  204. package/.next/server/pages/500.html +1 -1
  205. package/.next/server/server-reference-manifest.json +1 -1
  206. package/.next/static/chunks/{6488-f4e447464c9e0e22.js → 6488-2c412c29258637b6.js} +1 -1
  207. package/.next/static/chunks/app/worktrees/[id]/{page-5ffc84094830babb.js → page-f6e09d25cd3b56f9.js} +1 -1
  208. package/.next/trace +12 -12
  209. package/dist/cli/commands/auto-yes.d.ts.map +1 -1
  210. package/dist/cli/commands/auto-yes.js +9 -2
  211. package/dist/cli/commands/capture.d.ts +1 -0
  212. package/dist/cli/commands/capture.d.ts.map +1 -1
  213. package/dist/cli/commands/capture.js +112 -2
  214. package/dist/cli/commands/instances.d.ts +24 -0
  215. package/dist/cli/commands/instances.d.ts.map +1 -1
  216. package/dist/cli/commands/instances.js +44 -0
  217. package/dist/cli/commands/respond.d.ts.map +1 -1
  218. package/dist/cli/commands/respond.js +10 -2
  219. package/dist/cli/commands/send.d.ts.map +1 -1
  220. package/dist/cli/commands/send.js +47 -19
  221. package/dist/cli/commands/wait.d.ts +4 -1
  222. package/dist/cli/commands/wait.d.ts.map +1 -1
  223. package/dist/cli/commands/wait.js +134 -10
  224. package/dist/cli/types/api-responses.d.ts +10 -0
  225. package/dist/cli/types/api-responses.d.ts.map +1 -1
  226. package/dist/cli/types/index.d.ts +16 -0
  227. package/dist/cli/types/index.d.ts.map +1 -1
  228. package/dist/cli/utils/pager.d.ts +28 -0
  229. package/dist/cli/utils/pager.d.ts.map +1 -0
  230. package/dist/cli/utils/pager.js +57 -0
  231. package/dist/cli/utils/verify-runner.d.ts +6 -0
  232. package/dist/cli/utils/verify-runner.d.ts.map +1 -1
  233. package/dist/cli/utils/verify-runner.js +1 -0
  234. package/dist/lib/detection/ansi.d.ts +30 -0
  235. package/dist/lib/detection/ansi.d.ts.map +1 -0
  236. package/dist/lib/detection/ansi.js +39 -0
  237. package/dist/lib/tmux/transcript-squeeze.d.ts +76 -0
  238. package/dist/lib/tmux/transcript-squeeze.d.ts.map +1 -0
  239. package/dist/lib/tmux/transcript-squeeze.js +96 -0
  240. package/dist/server/server.js +18 -0
  241. package/dist/server/src/config/tmux-pane-config.js +33 -1
  242. package/dist/server/src/lib/cli-tools/antigravity.js +2 -1
  243. package/dist/server/src/lib/cli-tools/codex.js +3 -2
  244. package/dist/server/src/lib/cli-tools/copilot.js +2 -2
  245. package/dist/server/src/lib/cli-tools/gemini.js +2 -2
  246. package/dist/server/src/lib/cli-tools/opencode.js +2 -2
  247. package/dist/server/src/lib/cli-tools/vibe-local.js +2 -2
  248. package/dist/server/src/lib/db/agent-instances-db.js +53 -0
  249. package/dist/server/src/lib/db/migrations/index.js +2 -0
  250. package/dist/server/src/lib/db/migrations/runner.js +1 -1
  251. package/dist/server/src/lib/db/migrations/v52-orphaned-worktree-children.js +76 -0
  252. package/dist/server/src/lib/db/migrations/worktree-child-tables.js +119 -0
  253. package/dist/server/src/lib/db/tasks-db.js +46 -1
  254. package/dist/server/src/lib/db/verification-db.js +21 -3
  255. package/dist/server/src/lib/db/worktree-db.js +65 -42
  256. package/dist/server/src/lib/detection/cli-patterns.js +24 -1
  257. package/dist/server/src/lib/detection/status-detector.js +52 -2
  258. package/dist/server/src/lib/session/claude-session.js +4 -2
  259. package/dist/server/src/lib/tmux/read-mode-pager.js +161 -0
  260. package/dist/server/src/lib/tmux/read-mode.js +327 -0
  261. package/dist/server/src/lib/tmux/tmux.js +43 -5
  262. package/package.json +1 -1
  263. /package/.next/static/{gR8Sh86RrTynJON8SWkWK → -E7I667pJDTBamyG8M_Z-}/_buildManifest.js +0 -0
  264. /package/.next/static/{gR8Sh86RrTynJON8SWkWK → -E7I667pJDTBamyG8M_Z-}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"auto-yes.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/auto-yes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,wBAAgB,oBAAoB,IAAI,OAAO,CA6F9C"}
1
+ {"version":3,"file":"auto-yes.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/auto-yes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,oBAAoB,IAAI,OAAO,CAoG9C"}
@@ -11,6 +11,7 @@ const api_client_1 = require("../utils/api-client");
11
11
  const command_helpers_1 = require("../utils/command-helpers");
12
12
  const duration_constants_1 = require("../config/duration-constants");
13
13
  const cli_tool_ids_1 = require("../config/cli-tool-ids");
14
+ const instances_1 = require("./instances");
14
15
  function createAutoYesCommand() {
15
16
  const cmd = new commander_1.Command('auto-yes');
16
17
  cmd
@@ -71,8 +72,14 @@ function createAutoYesCommand() {
71
72
  body.stopPattern = options.stopPattern;
72
73
  }
73
74
  }
74
- if (options.agent) {
75
- body.cliToolId = options.agent;
75
+ // Issue #1629: the auto-yes poller keys on (worktree, cliTool, instance)
76
+ // and watches the session cliTool names, so the instance must be paired
77
+ // with the CLI tool its roster entry declares.
78
+ const agent = options.instance
79
+ ? await (0, instances_1.resolveInstanceCliTool)(client, worktreeId, options.instance, options.agent)
80
+ : options.agent;
81
+ if (agent) {
82
+ body.cliToolId = agent;
76
83
  }
77
84
  // Issue #896: per-instance auto-yes
78
85
  if (options.instance) {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * capture Command - Get current terminal output
3
3
  * Issue #518: [DR1-08] Factory pattern
4
+ * Issue #1623: `--pane` reads the raw tmux pane as a transcript (案B)
4
5
  */
5
6
  import { Command } from 'commander';
6
7
  export declare function createCaptureCommand(): Command;
@@ -1 +1 @@
1
- {"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/capture.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBpC,wBAAgB,oBAAoB,IAAI,OAAO,CAsD9C"}
1
+ {"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/capture.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6HpC,wBAAgB,oBAAoB,IAAI,OAAO,CA+E9C"}
@@ -2,6 +2,7 @@
2
2
  /**
3
3
  * capture Command - Get current terminal output
4
4
  * Issue #518: [DR1-08] Factory pattern
5
+ * Issue #1623: `--pane` reads the raw tmux pane as a transcript (案B)
5
6
  */
6
7
  Object.defineProperty(exports, "__esModule", { value: true });
7
8
  exports.createCaptureCommand = createCaptureCommand;
@@ -10,6 +11,19 @@ const types_1 = require("../types");
10
11
  const api_client_1 = require("../utils/api-client");
11
12
  const command_helpers_1 = require("../utils/command-helpers");
12
13
  const cli_tool_ids_1 = require("../config/cli-tool-ids");
14
+ const instances_1 = require("./instances");
15
+ const pager_1 = require("../utils/pager");
16
+ const transcript_squeeze_1 = require("../../lib/tmux/transcript-squeeze");
17
+ /**
18
+ * Rows of pane history the `--pane` viewer asks for.
19
+ *
20
+ * Deliberately NOT configurable and deliberately equal to the capture route's
21
+ * own default: Issue #1623 has to leave the detection pipeline's view of the
22
+ * pane untouched, and the cheapest way to guarantee that is for the viewer to
23
+ * make exactly the request everything else already makes. `--tail` narrows the
24
+ * RESULT instead (see {@link CaptureOptions.tail}).
25
+ */
26
+ const PANE_CAPTURE_LINES = 1000;
13
27
  /**
14
28
  * Format capture output as JSON (excluding fullOutput for size).
15
29
  */
@@ -17,12 +31,91 @@ function formatJson(data) {
17
31
  const { fullOutput: _fullOutput, ...rest } = data;
18
32
  return JSON.stringify(rest, null, 2);
19
33
  }
34
+ /**
35
+ * Parse and validate `--tail N`.
36
+ *
37
+ * @param raw - Raw option value, if the user passed one
38
+ * @returns The parsed count, or undefined when the option was absent
39
+ */
40
+ function parseTail(raw) {
41
+ if (raw === undefined)
42
+ return undefined;
43
+ const value = Number(raw);
44
+ if (!Number.isInteger(value) || value < 1) {
45
+ console.error('Error: --tail must be a positive integer.');
46
+ process.exit(types_1.ExitCode.CONFIG_ERROR);
47
+ }
48
+ return value;
49
+ }
50
+ /**
51
+ * Resolve which CLI tool's session the pane should be read from.
52
+ *
53
+ * POST /capture demands an explicit `cliToolId`, while GET /current-output falls
54
+ * back to the worktree's own default server-side. Mirroring that fallback here
55
+ * (`worktree.cliToolId || 'claude'`, matching the route) keeps bare
56
+ * `capture <id> --pane` pointed at the same session the rest of the CLI uses.
57
+ *
58
+ * @param client - API client
59
+ * @param worktreeId - Worktree ID
60
+ * @param agent - Value of `--agent`, already validated
61
+ * @param instance - Value of `--instance`, already validated
62
+ * @returns CLI tool ID to capture
63
+ */
64
+ async function resolvePaneCliTool(client, worktreeId, agent, instance) {
65
+ if (instance) {
66
+ const resolved = await (0, instances_1.resolveInstanceCliTool)(client, worktreeId, instance, agent);
67
+ if (resolved)
68
+ return resolved;
69
+ }
70
+ if (agent)
71
+ return agent;
72
+ const worktree = await client.get(`/api/worktrees/${worktreeId}`);
73
+ return worktree.cliToolId || 'claude';
74
+ }
75
+ /**
76
+ * `--pane` path: read the raw tmux pane and render it as a readable transcript.
77
+ *
78
+ * The squeeze happens CLIENT-side on purpose. The server keeps returning the
79
+ * unmodified frame, so nothing that consumes `/capture` — detection, Auto-Yes,
80
+ * the response saver — sees a different payload because this command exists.
81
+ */
82
+ async function capturePane(worktreeId, options) {
83
+ const client = new api_client_1.ApiClient({ token: options.token });
84
+ const tail = parseTail(options.tail);
85
+ const cliToolId = await resolvePaneCliTool(client, worktreeId, options.agent, options.instance);
86
+ const data = await client.post(`/api/worktrees/${worktreeId}/capture`, {
87
+ cliToolId,
88
+ lines: PANE_CAPTURE_LINES,
89
+ ...(options.instance ? { instanceId: options.instance } : {}),
90
+ });
91
+ const raw = data.output ?? '';
92
+ const squeezed = (0, transcript_squeeze_1.squeezeTranscript)(raw, { tail });
93
+ const text = options.raw ? raw : squeezed.text;
94
+ if (options.json) {
95
+ console.log(JSON.stringify({
96
+ cliToolId,
97
+ instanceId: options.instance ?? null,
98
+ output: text,
99
+ lines: options.raw ? squeezed.rawLines : squeezed.lines,
100
+ rawLines: squeezed.rawLines,
101
+ squeezed: !options.raw,
102
+ tailed: !options.raw && squeezed.tailed,
103
+ }, null, 2));
104
+ return;
105
+ }
106
+ (0, pager_1.printMaybePaged)(text);
107
+ }
20
108
  function createCaptureCommand() {
21
109
  const cmd = new commander_1.Command('capture');
22
110
  cmd
23
111
  .description('Capture current terminal output from a worktree')
24
112
  .argument('<worktree-id>', 'Worktree ID')
25
113
  .option('--json', 'JSON output (excludes fullOutput)')
114
+ // Issue #1623: reading mode. Works without attaching and without tmux 3.2+,
115
+ // which is why it is the fallback the popup binding degrades to.
116
+ .option('--pane', 'Read the raw tmux pane as a transcript, with blank layout rows squeezed')
117
+ .option('--tail <n>', 'With --pane: keep only the last N lines OF THE SQUEEZED transcript')
118
+ .option('--raw', 'With --pane: skip the squeeze and print the pane verbatim')
26
119
  .option('--agent <agent>', 'CLI tool agent (claude, codex, gemini, vibe-local, opencode, copilot, antigravity)')
27
120
  .option('--instance <id>', 'Agent instance ID: <agent> or <agent>-<n> (e.g. claude-2). Defaults to the agent\'s primary instance.')
28
121
  .option('--token <token>', command_helpers_1.TOKEN_WARNING)
@@ -42,11 +135,28 @@ function createCaptureCommand() {
42
135
  console.error('Error: Invalid --instance. Must be an alphanumeric/underscore/hyphen identifier (max 64 chars).');
43
136
  process.exit(types_1.ExitCode.CONFIG_ERROR);
44
137
  }
138
+ // Issue #1623: --tail / --raw only mean anything for the pane viewer.
139
+ // Silently ignoring them would look like the flag had no effect.
140
+ if (!options.pane && (options.tail !== undefined || options.raw)) {
141
+ console.error('Error: --tail and --raw require --pane.');
142
+ process.exit(types_1.ExitCode.CONFIG_ERROR);
143
+ }
144
+ if (options.pane) {
145
+ await capturePane(worktreeId, options);
146
+ return;
147
+ }
45
148
  const client = new api_client_1.ApiClient({ token: options.token });
149
+ // Issue #1629: /current-output takes the CLI tool at face value and
150
+ // otherwise falls back to the worktree default, so `--instance codex`
151
+ // alone captured the wrong (claude-named) session. Resolve the tool the
152
+ // instance is registered under before asking.
153
+ const agent = options.instance
154
+ ? await (0, instances_1.resolveInstanceCliTool)(client, worktreeId, options.instance, options.agent)
155
+ : options.agent;
46
156
  // Build path with optional cliTool/instance query parameters
47
157
  const query = new URLSearchParams();
48
- if (options.agent) {
49
- query.set('cliTool', options.agent);
158
+ if (agent) {
159
+ query.set('cliTool', agent);
50
160
  }
51
161
  if (options.instance) {
52
162
  query.set('instance', options.instance);
@@ -9,5 +9,29 @@
9
9
  * commandmate instances <worktree-id> kill <instance-id>
10
10
  */
11
11
  import { Command } from 'commander';
12
+ import { ApiClient } from '../utils/api-client';
13
+ /**
14
+ * Resolve which CLI tool backs `instanceId`, from the worktree's roster
15
+ * (Issue #1629). Shared by every command that targets an instance: `send`,
16
+ * `respond`, `capture` and `auto-yes`.
17
+ *
18
+ * `--instance <id>` on its own carries no CLI tool, so the server used to fall
19
+ * back to the worktree default. Since the tool id is part of the tmux session
20
+ * name, `send --instance codex` against a claude-default worktree started
21
+ * Claude in `mcbd-claude-<worktree>-codex`. Resolving here means the resolved
22
+ * tool is sent explicitly to every endpoint the command touches — including
23
+ * `/tasks`, `/current-output` and `/prompt-response`, which have no other way
24
+ * to learn it.
25
+ *
26
+ * The roster wins over `--agent`: it is the user-maintained declaration of what
27
+ * a named instance is, so a contradiction is an error rather than a session
28
+ * whose name disagrees with the agent inside it. An instance the roster does
29
+ * not know (the ad-hoc `send --instance <new-id>` flow) keeps `--agent` as
30
+ * given, and an unreadable roster degrades to a warning so an older daemon
31
+ * behaves as it did before.
32
+ *
33
+ * @returns the CLI tool to send, or undefined to let the server decide
34
+ */
35
+ export declare function resolveInstanceCliTool(client: ApiClient, worktreeId: string, instanceId: string, requestedAgent: string | undefined): Promise<string | undefined>;
12
36
  export declare function createInstancesCommand(): Command;
13
37
  //# sourceMappingURL=instances.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/instances.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6NpC,wBAAgB,sBAAsB,IAAI,OAAO,CAqEhD"}
1
+ {"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/instances.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAE,SAAS,EAAwC,MAAM,qBAAqB,CAAC;AAmDtF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA0B7B;AAwKD,wBAAgB,sBAAsB,IAAI,OAAO,CAqEhD"}
@@ -10,6 +10,7 @@
10
10
  * commandmate instances <worktree-id> kill <instance-id>
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.resolveInstanceCliTool = resolveInstanceCliTool;
13
14
  exports.createInstancesCommand = createInstancesCommand;
14
15
  const commander_1 = require("commander");
15
16
  const types_1 = require("../types");
@@ -38,6 +39,49 @@ function formatInstancesTable(rows) {
38
39
  const dataLines = dataRows.map(r => r.map((cell, i) => cell.padEnd(colWidths[i])).join(' '));
39
40
  return [headerLine, separator, ...dataLines].join('\n');
40
41
  }
42
+ /**
43
+ * Resolve which CLI tool backs `instanceId`, from the worktree's roster
44
+ * (Issue #1629). Shared by every command that targets an instance: `send`,
45
+ * `respond`, `capture` and `auto-yes`.
46
+ *
47
+ * `--instance <id>` on its own carries no CLI tool, so the server used to fall
48
+ * back to the worktree default. Since the tool id is part of the tmux session
49
+ * name, `send --instance codex` against a claude-default worktree started
50
+ * Claude in `mcbd-claude-<worktree>-codex`. Resolving here means the resolved
51
+ * tool is sent explicitly to every endpoint the command touches — including
52
+ * `/tasks`, `/current-output` and `/prompt-response`, which have no other way
53
+ * to learn it.
54
+ *
55
+ * The roster wins over `--agent`: it is the user-maintained declaration of what
56
+ * a named instance is, so a contradiction is an error rather than a session
57
+ * whose name disagrees with the agent inside it. An instance the roster does
58
+ * not know (the ad-hoc `send --instance <new-id>` flow) keeps `--agent` as
59
+ * given, and an unreadable roster degrades to a warning so an older daemon
60
+ * behaves as it did before.
61
+ *
62
+ * @returns the CLI tool to send, or undefined to let the server decide
63
+ */
64
+ async function resolveInstanceCliTool(client, worktreeId, instanceId, requestedAgent) {
65
+ let registered;
66
+ try {
67
+ const instances = await (0, agent_instances_1.fetchAgentInstances)(client, worktreeId);
68
+ registered = instances.find((inst) => inst.id === instanceId);
69
+ }
70
+ catch (error) {
71
+ console.error(`Warning: could not read the agent-instance roster (${(0, types_1.getErrorMessage)(error)}); using --agent as given.`);
72
+ return requestedAgent;
73
+ }
74
+ if (!registered) {
75
+ return requestedAgent;
76
+ }
77
+ if (requestedAgent && requestedAgent !== registered.cliTool) {
78
+ console.error(`Error: instance '${instanceId}' is registered as ${registered.cliTool}, but --agent ${requestedAgent} was given. `
79
+ + `Drop --agent, pass --agent ${registered.cliTool}, or re-register the instance.`);
80
+ process.exit(types_1.ExitCode.CONFIG_ERROR);
81
+ return requestedAgent;
82
+ }
83
+ return registered.cliTool;
84
+ }
41
85
  /**
42
86
  * List action: roster + live running/auto-yes status per instance.
43
87
  * Probes GET .../current-output?cliTool=&instance= per instance (same
@@ -1 +1 @@
1
- {"version":3,"file":"respond.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/respond.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,wBAAgB,oBAAoB,IAAI,OAAO,CAiE9C"}
1
+ {"version":3,"file":"respond.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/respond.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,oBAAoB,IAAI,OAAO,CAyE9C"}
@@ -12,6 +12,7 @@ const types_1 = require("../types");
12
12
  const api_client_1 = require("../utils/api-client");
13
13
  const command_helpers_1 = require("../utils/command-helpers");
14
14
  const cli_tool_ids_1 = require("../config/cli-tool-ids");
15
+ const instances_1 = require("./instances");
15
16
  function createRespondCommand() {
16
17
  const cmd = new commander_1.Command('respond');
17
18
  cmd
@@ -44,10 +45,17 @@ function createRespondCommand() {
44
45
  process.exit(types_1.ExitCode.CONFIG_ERROR);
45
46
  }
46
47
  const client = new api_client_1.ApiClient({ token: options.token });
48
+ // Issue #1629: /prompt-response derives the session name from cliTool
49
+ // and falls back to the worktree default, so `--instance codex` alone
50
+ // answered into a session that was never started. Resolve the tool the
51
+ // instance is registered under first.
52
+ const agent = options.instance
53
+ ? await (0, instances_1.resolveInstanceCliTool)(client, worktreeId, options.instance, options.agent)
54
+ : options.agent;
47
55
  // [DR2-06] Use prompt-response API with cliTool (not cliToolId)
48
56
  const body = { answer };
49
- if (options.agent) {
50
- body.cliTool = options.agent;
57
+ if (agent) {
58
+ body.cliTool = agent;
51
59
  }
52
60
  // Issue #868: target a specific agent instance
53
61
  if (options.instance) {
@@ -1 +1 @@
1
- {"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/send.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8IpC,wBAAgB,iBAAiB,IAAI,OAAO,CAmJ3C"}
1
+ {"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/send.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgKpC,wBAAgB,iBAAiB,IAAI,OAAO,CAoK3C"}
@@ -13,28 +13,41 @@ const duration_constants_1 = require("../config/duration-constants");
13
13
  const cli_tool_ids_1 = require("../config/cli-tool-ids");
14
14
  const model_validation_1 = require("../config/model-validation");
15
15
  const agent_instances_1 = require("../utils/agent-instances");
16
+ const instances_1 = require("./instances");
17
+ /** Auto-yes duration used when --duration is omitted. */
18
+ const DEFAULT_AUTO_YES_DURATION = '1h';
16
19
  /**
17
- * Build auto-yes request body and send it to the API (DRY extraction).
18
- * Validates duration and exits on invalid input.
20
+ * Resolve --duration to milliseconds, exiting on an invalid value.
19
21
  *
20
- * @param client - API client instance
21
- * @param worktreeId - Target worktree ID
22
- * @param options - Send command options containing auto-yes settings
22
+ * Issue #1608: this is called from the option-validation block at the top of
23
+ * the action, not from enableAutoYes(). enableAutoYes() runs after --contract
24
+ * has already created the task row, so validating there left a `pending` task
25
+ * behind for a message that was never sent.
23
26
  */
24
- async function enableAutoYes(client, worktreeId, options) {
25
- const durationMs = options.duration
26
- ? (0, duration_constants_1.parseDurationToMs)(options.duration)
27
- : (0, duration_constants_1.parseDurationToMs)('1h'); // default 1h
27
+ function resolveAutoYesDurationMs(duration) {
28
+ const durationMs = (0, duration_constants_1.parseDurationToMs)(duration ?? DEFAULT_AUTO_YES_DURATION);
28
29
  if (durationMs === null) {
29
30
  console.error(`Error: Invalid duration. Must be one of: ${duration_constants_1.ALLOWED_DURATIONS.join(', ')}`);
30
31
  process.exit(types_1.ExitCode.CONFIG_ERROR);
31
32
  }
33
+ return durationMs;
34
+ }
35
+ /**
36
+ * Build auto-yes request body and send it to the API (DRY extraction).
37
+ *
38
+ * @param client - API client instance
39
+ * @param worktreeId - Target worktree ID
40
+ * @param options - Send command options containing auto-yes settings
41
+ * @param durationMs - Duration already validated by resolveAutoYesDurationMs()
42
+ * @param agent - CLI tool resolved for --instance (Issue #1629), else --agent
43
+ */
44
+ async function enableAutoYes(client, worktreeId, options, durationMs, agent) {
32
45
  const autoYesBody = {
33
46
  enabled: true,
34
47
  duration: durationMs,
35
48
  };
36
- if (options.agent) {
37
- autoYesBody.cliToolId = options.agent;
49
+ if (agent) {
50
+ autoYesBody.cliToolId = agent;
38
51
  }
39
52
  // Issue #896: per-instance auto-yes. When --instance is given, the poller keys
40
53
  // on worktreeId:cliToolId:instanceId so the targeted instance is auto-answered
@@ -74,10 +87,10 @@ async function registerInstance(client, worktreeId, instanceId, cliTool) {
74
87
  * from that worktree's verify.yaml. Every violation the server found is printed
75
88
  * before exiting, so a broken contract is fixed in one pass (Issue #1545).
76
89
  */
77
- async function createContractTask(client, worktreeId, options) {
90
+ async function createContractTask(client, worktreeId, options, agent) {
78
91
  const body = { contractPath: options.contract };
79
- if (options.agent) {
80
- body.cliToolId = options.agent;
92
+ if (agent) {
93
+ body.cliToolId = agent;
81
94
  }
82
95
  if (options.instance) {
83
96
  body.instanceId = options.instance;
@@ -187,14 +200,29 @@ function createSendCommand() {
187
200
  process.exit(types_1.ExitCode.CONFIG_ERROR);
188
201
  }
189
202
  }
203
+ // Issue #1608: every option that can be judged from its own value is
204
+ // judged here, before the first side effect. --duration used to be the
205
+ // exception: enableAutoYes() validated it, and that runs after
206
+ // --contract has already created the task row, so `--duration 2h` left
207
+ // a `pending` task for a message that was never sent. Validated
208
+ // unconditionally, like --stop-pattern and --model above: a value the
209
+ // CLI cannot honour is an error whether or not --auto-yes accompanies it.
210
+ const autoYesDurationMs = resolveAutoYesDurationMs(options.duration);
190
211
  const client = new api_client_1.ApiClient({ token: options.token });
212
+ // Issue #1629: --instance names an agent instance, not a CLI tool, and
213
+ // the roster is the only place that pairs the two. Resolve it once, up
214
+ // front, so the task row, the send and auto-yes all name the same tool
215
+ // as the session that actually starts.
216
+ const agent = options.instance
217
+ ? await (0, instances_1.resolveInstanceCliTool)(client, worktreeId, options.instance, options.agent)
218
+ : options.agent;
191
219
  // Issue #1545: resolve the contract before anything with a side effect,
192
220
  // so an invalid contract cannot leave auto-yes enabled for a message
193
221
  // that was never sent.
194
222
  let taskId;
195
223
  let content = message;
196
224
  if (options.contract) {
197
- const task = await createContractTask(client, worktreeId, options);
225
+ const task = await createContractTask(client, worktreeId, options, agent);
198
226
  taskId = task.taskId;
199
227
  content = task.message;
200
228
  console.error(`Task created: ${taskId}`);
@@ -202,12 +230,12 @@ function createSendCommand() {
202
230
  }
203
231
  // --auto-yes: enable auto-yes first (unless --model is specified, then after send) [DR2-02]
204
232
  if (options.autoYes && !options.model) {
205
- await enableAutoYes(client, worktreeId, options);
233
+ await enableAutoYes(client, worktreeId, options, autoYesDurationMs, agent);
206
234
  }
207
235
  // [DR2-05] Send API uses "content" not "message"
208
236
  const sendBody = { content };
209
- if (options.agent) {
210
- sendBody.cliToolId = options.agent;
237
+ if (agent) {
238
+ sendBody.cliToolId = agent;
211
239
  }
212
240
  // Issue #868: Include instance ID in send body
213
241
  if (options.instance) {
@@ -240,7 +268,7 @@ function createSendCommand() {
240
268
  // Issue #576: Enable auto-yes AFTER send when --model is specified
241
269
  // This avoids auto-yes interfering with the /model command interaction
242
270
  if (options.autoYes && options.model) {
243
- await enableAutoYes(client, worktreeId, options);
271
+ await enableAutoYes(client, worktreeId, options, autoYesDurationMs, agent);
244
272
  }
245
273
  }
246
274
  catch (error) {
@@ -4,10 +4,13 @@
4
4
  *
5
5
  * Exit codes [DR1-03]:
6
6
  * - 0: SUCCESS (agent completed)
7
- * - 10: PROMPT_DETECTED (agent waiting for user input)
7
+ * - 10: PROMPT_DETECTED (agent waiting for user input, including arrow-key
8
+ * selection lists — Issue #1628)
8
9
  * - 124: TIMEOUT (--timeout exceeded)
9
10
  * Issue #1544 adds --verify / --require-work, which can turn a detected
10
11
  * completion into 20 (VERIFY_FAILED) or 21 (NOT_STARTED).
12
+ * Issue #1628 also returns 21 without --verify when the session was never
13
+ * running: a wait with nothing to wait for must not report success.
11
14
  * Infrastructure errors use ExitCode (1, 2, 99)
12
15
  */
13
16
  import { Command } from 'commander';
@@ -1 +1 @@
1
- {"version":3,"file":"wait.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/wait.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkKpC,wBAAgB,iBAAiB,IAAI,OAAO,CA6F3C"}
1
+ {"version":3,"file":"wait.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/wait.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwSpC,wBAAgB,iBAAiB,IAAI,OAAO,CA6G3C"}