commandmate 0.48.0 → 0.49.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 (269) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +164 -164
  3. package/.next/app-path-routes-manifest.json +30 -30
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +3 -3
  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/release-notes/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/update/route_client-reference-manifest.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/auth/login/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/capabilities/route.js +1 -1
  17. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  18. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/push/escalation/route.js +1 -1
  31. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/push/vapid/route.js +1 -1
  34. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  43. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  52. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  54. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  55. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  61. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  63. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  64. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  67. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  70. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
  72. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  85. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  153. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  155. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  156. package/.next/server/app/page_client-reference-manifest.js +1 -1
  157. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  159. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  160. package/.next/server/app/sessions/page.js +1 -1
  161. package/.next/server/app/sessions/page.js.nft.json +1 -1
  162. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  163. package/.next/server/app/skills/[skillId]/page.js +1 -1
  164. package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -1
  165. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  166. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  167. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  168. package/.next/server/app/worktrees/[id]/files/[...path]/page.js +2 -2
  169. package/.next/server/app/worktrees/[id]/files/[...path]/page.js.nft.json +1 -1
  170. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  171. package/.next/server/app/worktrees/[id]/page.js +3 -3
  172. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  173. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  174. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  175. package/.next/server/app-paths-manifest.json +30 -30
  176. package/.next/server/chunks/1601.js +2 -2
  177. package/.next/server/chunks/1656.js +2 -2
  178. package/.next/server/chunks/1945.js +3 -3
  179. package/.next/server/chunks/2069.js +1 -0
  180. package/.next/server/chunks/2422.js +1 -1
  181. package/.next/server/chunks/2534.js +1 -1
  182. package/.next/server/chunks/3241.js +1 -1
  183. package/.next/server/chunks/4243.js +1 -1
  184. package/.next/server/chunks/4248.js +1 -1
  185. package/.next/server/chunks/4280.js +1 -1
  186. package/.next/server/chunks/6119.js +1 -1
  187. package/.next/server/chunks/6130.js +1 -1
  188. package/.next/server/chunks/6401.js +1 -1
  189. package/.next/server/chunks/6486.js +1 -1
  190. package/.next/server/chunks/720.js +2 -2
  191. package/.next/server/chunks/7604.js +2 -2
  192. package/.next/server/chunks/7905.js +1 -1
  193. package/.next/server/chunks/8581.js +3 -3
  194. package/.next/server/chunks/8728.js +3 -3
  195. package/.next/server/chunks/8791.js +1 -1
  196. package/.next/server/chunks/9390.js +1 -1
  197. package/.next/server/chunks/9627.js +3 -3
  198. package/.next/server/middleware-manifest.json +5 -5
  199. package/.next/server/pages/500.html +1 -1
  200. package/.next/server/server-reference-manifest.json +1 -1
  201. package/.next/static/chunks/1128-914c559913546bbc.js +1 -0
  202. package/.next/static/chunks/{2407-26139a8a2f1adbe8.js → 2407-ab92ae9837c39dce.js} +1 -1
  203. package/.next/static/chunks/{2619-a305ad4810f1393a.js → 2619-04bc32f026a0d946.js} +1 -1
  204. package/.next/static/chunks/{2863-f0121af1cbbedb3b.js → 2863-7173dc305dffc4f6.js} +1 -1
  205. package/.next/static/chunks/6288-6fadbba6e84393b2.js +1 -0
  206. package/.next/static/chunks/7665-e9ef6e0a85b9fa49.js +1 -0
  207. package/.next/static/chunks/{8165-c68b3dc844210e6a.js → 8165-263172c17ae8e8c3.js} +1 -1
  208. package/.next/static/chunks/9079-987939d231704218.js +1 -0
  209. package/.next/static/chunks/app/{layout-46b4cbf07520d9b6.js → layout-aa8e66164a4367af.js} +1 -1
  210. package/.next/static/chunks/app/sessions/{page-fb241bed579c67aa.js → page-cfd645305e25fd33.js} +1 -1
  211. package/.next/static/chunks/app/skills/[skillId]/{page-52ba58712faf3378.js → page-cb6e74fd9a6a571d.js} +1 -1
  212. package/.next/static/chunks/app/worktrees/[id]/files/[...path]/page-704086656fb45699.js +1 -0
  213. package/.next/static/chunks/app/worktrees/[id]/{page-cbc7749a33450cc5.js → page-a8d7886703ffc7b4.js} +1 -1
  214. package/.next/static/chunks/app/worktrees/[id]/terminal/{page-c601f3b3ece6557e.js → page-373ea37b16d930c7.js} +1 -1
  215. package/.next/static/css/{743f79ff19ab91e9.css → db8959555c3d9c96.css} +1 -1
  216. package/.next/trace +13 -13
  217. package/dist/cli/commands/auto-yes.d.ts.map +1 -1
  218. package/dist/cli/commands/auto-yes.js +3 -5
  219. package/dist/cli/commands/capture.d.ts.map +1 -1
  220. package/dist/cli/commands/capture.js +5 -0
  221. package/dist/cli/commands/send.d.ts.map +1 -1
  222. package/dist/cli/commands/send.js +4 -6
  223. package/dist/cli/commands/verify.d.ts.map +1 -1
  224. package/dist/cli/commands/verify.js +8 -1
  225. package/dist/cli/config/duration-constants.d.ts +16 -13
  226. package/dist/cli/config/duration-constants.d.ts.map +1 -1
  227. package/dist/cli/config/duration-constants.js +21 -21
  228. package/dist/cli/docs/agent-operations.d.ts +1 -1
  229. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  230. package/dist/cli/docs/agent-operations.js +2 -1
  231. package/dist/cli/types/api-responses.d.ts +29 -1
  232. package/dist/cli/types/api-responses.d.ts.map +1 -1
  233. package/dist/cli/utils/verify-runner.d.ts +24 -1
  234. package/dist/cli/utils/verify-runner.d.ts.map +1 -1
  235. package/dist/cli/utils/verify-runner.js +54 -1
  236. package/dist/config/auto-yes-duration.d.ts +56 -0
  237. package/dist/config/auto-yes-duration.d.ts.map +1 -0
  238. package/dist/config/auto-yes-duration.js +76 -0
  239. package/dist/server/src/config/auto-yes-config.js +14 -19
  240. package/dist/server/src/config/auto-yes-duration.js +76 -0
  241. package/dist/server/src/lib/auto-yes-state.js +9 -2
  242. package/dist/server/src/lib/cli-tools/submit-verified-sender.js +137 -14
  243. package/dist/server/src/lib/detection/composer-text.js +215 -11
  244. package/dist/server/src/lib/detection/prompt-detect-multiple-choice-chrome.js +193 -0
  245. package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +8 -191
  246. package/dist/server/src/lib/detection/upstream-faults.js +19 -2
  247. package/dist/server/src/lib/hooks/structured-decision-response.js +1 -1
  248. package/dist/server/src/lib/polling/auto-yes-manual-answer.js +4 -2
  249. package/dist/server/src/lib/polling/response-checker.js +12 -15
  250. package/dist/server/src/lib/session/composer-clear.js +56 -4
  251. package/dist/server/src/lib/session/current-output-builder.js +2 -1
  252. package/dist/server/src/lib/session/send-attempt-state.js +2 -1
  253. package/dist/server/src/lib/session/waiting-episode-state-ops.js +152 -0
  254. package/dist/server/src/lib/session/waiting-episode-state-store.js +202 -0
  255. package/dist/server/src/lib/session/waiting-episode-state-types.js +6 -0
  256. package/dist/server/src/lib/session/waiting-episode-state.js +26 -339
  257. package/dist/server/src/lib/tmux/tmux.js +25 -0
  258. package/dist/server/src/lib/verification/gate-runner.js +11 -4
  259. package/docs/en/user-guide/webapp-guide.md +15 -10
  260. package/package.json +1 -1
  261. package/release-notes/0.49.0.json +45 -0
  262. package/.next/server/chunks/6722.js +0 -1
  263. package/.next/static/chunks/2099-c3e0ab70a1b95dd3.js +0 -1
  264. package/.next/static/chunks/5371-a549a0d2c2044d41.js +0 -1
  265. package/.next/static/chunks/6288-09feba367cc2c65e.js +0 -1
  266. package/.next/static/chunks/9079-406b84d3cc891a87.js +0 -1
  267. package/.next/static/chunks/app/worktrees/[id]/files/[...path]/page-9cf1ecc59e36a004.js +0 -1
  268. /package/.next/static/{PTlAswXLq8PAe2vUJ8dVP → 3_JtAZaKMJEDFIIfkHv4n}/_buildManifest.js +0 -0
  269. /package/.next/static/{PTlAswXLq8PAe2vUJ8dVP → 3_JtAZaKMJEDFIIfkHv4n}/_ssgManifest.js +0 -0
@@ -51,296 +51,30 @@
51
51
  * @module lib/session/waiting-episode-state
52
52
  */
53
53
  Object.defineProperty(exports, "__esModule", { value: true });
