commandmate 0.33.3 → 0.34.1

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 (355) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +146 -146
  3. package/.next/app-path-routes-manifest.json +26 -26
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +15 -15
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/update-check/route.js +1 -1
  12. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/assistant/conversation/route.js +1 -1
  14. package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
  15. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/assistant/current-output/route.js +1 -1
  17. package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
  18. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/assistant/messages/route.js +1 -1
  20. package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
  21. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/assistant/session/route.js +1 -1
  23. package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
  24. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/assistant/start/route.js +2 -2
  26. package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
  27. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/assistant/terminal/route.js +3 -3
  29. package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
  30. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/assistant/tools/route.js +1 -1
  32. package/.next/server/app/api/assistant/tools/route.js.nft.json +1 -1
  33. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/capabilities/route.js +1 -1
  38. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  43. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/hooks/agent-event/route.js +1 -1
  47. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  48. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/hooks/claude-done/route.js +2 -2
  50. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  51. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  52. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  53. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  54. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  55. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -1
  61. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
  62. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/relays/route.js +1 -1
  64. package/.next/server/app/api/relays/route.js.nft.json +1 -1
  65. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  67. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  70. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  71. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  72. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/repositories/clone/route.js +1 -1
  74. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  75. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/repositories/restore/route.js +1 -1
  78. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  79. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/repositories/route.js +1 -1
  81. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  82. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/repositories/scan/route.js +1 -1
  84. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  85. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/repositories/sync/route.js +1 -1
  87. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  88. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  91. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  92. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  110. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  113. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  116. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  122. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  153. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  156. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  159. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  171. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  176. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  179. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/schedules/route.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  188. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +2 -2
  190. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  191. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  202. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/tasks/route.js +2 -2
  204. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/terminal/route.js +2 -2
  206. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  207. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  209. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  211. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  212. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  215. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
  218. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  221. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  222. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  224. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  225. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  226. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  227. package/.next/server/app/api/worktrees/route.js +1 -1
  228. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  229. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  230. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  231. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  232. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  233. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  234. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  235. package/.next/server/app/page.js +1 -1
  236. package/.next/server/app/page_client-reference-manifest.js +1 -1
  237. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  238. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  239. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  240. package/.next/server/app/sessions/page.js +1 -1
  241. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  242. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  243. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  244. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  245. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  246. package/.next/server/app/worktrees/[id]/page.js +8 -8
  247. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  248. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  249. package/.next/server/app-paths-manifest.json +26 -26
  250. package/.next/server/chunks/1501.js +4 -4
  251. package/.next/server/chunks/1886.js +2 -2
  252. package/.next/server/chunks/2119.js +1 -1
  253. package/.next/server/chunks/2404.js +1 -1
  254. package/.next/server/chunks/2445.js +1 -1
  255. package/.next/server/chunks/3077.js +1 -1
  256. package/.next/server/chunks/3241.js +1 -1
  257. package/.next/server/chunks/3323.js +1 -1
  258. package/.next/server/chunks/3480.js +2 -2
  259. package/.next/server/chunks/434.js +1 -0
  260. package/.next/server/chunks/4443.js +1 -1
  261. package/.next/server/chunks/4802.js +1 -1
  262. package/.next/server/chunks/5164.js +1 -1
  263. package/.next/server/chunks/5571.js +1 -1
  264. package/.next/server/chunks/595.js +3 -3
  265. package/.next/server/chunks/6130.js +1 -1
  266. package/.next/server/chunks/6285.js +1 -1
  267. package/.next/server/chunks/6286.js +7 -7
  268. package/.next/server/chunks/6337.js +1 -1
  269. package/.next/server/chunks/650.js +1 -1
  270. package/.next/server/chunks/663.js +1 -1
  271. package/.next/server/chunks/6677.js +25 -0
  272. package/.next/server/chunks/7075.js +1 -0
  273. package/.next/server/chunks/7905.js +1 -1
  274. package/.next/server/chunks/8583.js +1 -0
  275. package/.next/server/chunks/8807.js +10 -10
  276. package/.next/server/chunks/8918.js +4 -2
  277. package/.next/server/chunks/9080.js +1 -0
  278. package/.next/server/chunks/964.js +1 -0
  279. package/.next/server/middleware-manifest.json +5 -5
  280. package/.next/server/pages/500.html +1 -1
  281. package/.next/server/server-reference-manifest.json +1 -1
  282. package/.next/server/src/middleware.js +1 -1
  283. package/.next/server/src/middleware.js.map +1 -1
  284. package/.next/static/chunks/2053-9ac860ab4e92ac89.js +1 -0
  285. package/.next/static/chunks/2652-18b8fea64413467e.js +1 -0
  286. package/.next/static/chunks/{4718-814f4ecfd7fcc513.js → 4718-29cfcfb806724d9a.js} +1 -1
  287. package/.next/static/chunks/{8361-9bb887203c456edb.js → 8361-0142beb59be2abf3.js} +1 -1
  288. package/.next/static/chunks/app/{page-022090bf6f932818.js → page-26a42881c8648cd3.js} +1 -1
  289. package/.next/static/chunks/app/sessions/page-a3ab6f122ec60d5a.js +1 -0
  290. package/.next/static/chunks/app/worktrees/[id]/page-60eab4e24c37cb77.js +1 -0
  291. package/.next/static/css/b09bede85744e1cf.css +1 -0
  292. package/.next/trace +13 -13
  293. package/README.md +141 -24
  294. package/dist/cli/commands/ask.d.ts.map +1 -1
  295. package/dist/cli/commands/ask.js +11 -2
  296. package/dist/cli/commands/remote.d.ts +93 -3
  297. package/dist/cli/commands/remote.d.ts.map +1 -1
  298. package/dist/cli/commands/remote.js +232 -9
  299. package/dist/cli/commands/respond.d.ts.map +1 -1
  300. package/dist/cli/commands/respond.js +8 -4
  301. package/dist/cli/commands/send.d.ts.map +1 -1
  302. package/dist/cli/commands/send.js +18 -0
  303. package/dist/cli/commands/wait.d.ts +18 -3
  304. package/dist/cli/commands/wait.d.ts.map +1 -1
  305. package/dist/cli/commands/wait.js +137 -2
  306. package/dist/cli/docs/agent-operations.d.ts +2 -2
  307. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  308. package/dist/cli/docs/agent-operations.js +41 -1
  309. package/dist/cli/types/index.d.ts +9 -0
  310. package/dist/cli/types/index.d.ts.map +1 -1
  311. package/dist/cli/utils/api-client.d.ts.map +1 -1
  312. package/dist/cli/utils/api-client.js +11 -1
  313. package/dist/cli/utils/remote-state.d.ts +32 -0
  314. package/dist/cli/utils/remote-state.d.ts.map +1 -1
  315. package/dist/cli/utils/remote-state.js +12 -0
  316. package/dist/cli/utils/session-target.d.ts +23 -6
  317. package/dist/cli/utils/session-target.d.ts.map +1 -1
  318. package/dist/cli/utils/session-target.js +33 -5
  319. package/dist/server/locales/en/worktree.json +21 -2
  320. package/dist/server/locales/ja/worktree.json +21 -2
  321. package/dist/server/server.js +204 -16
  322. package/dist/server/src/config/schedule-config.js +45 -3
  323. package/dist/server/src/lib/cli-tools/antigravity.js +95 -10
  324. package/dist/server/src/lib/cli-tools/submit-verified-sender.js +377 -16
  325. package/dist/server/src/lib/cmate-parser.js +8 -1
  326. package/dist/server/src/lib/db/agent-instances-db.js +11 -0
  327. package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +140 -19
  328. package/dist/server/src/lib/detection/tools/claude/detect.js +13 -2
  329. package/dist/server/src/lib/detection/tools/claude/picker-chrome.js +239 -0
  330. package/dist/server/src/lib/detection/tools/claude/prompt.js +74 -6
  331. package/dist/server/src/lib/hooks/sources/claude/history.js +391 -34
  332. package/dist/server/src/lib/hooks/sources/claude/transcript.js +91 -0
  333. package/dist/server/src/lib/hooks/sources/opencode/ports.js +6 -0
  334. package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +114 -11
  335. package/dist/server/src/lib/polling/response-checker.js +82 -3
  336. package/dist/server/src/lib/relay/relay-session-ref.js +15 -8
  337. package/dist/server/src/lib/schedule-manager.js +178 -19
  338. package/dist/server/src/lib/session/ask-user-question-prompt.js +4 -2
  339. package/dist/server/src/lib/session/claude-executor.js +33 -2
  340. package/dist/server/src/lib/session/resolve-session-target.js +37 -9
  341. package/dist/server/src/lib/verification/env-clean-gate.js +81 -4
  342. package/dist/server/src/lib/ws-server.js +74 -5
  343. package/dist/server/src/types/agent-transcript.js +143 -1
  344. package/package.json +1 -1
  345. package/.next/server/chunks/1068.js +0 -1
  346. package/.next/server/chunks/6808.js +0 -1
  347. package/.next/server/chunks/7875.js +0 -25
  348. package/.next/server/chunks/9553.js +0 -1
  349. package/.next/static/chunks/2053-3f299a7a2c7d6767.js +0 -1
  350. package/.next/static/chunks/8772-9be53a530950d804.js +0 -1
  351. package/.next/static/chunks/app/sessions/page-584adf11ae51df10.js +0 -1
  352. package/.next/static/chunks/app/worktrees/[id]/page-3af707e74a75172b.js +0 -1
  353. package/.next/static/css/acd46e25427a2080.css +0 -1
  354. /package/.next/static/{9x6U1h52hH_r6pOsGwI_p → oDWX0JcwfhUYrMnnqDWVC}/_buildManifest.js +0 -0
  355. /package/.next/static/{9x6U1h52hH_r6pOsGwI_p → oDWX0JcwfhUYrMnnqDWVC}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"remote-state.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/remote-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,oFAAoF;AACpF,eAAO,MAAM,sBAAsB,gBAAgB,CAAC;AAEpD,qEAAqE;AACrE,eAAO,MAAM,sBAAsB,MAAQ,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,4EAA4E;AAC5E,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAC;IACZ,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;OAOG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,OAAO,EAAE;QACP,sEAAsE;QACtE,QAAQ,EAAE,MAAM,CAAC;QACjB,8EAA8E;QAC9E,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,gFAAgF;IAChF,MAAM,EAAE,YAAY,CAAC;IACrB,4DAA4D;IAC5D,MAAM,EAAE;QACN,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAa5E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAkBrE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAMzD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAqBlE"}
