commandmate 0.30.2 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (440) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +160 -160
  3. package/.next/app-path-routes-manifest.json +27 -27
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +9 -9
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/update-check/route.js +1 -1
  12. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/assistant/conversation/route.js +1 -1
  14. package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
  15. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/assistant/current-output/route.js +1 -1
  17. package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
  18. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/assistant/messages/route.js +1 -1
  20. package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
  21. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/assistant/session/route.js +1 -1
  23. package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
  24. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/assistant/start/route.js +3 -3
  26. package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
  27. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/assistant/terminal/route.js +4 -4
  29. package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
  30. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/assistant/tools/route.js +1 -1
  32. package/.next/server/app/api/assistant/tools/route.js.nft.json +1 -1
  33. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/capabilities/route.js +1 -1
  38. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  43. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/hooks/agent-event/route.js +1 -1
  47. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  48. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/hooks/claude-done/route.js +1 -1
  50. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  51. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  52. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  53. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  54. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  55. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  61. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  64. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  65. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  66. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  67. package/.next/server/app/api/repositories/clone/route.js +1 -1
  68. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  69. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  70. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/repositories/restore/route.js +1 -1
  72. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  73. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/repositories/route.js +1 -1
  75. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  76. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/repositories/scan/route.js +1 -1
  78. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  79. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/repositories/sync/route.js +1 -1
  81. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  82. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  85. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  86. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/skills/[id]/route.js +1 -1
  90. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/skills/route.js +1 -1
  95. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/slash-commands/route.js +1 -1
  97. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  107. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  110. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  113. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  119. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  150. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  153. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  156. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  168. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  172. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  175. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +4 -3
  177. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/schedules/route.js +4 -3
  180. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  184. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +2 -2
  186. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  187. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  199. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  203. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  207. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  209. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  211. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  212. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  215. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  218. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  220. package/.next/server/app/api/worktrees/route.js +1 -1
  221. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  222. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/chat/page.js +2 -2
  224. package/.next/server/app/chat/page.js.nft.json +1 -1
  225. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  226. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  227. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  228. package/.next/server/app/more/page.js +2 -2
  229. package/.next/server/app/more/page.js.nft.json +1 -1
  230. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  231. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  232. package/.next/server/app/page.js +1 -1
  233. package/.next/server/app/page.js.nft.json +1 -1
  234. package/.next/server/app/page_client-reference-manifest.js +1 -1
  235. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  236. package/.next/server/app/repositories/page.js +2 -2
  237. package/.next/server/app/repositories/page.js.nft.json +1 -1
  238. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  239. package/.next/server/app/review/page.js +1 -1
  240. package/.next/server/app/review/page.js.nft.json +1 -1
  241. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  242. package/.next/server/app/sessions/page.js +1 -1
  243. package/.next/server/app/sessions/page.js.nft.json +1 -1
  244. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  245. package/.next/server/app/skills/[skillId]/page.js +2 -2
  246. package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -1
  247. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  248. package/.next/server/app/skills/installed/page.js +2 -2
  249. package/.next/server/app/skills/installed/page.js.nft.json +1 -1
  250. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  251. package/.next/server/app/skills/page.js +1 -1
  252. package/.next/server/app/skills/page.js.nft.json +1 -1
  253. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  254. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  255. package/.next/server/app/worktrees/[id]/page.js +10 -10
  256. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  257. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  258. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  259. package/.next/server/app-paths-manifest.json +27 -27
  260. package/.next/server/chunks/1058.js +1 -1
  261. package/.next/server/chunks/1068.js +1 -1
  262. package/.next/server/chunks/1262.js +1 -1
  263. package/.next/server/chunks/1886.js +3 -3
  264. package/.next/server/chunks/1990.js +103 -0
  265. package/.next/server/chunks/2119.js +1 -1
  266. package/.next/server/chunks/2328.js +1 -1
  267. package/.next/server/chunks/2404.js +1 -1
  268. package/.next/server/chunks/2445.js +1 -1
  269. package/.next/server/chunks/261.js +1 -1
  270. package/.next/server/chunks/3123.js +1 -1
  271. package/.next/server/chunks/3241.js +1 -1
  272. package/.next/server/chunks/3480.js +5 -4
  273. package/.next/server/chunks/4299.js +1 -1
  274. package/.next/server/chunks/4393.js +1 -1
  275. package/.next/server/chunks/4443.js +1 -5
  276. package/.next/server/chunks/5017.js +1 -1
  277. package/.next/server/chunks/5043.js +1 -1
  278. package/.next/server/chunks/5164.js +1 -1
  279. package/.next/server/chunks/552.js +2 -2
  280. package/.next/server/chunks/6072.js +1 -1
  281. package/.next/server/chunks/6130.js +1 -1
  282. package/.next/server/chunks/663.js +4 -3
  283. package/.next/server/chunks/6894.js +2 -2
  284. package/.next/server/chunks/7187.js +1 -0
  285. package/.next/server/chunks/7472.js +1 -1
  286. package/.next/server/chunks/{880.js → 7859.js} +6 -6
  287. package/.next/server/chunks/7905.js +1 -1
  288. package/.next/server/chunks/8800.js +2 -2
  289. package/.next/server/chunks/8918.js +7 -0
  290. package/.next/server/chunks/9123.js +2 -2
  291. package/.next/server/chunks/9130.js +4 -4
  292. package/.next/server/chunks/9627.js +1 -1
  293. package/.next/server/chunks/9696.js +1 -1
  294. package/.next/server/chunks/9798.js +1 -1
  295. package/.next/server/middleware-manifest.json +5 -5
  296. package/.next/server/pages/500.html +1 -1
  297. package/.next/server/pages-manifest.json +1 -1
  298. package/.next/server/server-reference-manifest.json +1 -1
  299. package/.next/static/chunks/1783-11c9b4d8a52ebd91.js +1 -0
  300. package/.next/static/chunks/4718-de1224c9e8a6e7fc.js +1 -0
  301. package/.next/static/chunks/6022-2fa0b5a82d4ce7b6.js +1 -0
  302. package/.next/static/chunks/{5229-6c89475b61bd2c8b.js → 6170-951b9f5fe6b4b3b5.js} +1 -1
  303. package/.next/static/chunks/app/chat/{page-9aa2011410895b0d.js → page-37d7615d17d7e2a0.js} +1 -1
  304. package/.next/static/chunks/app/layout-4c2f21e3f653ee4c.js +1 -0
  305. package/.next/static/chunks/app/more/{page-333bba1c8bbc9c11.js → page-353a3924e6d7968e.js} +1 -1
  306. package/.next/static/chunks/app/{page-214f7ffa13a0cf10.js → page-c2bf871d953a1d6f.js} +1 -1
  307. package/.next/static/chunks/app/repositories/{page-4951cac905e50224.js → page-7d0f26df0537254c.js} +1 -1
  308. package/.next/static/chunks/app/review/{page-a0899b2d285318c3.js → page-e3f141b2829973e9.js} +1 -1
  309. package/.next/static/chunks/app/sessions/{page-fb36145ec732092a.js → page-53f188ed9ca49e5f.js} +1 -1
  310. package/.next/static/chunks/app/skills/[skillId]/{page-9099e26b60442873.js → page-80569b720aea59cc.js} +1 -1
  311. package/.next/static/chunks/app/skills/installed/{page-182e32368696d824.js → page-dbd2690ad72da95b.js} +1 -1
  312. package/.next/static/chunks/app/skills/{page-d3fdc88239ebe0ab.js → page-dacd36f9c11aa7da.js} +1 -1
  313. package/.next/static/chunks/app/worktrees/[id]/page-97205088520255a5.js +1 -0
  314. package/.next/static/css/5c13ea243dfdcb66.css +1 -0
  315. package/.next/trace +13 -13
  316. package/README.md +37 -11
  317. package/dist/cli/commands/attach.d.ts +50 -0
  318. package/dist/cli/commands/attach.d.ts.map +1 -0
  319. package/dist/cli/commands/attach.js +204 -0
  320. package/dist/cli/commands/capture.d.ts.map +1 -1
  321. package/dist/cli/commands/capture.js +114 -0
  322. package/dist/cli/commands/instances.d.ts.map +1 -1
  323. package/dist/cli/commands/instances.js +23 -2
  324. package/dist/cli/commands/ls.d.ts.map +1 -1
  325. package/dist/cli/commands/ls.js +41 -1
  326. package/dist/cli/config/cli-dependencies.d.ts.map +1 -1
  327. package/dist/cli/config/cli-dependencies.js +34 -0
  328. package/dist/cli/program.d.ts.map +1 -1
  329. package/dist/cli/program.js +5 -0
  330. package/dist/cli/types/index.d.ts +36 -0
  331. package/dist/cli/types/index.d.ts.map +1 -1
  332. package/dist/config/tmux-pane-config.d.ts +153 -0
  333. package/dist/config/tmux-pane-config.d.ts.map +1 -0
  334. package/dist/config/tmux-pane-config.js +172 -0
  335. package/dist/lib/cli-tools/session-name.d.ts +44 -0
  336. package/dist/lib/cli-tools/session-name.d.ts.map +1 -0
  337. package/dist/lib/cli-tools/session-name.js +57 -0
  338. package/dist/lib/cli-tools/types.d.ts +1 -1
  339. package/dist/lib/cli-tools/types.d.ts.map +1 -1
  340. package/dist/lib/cli-tools/types.js +6 -1
  341. package/dist/lib/cli-tools/validation.d.ts +34 -0
  342. package/dist/lib/cli-tools/validation.d.ts.map +1 -0
  343. package/dist/lib/cli-tools/validation.js +41 -0
  344. package/dist/lib/detection/status-reason.d.ts +18 -0
  345. package/dist/lib/detection/status-reason.d.ts.map +1 -1
  346. package/dist/lib/detection/status-reason.js +18 -0
  347. package/dist/lib/detection/tools/verified-against.d.ts +57 -7
  348. package/dist/lib/detection/tools/verified-against.d.ts.map +1 -1
  349. package/dist/lib/detection/tools/verified-against.js +59 -8
  350. package/dist/lib/detection/version-probes.d.ts +26 -5
  351. package/dist/lib/detection/version-probes.d.ts.map +1 -1
  352. package/dist/lib/detection/version-probes.js +28 -6
  353. package/dist/lib/session/tmux-session-surface.d.ts +369 -0
  354. package/dist/lib/session/tmux-session-surface.d.ts.map +1 -0
  355. package/dist/lib/session/tmux-session-surface.js +525 -0
  356. package/dist/server/src/config/cli-tool-timing-config.js +12 -1
  357. package/dist/server/src/config/detection-evidence-config.js +5 -0
  358. package/dist/server/src/config/schedule-config.js +28 -1
  359. package/dist/server/src/lib/cli-tools/antigravity.js +2 -2
  360. package/dist/server/src/lib/cli-tools/base.js +13 -8
  361. package/dist/server/src/lib/cli-tools/claude.js +20 -0
  362. package/dist/server/src/lib/cli-tools/codex.js +205 -61
  363. package/dist/server/src/lib/cli-tools/command-code.js +349 -0
  364. package/dist/server/src/lib/cli-tools/composer-spec.js +6 -0
  365. package/dist/server/src/lib/cli-tools/copilot.js +2 -2
  366. package/dist/server/src/lib/cli-tools/gemini.js +2 -2
  367. package/dist/server/src/lib/cli-tools/graceful-exit.js +16 -1
  368. package/dist/server/src/lib/cli-tools/index.js +4 -1
  369. package/dist/server/src/lib/cli-tools/install-hints.js +131 -0
  370. package/dist/server/src/lib/cli-tools/liveness-spec.js +18 -0
  371. package/dist/server/src/lib/cli-tools/manager.js +2 -0
  372. package/dist/server/src/lib/cli-tools/opencode.js +2 -2
  373. package/dist/server/src/lib/cli-tools/start-availability.js +18 -11
  374. package/dist/server/src/lib/cli-tools/types.js +6 -1
  375. package/dist/server/src/lib/cli-tools/vibe-local.js +2 -2
  376. package/dist/server/src/lib/cmate-parser.js +6 -0
  377. package/dist/server/src/lib/detection/cli-patterns.js +441 -8
  378. package/dist/server/src/lib/detection/opencode-modal-overlay.js +66 -100
  379. package/dist/server/src/lib/detection/selection-shape.js +341 -0
  380. package/dist/server/src/lib/detection/sgr-background.js +210 -0
  381. package/dist/server/src/lib/detection/status-detector.js +6 -0
  382. package/dist/server/src/lib/detection/status-reason.js +18 -0
  383. package/dist/server/src/lib/detection/tools/antigravity/detect.js +38 -15
  384. package/dist/server/src/lib/detection/tools/codex/cli-patterns.js +392 -0
  385. package/dist/server/src/lib/detection/tools/codex/detect.js +83 -2
  386. package/dist/server/src/lib/detection/tools/command-code/detect.js +159 -0
  387. package/dist/server/src/lib/detection/tools/registry.js +6 -4
  388. package/dist/server/src/lib/detection/tools/verified-against.js +59 -8
  389. package/dist/server/src/lib/detection/version-probes.js +28 -6
  390. package/dist/server/src/lib/hooks/sources/antigravity/history.js +77 -16
  391. package/dist/server/src/lib/hooks/sources/claude/history.js +94 -18
  392. package/dist/server/src/lib/hooks/sources/codex/history.js +84 -15
  393. package/dist/server/src/lib/hooks/sources/codex/hooks-config.js +130 -17
  394. package/dist/server/src/lib/hooks/sources/codex/relay-install.js +145 -0
  395. package/dist/server/src/lib/hooks/sources/command-code/history.js +865 -0
  396. package/dist/server/src/lib/hooks/sources/command-code/hooks-config.js +390 -0
  397. package/dist/server/src/lib/hooks/sources/command-code/source.js +290 -0
  398. package/dist/server/src/lib/hooks/sources/command-code/tool-id.js +18 -0
  399. package/dist/server/src/lib/hooks/sources/command-code/transcript.js +604 -0
  400. package/dist/server/src/lib/hooks/sources/index.js +3 -1
  401. package/dist/server/src/lib/hooks/sources/opencode/history.js +57 -3
  402. package/dist/server/src/lib/hooks/sources/opencode/transcript.js +24 -28
  403. package/dist/server/src/lib/hooks/sources/registry.js +4 -0
  404. package/dist/server/src/lib/hooks/sources/turn-body.js +77 -19
  405. package/dist/server/src/lib/job-executor.js +12 -0
  406. package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +6 -0
  407. package/dist/server/src/lib/polling/response-checker.js +112 -7
  408. package/dist/server/src/lib/polling/structured-history-gate.js +15 -8
  409. package/dist/server/src/lib/realtime/types.js +15 -5
  410. package/dist/server/src/lib/response-cleaner.js +24 -1
  411. package/dist/server/src/lib/response-extractor.js +11 -0
  412. package/dist/server/src/lib/session/claude-executor.js +223 -4
  413. package/dist/server/src/lib/session/cli-session.js +52 -0
  414. package/dist/server/src/lib/session/tmux-session-surface.js +525 -0
  415. package/dist/server/src/lib/skills/compatibility-matrix.js +117 -1
  416. package/dist/server/src/lib/tmux/geometry-delegation.js +143 -0
  417. package/dist/server/src/lib/tmux/read-mode-pager.js +76 -10
  418. package/dist/server/src/lib/tmux/read-mode.js +44 -2
  419. package/dist/server/src/lib/tmux/session-hook-scripts.js +249 -0
  420. package/dist/server/src/lib/tmux/session-hooks.js +122 -0
  421. package/dist/server/src/lib/tmux/session-status-options.js +213 -0
  422. package/dist/server/src/lib/tmux/tmux.js +79 -2
  423. package/dist/server/src/lib/version-checker.js +110 -0
  424. package/dist/server/src/lib/ws-server.js +16 -10
  425. package/dist/server/src/types/agent-transcript.js +73 -1
  426. package/dist/server/src/types/terminal-keys.js +131 -3
  427. package/dist/types/terminal-keys.d.ts +100 -3
  428. package/dist/types/terminal-keys.d.ts.map +1 -1
  429. package/dist/types/terminal-keys.js +131 -3
  430. package/package.json +1 -1
  431. package/.next/server/chunks/3099.js +0 -5
  432. package/.next/server/chunks/7824.js +0 -1
  433. package/.next/static/chunks/3916-0e929d089282dc5d.js +0 -1
  434. package/.next/static/chunks/6022-7a7d1760fc9814c7.js +0 -1
  435. package/.next/static/chunks/6381-147dde2a967e9458.js +0 -1
  436. package/.next/static/chunks/app/layout-6a26ea22d5cf03dc.js +0 -1
  437. package/.next/static/chunks/app/worktrees/[id]/page-2f73d69187936627.js +0 -1
  438. package/.next/static/css/23f9c40ecc458c77.css +0 -1
  439. /package/.next/static/{QXxQbXWoo7ldUyOcv7PCZ → nXW4dPkpE_9xUf_9ySRff}/_buildManifest.js +0 -0
  440. /package/.next/static/{QXxQbXWoo7ldUyOcv7PCZ → nXW4dPkpE_9xUf_9ySRff}/_ssgManifest.js +0 -0