54
- exports.onWaitingTransition = onWaitingTransition;
55
- exports.onWaitingEpisodeTransition = onWaitingEpisodeTransition;
56
- exports.openEpisode = openEpisode;
57
- exports.closeEpisode = closeEpisode;
58
- exports.replaceEpisode = replaceEpisode;
59
- exports.rebindEpisode = rebindEpisode;
60
- exports.updateEpisodeKind = updateEpisodeKind;
61
- exports.getWaitingEpisodeRecord = getWaitingEpisodeRecord;
62
- exports.getEpisodeVersion = getEpisodeVersion;
63
- exports.snapshotEpisodeVersions = snapshotEpisodeVersions;
64
- exports.getLastClosedEpisode = getLastClosedEpisode;
54
+ exports.updateEpisodeKind = exports.replaceEpisode = exports.rebindEpisode = exports.openEpisode = exports.closeEpisode = exports.snapshotEpisodeVersions = exports.onWaitingTransition = exports.onWaitingEpisodeTransition = exports.hasOpenWaitingEpisode = exports.getWaitingEpisodeRecord = exports.getWaitingEpisode = exports.getLastClosedEpisode = exports.getEpisodeVersion = exports.clearWaitingTransitionListeners = exports.clearWaitingEpisodes = void 0;
65
55
  exports.registerEpisodeBindingResolver = registerEpisodeBindingResolver;
66
56
  exports.observeWaitingEdge = observeWaitingEdge;
67
- exports.getWaitingEpisode = getWaitingEpisode;
68
- exports.hasOpenWaitingEpisode = hasOpenWaitingEpisode;
69
- exports.clearWaitingEpisodes = clearWaitingEpisodes;
70
- exports.clearWaitingTransitionListeners = clearWaitingTransitionListeners;
71
- const auto_yes_state_1 = require("../../lib/auto-yes-state");
72
57
  const logger_1 = require("../../lib/logger");
73
- const global_state_1 = require("../global-state");
58
+ const waiting_episode_state_ops_1 = require("../../lib/session/waiting-episode-state-ops");
59
+ const waiting_episode_state_store_1 = require("../../lib/session/waiting-episode-state-store");
60
+ var waiting_episode_state_store_2 = require("../../lib/session/waiting-episode-state-store");
61
+ Object.defineProperty(exports, "clearWaitingEpisodes", { enumerable: true, get: function () { return waiting_episode_state_store_2.clearWaitingEpisodes; } });
62
+ Object.defineProperty(exports, "clearWaitingTransitionListeners", { enumerable: true, get: function () { return waiting_episode_state_store_2.clearWaitingTransitionListeners; } });
63
+ Object.defineProperty(exports, "getEpisodeVersion", { enumerable: true, get: function () { return waiting_episode_state_store_2.getEpisodeVersion; } });
64
+ Object.defineProperty(exports, "getLastClosedEpisode", { enumerable: true, get: function () { return waiting_episode_state_store_2.getLastClosedEpisode; } });
65
+ Object.defineProperty(exports, "getWaitingEpisode", { enumerable: true, get: function () { return waiting_episode_state_store_2.getWaitingEpisode; } });
66
+ Object.defineProperty(exports, "getWaitingEpisodeRecord", { enumerable: true, get: function () { return waiting_episode_state_store_2.getWaitingEpisodeRecord; } });
67
+ Object.defineProperty(exports, "hasOpenWaitingEpisode", { enumerable: true, get: function () { return waiting_episode_state_store_2.hasOpenWaitingEpisode; } });
68
+ Object.defineProperty(exports, "onWaitingEpisodeTransition", { enumerable: true, get: function () { return waiting_episode_state_store_2.onWaitingEpisodeTransition; } });
69
+ Object.defineProperty(exports, "onWaitingTransition", { enumerable: true, get: function () { return waiting_episode_state_store_2.onWaitingTransition; } });
70
+ Object.defineProperty(exports, "snapshotEpisodeVersions", { enumerable: true, get: function () { return waiting_episode_state_store_2.snapshotEpisodeVersions; } });
71
+ var waiting_episode_state_ops_2 = require("../../lib/session/waiting-episode-state-ops");
72
+ Object.defineProperty(exports, "closeEpisode", { enumerable: true, get: function () { return waiting_episode_state_ops_2.closeEpisode; } });
73
+ Object.defineProperty(exports, "openEpisode", { enumerable: true, get: function () { return waiting_episode_state_ops_2.openEpisode; } });
74
+ Object.defineProperty(exports, "rebindEpisode", { enumerable: true, get: function () { return waiting_episode_state_ops_2.rebindEpisode; } });
75
+ Object.defineProperty(exports, "replaceEpisode", { enumerable: true, get: function () { return waiting_episode_state_ops_2.replaceEpisode; } });
76
+ Object.defineProperty(exports, "updateEpisodeKind", { enumerable: true, get: function () { return waiting_episode_state_ops_2.updateEpisodeKind; } });
74
77
  const logger = (0, logger_1.createLogger)('waiting-episode-state');