1
+ {"version":3,"file":"remote-state.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/remote-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,oFAAoF;AACpF,eAAO,MAAM,sBAAsB,gBAAgB,CAAC;AAEpD,qEAAqE;AACrE,eAAO,MAAM,sBAAsB,MAAQ,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,aAAa,CAAC;AAEpD,4EAA4E;AAC5E,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAC;IACZ,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;OAOG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,OAAO,EAAE;QACP,sEAAsE;QACtE,QAAQ,EAAE,MAAM,CAAC;QACjB,8EAA8E;QAC9E,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,gFAAgF;IAChF,MAAM,EAAE,YAAY,CAAC;IACrB,4DAA4D;IAC5D,MAAM,EAAE;QACN,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;QACb;;;;;;;;;;;;WAYG;QACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACnC,CAAC;IACF;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAa5E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAkBrE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAMzD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAqClE"}
@@ -164,6 +164,18 @@ function isRemoteState(value) {
164
164
  return false;
165
165
  if (typeof server.port !== 'number')
166
166
  return false;
167
+ // Issue #2489: present-and-wrong is rejected; absent is accepted and reads as
168
+ // "this session predates --auth", which is the compatibility this field needs.
169
+ if (server.remoteIngressPort !== undefined &&
170
+ server.remoteIngressPort !== null &&
171
+ typeof server.remoteIngressPort !== 'number') {
172
+ return false;
173
+ }
174
+ if (record.authScope !== undefined &&
175
+ record.authScope !== 'all' &&
176
+ record.authScope !== 'remote-only') {
177
+ return false;
178
+ }
167
179
  return isRemoteHandle(record.handle);
168
180
  }