@@ -27,12 +27,26 @@
27
27
  * launch line, so `codex` and `codex-2` in one worktree report as
28
28
  * themselves. Verified live — a session launched with
29
29
  * `CM_AGENT_INSTANCE_ID=codex-2` posted `instanceId: "codex-2"`.
30
- * 4. **Hooks do not run until a human trusts them.** Trust is recorded in the
30
+ * 4. **Hooks do not run until they are trusted.** Trust is recorded in the
31
31
  * user's own `~/.codex/config.toml` as
32
32
  * `[hooks.state."<file>:<event>:0:0"] trusted_hash`, and an untrusted hook
33
- * is skipped in complete silence (#1757 P4). CommandMate does not write
34
- * that file see {@link isCodexHookTrustBypassEnabled} for the whole of
35
- * the reasoning, and `docs/design/agent-event-source-interface.md`.
33
+ * is skipped in complete silence (#1757 P4). Issue #1760 declined that
34
+ * dialog on every launch; Issue #2315 measured what that cost — the decline
35
+ * is not remembered, so the dialog returned forever and the hooks never ran
36
+ * — and now answers it with *trust* for a worktree that ships no
37
+ * `.codex/hooks.json` of its own. codex writes the hash; this server only
38
+ * presses the key. See {@link shouldTrustCodexHooks} for the security
39
+ * argument, {@link isCodexHookTrustBypassEnabled} for the flag that is
40
+ * still off, and `docs/design/agent-event-source-interface.md`.
41
+ *
42
+ * ## What keeps the trust once it is granted (Issue #2315)
43
+ *
44
+ * codex keys trust by the hash of the handler, so the generated file has to be
45
+ * byte-identical whoever wrote it. It was not: the hook command named
46
+ * `process.cwd()/scripts/hooks/cmate-agent-event.sh`, so each of the machine's
47
+ * worktree servers rewrote the one shared file with its own checkout and undid
48
+ * the last one's grant. `./relay-install` is the fix — the command now names a
49
+ * copy under `$CODEX_HOME`, and the file is a function of `$CODEX_HOME` alone.
36
50
  *
37
51
  * ## Why `$CODEX_HOME/hooks.json` and not `<worktree>/.codex/hooks.json`
38
52
  *
@@ -54,10 +68,13 @@
54
68
  * @module lib/hooks/sources/codex/hooks-config
55
69
  */
56
70
  Object.defineProperty(exports, "__esModule", { value: true });
57
- exports.CODEX_SUPPORTED_EVENTS = exports.CODEX_PERMISSION_REQUEST_EVENT = exports.CODEX_REGISTERED_EVENTS = exports.CODEX_SESSION_END_TIMEOUT_SECONDS = exports.CODEX_HOOK_TRUST_BYPASS_FLAG = exports.CODEX_HOOK_TRUST_ENV_VAR = exports.CODEX_PERMISSION_URL_ENV_VAR = exports.CODEX_EVENT_URL_ENV_VAR = exports.CODEX_INSTANCE_ID_ENV_VAR = exports.CODEX_WORKTREE_ID_ENV_VAR = exports.CODEX_TOOL_ENV_VAR = exports.CODEX_HOME_ENV_VAR = exports.CODEX_HOOK_MARKER = void 0;
71
+ exports.CODEX_HOOK_TRUST_POLICY_DEFAULT = exports.CODEX_SUPPORTED_EVENTS = exports.CODEX_PERMISSION_REQUEST_EVENT = exports.CODEX_REGISTERED_EVENTS = exports.CODEX_SESSION_END_TIMEOUT_SECONDS = exports.CODEX_HOOK_TRUST_BYPASS_FLAG = exports.CODEX_HOOK_TRUST_ENV_VAR = exports.CODEX_PERMISSION_URL_ENV_VAR = exports.CODEX_EVENT_URL_ENV_VAR = exports.CODEX_INSTANCE_ID_ENV_VAR = exports.CODEX_WORKTREE_ID_ENV_VAR = exports.CODEX_TOOL_ENV_VAR = exports.CODEX_HOME_ENV_VAR = exports.CODEX_HOOK_MARKER = void 0;
72
+ exports.resolveCodexHookTrustPolicy = resolveCodexHookTrustPolicy;
58
73
  exports.isCodexHookTrustBypassEnabled = isCodexHookTrustBypassEnabled;
74
+ exports.shouldTrustCodexHooks = shouldTrustCodexHooks;
59
75
  exports.getCodexHome = getCodexHome;
60
76
  exports.getCodexHooksPath = getCodexHooksPath;
77
+ exports.resolveCodexRelayCommandPath = resolveCodexRelayCommandPath;
61
78
  exports.buildCodexEventHookCommand = buildCodexEventHookCommand;
62
79
  exports.buildCodexPermissionHookCommand = buildCodexPermissionHookCommand;
63
80
  exports.buildCodexHookSettings = buildCodexHookSettings;
@@ -74,6 +91,7 @@ const hook_settings_generator_1 = require("../../../../lib/hooks/hook-settings-g
74
91
  const logger_1 = require("../../../../lib/logger");
75
92
  const path_validator_1 = require("../../../../lib/security/path-validator");
76
93
  const event_mapper_1 = require("../event-mapper");
94
+ const relay_install_1 = require("./relay-install");
77
95
  const tool_id_1 = require("./tool-id");
78
96
  const logger = (0, logger_1.createLogger)('lib/hooks/sources/codex/hooks-config');
79
97
  /** Loopback: the agent runs on the machine the server runs on. */
@@ -107,7 +125,12 @@ exports.CODEX_INSTANCE_ID_ENV_VAR = 'CM_AGENT_INSTANCE_ID';
107
125
  exports.CODEX_EVENT_URL_ENV_VAR = 'CM_HOOK_URL';
108
126
  /** Auto-Yes v2 receiver URL, with the correlation keys already in its query. */
109
127
  exports.CODEX_PERMISSION_URL_ENV_VAR = 'CM_PERMISSION_HOOK_URL';
110
- /** Opt-in switch for {@link CODEX_HOOK_TRUST_BYPASS_FLAG}; `bypass` is the only value that acts. */
128
+ /**
129
+ * How this server answers codex's hook trust question.
130
+ *
131
+ * See {@link resolveCodexHookTrustPolicy} for what each value does; anything
132
+ * else, including unset, is {@link CODEX_HOOK_TRUST_POLICY_DEFAULT}.
133
+ */
111
134
  exports.CODEX_HOOK_TRUST_ENV_VAR = 'CM_CODEX_HOOK_TRUST';
112
135
  /** codex's own flag for running unreviewed hooks, for one invocation. */
113
136
  exports.CODEX_HOOK_TRUST_BYPASS_FLAG = '--dangerously-bypass-hook-trust';
@@ -150,6 +173,15 @@ exports.CODEX_REGISTERED_EVENTS = {
150
173
  exports.CODEX_PERMISSION_REQUEST_EVENT = 'PermissionRequest';
151
174
  /** The four words a codex session can actually produce, given the config above. */
152
175
  exports.CODEX_SUPPORTED_EVENTS = Object.values(exports.CODEX_REGISTERED_EVENTS);
176
+ /** What an unset or unrecognised {@link CODEX_HOOK_TRUST_ENV_VAR} means. */
177
+ exports.CODEX_HOOK_TRUST_POLICY_DEFAULT = 'auto';
178
+ /** Read {@link CODEX_HOOK_TRUST_ENV_VAR}, defaulting anything unrecognised. */
179
+ function resolveCodexHookTrustPolicy() {
180
+ const raw = process.env[exports.CODEX_HOOK_TRUST_ENV_VAR];
181
+ if (raw === 'bypass' || raw === 'never' || raw === 'auto')
182
+ return raw;
183
+ return exports.CODEX_HOOK_TRUST_POLICY_DEFAULT;
184
+ }
153
185
  /**
154
186
  * Whether to launch codex with {@link CODEX_HOOK_TRUST_BYPASS_FLAG}.
155
187
  *
@@ -161,19 +193,72 @@ exports.CODEX_SUPPORTED_EVENTS = Object.values(exports.CODEX_REGISTERED_EVENTS);
161
193
  * `.codex/hooks.json`, with no dialog, defeating the exact mechanism codex
162
194
  * built to prevent it. A structured `Stop` event is not worth that.
163
195
  *
164
- * So the default posture is: CommandMate writes the config and never grants the
165
- * trust. The human grants it once, through codex's own review screen, which is
166
- * also the only thing that may write `~/.codex/config.toml` — a file this
167
- * server never touches (it holds, among other things, the `notify` entry a
168
- * user's Computer Use integration depends on). Until then the hooks are inert,
169
- * the screen scraper keeps doing what it did before this Issue, and
170
- * `cli-tools/codex` dismisses the review dialog so a session still starts.
171
- *
172
196
  * `CM_CODEX_HOOK_TRUST=bypass` exists for headless and CI operators who have
173
- * weighed that trade for themselves.
197
+ * weighed that trade for themselves. It is NOT what {@link shouldTrustCodexHooks}
198
+ * does — that answers one dialog, about hooks it has checked the provenance of.
174
199
  */
175
200
  function isCodexHookTrustBypassEnabled() {
176
- return process.env[exports.CODEX_HOOK_TRUST_ENV_VAR] === 'bypass';
201
+ return resolveCodexHookTrustPolicy() === 'bypass';
202
+ }
203
+ /**
204
+ * Whether the server may answer codex's review dialog with *trust* for a
205
+ * session about to start in `worktreePath` (Issue #2315).
206
+ *
207
+ * ## Why this reverses Issue #1760's answer
208
+ *
209
+ * #1760 declined the dialog on the operator's behalf — option 3, *Continue
210
+ * without trusting* — because granting trust writes `[hooks.state…]` into their
211
+ * own `~/.codex/config.toml`. Two years of that measured badly, and the Issue
212
+ * this function exists for is the bill:
213
+ *
214
+ * - **Declining is not remembered.** codex records a *grant*; there is no
215
+ * "asked and refused" state. So the dialog came back on every single launch,
216
+ * which is what made `waitForReady`'s one-shot handling the only thing
217
+ * standing between a session and a pane parked three screens deep.
218
+ * - **The hooks never ran.** CommandMate writes `hooks.json` in order to
219
+ * receive `session_start` / `stop` — the structured events the whole of
220
+ * #1760 exists for. Declining every launch meant the default installation
221
+ * got the dialog and none of the benefit; the means and the end pointed in
222
+ * opposite directions.
223
+ *
224
+ * ## Why this is not `--dangerously-bypass-hook-trust` by another name
225
+ *
226
+ * The objection #1760 raised is real and this function answers it rather than
227
+ * dropping it: a hostile repository can ship `.codex/hooks.json`, codex reads
228
+ * it from `<cwd>`, and *Trust all and continue* would trust that too. So the
229
+ * grant is withheld from exactly that case — a worktree carrying its own
230
+ * `.codex/hooks.json` gets the pre-#2315 decline-and-escape path, and the human
231
+ * answers its dialog themselves.
232
+ *
233
+ * What remains trustable is `$CODEX_HOME/hooks.json`: the operator's own file,
234
+ * holding the operator's own hooks plus the ones this server wrote and marked.
235
+ * Trusting a file the human already owns is a materially different act from
236
+ * trusting one that arrived with a `git clone`.
237
+ *
238
+ * The grant is still a write to `~/.codex/config.toml`, which this server
239
+ * otherwise never touches — it is a documented consequence of the default, not
240
+ * a hidden one, and `CM_CODEX_HOOK_TRUST=never` restores the old behaviour.
241
+ *
242
+ * @param worktreePath - Working directory of the session about to start
243
+ * @returns True when the dialog may be answered with trust
244
+ */
245
+ function shouldTrustCodexHooks(worktreePath) {
246
+ if (resolveCodexHookTrustPolicy() === 'never')
247
+ return false;
248
+ try {
249
+ // codex reads `<cwd>/.codex/hooks.json` as well as the home one, and a
250
+ // review that includes a hook from the repository is a review this server
251
+ // must not answer.
252
+ if ((0, fs_1.existsSync)((0, path_1.join)(worktreePath, '.codex', 'hooks.json'))) {
253
+ logger.info('codex-hooks-trust-withheld-repo-hooks', { worktreePath });
254
+ return false;
255
+ }
256
+ }
257
+ catch {
258
+ // An unreadable worktree is not one to grant trust for.
259
+ return false;
260
+ }
261
+ return true;
177
262
  }
178
263
  /**
179
264
  * `$CODEX_HOME`, or `~/.codex`.
@@ -205,6 +290,25 @@ function getCodexHooksPath(options = {}) {
205
290
  function fallbackUrlExpression(path, query) {
206
291
  return `http://${CODEX_HOOK_HOST}:\${CM_PORT:-3000}${path}${query}`;
207
292
  }
293
+ /**
294
+ * The relay path `hooks.json` may name — never a checkout (Issue #2315).
295
+ *
296
+ * `resolveRelayScriptPath()` answers with `process.cwd()/scripts/hooks/…`, which
297
+ * is the checkout of whichever server wrote the file. On a machine running
298
+ * several worktree servers against one `$CODEX_HOME/hooks.json` that value is
299
+ * the only part of the generated file that moves, and every time it moves codex
300
+ * throws away the trust the human granted and opens on
301
+ * `Modified since last trusted - review required`. See `./relay-install`.
302
+ *
303
+ * So the auto path is the INSTALLED copy, which is a function of `$CODEX_HOME`
304
+ * alone. An explicit `relayScriptPath` (including `null`) is still honoured
305
+ * verbatim — that is how the suites drive the two command shapes.
306
+ */
307
+ function resolveCodexRelayCommandPath(options = {}) {
308
+ if (options.relayScriptPath !== undefined)
309
+ return options.relayScriptPath;
310
+ return (0, relay_install_1.getInstalledCodexRelayPath)(getCodexHome(options));
311
+ }
208
312
  /**
209
313
  * The command for one lifecycle event.
210
314
  *
@@ -215,7 +319,7 @@ function fallbackUrlExpression(path, query) {
215
319
  */
216
320
  function buildCodexEventHookCommand(event, options = {}) {
217
321
  const marker = ` # ${exports.CODEX_HOOK_MARKER}`;
218
- const relay = options.relayScriptPath === undefined ? (0, hook_settings_generator_1.resolveRelayScriptPath)() : options.relayScriptPath;
322
+ const relay = resolveCodexRelayCommandPath(options);
219
323
  if (relay) {
220
324
  return ([
221
325
  (0, hook_settings_generator_1.shellQuote)(relay),
@@ -371,6 +475,15 @@ function mergeCodexHookSettings(existing, generated) {
371
475
  */
372
476
  function writeCodexHookSettings(options = {}) {
373
477
  const settingsPath = getCodexHooksPath(options);
478
+ // Issue #2315: put the relay where the generated file can name it without
479
+ // naming a checkout, BEFORE the content is built — `buildCodexHookSettings`
480
+ // only reads what is installed, so an install that had not happened yet would
481
+ // emit the inline `curl` shape and give the shared file a third form to drift
482
+ // between. Best-effort by construction: the installer never throws, and a
483
+ // machine where it cannot write simply keeps whatever copy is already there.
484
+ if (options.relayScriptPath === undefined) {
485
+ (0, relay_install_1.installCodexRelayScript)(getCodexHome(options), (0, hook_settings_generator_1.resolveRelayScriptPath)());
486
+ }
374
487
  let existing = null;
375
488
  let previous = null;
376
489
  if ((0, fs_1.existsSync)(settingsPath)) {
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ /**
3
+ * The one path `$CODEX_HOME/hooks.json` is allowed to name (Issue #2315).
4
+ *
5
+ * ## The bug this module exists for
6
+ *
7
+ * `hooks-config` writes ONE file — `$CODEX_HOME/hooks.json` — shared by every
8
+ * codex session on the machine, and its whole design rests on that file being
9
+ * byte-identical whoever wrote it: codex keys hook trust by the hash of the
10
+ * handler, so a file whose bytes move puts the review dialog back in front of
11
+ * the next launch. `writeCodexHookSettings` already refuses to rewrite matching
12
+ * content, and `buildCodexHookSettings` already keeps the port, the worktree and
13
+ * the instance out of the file.
14
+ *
15
+ * One value got through anyway, and it is the one that moves most: the absolute
16
+ * path of the relay script, which `resolveRelayScriptPath()` resolves against
17
+ * `process.cwd()` — the checkout of the server that happened to write the file.
18
+ * Measured on the reporting machine on 2026-09-04, with 22 worktrees registered
19
+ * and several dev servers running:
20
+ *
21
+ * ```
22
+ * $ grep -o "'[^']*cmate-agent-event.sh'" ~/.codex/hooks.json
23
+ * '/Users/…/MyCodeBranchDesk/scripts/hooks/cmate-agent-event.sh'
24
+ * $ pwd # a worktree server, which would rewrite it as its own
25
+ * /Users/…/commandmate-issue-2315
26
+ * ```
27
+ *
28
+ * So each server rewrites the shared file with its own checkout, every rewrite
29
+ * invalidates the hash the human trusted, and the next codex opens on
30
+ * `Trust Modified since last trusted - review required`. The servers eat each
31
+ * other's trust, forever, which is the "度々" in the Issue.
32
+ *
33
+ * ## The fix
34
+ *
35
+ * Put the script where every server agrees it is: beside the hooks file it is
36
+ * named from, under `$CODEX_HOME/commandmate/`. Each server copies its shipped
37
+ * relay there (a no-op when the bytes already match) and `hooks.json` names the
38
+ * installed copy, so the generated file no longer contains a checkout at all —
39
+ * it is a function of `$CODEX_HOME` alone, which is the same directory codex
40
+ * reads the hooks from by construction.
41
+ *
42
+ * A server whose own copy of the script is unreachable — a global install whose
43
+ * `process.cwd()` is the user's shell directory — installs nothing and uses the
44
+ * copy that is already there, rather than falling back to the inline `curl`
45
+ * form and rewriting the file into a third shape.
46
+ *
47
+ * Copying the SCRIPT rather than hashing it is deliberate. codex trusts a
48
+ * command *string*; it cannot see what that string executes, so two servers on
49
+ * different versions of the script still share one trusted `hooks.json`. The
50
+ * newest server to start wins the script content, which is the same rule the
51
+ * hooks file itself has always had.
52
+ *
53
+ * @module lib/hooks/sources/codex/relay-install
54
+ */
55
+ Object.defineProperty(exports, "__esModule", { value: true });
56
+ exports.CODEX_RELAY_INSTALL_BASENAME = exports.CODEX_RELAY_INSTALL_DIRNAME = void 0;
57
+ exports.getCodexRelayInstallPath = getCodexRelayInstallPath;
58
+ exports.getInstalledCodexRelayPath = getInstalledCodexRelayPath;
59
+ exports.installCodexRelayScript = installCodexRelayScript;
60
+ const fs_1 = require("fs");
61
+ const path_1 = require("path");
62
+ const logger_1 = require("../../../../lib/logger");
63
+ const logger = (0, logger_1.createLogger)('lib/hooks/sources/codex/relay-install');
64
+ /**
65
+ * Subdirectory of `$CODEX_HOME` this server owns.
66
+ *
67
+ * Namespaced rather than dropped beside `hooks.json` because the directory is
68
+ * the operator's: everything CommandMate puts there is under one name they can
69
+ * delete in one command, and nothing it writes can collide with a file codex
70
+ * itself introduces later.
71
+ */
72
+ exports.CODEX_RELAY_INSTALL_DIRNAME = 'commandmate';
73
+ /** Basename kept identical to the shipped script, so the two are recognisably one file. */
74
+ exports.CODEX_RELAY_INSTALL_BASENAME = 'cmate-agent-event.sh';
75
+ /** Where {@link installCodexRelayScript} puts the relay, for a given codex home. */
76
+ function getCodexRelayInstallPath(codexHome) {
77
+ return (0, path_1.join)(codexHome, exports.CODEX_RELAY_INSTALL_DIRNAME, exports.CODEX_RELAY_INSTALL_BASENAME);
78
+ }
79
+ /**
80
+ * The installed relay, or null when nothing has installed one yet.
81
+ *
82
+ * Read-only, so the command builders stay free of side effects: the install
83
+ * itself is done once by {@link installCodexRelayScript}, from the one function
84
+ * that was going to touch the disk anyway.
85
+ */
86
+ function getInstalledCodexRelayPath(codexHome) {
87
+ const target = getCodexRelayInstallPath(codexHome);
88
+ return (0, fs_1.existsSync)(target) ? target : null;
89
+ }
90
+ /**
91
+ * Copy the shipped relay to the stable path, and answer where codex should look.
92
+ *
93
+ * Never throws and never fails a launch: hooks are an enhancement to a session
94
+ * that has to start regardless, so every error path here degrades to "use
95
+ * whatever copy is already installed", and then to "no relay", which
96
+ * `buildCodexEventHookCommand` answers with its inline `curl`.
97
+ *
98
+ * Idempotent: the file is opened for writing only when the bytes differ, so the
99
+ * ordinary launch does not touch it. The write itself goes through a temporary
100
+ * file and a rename, because the file being replaced is one a *running* codex
101
+ * session may be executing at that moment — truncating it in place would hand
102
+ * that session half a script.
103
+ *
104
+ * @param codexHome - The directory `hooks.json` lives in
105
+ * @param sourcePath - The shipped script, or null when this process cannot find its own
106
+ * @returns The path to name in `hooks.json`, or null when there is none
107
+ */
108
+ function installCodexRelayScript(codexHome, sourcePath) {
109
+ const target = getCodexRelayInstallPath(codexHome);
110
+ if (sourcePath && sourcePath !== target) {
111
+ try {
112
+ const desired = (0, fs_1.readFileSync)(sourcePath, 'utf8');
113
+ const current = (0, fs_1.existsSync)(target) ? (0, fs_1.readFileSync)(target, 'utf8') : null;
114
+ if (current !== desired) {
115
+ (0, fs_1.mkdirSync)((0, path_1.dirname)(target), { recursive: true, mode: 0o700 });
116
+ // `.tmp` beside the target so the rename cannot cross a filesystem.
117
+ const staging = `${target}.tmp`;
118
+ try {
119
+ (0, fs_1.writeFileSync)(staging, desired, { mode: 0o700 });
120
+ (0, fs_1.renameSync)(staging, target);
121
+ }
122
+ catch (error) {
123
+ try {
124
+ (0, fs_1.unlinkSync)(staging);
125
+ }
126
+ catch {
127
+ // Nothing to clean up, or nothing that can be.
128
+ }
129
+ throw error;
130
+ }
131
+ logger.info('codex-relay-installed', { target });
132
+ }
133
+ }
134
+ catch (error) {
135
+ // An install that failed is not a launch that failed. If a previous
136
+ // server already put a copy there, that copy is still the right path to
137
+ // name — and naming it is what keeps this file byte-identical.
138
+ logger.warn('codex-relay-install-failed', {
139
+ target,
140
+ error: error instanceof Error ? error.message : String(error),
141
+ });
142
+ }
143
+ }
144
+ return (0, fs_1.existsSync)(target) ? target : null;
145
+ }