75
- /** compositeKey -> the wait currently in progress for that instance. */
76
- const episodes = (0, global_state_1.getOrInitGlobal)('__sessionWaitingEpisodes', () => new Map());
77
- /** Subscribers to the edge. See the module docblock. */
78
- const listeners = (0, global_state_1.getOrInitGlobal)('__sessionWaitingTransitionListeners', () => new Set());
79
- const metas = (0, global_state_1.getOrInitGlobal)('__sessionWaitingEpisodeMeta', () => new WeakMap());
80
- const versions = (0, global_state_1.getOrInitGlobal)('__sessionWaitingEpisodeVersions', () => new Map());
81
- const lastClosed = (0, global_state_1.getOrInitGlobal)('__sessionWaitingEpisodeLastClosed', () => new Map());
82
- const episodeSeq = (0, global_state_1.getOrInitGlobal)('__sessionWaitingEpisodeSeq', () => ({
83
- value: 0,
84
- nonce: Math.random().toString(36).slice(2, 10),
85
- }));
86
- const episodeListeners = (0, global_state_1.getOrInitGlobal)('__sessionWaitingEpisodeListeners', () => new Set());
87
- /** The binding used when no resolver is registered: nothing is known. */
88
- const UNKNOWN_BINDING = {
89
- kind: 'unattributed',
90
- generation: { kind: 'none' },
91
- lastClosedTurnId: null,
92
- };
93
- function nextEpisodeId() {
94
- episodeSeq.value += 1;
95
- return `wep-${episodeSeq.nonce}-${episodeSeq.value}`;
96
- }
97
- function keyOf(parts) {
98
- return (0, auto_yes_state_1.buildCompositeKey)(parts.worktreeId, parts.cliToolId, parts.instanceId);
99
- }
100
- function bumpVersion(key) {
101
- versions.set(key, (versions.get(key) ?? 0) + 1);
102
- }
103
- /**
104
- * Subscribe to waiting edges.
105
- *
106
- * @returns An unsubscribe function. Idempotent — calling it twice is harmless.
107
- */
108
- function onWaitingTransition(listener) {
109
- listeners.add(listener);
110
- return () => {
111
- listeners.delete(listener);
112
- };
113
- }
114
- /**
115
- * Subscribe to waiting edges with the episode's identity (Issue #3798).
116
- *
117
- * The same crossings `onWaitingTransition` delivers, in the same order, with
118
- * the cause, the episode ids and the close reason added.
119
- */
120
- function onWaitingEpisodeTransition(listener) {
121
- episodeListeners.add(listener);
122
- return () => {
123
- episodeListeners.delete(listener);
124
- };
125
- }
126
- /** Notify subscribers, containing anything they throw. */
127
- function emit(transition) {
128
- const { cause: _cause, episodeId: _id, previousEpisodeId: _prev, closeReason: _reason, ...plain } = transition;
129
- for (const listener of listeners) {
130
- try {
131
- listener(plain);
132
- }
133
- catch (error) {
134
- logListenerFailure(transition, error);
135
- }
136
- }
137
- for (const listener of episodeListeners) {
138
- try {
139
- listener(transition);
140
- }
141
- catch (error) {
142
- logListenerFailure(transition, error);
143
- }
144
- }
145
- }
146
- function logListenerFailure(transition, error) {
147
- logger.error('waiting-transition-listener-failed', {
148
- worktreeId: transition.worktreeId,
149
- cliToolId: transition.cliToolId,
150
- instanceId: transition.instanceId ?? transition.cliToolId,
151
- waiting: transition.waiting,
152
- error: error instanceof Error ? error.message : String(error),
153
- });
154
- }
155
- /**
156
- * Open an episode (Issue #3798). Low-level: the caller has decided there is
157
- * none open and what it is bound to. Emits the opening edge.
158
- */
159
- function openEpisode(parts, next, at) {
160
- const key = keyOf(parts);
161
- const view = { since: next.since, kind: next.kind };
162
- const meta = {
163
- episodeId: nextEpisodeId(),
164
- openedAt: at,
165
- boundAt: at,
166
- binding: next.binding,
167
- openedBy: next.openedBy,
168
- promptScreenKey: next.promptScreenKey ?? null,
169
- };
170
- episodes.set(key, view);
171
- metas.set(view, meta);
172
- bumpVersion(key);
173
- emit({
174
- worktreeId: parts.worktreeId,
175
- cliToolId: parts.cliToolId,
176
- instanceId: parts.instanceId,
177
- waiting: true,
178
- since: view.since,
179
- kind: view.kind,
180
- at,
181
- cause: 'opened',
182
- episodeId: meta.episodeId,
183
- previousEpisodeId: null,
184
- closeReason: null,
185
- });
186
- return { ...view, ...meta };
187
- }
188
- /**
189
- * Close the open episode when it is still `expectedId` (Issue #3798). A closer
190
- * that names the episode it decided about cannot close a later one.
191
- *
192
- * @returns Whether an episode was closed
193
- */
194
- function closeEpisode(parts, expectedId, reason, at) {
195
- const key = keyOf(parts);
196
- const view = episodes.get(key);
197
- if (view === undefined)
198
- return false;
199
- const meta = metaOf(view);
200
- if (meta.episodeId !== expectedId)
201
- return false;
202
- episodes.delete(key);
203
- lastClosed.set(key, { at, promptScreenKey: meta.promptScreenKey });
204
- bumpVersion(key);
205
- emit({
206
- worktreeId: parts.worktreeId,
207
- cliToolId: parts.cliToolId,
208
- instanceId: parts.instanceId,
209
- waiting: false,
210
- since: null,
211
- kind: null,
212
- at,
213
- cause: 'closed',
214
- episodeId: null,
215
- previousEpisodeId: meta.episodeId,
216
- closeReason: reason,
217
- });
218
- return true;
219
- }
220
- /**
221
- * Put a new episode in place of `expectedId` as one operation (Issue #3798):
222
- * listeners hear a single opening edge for the new wait and no closing one
223
- * in between, so nothing reports "nobody is waiting" mid-swap.
224
- *
225
- * @returns The new episode, or null when `expectedId` is no longer open
226
- */
227
- function replaceEpisode(parts, expectedId, next, reason, at) {
228
- const key = keyOf(parts);
229
- const old = episodes.get(key);
230
- if (old === undefined)
231
- return null;
232
- const oldMeta = metaOf(old);
233
- if (oldMeta.episodeId !== expectedId)
234
- return null;
235
- lastClosed.set(key, { at, promptScreenKey: oldMeta.promptScreenKey });
236
- const view = { since: next.since, kind: next.kind };
237
- const meta = {
238
- episodeId: nextEpisodeId(),
239
- openedAt: at,
240
- boundAt: at,
241
- binding: next.binding,
242
- openedBy: next.openedBy,
243
- promptScreenKey: next.promptScreenKey ?? null,
244
- };
245
- episodes.set(key, view);
246
- metas.set(view, meta);
247
- bumpVersion(key);
248
- emit({
249
- worktreeId: parts.worktreeId,
250
- cliToolId: parts.cliToolId,
251
- instanceId: parts.instanceId,
252
- waiting: true,
253
- since: view.since,
254
- kind: view.kind,
255
- at,
256
- cause: 'replaced',
257
- episodeId: meta.episodeId,
258
- previousEpisodeId: oldMeta.episodeId,
259
- closeReason: reason,
260
- });
261
- return { ...view, ...meta };
262
- }
263
- /**
264
- * Change what the open episode `expectedId` is bound to (Issue #3798). Not an
265
- * edge: the wait goes on, so nothing is emitted and `since` stays.
266
- *
267
- * @returns Whether the episode was rebound
268
- */
269
- function rebindEpisode(parts, expectedId, binding, at) {
270
- const key = keyOf(parts);
271
- const view = episodes.get(key);
272
- if (view === undefined)
273
- return false;
274
- const meta = metaOf(view);
275
- if (meta.episodeId !== expectedId)
276
- return false;
277
- meta.binding = binding;
278
- meta.boundAt = at;
279
- bumpVersion(key);
280
- return true;
281
- }
282
- /**
283
- * Refresh the kind of the open episode `expectedId` (Issue #3798, I10). The
284
- * wait goes on: no edge, and the version does not move.
285
- *
286
- * @returns Whether the episode was still open
287
- */
288
- function updateEpisodeKind(parts, expectedId, kind) {
289
- const view = episodes.get(keyOf(parts));
290
- if (view === undefined || metaOf(view).episodeId !== expectedId)
291
- return false;
292
- view.kind = kind;
293
- return true;
294
- }
295
- /**
296
- * The meta of an episode in the map. An episode put there without one (a test
297
- * that wrote the map directly) is given an unattributed identity on first read.
298
- */
299
- function metaOf(view) {
300
- let meta = metas.get(view);
301
- if (meta === undefined) {
302
- meta = {
303
- episodeId: nextEpisodeId(),
304
- openedAt: view.since,
305
- boundAt: view.since,
306
- binding: UNKNOWN_BINDING,
307
- openedBy: 'legacy-edge',
308
- promptScreenKey: null,
309
- };
310
- metas.set(view, meta);
311
- }
312
- return meta;
313
- }
314
- /** The open episode with its identity and binding, or null (Issue #3798). */
315
- function getWaitingEpisodeRecord(worktreeId, cliToolId, instanceId) {
316
- const view = episodes.get((0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, instanceId));
317
- if (view === undefined)
318
- return null;
319
- const meta = metaOf(view);
320
- return { since: view.since, kind: view.kind, ...meta, binding: meta.binding };
321
- }
322
- /** The instance's episode version: it moves on every open, close, replacement and rebind. */
323
- function getEpisodeVersion(worktreeId, cliToolId, instanceId) {
324
- return versions.get((0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, instanceId)) ?? 0;
325
- }
326
- /**
327
- * Every instance version of one worktree, as of now (Issue #3798): the status
328
- * probe fixes them before it lists the tmux sessions. An instance missing from
329
- * the map is at version 0.
330
- */
331
- function snapshotEpisodeVersions(worktreeId) {
332
- const prefix = `${worktreeId}${auto_yes_state_1.COMPOSITE_KEY_SEPARATOR}`;
333
- const snapshot = new Map();
334
- for (const [key, version] of versions) {
335
- if (key.startsWith(prefix))
336
- snapshot.set(key, version);
337
- }
338
- return snapshot;
339
- }
340
- /** The last episode that ended for this instance, or null. */
341
- function getLastClosedEpisode(worktreeId, cliToolId, instanceId) {
342
- return lastClosed.get((0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, instanceId)) ?? null;
343
- }
344
78
  /** Install the binding resolver `observeWaitingEdge` uses. The last one wins. */
345
79
  function registerEpisodeBindingResolver(resolver) {
346
80
  globalThis.__sessionWaitingEpisodeBindingResolver = resolver;
@@ -348,7 +82,7 @@ function registerEpisodeBindingResolver(resolver) {
348
82
  function resolveBinding(parts, at) {
349
83
  const resolver = globalThis.__sessionWaitingEpisodeBindingResolver;
350
84
  if (resolver === undefined)
351
- return UNKNOWN_BINDING;
85
+ return waiting_episode_state_store_1.UNKNOWN_BINDING;
352
86
  try {
353
87
  return resolver(parts, at);
354
88
  }
@@ -359,7 +93,7 @@ function resolveBinding(parts, at) {
359
93
  instanceId: parts.instanceId ?? parts.cliToolId,
360
94
  error: error instanceof Error ? error.message : String(error),
361
95
  });
362
- return UNKNOWN_BINDING;
96
+ return waiting_episode_state_store_1.UNKNOWN_BINDING;
363
97
  }
364
98
  }
365
99
  /**
@@ -381,12 +115,12 @@ function resolveBinding(parts, at) {
381
115
  */