169
181
  /**
@@ -15,7 +15,10 @@
15
15
  * compatibility path for a daemon older than the endpoint, reported as
16
16
  * `resolvedBy: 'client-fallback'` with a warning on stderr. It is deliberately
17
17
  * NOT kept in step with the server — adding the primary-anchor stage to it would
18
- * be growing the second authority back (DR2-008).
18
+ * be growing the second authority back (DR2-008). The one exception is a
19
+ * refusal, not a choice: an `--agent` that contradicts an unregistered
20
+ * tool-named instance is reported exactly as the server reports it (Issue
21
+ * #2487), because a copy that obeys it sends where the server would refuse to.
19
22
  */
20
23
  import type { ApiClient } from './api-client';
21
24
  /**
@@ -24,11 +27,22 @@ import type { ApiClient } from './api-client';
24
27
  * CLI keeps its own copy of API shapes (see api-responses.ts).
25
28
  */
26
29
  export type SessionTargetResolvedBy = 'explicit' | 'roster' | 'primary' | 'worktree-default' | 'fallback' | 'client-fallback';
27
- /** An explicit `--agent` that the roster contradicts. */
30
+ /**
31
+ * An explicit `--agent` that the instance's declaration contradicts: its roster
32
+ * row, or — with no row — its own id when that id is a CLI tool id (the
33
+ * primary-instance anchor, #868; Issue #2487).
34
+ */
28
35
  export interface SessionTargetConflict {
29
36
  instanceId: string;
37
+ /** The tool the instance is declared as; for a primary-anchor conflict, the id itself. */
30
38
  rosterCliTool: string;
31
39
  requestedCliTool: string;
40
+ /**
41
+ * Set when the declaration is the primary-instance anchor rather than a
42
+ * roster row. Mirrors the server's field of the same name, which
43
+ * `resolve-target` sends; absent for a roster contradiction.
44
+ */
45
+ primaryAnchor?: true;
32
46
  }
33
47
  export interface CliSessionTarget {
34
48
  /**
@@ -56,15 +70,18 @@ export interface ResolveSessionTargetOptions {
56
70
  * @param client - API client aimed at the server
57
71
  * @param worktreeId - Worktree ID
58
72
  * @param options - `--instance` and `--agent` as the user gave them
59
- * @returns The resolved target, with `conflict` set when `--agent` contradicts the roster
73
+ * @returns The resolved target, with `conflict` set when `--agent` contradicts
74
+ * the roster or the primary-instance anchor
60
75
  * @throws ApiError when the server's capabilities cannot be determined (auth
61
76
  * failure, redirect, non-JSON body) — those are never treated as "old server"
62
77
  */
63
78
  export declare function resolveSessionTarget(client: ApiClient, worktreeId: string, options?: ResolveSessionTargetOptions): Promise<CliSessionTarget>;
64
79
  /**
65
- * The sentence shown when the roster and `--agent` disagree. Names both
66
- * declarations and the three ways out, because only the operator knows which of
67
- * the two is wrong.
80
+ * The sentence shown when the instance's declaration and `--agent` disagree.
81
+ * Names both declarations and the three ways out, because only the operator
82
+ * knows which of the two is wrong. A primary-anchor conflict has no roster row
83
+ * to re-register — `instances add --id <tool>` answers "already exists" — so its
84
+ * third way out is another instance.
68
85
  */
69
86
  export declare function describeSessionTargetConflict(conflict: SessionTargetConflict): string;
70
87
  //# sourceMappingURL=session-target.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"session-target.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/session-target.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAK9C;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAC/B,UAAU,GACV,QAAQ,GACR,SAAS,GACT,kBAAkB,GAClB,UAAU,GACV,iBAAiB,CAAC;AAEtB,yDAAyD;AACzD,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,0EAA0E;IAC1E,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,UAAU,EAAE,uBAAuB,CAAC;IACpC,gFAAgF;IAChF,QAAQ,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,2BAA2B;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAuBD;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAAC,gBAAgB,CAAC,CAM3B;AA6ED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,qBAAqB,GAAG,MAAM,CAMrF"}
1
+ {"version":3,"file":"session-target.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/session-target.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAK9C;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAC/B,UAAU,GACV,QAAQ,GACR,SAAS,GACT,kBAAkB,GAClB,UAAU,GACV,iBAAiB,CAAC;AAEtB;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,0FAA0F;IAC1F,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,aAAa,CAAC,EAAE,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,0EAA0E;IAC1E,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,UAAU,EAAE,uBAAuB,CAAC;IACpC,gFAAgF;IAChF,QAAQ,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,2BAA2B;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAuBD;;;;;;;;;;GAUG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAAC,gBAAgB,CAAC,CAM3B;AA4FD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,qBAAqB,GAAG,MAAM,CAcrF"}
@@ -16,12 +16,16 @@
16
16
  * compatibility path for a daemon older than the endpoint, reported as
17
17
  * `resolvedBy: 'client-fallback'` with a warning on stderr. It is deliberately
18
18
  * NOT kept in step with the server — adding the primary-anchor stage to it would
19
- * be growing the second authority back (DR2-008).
19
+ * be growing the second authority back (DR2-008). The one exception is a
20
+ * refusal, not a choice: an `--agent` that contradicts an unregistered
21
+ * tool-named instance is reported exactly as the server reports it (Issue
22
+ * #2487), because a copy that obeys it sends where the server would refuse to.
20
23
  */
21
24
  Object.defineProperty(exports, "__esModule", { value: true });
22
25
  exports.resolveSessionTarget = resolveSessionTarget;
23
26
  exports.describeSessionTargetConflict = describeSessionTargetConflict;
24
27
  const types_1 = require("../types");
28
+ const cli_tool_ids_1 = require("../config/cli-tool-ids");
25
29
  const agent_instances_1 = require("./agent-instances");
26
30
  const server_capabilities_1 = require("./server-capabilities");
27
31
  /**
@@ -40,7 +44,8 @@ function warnClientFallback() {
40
44
  * @param client - API client aimed at the server
41
45
  * @param worktreeId - Worktree ID
42
46
  * @param options - `--instance` and `--agent` as the user gave them
43
- * @returns The resolved target, with `conflict` set when `--agent` contradicts the roster
47
+ * @returns The resolved target, with `conflict` set when `--agent` contradicts
48
+ * the roster or the primary-instance anchor
44
49
  * @throws ApiError when the server's capabilities cannot be determined (auth
45
50
  * failure, redirect, non-JSON body) — those are never treated as "old server"
46
51
  */
@@ -73,6 +78,13 @@ async function resolveViaServer(client, worktreeId, options) {
73
78
  * primary-anchor stage and no worktree-default read — an old server applies
74
79
  * those itself when the CLI sends no `cliToolId`, and reimplementing them here
75
80
  * is how the second authority grew in the first place (DR2-008).
81
+ *
82
+ * The one thing borrowed from the server's chain is its refusal (Issue #2487):
83
+ * with no roster row, an `--agent` that differs from a tool-named instance id
84
+ * is the contradiction the server reports, and it is reported here with the
85
+ * same `conflict`. It resolves nothing — without `--agent` that id still
86
+ * resolves to nothing here — but taking the `--agent` would start an ad-hoc
87
+ * session under another tool's primary id, which the server now refuses.
76
88
  */
77
89
  async function resolveLocally(client, worktreeId, options) {
78
90
  const { instanceId, requestedCliTool } = options;
@@ -95,6 +107,14 @@ async function resolveLocally(client, worktreeId, options) {
95
107
  return degraded(requestedCliTool);
96
108
  }
97
109
  if (!registered) {
110
+ if (requestedCliTool && (0, cli_tool_ids_1.isCliToolId)(instanceId) && requestedCliTool !== instanceId) {
111
+ return degraded(instanceId, {
112
+ instanceId,
113
+ rosterCliTool: instanceId,
114
+ requestedCliTool,
115
+ primaryAnchor: true,
116
+ });
117
+ }
98
118
  return degraded(requestedCliTool);
99
119
  }
100
120
  if (requestedCliTool && requestedCliTool !== registered.cliTool) {
@@ -107,11 +127,19 @@ async function resolveLocally(client, worktreeId, options) {
107
127
  return degraded(registered.cliTool);
108
128
  }
109
129
  /**
110
- * The sentence shown when the roster and `--agent` disagree. Names both
111
- * declarations and the three ways out, because only the operator knows which of
112
- * the two is wrong.
130
+ * The sentence shown when the instance's declaration and `--agent` disagree.
131
+ * Names both declarations and the three ways out, because only the operator
132
+ * knows which of the two is wrong. A primary-anchor conflict has no roster row
133
+ * to re-register — `instances add --id <tool>` answers "already exists" — so its
134
+ * third way out is another instance.
113
135
  */
114
136
  function describeSessionTargetConflict(conflict) {
137
+ if (conflict.primaryAnchor) {
138
+ return (`instance '${conflict.instanceId}' is the primary instance of ${conflict.rosterCliTool}, `
139
+ + `but --agent ${conflict.requestedCliTool} was given. `
140
+ + `Drop --agent, pass --agent ${conflict.rosterCliTool}, or target a ${conflict.requestedCliTool} instance instead `
141
+ + `(e.g. --instance ${conflict.requestedCliTool}).`);
142
+ }
115
143
  return (`instance '${conflict.instanceId}' is registered as ${conflict.rosterCliTool}, `
116
144
  + `but --agent ${conflict.requestedCliTool} was given. `
117
145
  + `Drop --agent, pass --agent ${conflict.rosterCliTool}, or re-register the instance.`);
@@ -334,7 +334,10 @@
334
334
  "trace": "Copy the current trace id for support debugging",
335
335
  "tree": "Browse the session tree and jump to any point in it",
336
336
  "unshare": "Stop sharing the conversation",
337
- "worktree": "Create, list, or switch git worktrees",
337
+ "worktree": {
338
+ "codex": "Start or continue a conversation in a new worktree",
339
+ "command-code": "Create, list, or switch git worktrees"
340
+ },
338
341
  "skill-doctor": "Show what each of your skills costs in context and how often it gets used, so you can find skills to turn off"
339
342
  }
340
343
  },
@@ -479,6 +482,7 @@
479
482
  "empty": "No messages yet",
480
483
  "emptyHint": "Sending a message starts the session",
481
484
  "openSearch": "Search this conversation",
485
+ "turnBoundary": "Next turn",
482
486
  "thinking": {
483
487
  "summary": "Thinking · {count}",
484
488
  "expand": "Show the reasoning",
@@ -504,7 +508,19 @@
504
508
  "awaitingAnswer": "Awaiting an answer",
505
509
  "unclassified": "Dialog not recognized",
506
510
  "resolved": "Resolved",
507
- "unlabeled": "Approval dialog"
511
+ "unlabeled": "Approval dialog",
512
+ "unlabeledQuestion": "Question",
513
+ "autoAnswered": "Auto-answered",
514
+ "submitConfirmation": "Answer submission",
515
+ "confirmation": "Submission: {outcome}",
516
+ "summaryQuestions": "Questions · {count}",
517
+ "summaryConfirmations": "Submissions · {count}",
518
+ "summaryConfirmationsOnly": "Answer submissions · {count}",
519
+ "summarySeparator": " / ",
520
+ "expandQuestions": "Show the questions",
521
+ "collapseQuestions": "Hide the questions",
522
+ "expandMixed": "Show the questions and approvals",
523
+ "collapseMixed": "Hide the questions and approvals"
508
524
  },
509
525
  "previousSession": {
510
526
  "summary": "Previous session ({count})",
@@ -927,6 +943,9 @@
927
943
  "toolbarLabel": "Dialog answer keys",
928
944
  "caption": "Answer"
929
945
  },
946
+ "promptResponse": {
947
+ "refused": "Your answer was not sent because the dialog has changed. Please check the screen."
948
+ },
930
949
  "dismissPanelKeys": {
931
950
  "toolbarLabel": "Close this screen",
932
951
  "close": "Close (Esc)",
@@ -334,7 +334,10 @@
334
334
  "trace": "サポート調査用に現在のトレース ID をコピー",
335
335
  "tree": "セッションツリーを辿って任意の地点へジャンプ",
336
336
  "unshare": "会話の共有を停止",
337
- "worktree": "git worktree の作成・一覧・切り替え",
337
+ "worktree": {
338
+ "codex": "新しい worktree で会話を開始・再開する",
339
+ "command-code": "git worktree の作成・一覧・切り替え"
340
+ },
338
341
  "skill-doctor": "各スキルのコンテキスト消費量と使用頻度を表示し、オフにするスキルを特定"
339
342
  }
340
343
  },
@@ -479,6 +482,7 @@
479
482
  "empty": "まだメッセージはありません",
480
483
  "emptyHint": "送信するとセッションが起動します",
481
484
  "openSearch": "この会話を検索",
485
+ "turnBoundary": "ここから次のターン",
482
486
  "thinking": {
483
487
  "summary": "思考 {count} 件",
484
488
  "expand": "思考を開く",
@@ -504,7 +508,19 @@
504
508
  "awaitingAnswer": "応答待ち",
505
509
  "unclassified": "判別できないダイアログ",
506
510
  "resolved": "応答済み",
507
- "unlabeled": "承認ダイアログ"
511
+ "unlabeled": "承認ダイアログ",
512
+ "unlabeledQuestion": "質問",
513
+ "autoAnswered": "自動回答",
514
+ "submitConfirmation": "質問の送信確認",
515
+ "confirmation": "送信確認: {outcome}",
516
+ "summaryQuestions": "質問 {count} 件",
517
+ "summaryConfirmations": "送信確認 {count} 件",
518
+ "summaryConfirmationsOnly": "質問の送信確認 {count} 件",
519
+ "summarySeparator": "・",
520
+ "expandQuestions": "質問を開く",
521
+ "collapseQuestions": "質問を閉じる",
522
+ "expandMixed": "質問と承認を開く",
523
+ "collapseMixed": "質問と承認を閉じる"
508
524
  },
509
525
  "previousSession": {
510
526
  "summary": "前回のセッション({count} 件)",
@@ -927,6 +943,9 @@
927
943
  "toolbarLabel": "ダイアログへの回答キー",
928
944
  "caption": "回答"
929
945
  },
946
+ "promptResponse": {
947
+ "refused": "ダイアログの状態が変わったため送信できませんでした。画面を確認してください。"
948
+ },
930
949
  "dismissPanelKeys": {
931
950
  "toolbarLabel": "この画面を閉じる",
932
951
  "close": "閉じる (Esc)",
@@ -87,6 +87,83 @@ const session_cleanup_1 = require("./src/lib/session-cleanup");
87
87
  const dev = process.env.NODE_ENV !== 'production';
88
88
  const hostname = (0, env_1.getEnvByKey)('CM_BIND') || '127.0.0.1';
89
89
  const port = parseInt((0, env_1.getEnvByKey)('CM_PORT') || '3000', 10);
90
+ /**
91
+ * Issue #2489: the `CM_AUTH_SCOPE` value that exempts the local listener.
92
+ *
93
+ * Written out here rather than imported from `src/lib/ws-server.ts`, which
94
+ * exports the same constant for the Node-runtime side, for the same reason the
95
+ * `x-cm-raw-url` header name below is written out: this is read at MODULE SCOPE,
96
+ * before `app.prepare()`, and everything server.ts evaluates that early has to
97
+ * stand on its own. `tests/integration/remote-ingress-auth-2489.test.ts` holds
98
+ * the two spellings equal, so a rename cannot leave one of them behind.
99
+ */
100
+ const REMOTE_ONLY_AUTH_SCOPE = 'remote-only';
101
+ /**
102
+ * Issue #2489: the loopback address the Provider's upstream is pointed at.
103
+ *
104
+ * `commandmate remote --auth remote-only` asks for "the phone authenticates,
105
+ * the PC in front of the machine does not". The listener a request landed on is
106
+ * the only unforgeable way to tell those apart (see the header of
107
+ * `src/lib/ws-server.ts`'s ingress section), so this bind is deliberately the
108
+ * literal loopback address rather than `hostname`: the second listener must
109
+ * never be reachable from the LAN, whatever `CM_BIND` says.
110
+ */
111
+ const REMOTE_INGRESS_BIND = '127.0.0.1';
112
+ /**
113
+ * Issue #2489: whether `CM_BIND` keeps the local listener off the network.
114
+ *
115
+ * `remote-only` makes the local listener unauthenticated, so a non-loopback
116
+ * bind would extend "local means trusted" to every host on the LAN. The CLI
117
+ * refuses that combination up front (exit 2); this is the second, independent
118
+ * check, because `CM_BIND` can also be set in `.env` or exported after the fact.
119
+ */
120
+ function isLoopbackBind(bind) {
121
+ return bind === '127.0.0.1' || bind === 'localhost' || bind === '::1' || bind === '[::1]';
122
+ }
123
+ /**
124
+ * Fall back to authenticating every listener, and say why.
125
+ *
126
+ * Writes the decision back into `process.env` rather than only returning it:
127
+ * `middleware.ts` and `ws-server.ts` read `CM_AUTH_SCOPE` per request, so a
128
+ * degradation that lived in a local variable would leave the local listener
129
+ * exempt while this process believed it had closed the door.
130
+ */
131
+ function refuseRemoteOnly(reason) {
132
+ console.error(`[Security] CM_AUTH_SCOPE=${REMOTE_ONLY_AUTH_SCOPE} refused: ${reason}. ` +
133
+ 'Every listener will require authentication.');
134
+ process.env.CM_AUTH_SCOPE = 'all';
135
+ return null;
136
+ }
137
+ /**
138
+ * Resolve the port of the remote-only ingress listener, or null for one listener.
139
+ *
140
+ * Fail-closed at every branch: anything this cannot verify turns into
141
+ * {@link refuseRemoteOnly}, which is the pre-#2489 behaviour (auth everywhere).
142
+ *
143
+ * @returns The loopback port to open for the Provider, or null
144
+ */
145
+ function resolveRemoteIngressPort() {
146
+ if (process.env.CM_AUTH_SCOPE !== REMOTE_ONLY_AUTH_SCOPE)
147
+ return null;
148
+ if (!isLoopbackBind(hostname)) {
149
+ return refuseRemoteOnly(`CM_BIND is ${hostname}, which is not loopback`);
150
+ }
151
+ const raw = process.env.CM_REMOTE_INGRESS_PORT;
152
+ if (!raw) {
153
+ return refuseRemoteOnly('CM_REMOTE_INGRESS_PORT is not set');
154
+ }
155
+ const parsed = Number.parseInt(raw, 10);
156
+ if (!Number.isInteger(parsed) || parsed < 1 || parsed > 65535) {
157
+ return refuseRemoteOnly(`CM_REMOTE_INGRESS_PORT is not a valid port: ${raw}`);
158
+ }
159
+ if (parsed === port) {
160
+ // One socket cannot be two ingresses, and "the Provider dials the port the
161
+ // user dials" is exactly the confusion this whole mechanism exists to avoid.
162
+ return refuseRemoteOnly('CM_REMOTE_INGRESS_PORT is the same port the server serves on');
163
+ }
164
+ return parsed;
165
+ }
166
+ const remoteIngressPort = resolveRemoteIngressPort();
90
167
  // Issue #331: HTTPS configuration
91
168
  const certPath = process.env.CM_HTTPS_CERT;
92
169
  const keyPath = process.env.CM_HTTPS_KEY;
@@ -162,14 +239,27 @@ async function resolveWorktreeAliasRedirect(url) {
162
239
  // All WebSocket upgrades are handled by ws-server.ts (our own upgrade listener).
163
240
  app.setupWebSocketHandler = () => { };
164
241
  app.prepare().then(() => {
165
- // Request handler for both HTTP and HTTPS
166
- const requestHandler = async (req, res) => {
242
+ // Request handler for both HTTP and HTTPS.
243
+ //
244
+ // Issue #2489: a factory rather than a single handler, because the ONE thing a
245
+ // request cannot lie about is the listener it arrived on, and that fact is
246
+ // only known here — at the point the listener is constructed. Every listener
247
+ // is built through this function, so every request is stamped; a listener
248
+ // wired up any other way would leave the caller's own `x-cm-ingress` in place,
249
+ // which is the single way this scheme can fail open.
250
+ const requestHandlerFor = (ingress) => async (req, res) => {
167
251
  // Guard: res must be a proper HTTP ServerResponse (not a raw net.Socket).
168
252
  // Defense-in-depth: normally not needed after the setupWebSocketHandler fix above,
169
253
  // but kept for safety in case any other path passes a non-ServerResponse object.
170
254
  if (typeof res?.setHeader !== 'function') {
171
255
  return;
172
256
  }
257
+ // Issue #2489: overwrite, unconditionally and before anything reads it.
258
+ // `middleware.ts` and `ws-server.ts` decide whether to demand a token from
259
+ // this value alone — deliberately NOT from `X-Real-IP` / `X-Forwarded-For` /
260
+ // `Host`, all of which a tunnelled request carries identically to a local
261
+ // one (a Provider's upstream IS 127.0.0.1).
262
+ (0, ws_server_1.stampIngress)(req.headers, ingress);
173
263
  // Issue #332: Inject X-Real-IP header for IP restriction
174
264
  // [S3-005] This applies to HTTP requests only. WebSocket upgrade requests
175
265
  // are skipped below and handled by ws-server.ts (which uses socket.remoteAddress directly).
@@ -241,15 +331,16 @@ app.prepare().then(() => {
241
331
  }
242
332
  };
243
333
  // Issue #331: Create HTTP or HTTPS server
244
- let server;
334
+ let tlsOptions = null;
245
335
  let protocol = 'http';
246
336
  if (certPath && keyPath) {
247
337
  const validatedCertPath = validateCertPath(certPath, 'Certificate');
248
338
  const validatedKeyPath = validateCertPath(keyPath, 'Key');
249
339
  try {
250
- const cert = (0, fs_1.readFileSync)(validatedCertPath);
251
- const key = (0, fs_1.readFileSync)(validatedKeyPath);
252
- server = (0, https_1.createServer)({ cert, key }, requestHandler);
340
+ tlsOptions = {
341
+ cert: (0, fs_1.readFileSync)(validatedCertPath),
342
+ key: (0, fs_1.readFileSync)(validatedKeyPath),
343
+ };
253
344
  protocol = 'https';
254
345
  console.log('HTTPS server created with TLS certificates');
255
346
  }
@@ -258,11 +349,35 @@ app.prepare().then(() => {
258
349
  process.exit(2);
259
350
  }
260
351
  }
261
- else {
262
- server = (0, http_1.createServer)(requestHandler);
263
- }
352
+ /**
353
+ * Issue #2489: build one listener, stamped with its own ingress.
354
+ *
355
+ * The TLS material is read once above and shared, so the remote listener is
356
+ * the same server in every respect except which socket it answers on — which
357
+ * is the only difference that is allowed to matter.
358
+ */
359
+ const createListener = (ingress) => tlsOptions === null
360
+ ? (0, http_1.createServer)(requestHandlerFor(ingress))
361
+ : (0, https_1.createServer)(tlsOptions, requestHandlerFor(ingress));
362
+ const server = createListener('local');
363
+ /**
364
+ * Issue #2489: the listener `commandmate remote --auth remote-only` points the
365
+ * Provider at. Null in every other configuration, which is what keeps
366
+ * `--auth all` (and a plain `commandmate start`) on exactly one socket.
367
+ */
368
+ const remoteServer = remoteIngressPort === null ? null : createListener('remote');
369
+ // Issue #2489: stamp WebSocket upgrades too, and BEFORE `setupWebSocket`
370
+ // registers its own 'upgrade' listener — Node fires listeners in registration
371
+ // order, so this is what guarantees the auth check downstream reads a value
372
+ // this process wrote. HTTP and WS must agree: a phone drives the terminal over
373
+ // this socket, so a WS path that exempted more than the HTTP path would hand
374
+ // the tunnel a live shell while the screen behind it still asked for a token.
375
+ server.on('upgrade', (request) => (0, ws_server_1.stampIngress)(request.headers, 'local'));
376
+ remoteServer?.on('upgrade', (request) => (0, ws_server_1.stampIngress)(request.headers, 'remote'));
264
377
  // Setup WebSocket server
265
- (0, ws_server_1.setupWebSocket)(server);
378
+ (0, ws_server_1.setupWebSocket)(server, {
379
+ additionalServers: remoteServer === null ? [] : [remoteServer],
380
+ });
266
381
  // Scan and sync worktrees on startup
267
382
  async function initializeWorktrees() {
268
383
  try {
@@ -466,9 +581,35 @@ app.prepare().then(() => {
466
581
  }
467
582
  process.exit(1);
468
583
  });
584
+ // Issue #2489: open the Provider's door on its own loopback socket.
585
+ //
586
+ // Started before the main `listen` so the CLI's readiness probe on this port
587
+ // cannot outrun it. An error here is NOT fatal to the process — killing the
588
+ // server would take the user's local session down with the remote one, which
589
+ // is the same reason `--expires` closes only the Provider (§5.3) — but it IS
590
+ // fail-closed: without this socket there is no "remote" ingress, so the local
591
+ // exemption is withdrawn and every listener goes back to demanding a token.
592
+ // `commandmate remote` then fails its readiness probe on this port and rolls
593
+ // the whole session back, which is where the user sees the error.
594
+ if (remoteServer !== null && remoteIngressPort !== null) {
595
+ remoteServer.on('error', (err) => {
596
+ console.error(`[Security] Remote ingress listener on ${REMOTE_INGRESS_BIND}:${remoteIngressPort} failed ` +
597
+ `(${err.code ?? err.message}). Every listener will require authentication.`);
598
+ process.env.CM_AUTH_SCOPE = 'all';
599
+ });
600
+ remoteServer.listen(remoteIngressPort, REMOTE_INGRESS_BIND, () => {
601
+ console.log(`> Remote ingress ready on ${protocol}://${REMOTE_INGRESS_BIND}:${remoteIngressPort} (authentication required)`);
602
+ });
603
+ }
469
604
  server.listen(port, hostname, async () => {
470
605
  console.log(`> Ready on ${protocol}://${hostname}:${port}`);
471
606
  console.log(`> WebSocket server ready`);
607
+ if (remoteIngressPort !== null) {
608
+ // Say it on the main "Ready" line too: "the PC does not need to log in" is
609
+ // a security-relevant departure from the default, and a server log that
610
+ // only mentions it in a line above is a log nobody reads.
611
+ console.log(`> Auth scope: ${REMOTE_ONLY_AUTH_SCOPE} — ${protocol}://${hostname}:${port} does not require a token`);
612
+ }
472
613
  // Issue #2113: verify that the URL the documentation advertises
473
614
  // (`http://localhost:<port>`) actually reaches THIS process. It does not when
474
615
  // another process holds `::1:<port>`: `localhost` resolves ::1 before 127.0.0.1
@@ -647,12 +788,59 @@ app.prepare().then(() => {
647
788
  console.log('Graceful shutdown timeout, forcing exit...');
648
789
  process.exit(1);
649
790
  }, 3000);
650
- // Try graceful HTTP server close
651
- server.close(() => {
652
- clearTimeout(forceExitTimeout);
653
- console.log('Server closed gracefully');
654
- process.exit(0);
655
- });
791
+ // Try graceful HTTP server close.
792
+ //
793
+ // Issue #2489: EVERY listener this process opened, not just the main one.
794
+ // `remoteServer` was absent from this function entirely, and the cost was
795
+ // asymmetry on the door the user cannot see: `server.close()`'s callback
796
+ // fires once the LOCAL connections have drained, and the `process.exit(0)`
797
+ // inside it then cut off any request still in flight through the provider.
798
+ // The local listener had three seconds of grace and the remote one had
799
+ // none. (The accept window between the teardown above and this point is the
800
+ // same for both listeners, and effectively zero — everything between the
801
+ // signal and here is synchronous, so the event loop never turns to accept a
802
+ // connection. The in-flight requests are the real loss.)
803
+ //
804
+ // The invariant, rather than the fix: whatever shutdown does to one
805
+ // listener it does to all of them. Anything added here belongs INSIDE this
806
+ // loop rather than on `server` alone — applying it to `server` only would
807
+ // put the asymmetry straight back on the listener nobody is looking at.
808
+ const listeners = remoteServer === null ? [server] : [server, remoteServer];
809
+ // `close()` stops each accept loop immediately and calls back once that
810
+ // listener's own connections have ended, so both doors shut now and the
811
+ // exit waits for the last one to drain. A listener that never reached
812
+ // `listen()` (EADDRINUSE on the remote port) calls its callback with an
813
+ // Error instead of throwing, which counts as drained here — which is what
814
+ // we want: a door that never opened cannot be holding anything.
815
+ let draining = listeners.length;
816
+ for (const listener of listeners) {
817
+ listener.close(() => {
818
+ draining -= 1;
819
+ if (draining > 0)
820
+ return;
821
+ clearTimeout(forceExitTimeout);
822
+ console.log('Server closed gracefully');
823
+ process.exit(0);
824
+ });
825
+ // Issue #2488: close() stops accepting immediately, but its callback only
826
+ // fires once every ESTABLISHED connection on that listener is gone. A
827
+ // browser tab left on the dashboard holds keep-alive sockets with no
828
+ // request in flight, and nothing ever closes them, so the callback never
829
+ // ran and the process lived the full 3 seconds to the force-exit — with
830
+ // its listening socket already closed. That window is what the stop
831
+ // scripts used to mistake for "stopped" (they looked for a listener,
832
+ // found none, and returned while this process was still alive and still
833
+ // named by logs/server.pid).
834
+ //
835
+ // closeIdleConnections() ends exactly those sockets. A connection with a
836
+ // request in flight is NOT idle and is left alone: it still gets the 3
837
+ // seconds above, so an in-flight response is no more truncated than
838
+ // before. The stop scripts no longer depend on this being fast — they
839
+ // wait for the PID — but the common case now exits in milliseconds
840
+ // instead of 3 seconds. Per #2489's invariant this runs on EVERY
841
+ // listener, so the remote door drains on the same terms as the local one.
842
+ listener.closeIdleConnections();
843
+ }
656
844
  }
657
845
  process.on('SIGTERM', () => gracefulShutdown('SIGTERM'));
658
846
  process.on('SIGINT', () => gracefulShutdown('SIGINT'));
@@ -10,7 +10,7 @@
10
10
  * [S4-014] UUID v4 format validation
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.UUID_V4_PATTERN = exports.DEFAULT_PERMISSIONS = exports.NO_PERMISSION_FLAGS = exports.OPENCODE_PERMISSIONS = exports.VIBE_LOCAL_PERMISSIONS = exports.GEMINI_PERMISSIONS = exports.COMMAND_CODE_PERMISSIONS = exports.ANTIGRAVITY_PERMISSIONS = exports.COPILOT_PERMISSIONS = exports.CODEX_SANDBOXES = exports.CLAUDE_PERMISSIONS = exports.MAX_SCHEDULE_CRON_LENGTH = exports.MAX_SCHEDULE_MESSAGE_LENGTH = exports.MAX_SCHEDULE_NAME_LENGTH = void 0;
13
+ exports.UUID_V4_PATTERN = exports.DEFAULT_PERMISSIONS = exports.NO_PERMISSION_FLAGS = exports.OPENCODE_PERMISSIONS = exports.VIBE_LOCAL_PERMISSIONS = exports.GEMINI_PERMISSIONS = exports.COMMAND_CODE_SCHEDULE_PERMISSIONS = exports.COMMAND_CODE_YOLO_PERMISSION = exports.COMMAND_CODE_PERMISSIONS = exports.ANTIGRAVITY_PERMISSIONS = exports.COPILOT_PERMISSIONS = exports.CODEX_SANDBOXES = exports.CLAUDE_PERMISSIONS = exports.MAX_SCHEDULE_CRON_LENGTH = exports.MAX_SCHEDULE_MESSAGE_LENGTH = exports.MAX_SCHEDULE_NAME_LENGTH = void 0;
14
14
  exports.getPermissionOptionsForTool = getPermissionOptionsForTool;
15
15
  exports.isValidUuidV4 = isValidUuidV4;
16
16
  // =============================================================================
@@ -62,6 +62,41 @@ exports.COMMAND_CODE_PERMISSIONS = [
62
62
  'auto-accept',
63
63
  'dont-ask',
64
64
  ];
65
+ /**
66
+ * The value that means `--yolo` in the Permission column (Issue #2454).
67
+ *
68
+ * Not a `--permission-mode` value — it is the flag name, the same trick
69
+ * {@link COPILOT_PERMISSIONS} plays with `allow-all-tools` / `yolo`. Named so
70
+ * the branch in `buildCliArgs` reads as a comparison against a vocabulary
71
+ * entry rather than against a bare string.
72
+ */
73
+ exports.COMMAND_CODE_YOLO_PERMISSION = 'yolo';
74
+ /**
75
+ * What the CMATE.md Permission column accepts for command-code (Issue #2454).
76
+ *
77
+ * {@link COMMAND_CODE_PERMISSIONS} is what `--permission-mode` accepts; this is
78
+ * what a *schedule* may say, and the two are different sets because `--yolo`
79
+ * lives on its own axis. The column is modelled on copilot's, where the cell
80
+ * holds a flag name (`allow-all-tools` / `yolo`) rather than a mode.
81
+ *
82
+ * ## Why `yolo` is first and is the default
83
+ *
84
+ * Measured on the 1.53.0 bundle: `commandcode -p …` injects a
85
+ * `print-permission-gate` mod unless `--yolo` was passed, and that mod answers
86
+ * `edit_file` / `write_file` / `shell_command` / `monitor_command` /
87
+ * `kill_shell` with `block: true`. `--permission-mode` does not reach the gate
88
+ * at all — every one of the five values leaves print mode read-only. The block
89
+ * does not fail the run: it ends exit 0 with `subtype: "success"`, so the
90
+ * execution log says the schedule succeeded and nothing was written.
91
+ *
92
+ * Before this Issue the column had no spelling for `--yolo`, so the parser
93
+ * filled an empty cell with `'default'` and `buildCliArgs`'s `--yolo` branch
94
+ * was unreachable from a schedule (#2454).
95
+ */
96
+ exports.COMMAND_CODE_SCHEDULE_PERMISSIONS = [
97
+ exports.COMMAND_CODE_YOLO_PERMISSION,
98
+ ...exports.COMMAND_CODE_PERMISSIONS,
99
+ ];
65
100
  /** Allowed permission values for gemini CLI (no permission flags) */
66
101
  exports.GEMINI_PERMISSIONS = [];
67
102
  /** Allowed permission values for vibe-local CLI (no permission flags) */
@@ -108,7 +143,11 @@ exports.DEFAULT_PERMISSIONS = {
108
143
  opencode: '',
109
144
  copilot: 'allow-all-tools',
110
145
  antigravity: '--dangerously-skip-permissions',
111
- 'command-code': 'default',
146
+ // Issue #2454: `yolo`, not `default` -- see COMMAND_CODE_SCHEDULE_PERMISSIONS.
147
+ // Every `--permission-mode` value leaves `commandcode -p` read-only, and the
148
+ // run still reports success, so an unattended schedule that omits the column
149
+ // would look like it worked and change nothing.
150
+ 'command-code': exports.COMMAND_CODE_YOLO_PERMISSION,
112
151
  };
113
152
  /**
114
153
  * Resolve the allowed Permission dropdown options for a CLI tool (Issue #824).
@@ -144,7 +183,10 @@ function getPermissionOptionsForTool(cliToolId) {
144
183
  case 'antigravity':
145
184
  return exports.ANTIGRAVITY_PERMISSIONS;
146
185
  case 'command-code':
147
- return exports.COMMAND_CODE_PERMISSIONS;
186
+ // Issue #2454: the six-value column vocabulary, not the five
187
+ // `--permission-mode` choices -- the dropdown has to be able to offer
188
+ // `yolo`, which is the only value that lets print mode write.
189
+ return exports.COMMAND_CODE_SCHEDULE_PERMISSIONS;
148
190
  case 'gemini':
149
191
  return exports.GEMINI_PERMISSIONS;
150
192
  case 'vibe-local':