382
116
  function observeWaitingEdge({ worktreeId, cliToolId, instanceId, waiting, kind = null, structuredSince = null, now = Date.now(), }) {
383
117
  const parts = { worktreeId, cliToolId, instanceId };
384
- const key = keyOf(parts);
385
- const existing = episodes.get(key);
118
+ const key = (0, waiting_episode_state_store_1.keyOf)(parts);
119
+ const existing = waiting_episode_state_store_1.episodes.get(key);
386
120
  if (!waiting) {
387
121
  if (existing === undefined)
388
122
  return null;
389
- closeEpisode(parts, metaOf(existing).episodeId, 'screen-cleared', now);
123
+ (0, waiting_episode_state_ops_1.closeEpisode)(parts, (0, waiting_episode_state_store_1.metaOf)(existing).episodeId, 'screen-cleared', now);
390
124
  return null;
391
125
  }
392
126
  if (existing !== undefined) {
@@ -397,53 +131,6 @@ function observeWaitingEdge({ worktreeId, cliToolId, instanceId, waiting, kind =
397
131
  return existing.since;
398
132
  }
399
133
  const since = structuredSince ?? now;
400
- openEpisode(parts, { since, kind, binding: resolveBinding(parts, now), openedBy: 'legacy-edge' }, now);
134
+ (0, waiting_episode_state_ops_1.openEpisode)(parts, { since, kind, binding: resolveBinding(parts, now), openedBy: 'legacy-edge' }, now);
401
135
  return since;
402
136
  }
403
- /**
404
- * @returns The wait in progress for this instance, or null when it is not
405
- * waiting. Read-only: observing the edge is {@link observeWaitingEdge}'s job.
406
- */
407
- function getWaitingEpisode(worktreeId, cliToolId, instanceId) {
408
- return episodes.get((0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, instanceId)) ?? null;
409
- }
410
- /**
411
- * Whether **any** instance in this worktree is still waiting (Issue #2001).
412
- *
413
- * The cross-device dismissal is keyed on the worktree, because that is what the
414
- * Service Worker `tag` names (`<worktreeId>:prompt`, `push-sender`): two agent
415
- * instances waiting in one worktree share a single notification card on the
416
- * phone. So one instance crossing the closing edge is not on its own a reason
417
- * to clear that card — the card is still telling the truth until the last of
418
- * them has been answered.
419
- *
420
- * The prefix test is exact rather than heuristic: `buildCompositeKey` puts the
421
- * worktree id first and rejects a worktree id containing
422
- * {@link COMPOSITE_KEY_SEPARATOR}, so no other worktree's key can start with
423
- * `<worktreeId>:`.
424
- */
425
- function hasOpenWaitingEpisode(worktreeId) {
426
- const prefix = `${worktreeId}${auto_yes_state_1.COMPOSITE_KEY_SEPARATOR}`;
427
- for (const key of episodes.keys()) {
428
- if (key.startsWith(prefix))
429
- return true;
430
- }
431
- return false;
432
- }
433
- /**
434
- * Drop every episode. Test seam.
435
- *
436
- * CI runs with `fileParallelism: false`, so one process holds this map for the
437
- * whole suite: a test that opens an episode and does not clear it hands the next
438
- * file a session that is already waiting.
439
- */
440
- function clearWaitingEpisodes() {
441
- episodes.clear();
442
- versions.clear();
443
- lastClosed.clear();
444
- }
445
- /** Drop every subscriber. Test seam, paired with {@link clearWaitingEpisodes}. */
446
- function clearWaitingTransitionListeners() {
447
- listeners.clear();
448
- episodeListeners.clear();
449
- }
@@ -24,6 +24,7 @@ exports.ensureSession = ensureSession;
24
24
  exports.sendSpecialKey = sendSpecialKey;
25
25
  exports.clearInputLine = clearInputLine;
26
26
  exports.clearComposerLine = clearComposerLine;
27
+ exports.clearComposerPasteToken = clearComposerPasteToken;
27
28
  exports.isAllowedSpecialKey = isAllowedSpecialKey;
28
29
  exports.sendSpecialKeysAndInvalidate = sendSpecialKeysAndInvalidate;
29
30
  exports.sendDirectInputAndInvalidate = sendDirectInputAndInvalidate;
@@ -946,6 +947,30 @@ async function clearComposerLine(sessionName) {
946
947
  throw new Error(`Failed to clear tmux composer line: ${errorMessage}`);
947
948
  }
948
949
  }
950
+ /**
951
+ * Send one `C-e` + `BSpace` pass: take a collapsed paste placeholder out of the
952
+ * composer (Issue #3937).
953
+ *
954
+ * codex folds a pasted body into one `[Pasted Content N chars]` placeholder.
955
+ * `C-e`+`C-u` left one in place for all 12 passes (`composer-clear:not-cleared`,
956
+ * 2026-10-25), and one `BSpace` sent by hand removed it whole. The caller
957
+ * ({@link module:lib/session/composer-clear}) sends this only when the composer
958
+ * shows that placeholder and nothing else — after `C-e` the cursor sits right
959
+ * behind it — and reads the frame back afterwards like any other pass. Same
960
+ * literal-keys / one-invocation rules as {@link clearComposerLine}.
961
+ *
962
+ * @param sessionName - Target session name
963
+ * @throws {Error} If the tmux command fails
964
+ */
965
+ async function clearComposerPasteToken(sessionName) {
966
+ try {
967
+ await execFileAsync('tmux', ['send-keys', '-t', exactTarget(sessionName), 'C-e', 'BSpace'], { timeout: DEFAULT_TIMEOUT });
968
+ }
969
+ catch (error) {
970
+ const errorMessage = error instanceof Error ? error.message : String(error);
971
+ throw new Error(`Failed to clear tmux composer paste placeholder: ${errorMessage}`);
972
+ }
973
+ }
949
974
  /**
950
975
  * Type guard for navigation key validation (special-keys API).
951
976
  * Returns true if the key is in the NAVIGATION_KEY_VALUES set AND sendSpecialKeys()
@@ -427,9 +427,10 @@ const cancellations = new Map();
427
427
  * stopped something.
428
428
  *
429
429
  * A run cancelled while it is still queued behind
430
- * {@link MAX_CONCURRENT_VERIFICATIONS} answers `requested`: the latch is set,
431
- * so it will start nothing, but it closes its own row only once a slot reaches
432
- * it. The caller polls, which it is doing anyway.
430
+ * {@link MAX_CONCURRENT_VERIFICATIONS} leaves the queue at once and closes
431
+ * `cancelled` (Issue #3909); it used to answer `requested` and close only once
432
+ * a slot reached it. `requested` is now only a run whose gate is still winding
433
+ * down when the budget runs out.
433
434
  */
434
435
  async function cancelVerification(runId) {
435
436
  const cancellation = cancellations.get(runId);
@@ -1637,7 +1638,13 @@ async function startVerification(input) {
1637
1638
  };
1638
1639
  const slot = new RunSlot();
1639
1640
  const completion = (async () => {
1640
- await slot.acquire();
1641
+ // Issue #3909: the run's first wait for a slot is abandonable too, as the
1642
+ // re-take after a mutex wait has been since #3884 N3. A run cancelled here
1643
+ // used to stay queued (and `running`, holding its worktree) until one of
1644
+ // the two executing gates ended, so the cancel endpoint answered
1645
+ // `requested`. An abandoned wait holds no slot; `slot.release()` below is
1646
+ // idempotent, so the `finally` hands nothing back for it.
1647
+ await slot.acquire(false, cancellation);
1641
1648
  let terminalStatus = 'error';
1642
1649
  try {
1643
1650
  // Cancelled while queued behind MAX_CONCURRENT_VERIFICATIONS: nothing was
@@ -196,10 +196,12 @@ Useful when you want to run continuous processes without interruption.
196
196
  1. Open the worktree detail view
197
197
  2. Turn on the **"Auto Yes"** toggle at the top of the screen
198
198
  3. A confirmation dialog appears
199
- 4. **Select the active duration** (1 hour / 3 hours / 8 hours)
200
- - Default is **1 hour**
199
+ 4. **Select the active duration** (1-24 hours, in whole hours)
200
+ - The common **1 hour / 3 hours / 8 hours** are buttons; for anything else press **Other** and pick from the 1-24 hour list
201
+ - Every time the dialog opens it starts at **1 hour** (the previous choice is not remembered, so 24 hours and the like are chosen explicitly each time)
202
+ - A longer duration also means more permission checks answered automatically (careful mode answers permission checks too)
201
203
  - Select the minimum time needed for your work
202
- 5. The description text changes dynamically based on your selection (e.g., "Will automatically turn OFF after 3 hours.")
204
+ 5. The description text changes dynamically based on your selection (e.g., "Will automatically turn OFF after 5 hours.")
203
205
  6. **Choose how questions are answered** ("Answer questions with the recommended option (Recommended)" / "Answer questions yourself (Careful)"; see "Answer Modes" below)
204
206
  7. Click **"Agree and Enable"**
205
207
 
@@ -221,15 +223,18 @@ The dialog that turns Auto Yes on asks how a question from the agent (one that p
221
223
 
222
224
  ### Active Duration
223
225
 
224
- | Option | Milliseconds | Intended Use Case |
226
+ | Option (examples) | Milliseconds | Intended Use Case |
225
227
  |--------|-------------|-------------------|
226
- | **1 hour** (default) | 3,600,000 | Normal development work, short tasks |
227
- | **3 hours** | 10,800,000 | Medium-scale implementation work |
228
- | **8 hours** | 28,800,000 | Long batch-processing tasks (regular progress checks recommended) |
228
+ | **1 hour** (default, button) | 3,600,000 | Normal development work, short tasks |
229
+ | **3 hours** (button) | 10,800,000 | Medium-scale implementation work |
230
+ | **8 hours** (button) | 28,800,000 | Long batch-processing tasks (regular progress checks recommended) |
231
+ | **24 hours** (Other, the maximum) | 86,400,000 | Overnight work. It keeps answering while you are away, so narrowing it with a stop pattern or the contract's `autoYes` is recommended |
232
+
233
+ Any whole number of hours from 1 to 24 can be chosen (Issue #3913); the rows above are examples, and the millisecond value is hours × 3,600,000. The Auto Yes field of the New task dialog offers the same 1-24 hours ("Leave off" is unchanged).
229
234
 
230
235
  A countdown timer always shows the remaining time.
231
236
  - **Under 1 hour**: `MM:SS` format (e.g., `45:30`)
232
- - **1 hour or more**: `H:MM:SS` format (e.g., `2:15:30`)
237
+ - **1 hour or more**: `H:MM:SS` format (e.g., `2:15:30`; a 24-hour grant starts at `24:00:00`)
233
238
 
234
239
  ### API Specification (for developers)
235
240
 
@@ -240,13 +245,13 @@ POST /api/worktrees/:id/auto-yes
240
245
 
241
246
  {
242
247
  "enabled": true,
243
- "duration": 3600000 | 10800000 | 28800000, // Optional (default: 3600000)
248
+ "duration": 3600000, // Optional. 1-24 hours (a multiple of 3600000, 3600000-86400000; default: 3600000)
244
249
  "answerMode": "recommended" | "careful" // Optional (Issue #3863; recommended for a new grant, the current mode for one that is on)
245
250
  }
246
251
  ```
247
252
 
248
253
  - **When duration is omitted**: Defaults to 1 hour (3,600,000 ms) for backward compatibility
249
- - **Invalid duration value**: Returns 400 error
254
+ - **Invalid duration value**: Out of range, fractional or non-number values return a 400 error (checked only when enabling; `enabled: false` ignores duration)
250
255
  - **Security**: 5-layer defense with worktreeId format validation -> JSON parse validation -> type validation -> whitelist validation
251
256
 
252
257
  ### Approval Routes Differ by Agent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commandmate",
3
- "version": "0.48.0",
3
+ "version": "0.49.0",
4
4
  "description": "No long blocks of time? Run an AI team from your phone. Git worktree sessions, task contracts and verification gates for Claude Code, Codex, Gemini CLI, Copilot, OpenCode, Antigravity and Command Code.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -0,0 +1,45 @@
1
+ {
2
+ "version": "0.49.0",
3
+ "date": "2026-10-27",
4
+ "highlight": {
5
+ "ja": "Auto-Yes の有効時間を 1〜24 時間から選べるようになり、チャットのコードブロックをワンクリックでコピーできるようになりました。",
6
+ "en": "You can now choose any Auto-Yes duration from 1 to 24 hours, and copy chat code blocks with one click."
7
+ },
8
+ "added": [
9
+ {
10
+ "ja": "Auto-Yes の有効時間を 1〜24 時間の 1 時間刻みで選べるようになりました。",
11
+ "en": "Auto-Yes can now stay on for any whole number of hours from 1 to 24."
12
+ },
13
+ {
14
+ "ja": "チャットのコードブロックにコピーボタンが付きました。",
15
+ "en": "Code blocks in chat now have a copy button."
16
+ }
17
+ ],
18
+ "improved": [],
19
+ "fixed": [
20
+ {
21
+ "ja": "codex の入力欄に貼り付けの印が残り、次の送信ができなくなる問題を直しました。",
22
+ "en": "Fixed a leftover paste marker in the Codex input box that blocked the next message."
23
+ },
24
+ {
25
+ "ja": "codex のモデルが混雑しているとき、それを検出せずに長く待ち続ける問題を直しました。",
26
+ "en": "Fixed long waits when the Codex model was at capacity; this is now detected as an upstream failure."
27
+ },
28
+ {
29
+ "ja": "codex の長い入力の送信が、届いたかどうかを誤って判定することがある問題を直しました。",
30
+ "en": "Fixed Codex sends with long input sometimes being misjudged as delivered or not."
31
+ },
32
+ {
33
+ "ja": "確認ダイアログの下に隠れた codex の古い入力が、未送信バーに出続ける問題を直しました。",
34
+ "en": "Fixed old Codex input hidden under a dialog staying in the unsent message bar."
35
+ },
36
+ {
37
+ "ja": "入力欄から確認に答えたとき、Auto-Yes に手動の回答として伝わらない問題を直しました。",
38
+ "en": "Fixed answers given from the input panel not being reported to Auto-Yes as manual answers."
39
+ },
40
+ {
41
+ "ja": "CLI の確認画面の一覧と回答で、一部の情報が落ちたり Auto-Yes に伝わらなかったりする問題を直しました。",
42
+ "en": "Fixed the CLI prompt listing dropping some details, and some CLI answers not being reported to Auto-Yes."
43
+ }
44
+ ]
45
+ }
@@ -1 +0,0 @@
1
- "use strict";exports.id=6722,exports.ids=[6722],exports.modules={33661:(a,b,c)=>{c.d(b,{E:()=>f});var d=c(38301),e=c(93571);let f=(0,d.createContext)(e.Wo)},45538:(a,b,c)=>{c.d(b,{D:()=>g,c:()=>f});var d=c(38301),e=c.n(d);function f(a){return!!a&&a.split(" ").includes("language-mermaid")}function g(a){let b=e().Children.toArray(a)[0];if(!e().isValidElement(b))return!1;let c=b.props.className;return f("string"==typeof c?c:void 0)}},46332:(a,b,c)=>{c.d(b,{Ad:()=>f,Wo:()=>d,v5:()=>g});let d=a=>a,e=/^[ \t>]*$/;function f(a,b,c){if(a===b)return d;let f=[],g=0;for(let a of b.split("\n"))(!c||c.some(a=>g>=a.start&&g<a.end))&&f.push({start:g,text:a}),g+=a.length+1;let h=[],i=[],j=0,k=0;for(let b of a.split("\n")){let a=-1;for(let c=j;c<f.length;c++){let d=f[c].text;if(d.endsWith(b)&&e.test(d.slice(0,d.length-b.length))){a=c;break}}if(-1===a)return null;h.push(k),i.push(f[a].start+f[a].text.length-b.length),k+=b.length+1,j=a+1}return b=>{if(b<0||b>a.length)return null;let c=0,d=h.length-1;for(;c<d;){let a=c+d+1>>1;h[a]<=b?c=a:d=a-1}return i[c]+(b-h[c])}}function g(a,b){if(b.map(a=>a.text).join("\n")!==a)return null;if(0===b.length)return()=>null;let c=[],d=0;for(let a of b)c.push(d),d+=a.text.length+1;return d=>{if(d<0||d>a.length)return null;let e=0,f=c.length-1;for(;e<f;){let a=e+f+1>>1;c[a]<=d?e=a:f=a-1}let g=b[e].rawStart;return null===g?null:g+(d-c[e])}}},56722:(a,b,c)=>{c.d(b,{AY:()=>p});var d=c(21124),e=c(38301),f=c(13973),g=c(20481),h=c(17793),i=c(93571),j=c(45538),k=c(33661);let l=(0,f.default)(async()=>{},{loadableGenerated:{modules:["components/worktree/MermaidCodeBlock.tsx -> ./MermaidDiagram"]},ssr:!1,loading:function(){let a=(0,g.c)("worktree");return(0,d.jsxs)("div",{className:"mermaid-loading flex items-center gap-2 text-muted-foreground p-4",children:[(0,d.jsx)(h.y,{size:"sm"}),(0,d.jsx)("span",{children:a("mermaid.loading")})]})}}),m={[i.Zq]:"true"},n={[i.i5]:"true"};function o({code:a,node:b}){let c=(0,g.c)("worktree"),[f,h]=(0,e.useState)(!1),j=(0,e.useRef)(null),o=(0,e.useCallback)(a=>{h("error"===a),j.current?.dispatchEvent(new CustomEvent(i.Rb,{bubbles:!0}))},[]),p=a.endsWith("\n")?a.slice(0,-1):a,q=(0,e.useContext)(k.E),r=function(a){let b=a?.position,c=b?.start?.offset,d=b?.end?.offset;return"number"==typeof c&&"number"==typeof d?{start:c,end:d}:null}(b),s=r&&q?q(r.start):null,t=r&&q?q(r.end):null,u=null!==s&&null!==t&&t>s?{[i.i4]:String(s),[i.tz]:String(t)}:{};return(0,d.jsxs)("div",{ref:j,"data-testid":"mermaid-block-frame",className:"mermaid-block",children:[(0,d.jsx)("div",{...m,className:"mermaid-figure",children:(0,d.jsx)(l,{code:a,onRenderStateChange:o})}),(0,d.jsxs)("details",{"data-testid":"mermaid-source",className:"mermaid-source",open:f||void 0,children:[(0,d.jsx)("summary",{...m,children:c("mermaid.source")}),(0,d.jsx)("pre",{children:(0,d.jsx)("code",{...n,...u,children:p})})]})]})}function p({className:a,children:b,node:c}){if((0,j.c)(a)){let a=null==b?"":"string"==typeof b?b:Array.isArray(b)?b.map(a=>"string"==typeof a?a:"").join(""):String(b);return(0,d.jsx)(o,{code:a,node:c})}return(0,d.jsx)("code",{className:a,children:b})}},88033:(a,b,c)=>{c.d(b,{eT:()=>j});var d=c(18954);let e=["**","__"],f=/^https?:\/\/./i;function g(a){return"object"==typeof a&&null!==a&&"string"==typeof a.type}function h(a,b){let c=a.position;if(!c)return null;let d=c.start?.offset,e=c.end?.offset;return"number"!=typeof d||"number"!=typeof e||!Number.isInteger(d)||!Number.isInteger(e)||d<0||e<d||e>b.length?null:{start:d,end:e}}function i(a,b){return{line:a.line,column:a.column+b,offset:(a.offset??0)+b}}let j=Object.freeze([d.A,function(){return function(a,b){let c=function(a){if("string"==typeof a)return a;if("object"==typeof a&&null!==a){let b=a.value;if("string"==typeof b)return b}return null}(b);null!==c&&g(a)&&function a(b,c){let d=Array.isArray(b.children)?b:null;if(d)for(let b of(!function(a,b){let c=a.children;for(let a=0;a<c.length;a+=1){let d=c[a];if(!g(d)||!function(a,b){if("link"!==a.type||null!==a.title&&void 0!==a.title)return!1;let c=a.url;if("string"!=typeof c||!f.test(c))return!1;let d=h(a,b);if(!d||b.slice(d.start,d.end)!==c)return!1;let e=a.children;if(!Array.isArray(e)||1!==e.length)return!1;let i=e[0];if(!g(i)||"text"!==i.type||i.value!==c)return!1;let j=h(i,b);return null!==j&&j.start===d.start&&j.end===d.end}(d,b))continue;let j=function(a){let b=function(a){for(let b=0;b<a.length;b+=1)if("()、。「」【】".includes(a[b]))return b;return -1}(a);if(b<=0)return null;let c=a.slice(0,b),d=e.find(a=>c.endsWith(a)),g=d?b-d.length:b;if(g<=0)return null;let h=a.slice(0,g);return f.test(h)?{keptUrl:h,tailText:a.slice(g),tailOffset:g,delimiter:d??null}:null}(d.url);if(!j)continue;let k=h(d,b),l=d.position?.start,m=d.position?.end;if(!k||!l||!m)continue;let n=null!==j.delimiter&&function(a,b,c,d){if(!a||"text"!==a.type||"string"!=typeof a.value||!a.value.endsWith(b))return!1;let e=h(a,d);if(!e||e.end!==c)return!1;let f=d.slice(e.start,e.end);if(!f.endsWith(b))return!1;let g=f.length-b.length-1;return g<0||"\\"!==f[g]}(c[a-1],j.delimiter,k.start,b),o=n?j.tailText.slice(j.delimiter?.length??0):j.tailText,p=n?j.tailOffset+(j.delimiter?.length??0):j.tailOffset,q=i(l,j.keptUrl.length);d.url=j.keptUrl;let r=d.children?.[0];r&&(r.value=j.keptUrl,r.position={start:{...l},end:{...q}}),d.position={start:{...l},end:q};let s={type:"text",value:o,position:{start:i(l,p),end:{...m}}};if(n&&j.delimiter){let b=c[a-1],e=i(l,-j.delimiter.length),f={type:"strong",children:[d],position:{start:e,end:i(l,p)}},g=b.value.slice(0,-j.delimiter.length);0===g.length?(c.splice(a-1,1),a-=1):(b.value=g,b.position&&(b.position={...b.position,end:e})),c[a]=f}c.splice(a+1,0,s),a+=1}}(d,c),d.children))g(b)&&a(b,c)}(a,c)}}])},93571:(a,b,c)=>{c.d(b,{Gw:()=>L,Wo:()=>x.Wo,Rb:()=>h,tz:()=>g,i4:()=>f,i5:()=>e,Zq:()=>d,Ad:()=>x.Ad,Gg:()=>X,aX:()=>V,fq:()=>W,HI:()=>U,eu:()=>M,p0:()=>I,po:()=>J});let d="data-search-skip",e="data-mermaid-source",f="data-mermaid-raw-start",g="data-mermaid-raw-end",h="commandmate:mermaid-block-settled";var i=c(69999),j=c(63051),k=c(88033);let l=/^( {0,3})(`{3,}|~{3,})(.*)$/,m=/^ {0,3}(?:[-*+]|\d{1,9}[.)]) {1,4}(?=`{3,}|~{3,})/;function n(a,b,c,d){let e=0;for(;e<d&&b+e<c&&" "===a[b+e];)e+=1;return e}let o=/^ {0,3}>[ \t]?/;function p(a,b,c){let d=0,e=b.start;for(;d<c;){let c=o.exec(a.slice(e,b.end));if(!c)break;e+=c[0].length,d+=1}return{depth:d,contentStart:e}}let q=null;function r(a){let b=a.filter(a=>a.end>a.start).sort((a,b)=>a.start-b.start),c=[];for(let a of b){let b=c[c.length-1];b&&a.start<=b.end?b.end=Math.max(b.end,a.end):c.push({...a})}return c}function s(a,b){let c=a.map(a=>({...a}));for(let a of b)c=c.flatMap(b=>{if(a.end<=b.start||a.start>=b.end)return[b];let c=[];return a.start>b.start&&c.push({start:b.start,end:a.start}),a.end<b.end&&c.push({start:a.end,end:b.end}),c});return c}function t(a,b,c){return a.map(a=>({start:Math.max(a.start,b),end:Math.min(a.end,c)})).filter(a=>a.end>a.start)}function u(a,b,c){return b.flatMap(b=>(function(a,b){let c=[];if(!b)return c;let d=0;for(;;){let e=a.indexOf(b,d);if(-1===e)return c;c.push(e),d=e+1}})(a.slice(b.start,b.end),c).filter(a=>b.start+a+c.length<=b.end).map(a=>b.start+a))}let v=(a,b)=>a.some(a=>b>=a.start&&b<a.end),w="data-search-section";var x=c(46332);let y=/&(?:#([0-9]{1,7})|#[xX]([0-9a-fA-F]{1,6})|([A-Za-z][A-Za-z0-9]{0,31}));/y,z=a=>/\s/.test(a),A=new Map;function B(a,b){var c;y.lastIndex=b;let d=y.exec(a);if(!d)return null;let e=b+d[0].length,f=void 0!==d[3]?function(a){let b=A.get(a);if(void 0!==b)return b;let c=null;if("undefined"!=typeof DOMParser){let b=new DOMParser().parseFromString(`<b>${a}</b>`,"text/html").body.textContent??"";c=b!==a&&""!==b?b:null}return A.set(a,c),c}(d[0]):(c=Number.parseInt(d[1]??d[2],void 0!==d[1]?10:16))<9||11===c||c>13&&c<32||c>126&&c<160||c>55295&&c<57344||c>64975&&c<65008||(65535&c)==65535||(65535&c)==65534||c>1114111?"�":String.fromCodePoint(c);return null===f?null:{end:e,drawn:f}}let C="data-search-raw";function D(a){if(a.length%2!=0)return null;let b=[];for(let c=0;c<a.length;c+=2){let d=Number.parseInt(a[c],10),e=Number.parseInt(a[c+1],10);if(!Number.isInteger(d)||!Number.isInteger(e)||e<d)return null;b.push({start:d,end:e})}return b}function E(a,b,c,d=c[0]?.start??0){if(1===c.length&&b.slice(d,d+a.length)===a)return Array.from({length:a.length},(a,b)=>d+b);let e=c[c.length-1]?.end??d,f=a=>c.findIndex(b=>a>=b.start&&a<b.end),g=(a,d,e,f=0)=>{for(let g=f;g<c.length;g++){if(c[g].end<=d)continue;if(c[g].start>=e)break;let f=b.indexOf(a,Math.max(d,c[g].start));if(-1!==f&&f<Math.min(c[g].end,e))return{idx:f,span:g}}return null},h=Array(a.length).fill(-1),i=d,j=0,k=[],l=d,m=(c,d,e)=>{for(let g=b.indexOf("&",c);-1!==g&&g<d;g=b.indexOf("&",g+1)){if(-1===f(g))continue;let c=B(b,g);if(c&&/^\s+$/.test(c.drawn)&&!(e+c.drawn.length>k.length)&&k.slice(e,e+c.drawn.length).map(b=>a[b]).join("")===c.drawn)return{idx:g,end:c.end,units:c.drawn.length}}return null},n=b=>{let c=l;for(let d=0;d<k.length;d++){let e=k[d],f=g(a[e],c,b),i=m(c,f?f.idx:b,d);if(i){for(let a=0;a<i.units;a++)h[k[d+a]]=i.idx;d+=i.units-1,c=i.end}else f&&(h[e]=f.idx,c=f.idx+1)}k=[]};for(let c=0;c<a.length;c++){let d,e=a[c];if(z(e)){0===k.length&&(l=i),k.push(c);continue}let m=i,o=null;for(;m<b.length&&-1!==f(m);){if(z(b[m])){m+=1;continue}let d="&"===b[m]?B(b,m):null;if(!d||a.startsWith(b.slice(m,d.end),c))break;if(/^\s+$/.test(d.drawn)){m=d.end;continue}a.startsWith(d.drawn,c)&&(o={start:m,end:d.end,length:d.drawn.length});break}let p=1;if(o)j=f(d=o.start),i=o.end,p=o.length;else{let a=g(e,Math.max(i,m),1/0,j);if(!a)return null;d=a.idx,j=a.span,i=d+1}n(d);for(let a=0;a<p;a++)h[c+a]=d;c+=p-1}return n(e),h}let F=/^[ \t>]*(`{3,}|~{3,})/,G=a=>"number"==typeof a?.offset?a.offset:null;function H(a,b,c,d){if(void 0===d){let d=c(a),e=c(b);return null!==d&&null!==e&&e>=d?[{start:d,end:e}]:null}let e=[],f=a;for(let g=d.indexOf("\n",a);;g=d.indexOf("\n",g+1)){let a=-1===g||g>=b,d=c(f),h=c(a?b:g);if(null===d!=(null===h))return null;if(null!==d&&null!==h){let b=h+ +!a;if(b<d)return null;let c=e[e.length-1];c&&c.end===d?c.end=b:e.push({start:d,end:b})}if(a)return e.length>0?e:null;f=g+1}}function I(a){let b=a?.toRaw===void 0?x.Wo:a.toRaw;return(c,d)=>{let e=a?.source??("string"==typeof d?.value?d.value:void 0);b&&function a(b,c,d){if("root"===b.type||"element"===b.type){if("element"===b.type){let a=G(b.position?.start),e=G(b.position?.end),f=null===a||null===e?null:H(a,e,c,d);if(f){let a=[f.map(a=>`${a.start},${a.end}`).join(",")];for(let e of b.children)"text"===e.type&&a.push(...function(a,b,c){let d=a.value.length,e=G(a.position?.start),f=G(a.position?.end),g=null===e||null===f?null:H(e,f,b,c);if(!g)return[`,,${d}`];if(1===g.length||void 0===c||null===e||null===f)return[`${g[0].start},${g[0].end},${d}`];let h=[];for(let a=c.indexOf("\n",e);-1!==a&&a<f;a=c.indexOf("\n",a+1))h.push(a);let i=a.value.split("\n");if(i.length!==h.length+1){let[a,...b]=g;return[[`${a.start},${a.end},${d}`,...b.map(a=>`${a.start},${a.end}`)].join(",")]}return i.map((a,d)=>{let g=d===i.length-1,j=a.length+ +!g,k=H(0===d?e:h[d-1]+1,g?f:h[d],b,c);return k?`${k[0].start},${k[0].end+ +!g},${j}`:`,,${j}`})}(e,c,d));b.properties={...b.properties,dataSearchRaw:a.join(";")}}}for(let e of b.children)a(e,c,d)}}(c,b,e)}}function J(a){let b=a[C];return"string"==typeof b?{[C]:b}:{}}let K={highlightName:"terminal-search",currentHighlightName:"terminal-search-current",fallbackOverlayId:"terminal-search-fallback-overlay",fallbackOverlayBgColor:"rgba(255, 165, 0, 0.6)"},L={highlightName:"history-search",currentHighlightName:"history-search-current",fallbackOverlayId:"history-search-fallback-overlay",fallbackOverlayBgColor:"rgba(59, 130, 246, 0.6)"};function M(a){return{highlightName:`history-search-${a}`,currentHighlightName:`history-search-current-${a}`,fallbackOverlayId:`history-search-fallback-overlay-${a}`,fallbackOverlayBgColor:L.fallbackOverlayBgColor}}function N(){return"undefined"!=typeof CSS&&null!==CSS&&"highlights"in CSS}let O=new Map;function P(a){O.delete(a.highlightName),N()&&(CSS.highlights.delete(a.highlightName),CSS.highlights.delete(a.currentHighlightName)),document.getElementById(a.fallbackOverlayId)?.remove()}function Q(a,b,c,h,o){if(0===b.length){let b=O.get(h.highlightName);return(b?.delete(a),b&&S(b),b&&0!==b.size)?(R(h,b),void T(a,h)):void P(h)}let x=function(a){let b,c=[],e=0,f=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode:a=>a.nodeType===Node.TEXT_NODE?NodeFilter.FILTER_ACCEPT:a.hasAttribute(d)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP});for(;b=f.nextNode();){let a=b,d=a.nodeValue?.length??0;c.push({node:a,start:e,end:e+d}),e+=d}return c}(a),y=((o?.sourceText!==void 0?function(a,b,c,d,h){let o=()=>(function(a,b,c,d){if(!a.querySelector(`[${C}]`))return null;let e=new Map;for(let c of b){let b=c.node.parentElement?.closest(`[${C}]`);if(!b||!a.contains(b))continue;let d=e.get(b);d?d.push(c):e.set(b,[c])}let f=new Int32Array(c.length).fill(-1),g=new Int32Array(c.length).fill(-1);for(let[a,b]of e){let d=function(a){let[b,...c]=a.split(";"),d=D(b.split(","));if(!d||0===d.length)return null;let e=[];for(let a of c){let[b,c,d,...f]=a.split(","),g=Number.parseInt(d,10);if(!Number.isInteger(g)||g<0)return null;if(""===b||""===c){e.push({start:null,end:null,length:g,spans:[]});continue}let h=D([b,c,...f]);if(!h)return null;e.push({start:h[0].start,end:h[h.length-1].end,length:g,spans:h})}return{start:d[0].start,end:d[d.length-1].end,spans:d,segments:e}}(a.getAttribute(C)??"");if(!d)continue;let e=b.map(a=>a.node.nodeValue??"").join("");if(d.segments.reduce((a,b)=>a+b.length,0)!==e.length)continue;let h=[];for(let a of b)for(let b=a.start;b<a.end;b++)h.push(b);let i=d.start;if(F.exec(c.slice(d.start,d.end))){let a=c.indexOf("\n",d.start);i=-1===a?d.end:a+1}let j=0;for(let a of d.segments){let b=e.slice(j,j+a.length),k=null;null!==a.start&&null!==a.end?(k=E(b,c,a.spans))&&(i=Math.max(i,a.end)):""!==b.trim()&&(k=E(b,c,d.spans,i))&&k.length>0&&(i=k.reduce((a,b)=>Math.max(a,b+1),i)),k?.forEach((a,d)=>{if(a<0||a>=f.length||-1!==f[a]||(f[a]=h[j+d],g[a]=h[j+d]+1,"&"!==c[a]))return;let e=d;for(;k[e+1]===a;)e+=1;if(k[e+1]===a+1)return;let i=B(c,a);i&&i.drawn.length===e-d+1&&b.startsWith(i.drawn,d)&&-1===g[i.end-1]&&(g[i.end-1]=h[j+e]+1)}),j+=a.length}}return d.map(a=>{if(a.end<=a.start||a.end>f.length)return null;let b=f[a.start],c=g[a.end-1];return -1!==b&&-1!==c&&c>b?{start:b,end:c}:null})})(a,b,c,d),x=function(a,b,c,d,h){let o=Array.from(a.querySelectorAll(`[${e}]`));if(0===o.length)return null;let x=null,y=b.map(a=>a.node.nodeValue??"").join(""),z=new Set(h.map(a=>a.key)),A=b=>{let c=(b.nodeType===Node.TEXT_NODE?b.parentElement:b)?.closest(`[${w}]`),d=c&&a.contains(c)?c.getAttribute(w):null;return null!==d&&z.has(d)?d:""},B=new Map(h.map(a=>[a.key,r(a.ranges)])),C=r(h.flatMap(a=>a.ranges)),D=["",...z].map(a=>{let d=""===a?s([{start:0,end:c.length}],C):B.get(a),e=r(b.filter(b=>A(b.node)===a).map(({start:a,end:b})=>({start:a,end:b}))),h=[];for(let c of o){if(A(c)!==a)continue;let d=b.filter(a=>c.contains(a.node));if(0===d.length)continue;let e=d[0].start,f=d[d.length-1].end;h.push({domStart:e,domEnd:f,text:y.slice(e,f),element:c})}let u=function(a,b,c){if(0===c.length)return null;let d=[];for(let e of c){let c=Number.parseInt(e.element.getAttribute(f)??"",10),h=Number.parseInt(e.element.getAttribute(g)??"",10);if(!Number.isInteger(c)||!Number.isInteger(h)||!v(b,c))return null;let i=function(a,b,c,d){if(!(b>=0&&c<=a.length&&b<c))return null;let e=a.slice(b,c);if(!/^(?:`{3,}|~{3,})/.test(e))return null;let f=e.split("\n"),g=d.length>0?d.split("\n"):[],h=f.length-1;if(g.length>0&&h!==g.length&&h!==g.length+1)return null;let i=[],j=b+f[0].length+1,k=0;for(let a=0;a<g.length;a++){let b=f[a+1],c=g[a];if(!b.endsWith(c))return null;i.push({rawStart:j+b.length-c.length,length:c.length,bodyOffset:k}),k+=c.length+1,j+=b.length+1}let l=(a.slice(a.lastIndexOf("\n",b-1)+1,b).match(/>/g)??[]).length;return{fenceStart:b,bodyStart:i.length>0?b+f[0].length+1:b+f[0].length,bodyEnd:i.length>0?i[i.length-1].rawStart+i[i.length-1].length:b+f[0].length,fenceEnd:c,body:d,quoteDepth:l,lines:i}}(a,c,h,e.text),j=d[d.length-1];if(!i||j&&i.fenceStart<j.fenceEnd)return null;d.push(i)}return d}(c,d,h),w=u??(x??=function(a){let b=[],c=function(a){q??=(0,j.l)().use(i.A).use(k.eT);let b=new Set;for(let c of function a(b,c=[]){if("code"===b.type)"mermaid"===b.lang&&c.push(b);else if("children"in b)for(let d of b.children)a(d,c);return c}(q.parse(a))){let a=c.position?.start.offset;void 0!==a&&b.add(a)}return b}(a),d=[],e=0;for(;e<=a.length;){let b=a.indexOf("\n",e),c=-1===b?a.length:b;if(d.push({start:e,end:c}),-1===b)break;e=b+1}for(let e=0;e<d.length;e++){let{depth:f,contentStart:g}=p(a,d[e],1/0),h=m.exec(a.slice(g,d[e].end)),i=h?h[0].length:0,j=l.exec(a.slice(g+i,d[e].end));if(!j)continue;let k=g+i+j[1].length;if(!c.has(k))continue;let o=j[1].length,q=j[2],r=j[3].trim();if("`"===q[0]&&r.includes("`"))continue;let s=RegExp(`^ {0,3}${"`"===q[0]?"`":"~"}{${q.length},}[ \\t]*$`),t=[],u=e;for(let b=e+1;b<d.length;b++){let c=p(a,d[b],f);if(c.depth<f)break;let e=c.contentStart,g=d[b].end;if(i>0){let b=n(a,e,g,i);if(0!==a.slice(e,g).trim().length&&b<i)break;e+=b}if(u=b,s.test(a.slice(e,g)))break;e+=n(a,e,g,o),t.push({rawStart:e,length:g-e,bodyOffset:0})}if("mermaid"===r.split(/[ \t]/)[0]){let c=0;for(let a of t)a.bodyOffset=c,c+=a.length+1;let g=t.length>0?d[e+1].start:d[e].end,h=t.length>0?t[t.length-1].rawStart+t[t.length-1].length:g;b.push({fenceStart:d[e].start,bodyStart:g,bodyEnd:h,fenceEnd:d[u].end,body:t.map(b=>a.slice(b.rawStart,b.rawStart+b.length)).join("\n"),quoteDepth:f,lines:t})}e=u}return b}(c)).filter(a=>v(d,a.fenceStart)),z=[];if(u)u.forEach((a,b)=>z.push({fence:a,source:h[b]}));else if(w.length===h.length&&w.every((a,b)=>a.body===h[b].text))w.forEach((a,b)=>z.push({fence:a,source:h[b]}));else{let a=0;for(let b of h)for(let c=a;c<w.length;c++)if(w[c].body===b.text){z.push({fence:w[c],source:b}),a=c+1;break}}let D=r(w.map(a=>({start:a.fenceStart,end:a.fenceEnd}))),E=r(h.map(a=>({start:a.domStart,end:a.domEnd}))),F=[],G=0,H=0;for(let a of[...z.map(a=>({rawStart:a.fence.fenceStart,rawEnd:a.fence.fenceEnd,domStart:a.source.domStart,domEnd:a.source.domEnd})),{rawStart:1/0,rawEnd:0,domStart:1/0,domEnd:0}])F.push({raw:s(t(d,G,a.rawStart),D),dom:s(t(e,H,a.domStart),E),rawFrom:G,rawTo:a.rawStart}),G=a.rawEnd,H=a.domEnd;return{raw:d,fences:w,pairs:z,gaps:F}}),E=c.toLowerCase(),F=y.toLowerCase();return d.map(a=>{let b=a.end-a.start,c=D.find(b=>v(b.raw,a.start));if(!c)return null;let d=c.fences.find(b=>a.start>=b.fenceStart&&a.start<b.fenceEnd);if(d){let e=c.pairs.find(a=>a.fence===d);if(!e)return null;let f=d.lines.find(b=>a.start>=b.rawStart&&a.start<b.rawStart+b.length);if(!f)return null;let g=e.source.domStart+f.bodyOffset+(a.start-f.rawStart);return{start:g,end:Math.min(g+b,e.source.domEnd)}}let e=c.gaps.find(b=>a.start>=b.rawFrom&&a.start<b.rawTo);if(!e)return null;let f=E.slice(a.start,a.end),g=u(E,e.raw,f).indexOf(a.start),h=u(F,e.dom,f);return -1===g||g>=h.length?null:{start:h[g],end:h[g]+b}})}(a,b,c,d,h);if(!x)return o();let y=o();if(!y)return x;let z=Array.from(a.querySelectorAll(`[${e}]`)).flatMap(a=>{let c=b.filter(b=>a.contains(b.node));return c.length>0?[{start:c[0].start,end:c[c.length-1].end}]:[]}),A=a=>z.some(b=>a.start<b.end&&a.end>b.start);return x.map((a,b)=>{if(a&&A(a))return a;let c=y[b];return c&&!A(c)?c:null})}(a,x,o.sourceText,b,o.sections??[]):null)??b).map(a=>a?function(a,b,c){let d=document.createRange(),e=!1;for(let{node:f,start:g,end:h}of a)if(!e&&b<h&&b>=g&&(d.setStart(f,b-g),e=!0),e&&c<=h)return d.setEnd(f,c-g),d;return e?d:null}(x,a.start,a.end):null);y.forEach(b=>{b&&function(a,b){let c=a.startContainer,d=c.nodeType===Node.TEXT_NODE?c.parentElement:c,f=d?.closest("details");f instanceof HTMLDetailsElement&&!f.open&&b.contains(f)&&f.querySelector(`[${e}]`)&&(f.open=!0)}(b,a)});let z=y[c]??null,A=[];y.forEach((a,b)=>{b!==c&&a&&A.push(a)});let G=O.get(h.highlightName);if(G||(G=new Map,O.set(h.highlightName,G)),G.set(a,A),R(h,G,a),c>=0?function(a,b,c){let d=document.getElementById(c.fallbackOverlayId);if(d&&d.parentElement!==a&&(d.remove(),d=null),!b||"function"!=typeof b.getBoundingClientRect)return d?.remove();let e=b.getBoundingClientRect(),f=a.getBoundingClientRect();d?d.style.backgroundColor=c.fallbackOverlayBgColor:((d=document.createElement("div")).id=c.fallbackOverlayId,d.style.position="absolute",d.style.backgroundColor=c.fallbackOverlayBgColor,d.style.borderRadius="2px",d.style.pointerEvents="none",d.style.zIndex="5",a instanceof HTMLElement&&(a.style.position="relative"),a.appendChild(d)),d.style.top=`${e.top-f.top+a.scrollTop}px`,d.style.left=`${e.left-f.left+a.scrollLeft}px`,d.style.width=`${e.width}px`,d.style.height=`${e.height}px`}(a,z,h):T(a,h),z){let a=z.startContainer,b=a.nodeType===Node.TEXT_NODE?a.parentElement:a;b&&"function"==typeof b.scrollIntoView&&b.scrollIntoView({block:"center",behavior:"smooth"})}}function R(a,b,c){if(S(b,c),!N())return;let d=Array.from(b.values()).flat();CSS.highlights.set(a.highlightName,new Highlight(...d)),CSS.highlights.delete(a.currentHighlightName)}function S(a,b){for(let c of Array.from(a.keys()))c===b||c.isConnected||a.delete(c)}function T(a,b){let c=document.getElementById(b.fallbackOverlayId);c&&a.contains(c)&&c.remove()}function U(){P(K)}function V(a,b,c){Q(a,b,c,K)}function W(a=L){P(a)}function X(a,b,c,d=L,e){Q(a,b,c,d,e)}}};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2099],{14524:(e,t,a)=>{a.d(t,{Rb:()=>n,wn:()=>o,yv:()=>r});let r=["recommended","careful"],n="recommended";function o(e){return"recommended"===e||"careful"===e}},38218:(e,t,a)=>{a.d(t,{D:()=>o,a:()=>c});var r=a(12115);let n=r.useLayoutEffect,o=768;function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{breakpoint:t=o}=e,[a,c]=(0,r.useState)(!1);return n(()=>{let e=window.matchMedia("(max-width: ".concat(t-1,"px)"));c(e.matches);let a=e=>{c(e.matches)};return e.addEventListener("change",a),()=>{e.removeEventListener("change",a)}},[t]),a}},76351:(e,t,a)=>{a.d(t,{z9:()=>o,$s:()=>i,t6:()=>c,Ni:()=>s,$B:()=>m,dR:()=>d,S9:()=>l,P0:()=>u});var r=a(82912),n=a.n(r);a(95704);let o=[36e5,108e5,288e5],c=36e5,s={36e5:"autoYes.durations.1h",108e5:"autoYes.durations.3h",288e5:"autoYes.durations.8h"};function d(e){return"number"==typeof e&&o.includes(e)}let i=1e3;function l(e){return(null==e?void 0:e.enabled)!==!0&&(null==e?void 0:e.stopReason)==="server-restart"}function u(e){if(e.length>500)return{valid:!1,error:"Pattern must be ".concat(500," characters or less")};if(!n()(e))return{valid:!1,error:"Pattern may cause performance issues (catastrophic backtracking detected)"};try{return new RegExp(e),{valid:!0}}catch(e){return{valid:!1,error:"Invalid regular expression syntax"}}}function m(e){let t=Math.max(0,e-Date.now()),a=Math.floor(t/36e5),r=Math.floor(t%36e5/6e4),n=Math.floor(t%6e4/1e3);return a>0?"".concat(a,":").concat(r.toString().padStart(2,"0"),":").concat(n.toString().padStart(2,"0")):"".concat(r.toString().padStart(2,"0"),":").concat(n.toString().padStart(2,"0"))}},76471:(e,t,a)=>{a.d(t,{Ej:()=>l,Jd:()=>s,Mq:()=>i,rH:()=>d});var r=a(95155),n=a(12115),o=a(18955),c=a(48481);let s="bg-transparent border-2 border-muted-foreground",d="status.unknown";function i(e,t){return!0===t&&"ready"===e}let l=(0,n.memo)(function(e){let{status:t,label:a,waitingKind:n,unclassified:l}=e,u=(0,o.c)("common"),m=i(t,l);return(0,r.jsx)(c.m,{"data-testid":"status-indicator",status:t,label:m?null!=a?a:u(d):a,waitingKind:n,size:"sm",className:m?s:void 0,"data-unclassified":m?"true":void 0})})},86068:(e,t,a)=>{a.d(t,{o:()=>c});var r=a(95155);a(12115);var n=a(18955),o=a(14524);function c(e){let{value:t,onChange:a,idPrefix:c="auto-yes-answer-mode",labelClassName:s="font-medium mb-2"}=e,d=(0,n.c)("autoYes"),i="".concat(c,"-label");return(0,r.jsxs)("div",{className:"text-sm text-foreground",children:[(0,r.jsx)("p",{className:s,id:i,children:d("answerModeLabel")}),(0,r.jsx)("div",{className:"flex flex-col gap-2",role:"radiogroup","aria-labelledby":i,"data-testid":"".concat(c,"-options"),children:o.yv.map(e=>(0,r.jsxs)("button",{type:"button",role:"radio","aria-checked":t===e,onClick:()=>a(e),className:"w-full py-2 px-3 text-left rounded-md border-2 transition-colors ".concat(t===e?"border-accent-600 bg-accent-50 dark:bg-accent-900/30 text-accent-700 dark:text-accent-400":"border-border bg-surface dark:bg-surface-2 text-foreground hover:border-muted-foreground"),style:{minHeight:"44px"},"data-testid":"".concat(c,"-").concat(e),children:[(0,r.jsx)("span",{className:"block text-sm font-medium",children:d("answerModes.".concat(e))}),(0,r.jsx)("span",{className:"block text-xs text-muted-foreground",children:d("answerModeDescriptions.".concat(e))})]},e))}),(0,r.jsx)("p",{className:"mt-2 text-xs text-muted-foreground","data-testid":"".concat(c,"-permission-note"),children:d("answerModePermissionNote")})]})}}}]);