commandmate 0.47.2 → 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 (434) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +180 -180
  3. package/.next/app-path-routes-manifest.json +30 -30
  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/release-notes/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/update/route.js +3 -3
  12. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/capabilities/route.js +1 -1
  18. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/hooks/agent-event/route.js +2 -2
  27. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  28. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/hooks/claude-done/route.js +2 -2
  30. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  31. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  33. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  34. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/push/escalation/route.js +1 -1
  38. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/push/vapid/route.js +1 -1
  41. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -1
  43. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
  44. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/relays/route.js +1 -1
  46. package/.next/server/app/api/relays/route.js.nft.json +1 -1
  47. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  51. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  52. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/repositories/clone/route.js +1 -1
  54. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  55. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/repositories/restore/route.js +1 -1
  58. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  59. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/repositories/route.js +1 -1
  61. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  62. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/repositories/scan/route.js +1 -1
  64. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  65. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/repositories/sync/route.js +1 -1
  67. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  68. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  70. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  71. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  72. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  85. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  88. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  89. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  91. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  92. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  94. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  95. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  100. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  101. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
  103. package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
  104. package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  135. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  138. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  141. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
  151. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
  154. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  157. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js.nft.json +1 -1
  160. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  164. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  167. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  174. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -3
  176. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  177. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  188. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -103
  191. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  192. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  196. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  209. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  211. package/.next/server/app/api/worktrees/route.js +1 -1
  212. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  213. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  215. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  217. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  218. package/.next/server/app/page_client-reference-manifest.js +1 -1
  219. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  220. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  221. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  222. package/.next/server/app/sessions/page.js +1 -1
  223. package/.next/server/app/sessions/page.js.nft.json +1 -1
  224. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  225. package/.next/server/app/skills/[skillId]/page.js +1 -1
  226. package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -1
  227. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  228. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  229. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  230. package/.next/server/app/worktrees/[id]/files/[...path]/page.js +2 -2
  231. package/.next/server/app/worktrees/[id]/files/[...path]/page.js.nft.json +1 -1
  232. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  233. package/.next/server/app/worktrees/[id]/page.js +12 -12
  234. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  235. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  236. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  237. package/.next/server/app-paths-manifest.json +30 -30
  238. package/.next/server/chunks/1191.js +11 -4
  239. package/.next/server/chunks/1501.js +1 -1
  240. package/.next/server/chunks/1601.js +2 -2
  241. package/.next/server/chunks/1656.js +2 -2
  242. package/.next/server/chunks/1945.js +3 -3
  243. package/.next/server/chunks/1990.js +103 -0
  244. package/.next/server/chunks/2069.js +1 -0
  245. package/.next/server/chunks/2119.js +1 -1
  246. package/.next/server/chunks/2404.js +1 -1
  247. package/.next/server/chunks/2422.js +1 -1
  248. package/.next/server/chunks/2445.js +1 -1
  249. package/.next/server/chunks/2534.js +1 -1
  250. package/.next/server/chunks/255.js +1 -1
  251. package/.next/server/chunks/3241.js +1 -1
  252. package/.next/server/chunks/3505.js +2 -2
  253. package/.next/server/chunks/4243.js +1 -1
  254. package/.next/server/chunks/4248.js +1 -1
  255. package/.next/server/chunks/4280.js +1 -0
  256. package/.next/server/chunks/5209.js +1 -1
  257. package/.next/server/chunks/6119.js +1 -1
  258. package/.next/server/chunks/6130.js +1 -1
  259. package/.next/server/chunks/6401.js +1 -1
  260. package/.next/server/chunks/6486.js +9 -8
  261. package/.next/server/chunks/6781.js +1 -1
  262. package/.next/server/chunks/720.js +103 -0
  263. package/.next/server/chunks/7604.js +2 -0
  264. package/.next/server/chunks/7905.js +1 -1
  265. package/.next/server/chunks/8581.js +8 -8
  266. package/.next/server/chunks/8728.js +3 -3
  267. package/.next/server/chunks/8791.js +1 -1
  268. package/.next/server/chunks/8807.js +19 -18
  269. package/.next/server/chunks/8918.js +2 -104
  270. package/.next/server/chunks/936.js +1 -1
  271. package/.next/server/chunks/9390.js +1 -1
  272. package/.next/server/chunks/9540.js +1 -1
  273. package/.next/server/chunks/9627.js +5 -5
  274. package/.next/server/chunks/9731.js +2 -2
  275. package/.next/server/middleware-manifest.json +5 -5
  276. package/.next/server/pages/500.html +1 -1
  277. package/.next/server/server-reference-manifest.json +1 -1
  278. package/.next/static/chunks/1128-914c559913546bbc.js +1 -0
  279. package/.next/static/chunks/{2407-a6533805a86d05bd.js → 2407-ab92ae9837c39dce.js} +1 -1
  280. package/.next/static/chunks/{2863-6a07ec82fb52f4dd.js → 2863-7173dc305dffc4f6.js} +1 -1
  281. package/.next/static/chunks/6288-6fadbba6e84393b2.js +1 -0
  282. package/.next/static/chunks/7665-e9ef6e0a85b9fa49.js +1 -0
  283. package/.next/static/chunks/8407-35bbfc84793d7004.js +1 -0
  284. package/.next/static/chunks/9079-987939d231704218.js +1 -0
  285. package/.next/static/chunks/app/{layout-538d8d2746ad1588.js → layout-aa8e66164a4367af.js} +1 -1
  286. package/.next/static/chunks/app/sessions/page-cfd645305e25fd33.js +1 -0
  287. package/.next/static/chunks/app/skills/[skillId]/{page-52ba58712faf3378.js → page-cb6e74fd9a6a571d.js} +1 -1
  288. package/.next/static/chunks/app/worktrees/[id]/files/[...path]/page-704086656fb45699.js +1 -0
  289. package/.next/static/chunks/app/worktrees/[id]/page-a8d7886703ffc7b4.js +1 -0
  290. package/.next/static/css/{743f79ff19ab91e9.css → db8959555c3d9c96.css} +1 -1
  291. package/.next/trace +13 -13
  292. package/dist/cli/commands/auto-yes.d.ts +24 -0
  293. package/dist/cli/commands/auto-yes.d.ts.map +1 -1
  294. package/dist/cli/commands/auto-yes.js +76 -8
  295. package/dist/cli/commands/capture.d.ts.map +1 -1
  296. package/dist/cli/commands/capture.js +5 -0
  297. package/dist/cli/commands/instances.d.ts.map +1 -1
  298. package/dist/cli/commands/instances.js +10 -1
  299. package/dist/cli/commands/prompt.d.ts.map +1 -1
  300. package/dist/cli/commands/prompt.js +5 -3
  301. package/dist/cli/commands/send.d.ts.map +1 -1
  302. package/dist/cli/commands/send.js +19 -6
  303. package/dist/cli/commands/verify.d.ts.map +1 -1
  304. package/dist/cli/commands/verify.js +8 -1
  305. package/dist/cli/commands/wait.d.ts.map +1 -1
  306. package/dist/cli/commands/wait.js +101 -13
  307. package/dist/cli/config/duration-constants.d.ts +16 -13
  308. package/dist/cli/config/duration-constants.d.ts.map +1 -1
  309. package/dist/cli/config/duration-constants.js +21 -21
  310. package/dist/cli/docs/agent-operations.d.ts +2 -2
  311. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  312. package/dist/cli/docs/agent-operations.js +29 -1
  313. package/dist/cli/types/api-responses.d.ts +145 -3
  314. package/dist/cli/types/api-responses.d.ts.map +1 -1
  315. package/dist/cli/types/index.d.ts +4 -0
  316. package/dist/cli/types/index.d.ts.map +1 -1
  317. package/dist/cli/utils/resource-resolvers.d.ts +0 -18
  318. package/dist/cli/utils/resource-resolvers.d.ts.map +1 -1
  319. package/dist/cli/utils/resource-resolvers.js +1 -51
  320. package/dist/cli/utils/verify-runner.d.ts +24 -1
  321. package/dist/cli/utils/verify-runner.d.ts.map +1 -1
  322. package/dist/cli/utils/verify-runner.js +54 -1
  323. package/dist/config/auto-yes-duration.d.ts +56 -0
  324. package/dist/config/auto-yes-duration.d.ts.map +1 -0
  325. package/dist/config/auto-yes-duration.js +76 -0
  326. package/dist/lib/polling/auto-yes-suppression-reason.d.ts +54 -2
  327. package/dist/lib/polling/auto-yes-suppression-reason.d.ts.map +1 -1
  328. package/dist/lib/polling/auto-yes-suppression-reason.js +33 -2
  329. package/dist/lib/prompt-observation/types.d.ts +13 -0
  330. package/dist/lib/prompt-observation/types.d.ts.map +1 -1
  331. package/dist/server/locales/en/worktree.json +2 -1
  332. package/dist/server/locales/ja/worktree.json +2 -1
  333. package/dist/server/src/config/auto-yes-config.js +14 -19
  334. package/dist/server/src/config/auto-yes-duration.js +76 -0
  335. package/dist/server/src/lib/auto-yes-poller-answer-target.js +38 -0
  336. package/dist/server/src/lib/auto-yes-poller-keys.js +35 -0
  337. package/dist/server/src/lib/auto-yes-poller-session-presence.js +26 -0
  338. package/dist/server/src/lib/auto-yes-poller-tick.js +233 -0
  339. package/dist/server/src/lib/auto-yes-poller.js +337 -376
  340. package/dist/server/src/lib/auto-yes-state.js +59 -4
  341. package/dist/server/src/lib/cli-tools/submit-verified-sender.js +235 -19
  342. package/dist/server/src/lib/db/chat-db.js +5 -1
  343. package/dist/server/src/lib/db/verification-db.js +23 -2
  344. package/dist/server/src/lib/detection/composer-text.js +215 -11
  345. package/dist/server/src/lib/detection/option-recommendation.js +120 -0
  346. package/dist/server/src/lib/detection/prompt-detect-multiple-choice-approval-context.js +290 -0
  347. package/dist/server/src/lib/detection/prompt-detect-multiple-choice-chrome.js +193 -0
  348. package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +402 -539
  349. package/dist/server/src/lib/detection/prompt-detector.js +92 -21
  350. package/dist/server/src/lib/detection/prompt-screen-key.js +60 -0
  351. package/dist/server/src/lib/detection/tools/antigravity/dialog.js +158 -35
  352. package/dist/server/src/lib/detection/tools/claude/detect.js +111 -10
  353. package/dist/server/src/lib/detection/tools/command-code/dialog.js +67 -0
  354. package/dist/server/src/lib/detection/tools/dialog-block.js +16 -0
  355. package/dist/server/src/lib/detection/upstream-faults.js +19 -2
  356. package/dist/server/src/lib/detection/waiting-screen-reading.js +98 -0
  357. package/dist/server/src/lib/hooks/permission-decision-service.js +7 -0
  358. package/dist/server/src/lib/hooks/structured-decision-response.js +1 -1
  359. package/dist/server/src/lib/polling/auto-yes-confirm-page.js +2 -2
  360. package/dist/server/src/lib/polling/auto-yes-confirmation-ledger-types.js +3 -0
  361. package/dist/server/src/lib/polling/auto-yes-confirmation-ledger.js +34 -3
  362. package/dist/server/src/lib/polling/auto-yes-decision-state.js +195 -0
  363. package/dist/server/src/lib/polling/auto-yes-dialog-gate.js +139 -10
  364. package/dist/server/src/lib/polling/auto-yes-enter-fallback.js +14 -0
  365. package/dist/server/src/lib/polling/auto-yes-manual-answer.js +124 -0
  366. package/dist/server/src/lib/polling/auto-yes-option-effect.js +157 -0
  367. package/dist/server/src/lib/polling/auto-yes-policy.js +11 -5
  368. package/dist/server/src/lib/polling/auto-yes-poller-capture.js +15 -2
  369. package/dist/server/src/lib/polling/auto-yes-poller-generation.js +42 -1
  370. package/dist/server/src/lib/polling/auto-yes-poller-receipt-log.js +42 -5
  371. package/dist/server/src/lib/polling/auto-yes-poller-state.js +147 -49
  372. package/dist/server/src/lib/polling/auto-yes-poller-steps.js +172 -2
  373. package/dist/server/src/lib/polling/auto-yes-prompt-suppression.js +2 -2
  374. package/dist/server/src/lib/polling/auto-yes-question-choice.js +57 -0
  375. package/dist/server/src/lib/polling/auto-yes-resolver.js +96 -21
  376. package/dist/server/src/lib/polling/auto-yes-suppression-reason.js +33 -2
  377. package/dist/server/src/lib/polling/auto-yes-suppression-state.js +25 -1
  378. package/dist/server/src/lib/polling/prompt-screen-reading.js +232 -0
  379. package/dist/server/src/lib/polling/response-checker-dialog-gate.js +39 -0
  380. package/dist/server/src/lib/polling/response-checker.js +145 -58
  381. package/dist/server/src/lib/prompt-answer-sender.js +104 -10
  382. package/dist/server/src/lib/push/notification-dedup.js +15 -2
  383. package/dist/server/src/lib/push/prompt-card-state.js +140 -19
  384. package/dist/server/src/lib/push/prompt-push-gate.js +158 -12
  385. package/dist/server/src/lib/push/push-sender.js +23 -3
  386. package/dist/server/src/lib/push/resolution-push-notifier.js +14 -0
  387. package/dist/server/src/lib/push/waiting-push-notifier.js +139 -17
  388. package/dist/server/src/lib/realtime/terminal-broadcast.js +16 -0
  389. package/dist/server/src/lib/session/agent-event-state.js +25 -5
  390. package/dist/server/src/lib/session/agent-event-turn.js +140 -46
  391. package/dist/server/src/lib/session/cli-session.js +21 -2
  392. package/dist/server/src/lib/session/composer-clear.js +56 -4
  393. package/dist/server/src/lib/session/current-output-builder.js +66 -12
  394. package/dist/server/src/lib/session/send-attempt-state.js +24 -7
  395. package/dist/server/src/lib/session/waiting-episode-binding-observation.js +289 -0
  396. package/dist/server/src/lib/session/waiting-episode-binding-resolve.js +38 -0
  397. package/dist/server/src/lib/session/waiting-episode-binding.js +276 -0
  398. package/dist/server/src/lib/session/waiting-episode-state-ops.js +152 -0
  399. package/dist/server/src/lib/session/waiting-episode-state-store.js +202 -0
  400. package/dist/server/src/lib/session/waiting-episode-state-types.js +6 -0
  401. package/dist/server/src/lib/session/waiting-episode-state.js +68 -91
  402. package/dist/server/src/lib/session/waiting-episode-verdict.js +174 -0
  403. package/dist/server/src/lib/tmux/tmux-capture-cache.js +76 -11
  404. package/dist/server/src/lib/tmux/tmux.js +79 -9
  405. package/dist/server/src/lib/verification/gate-runner.js +172 -16
  406. package/dist/server/src/lib/verification/machine-lock.js +5 -0
  407. package/dist/server/src/lib/ws-server.js +18 -3
  408. package/dist/server/src/types/auto-yes-answer-mode.js +38 -0
  409. package/dist/server/src/types/auto-yes-decision.js +61 -0
  410. package/dist/server/src/types/auto-yes.js +6 -0
  411. package/dist/server/src/types/prompt-reading.js +32 -0
  412. package/dist/types/auto-yes-answer-mode.d.ts +35 -0
  413. package/dist/types/auto-yes-answer-mode.d.ts.map +1 -0
  414. package/dist/types/auto-yes-answer-mode.js +38 -0
  415. package/docs/en/user-guide/webapp-guide.md +47 -13
  416. package/package.json +1 -1
  417. package/public/sw.js +76 -4
  418. package/release-notes/0.48.0.json +57 -0
  419. package/release-notes/0.49.0.json +45 -0
  420. package/.next/server/chunks/1559.js +0 -2
  421. package/.next/server/chunks/2460.js +0 -1
  422. package/.next/server/chunks/5595.js +0 -1
  423. package/.next/server/chunks/610.js +0 -1
  424. package/.next/server/chunks/6722.js +0 -1
  425. package/.next/static/chunks/5371-a549a0d2c2044d41.js +0 -1
  426. package/.next/static/chunks/602-1c1488959215e140.js +0 -1
  427. package/.next/static/chunks/6288-09feba367cc2c65e.js +0 -1
  428. package/.next/static/chunks/8407-155f84e5ba05f1d5.js +0 -1
  429. package/.next/static/chunks/9079-24f9fa549ed298f1.js +0 -1
  430. package/.next/static/chunks/app/sessions/page-e02f1adb1d1c1ccc.js +0 -1
  431. package/.next/static/chunks/app/worktrees/[id]/files/[...path]/page-9cf1ecc59e36a004.js +0 -1
  432. package/.next/static/chunks/app/worktrees/[id]/page-46aced20b2b1c010.js +0 -1
  433. /package/.next/static/{etorRtpxbQqqOzdUeXdw2 → 3_JtAZaKMJEDFIIfkHv4n}/_buildManifest.js +0 -0
  434. /package/.next/static/{etorRtpxbQqqOzdUeXdw2 → 3_JtAZaKMJEDFIIfkHv4n}/_ssgManifest.js +0 -0
@@ -12,7 +12,9 @@
12
12
  * @module cli/utils/verify-runner
13
13
  */
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.MAX_PRINTED_LOG_TAIL_LINES = exports.GATE_NOTICE_LOG_PREFIX = exports.FLAKY_GATE_LABEL = exports.FLAKY_LOG_PREFIX = exports.MUTEX_LOG_PREFIX = exports.WORK_EVIDENCE_GATE_ID = exports.VERIFY_POLL_INTERVAL_MS = void 0;
15
+ exports.MAX_PRINTED_LOG_TAIL_LINES = exports.GATE_NOTICE_LOG_PREFIX = exports.FLAKY_GATE_LABEL = exports.FLAKY_LOG_PREFIX = exports.TIMING_LOG_PREFIX = exports.MUTEX_LOG_PREFIX = exports.WORK_EVIDENCE_GATE_ID = exports.VERIFY_POLL_INTERVAL_MS = void 0;
16
+ exports.parseTimingMarker = parseTimingMarker;
17
+ exports.formatGateTiming = formatGateTiming;
16
18
  exports.parseFlakyMarker = parseFlakyMarker;
17
19
  exports.parseGateNotices = parseGateNotices;
18
20
  exports.exitCodeForRunStatus = exitCodeForRunStatus;
@@ -41,6 +43,46 @@ exports.MUTEX_LOG_PREFIX = '[mutex]';
41
43
  * `waited=` cannot supply the number.
42
44
  */
43
45
  const MUTEX_WAITED_PATTERN = /^\[mutex\] [^\n]*?\bwaited=([0-9]+(?:\.[0-9]+)?s)/m;
46
+ /**
47
+ * Marker line carrying a gate's waits and its execution apart; mirrors
48
+ * TIMING_LOG_PREFIX in lib/verification/gate-runner.ts (Issue #3884 / #3909).
49
+ *
50
+ * Mirrored rather than imported for the same reason the mutex prefix is, and
51
+ * pinned to the runner's spelling (and to verification-db.ts parseGateTiming,
52
+ * which reads the same line for the history listing) by
53
+ * `tests/unit/cli/utils/verify-runner-timing-3909.test.ts`.
54
+ */
55
+ exports.TIMING_LOG_PREFIX = '[timing]';
56
+ /**
57
+ * The runner writes the marker as the LAST line of the log tail, so the match is
58
+ * anchored to the end: a gate whose own output prints a `[timing]` line earlier
59
+ * in the log cannot supply the numbers.
60
+ */
61
+ const TIMING_PATTERN = /(?:^|\n)\[timing\] queue=(\d+(?:\.\d+)?)s mutex=(\d+(?:\.\d+)?)s run=(\d+(?:\.\d+)?)s\s*$/;
62
+ /**
63
+ * Read a gate's `[timing]` marker back into seconds (Issue #3909).
64
+ *
65
+ * @returns null for a gate with neither a `mutex` nor a slot wait, and for runs
66
+ * recorded before the marker existed — those keep their old display.
67
+ */
68
+ function parseTimingMarker(logTail) {
69
+ const match = TIMING_PATTERN.exec(logTail ?? '');
70
+ if (!match)
71
+ return null;
72
+ return { queueSec: Number(match[1]), mutexSec: Number(match[2]), runSec: Number(match[3]) };
73
+ }
74
+ /**
75
+ * `queue=… mutex=… run=…` in one decimal second, the spelling the marker uses.
76
+ * Shared by the GATE line (`, ` between fields, like its other fields) and the
77
+ * history listing (` `, inside one gate's parentheses).
78
+ */
79
+ function formatGateTiming(timing, separator = ', ') {
80
+ return [
81
+ `queue=${timing.queueSec.toFixed(1)}s`,
82
+ `mutex=${timing.mutexSec.toFixed(1)}s`,
83
+ `run=${timing.runSec.toFixed(1)}s`,
84
+ ].join(separator);
85
+ }
44
86
  /**
45
87
  * Marker a retried gate writes into its log tail; mirrors FLAKY_LOG_PREFIX in
46
88
  * lib/verification/gate-runner.ts (Issue #1772).
@@ -205,6 +247,17 @@ function formatDetail(gate) {
205
247
  // the gate's command took, the wait is what the machine made it queue for.
206
248
  // Adding them would hide contention inside a number that timeout budgets and
207
249
  // "did this gate get slower" are read from.
250
+ //
251
+ // A gate with the `[timing]` marker (#3884) shows all three numbers instead
252
+ // of `waited=` (#3909): `mutex=` is the same lock wait summed over the
253
+ // gate's attempts, and `queue=` is the slot wait `waited=` never covered. A
254
+ // gate without the marker — no wait of either kind, or a server older than
255
+ // #3884 — keeps the line it always had.
256
+ const timing = parseTimingMarker(gate.logTail);
257
+ if (timing) {
258
+ parts.push(formatGateTiming(timing));
259
+ return parts.join(', ');
260
+ }
208
261
  const waited = MUTEX_WAITED_PATTERN.exec(gate.logTail ?? '');
209
262
  if (waited)
210
263
  parts.push(`waited=${waited[1]}`);
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Auto-Yes duration definitions (Issue #3913)
3
+ *
4
+ * The one definition of how long an Auto-Yes grant may last: any whole number
5
+ * of hours from 1 to 24. Server (route, state), browser (confirm dialog, new
6
+ * task) and CLI (`--duration`) all read it from here.
7
+ *
8
+ * Dependency-free on purpose: no `@/` alias and no safe-regex2, so the CLI
9
+ * build (tsconfig.cli.json sets `"paths": {}`) can re-export it through a
10
+ * relative path (`src/cli/config/duration-constants.ts`) instead of keeping a
11
+ * copy. `scripts/orchestrate/launch-worker.mjs` cannot import TypeScript and
12
+ * copies only {@link AUTO_YES_DURATION_FLAG_PATTERN}; a unit test keeps the
13
+ * copy equal to this one.
14
+ */
15
+ /** Milliseconds per hour */
16
+ export declare const AUTO_YES_MS_PER_HOUR = 3600000;
17
+ /** Shortest grant, in hours */
18
+ export declare const MIN_AUTO_YES_HOURS = 1;
19
+ /** Longest grant, in hours (agreed upper bound, 2026-10-25) */
20
+ export declare const MAX_AUTO_YES_HOURS = 24;
21
+ /**
22
+ * Every allowed duration in milliseconds: 1h, 2h, ..., 24h.
23
+ *
24
+ * Written out as literals so {@link AutoYesDuration} stays a literal union —
25
+ * a `number` would let NaN, Infinity and fractions through the type.
26
+ */
27
+ export declare const AUTO_YES_DURATIONS: readonly [3600000, 7200000, 10800000, 14400000, 18000000, 21600000, 25200000, 28800000, 32400000, 36000000, 39600000, 43200000, 46800000, 50400000, 54000000, 57600000, 61200000, 64800000, 68400000, 72000000, 75600000, 79200000, 82800000, 86400000];
28
+ /** Auto-Yes duration type (literal union of the 24 values in AUTO_YES_DURATIONS) */
29
+ export type AutoYesDuration = typeof AUTO_YES_DURATIONS[number];
30
+ /** The often-used durations offered as one-tap choices (1h / 3h / 8h) */
31
+ export declare const PRESET_AUTO_YES_DURATIONS: readonly [3600000, 10800000, 28800000];
32
+ /** Default Auto-Yes duration (1 hour = 3600000ms) */
33
+ export declare const DEFAULT_AUTO_YES_DURATION: AutoYesDuration;
34
+ /**
35
+ * Type guard: check whether a value is one of the 24 allowed durations.
36
+ * Rejects every non-number, NaN, ±Infinity, fractions of an hour and values
37
+ * outside 1〜24h.
38
+ */
39
+ export declare function isAllowedDuration(value: unknown): value is AutoYesDuration;
40
+ /** Whole hours of an allowed duration (e.g. 18000000 → 5) */
41
+ export declare function autoYesDurationToHours(duration: AutoYesDuration): number;
42
+ /** The duration for a whole number of hours, or null outside 1〜24 */
43
+ export declare function hoursToAutoYesDuration(hours: number): AutoYesDuration | null;
44
+ /**
45
+ * The CLI `--duration` format: `1h`〜`24h`, lower-case `h`, no leading zero,
46
+ * sign, whitespace, fraction or other unit.
47
+ */
48
+ export declare const AUTO_YES_DURATION_FLAG_PATTERN: RegExp;
49
+ /** How the CLI help and errors name the accepted range */
50
+ export declare const AUTO_YES_DURATION_FLAG_RANGE = "1h-24h, whole hours";
51
+ /**
52
+ * Parse a CLI `--duration` value (e.g. '5h') to milliseconds.
53
+ * @returns The duration, or null when the value is not `1h`〜`24h`
54
+ */
55
+ export declare function parseAutoYesDurationFlag(flag: string): AutoYesDuration | null;
56
+ //# sourceMappingURL=auto-yes-duration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-yes-duration.d.ts","sourceRoot":"","sources":["../../src/config/auto-yes-duration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,4BAA4B;AAC5B,eAAO,MAAM,oBAAoB,UAAY,CAAC;AAE9C,+BAA+B;AAC/B,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,yPAKrB,CAAC;AAEX,oFAAoF;AACpF,MAAM,MAAM,eAAe,GAAG,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAEhE,yEAAyE;AACzE,eAAO,MAAM,yBAAyB,wCAAoF,CAAC;AAE3H,qDAAqD;AACrD,eAAO,MAAM,yBAAyB,EAAE,eAA2B,CAAC;AAEpE;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAED,6DAA6D;AAC7D,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAExE;AAED,qEAAqE;AACrE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAG5E;AAED;;;GAGG;AACH,eAAO,MAAM,8BAA8B,QAA+B,CAAC;AAE3E,0DAA0D;AAC1D,eAAO,MAAM,4BAA4B,wBAAwB,CAAC;AAElE;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAG7E"}
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ /**
3
+ * Auto-Yes duration definitions (Issue #3913)
4
+ *
5
+ * The one definition of how long an Auto-Yes grant may last: any whole number
6
+ * of hours from 1 to 24. Server (route, state), browser (confirm dialog, new
7
+ * task) and CLI (`--duration`) all read it from here.
8
+ *
9
+ * Dependency-free on purpose: no `@/` alias and no safe-regex2, so the CLI
10
+ * build (tsconfig.cli.json sets `"paths": {}`) can re-export it through a
11
+ * relative path (`src/cli/config/duration-constants.ts`) instead of keeping a
12
+ * copy. `scripts/orchestrate/launch-worker.mjs` cannot import TypeScript and
13
+ * copies only {@link AUTO_YES_DURATION_FLAG_PATTERN}; a unit test keeps the
14
+ * copy equal to this one.
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.AUTO_YES_DURATION_FLAG_RANGE = exports.AUTO_YES_DURATION_FLAG_PATTERN = exports.DEFAULT_AUTO_YES_DURATION = exports.PRESET_AUTO_YES_DURATIONS = exports.AUTO_YES_DURATIONS = exports.MAX_AUTO_YES_HOURS = exports.MIN_AUTO_YES_HOURS = exports.AUTO_YES_MS_PER_HOUR = void 0;
18
+ exports.isAllowedDuration = isAllowedDuration;
19
+ exports.autoYesDurationToHours = autoYesDurationToHours;
20
+ exports.hoursToAutoYesDuration = hoursToAutoYesDuration;
21
+ exports.parseAutoYesDurationFlag = parseAutoYesDurationFlag;
22
+ /** Milliseconds per hour */
23
+ exports.AUTO_YES_MS_PER_HOUR = 3_600_000;
24
+ /** Shortest grant, in hours */
25
+ exports.MIN_AUTO_YES_HOURS = 1;
26
+ /** Longest grant, in hours (agreed upper bound, 2026-10-25) */
27
+ exports.MAX_AUTO_YES_HOURS = 24;
28
+ /**
29
+ * Every allowed duration in milliseconds: 1h, 2h, ..., 24h.
30
+ *
31
+ * Written out as literals so {@link AutoYesDuration} stays a literal union —
32
+ * a `number` would let NaN, Infinity and fractions through the type.
33
+ */
34
+ exports.AUTO_YES_DURATIONS = [
35
+ 3_600_000, 7_200_000, 10_800_000, 14_400_000, 18_000_000, 21_600_000,
36
+ 25_200_000, 28_800_000, 32_400_000, 36_000_000, 39_600_000, 43_200_000,
37
+ 46_800_000, 50_400_000, 54_000_000, 57_600_000, 61_200_000, 64_800_000,
38
+ 68_400_000, 72_000_000, 75_600_000, 79_200_000, 82_800_000, 86_400_000,
39
+ ];
40
+ /** The often-used durations offered as one-tap choices (1h / 3h / 8h) */
41
+ exports.PRESET_AUTO_YES_DURATIONS = [3_600_000, 10_800_000, 28_800_000];
42
+ /** Default Auto-Yes duration (1 hour = 3600000ms) */
43
+ exports.DEFAULT_AUTO_YES_DURATION = 3_600_000;
44
+ /**
45
+ * Type guard: check whether a value is one of the 24 allowed durations.
46
+ * Rejects every non-number, NaN, ±Infinity, fractions of an hour and values
47
+ * outside 1〜24h.
48
+ */
49
+ function isAllowedDuration(value) {
50
+ return typeof value === 'number' && exports.AUTO_YES_DURATIONS.includes(value);
51
+ }
52
+ /** Whole hours of an allowed duration (e.g. 18000000 → 5) */
53
+ function autoYesDurationToHours(duration) {
54
+ return duration / exports.AUTO_YES_MS_PER_HOUR;
55
+ }
56
+ /** The duration for a whole number of hours, or null outside 1〜24 */
57
+ function hoursToAutoYesDuration(hours) {
58
+ const ms = hours * exports.AUTO_YES_MS_PER_HOUR;
59
+ return isAllowedDuration(ms) ? ms : null;
60
+ }
61
+ /**
62
+ * The CLI `--duration` format: `1h`〜`24h`, lower-case `h`, no leading zero,
63
+ * sign, whitespace, fraction or other unit.
64
+ */
65
+ exports.AUTO_YES_DURATION_FLAG_PATTERN = /^(?:[1-9]|1[0-9]|2[0-4])h$/;
66
+ /** How the CLI help and errors name the accepted range */
67
+ exports.AUTO_YES_DURATION_FLAG_RANGE = '1h-24h, whole hours';
68
+ /**
69
+ * Parse a CLI `--duration` value (e.g. '5h') to milliseconds.
70
+ * @returns The duration, or null when the value is not `1h`〜`24h`
71
+ */
72
+ function parseAutoYesDurationFlag(flag) {
73
+ if (!exports.AUTO_YES_DURATION_FLAG_PATTERN.test(flag))
74
+ return null;
75
+ return hoursToAutoYesDuration(Number(flag.slice(0, -1)));
76
+ }
@@ -4,7 +4,11 @@
4
4
  * `deny-pattern-unusable` is the fail-closed case: a deny pattern that cannot be
5
5
  * evaluated (unsafe, unparseable, or over-long) suppresses instead of being
6
6
  * skipped. Ignoring it would silently drop the protection the contract author
7
- * asked for, which is the more dangerous of the two directions.
7
+ * asked for, which is the more dangerous of the two directions. Issue #3881:
8
+ * also when the patterns could only be run against part of the request — the
9
+ * approval target was cut at its line cap, or at the top of a capture that
10
+ * filled its window (`approvalTargetCompleteness`), and none matched the part
11
+ * that was read; that case carries no `pattern`.
8
12
  */
9
13
  export type AutoYesSuppressionReason = 'mode-off' | 'deny-pattern' | 'deny-pattern-unusable' | 'type-not-allowed'
10
14
  /**
@@ -69,6 +73,35 @@ export type AutoYesSuppressionReason = 'mode-off' | 'deny-pattern' | 'deny-patte
69
73
  * opposite of what happened.
70
74
  */
71
75
  | 'question-confirm-page'
76
+ /**
77
+ * Issue #3822: a question the tool asks the operator (an `AskUserQuestion`
78
+ * picker, OpenCode V2's question form) is on the pane. Auto-Yes answers
79
+ * permissions only; the question is the human's, so nothing is sent. Not a
80
+ * contract verdict — `allowPromptTypes` cannot bring it back. The confirm page
81
+ * that follows a question keeps its own reason, `question-confirm-page`.
82
+ */
83
+ | 'question-left-to-human'
84
+ /**
85
+ * Issue #3822: a permission dialog is on the pane, and no single row of it
86
+ * reads as "allow this call once" (`polling/auto-yes-option-effect`): every
87
+ * row saves a rule (`don't ask again`, `always allow`, `Persist to
88
+ * settings.json`), changes the permission mode, or denies — or two rows read
89
+ * as once. Auto-Yes answers the allow-once row only, by its number, so
90
+ * nothing is sent. Returned by the resolver (the base rules, not the
91
+ * contract), and re-evaluated on every tick.
92
+ */
93
+ | 'allow-once-unidentified'
94
+ /**
95
+ * Issue #3863: a question is on the pane, Auto-Yes's answer mode is
96
+ * `recommended` (answer questions with their recommended option), and which
97
+ * option that is could not be told: an option whose title the reader could
98
+ * not separate from its description, two or more options marked
99
+ * `(Recommended)` / `(推奨)` / `(推奨)`, a chosen option that takes typed
100
+ * text, or a multi-select question. Nothing is sent. Returned by the
101
+ * resolver (the base rules, not the contract), and re-evaluated on every
102
+ * tick.
103
+ */
104
+ | 'recommended-option-unidentified'
72
105
  /**
73
106
  * Issue #3767: agy's approval dialog is on the pane but Auto-Yes has no
74
107
  * unused `PreToolUse` question to match it to (none ever, it appeared after
@@ -82,7 +115,9 @@ export type AutoYesSuppressionReason = 'mode-off' | 'deny-pattern' | 'deny-patte
82
115
  /**
83
116
  * Issue #3796: the reasons `resolveAutoAnswerWithPolicy` returns — the contract's
84
117
  * verdict on the prompt as it is NOW, which a later tick re-evaluates, as
85
- * opposed to a reason that remembers an event (`partial-answer`).
118
+ * opposed to a reason that remembers an event (`partial-answer`). Issue #3822
119
+ * adds the base rules' one withholding, `allow-once-unidentified`, for the same
120
+ * reason.
86
121
  */
87
122
  export declare const CONTRACT_SUPPRESSION_REASONS: ReadonlySet<AutoYesSuppressionReason>;
88
123
  /** Issue #3822: the reason recorded when the contract lookup failed. */
@@ -93,6 +128,23 @@ export declare const PARTIAL_ANSWER_SUPPRESSION_REASON = "partial-answer";
93
128
  export declare const STARTUP_TRUST_UNHANDLED_SUPPRESSION_REASON = "startup-trust-unhandled";
94
129
  /** Issue #3748: the reason the poller records over an `AskUserQuestion` confirm page. */
95
130
  export declare const QUESTION_CONFIRM_PAGE_SUPPRESSION_REASON = "question-confirm-page";
131
+ /** Issue #3822: the reason the poller records over a question the tool asks the operator. */
132
+ export declare const QUESTION_LEFT_TO_HUMAN_SUPPRESSION_REASON = "question-left-to-human";
133
+ /**
134
+ * Issue #3822: the reasons `resolveAutoAnswerWithPolicy` returns from its base
135
+ * rules, before the contract is read. Every other reason it returns is the
136
+ * contract's verdict ({@link CONTRACT_SUPPRESSION_REASONS} holds both kinds:
137
+ * both are verdicts on the prompt as it is now). A reader that tells the
138
+ * operator what stopped the answer — the prompt observation, agy's withheld
139
+ * log line — must not send them to the contract for one of these.
140
+ */
141
+ export declare const BASE_RULE_SUPPRESSION_REASONS: ReadonlySet<AutoYesSuppressionReason>;
142
+ /** Whether `reason` is the base rules' withholding rather than the contract's (Issue #3822). */
143
+ export declare function isBaseRuleSuppressionReason(reason: AutoYesSuppressionReason | string): boolean;
144
+ /** Issue #3822: the reason the resolver returns over a permission dialog with no single allow-once row. */
145
+ export declare const ALLOW_ONCE_UNIDENTIFIED_SUPPRESSION_REASON = "allow-once-unidentified";
146
+ /** Issue #3863: the reason the resolver returns over a question whose recommended option could not be told. */
147
+ export declare const RECOMMENDED_OPTION_UNIDENTIFIED_SUPPRESSION_REASON = "recommended-option-unidentified";
96
148
  /** Issue #3767: the reason the poller records over an agy dialog with no matching hook receipt. */
97
149
  export declare const NO_HOOK_RECEIPT_SUPPRESSION_REASON = "no-hook-receipt";
98
150
  //# sourceMappingURL=auto-yes-suppression-reason.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auto-yes-suppression-reason.d.ts","sourceRoot":"","sources":["../../../src/lib/polling/auto-yes-suppression-reason.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,wBAAwB,GAChC,UAAU,GACV,cAAc,GACd,uBAAuB,GACvB,kBAAkB;AACpB;;;;;;;GAOG;GACD,sBAAsB;AACxB;;;;;;GAMG;GACD,qBAAqB;AACvB;;;;;;;;;;;;;GAaG;GACD,oBAAoB;AACtB;;;;;;;;GAQG;GACD,gBAAgB;AAClB;;;;;;;;GAQG;GACD,yBAAyB;AAC3B;;;;;;;;GAQG;GACD,uBAAuB;AACzB;;;;;;;;GAQG;GACD,iBAAiB,CAAC;AAEtB;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,WAAW,CAAC,wBAAwB,CAM7E,CAAC;AAEH,wEAAwE;AACxE,eAAO,MAAM,uCAAuC,yBAA4D,CAAC;AAEjH,iFAAiF;AACjF,eAAO,MAAM,iCAAiC,mBAAsD,CAAC;AAErG,qFAAqF;AACrF,eAAO,MAAM,0CAA0C,4BAA+D,CAAC;AAEvH,yFAAyF;AACzF,eAAO,MAAM,wCAAwC,0BAA6D,CAAC;AAEnH,mGAAmG;AACnG,eAAO,MAAM,kCAAkC,oBAAuD,CAAC"}
1
+ {"version":3,"file":"auto-yes-suppression-reason.d.ts","sourceRoot":"","sources":["../../../src/lib/polling/auto-yes-suppression-reason.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,wBAAwB,GAChC,UAAU,GACV,cAAc,GACd,uBAAuB,GACvB,kBAAkB;AACpB;;;;;;;GAOG;GACD,sBAAsB;AACxB;;;;;;GAMG;GACD,qBAAqB;AACvB;;;;;;;;;;;;;GAaG;GACD,oBAAoB;AACtB;;;;;;;;GAQG;GACD,gBAAgB;AAClB;;;;;;;;GAQG;GACD,yBAAyB;AAC3B;;;;;;;;GAQG;GACD,uBAAuB;AACzB;;;;;;GAMG;GACD,wBAAwB;AAC1B;;;;;;;;GAQG;GACD,yBAAyB;AAC3B;;;;;;;;;GASG;GACD,iCAAiC;AACnC;;;;;;;;GAQG;GACD,iBAAiB,CAAC;AAEtB;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,EAAE,WAAW,CAAC,wBAAwB,CAW7E,CAAC;AAEH,wEAAwE;AACxE,eAAO,MAAM,uCAAuC,yBAA4D,CAAC;AAEjH,iFAAiF;AACjF,eAAO,MAAM,iCAAiC,mBAAsD,CAAC;AAErG,qFAAqF;AACrF,eAAO,MAAM,0CAA0C,4BAA+D,CAAC;AAEvH,yFAAyF;AACzF,eAAO,MAAM,wCAAwC,0BAA6D,CAAC;AAEnH,6FAA6F;AAC7F,eAAO,MAAM,yCAAyC,2BAA8D,CAAC;AAErH;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,EAAE,WAAW,CAAC,wBAAwB,CAI9E,CAAC;AAEH,gGAAgG;AAChG,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,wBAAwB,GAAG,MAAM,GAAG,OAAO,CAE9F;AAED,2GAA2G;AAC3G,eAAO,MAAM,0CAA0C,4BAA+D,CAAC;AAEvH,+GAA+G;AAC/G,eAAO,MAAM,kDAAkD,oCACO,CAAC;AAEvE,mGAAmG;AACnG,eAAO,MAAM,kCAAkC,oBAAuD,CAAC"}
@@ -1,10 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NO_HOOK_RECEIPT_SUPPRESSION_REASON = exports.QUESTION_CONFIRM_PAGE_SUPPRESSION_REASON = exports.STARTUP_TRUST_UNHANDLED_SUPPRESSION_REASON = exports.PARTIAL_ANSWER_SUPPRESSION_REASON = exports.POLICY_LOOKUP_FAILED_SUPPRESSION_REASON = exports.CONTRACT_SUPPRESSION_REASONS = void 0;
3
+ exports.NO_HOOK_RECEIPT_SUPPRESSION_REASON = exports.RECOMMENDED_OPTION_UNIDENTIFIED_SUPPRESSION_REASON = exports.ALLOW_ONCE_UNIDENTIFIED_SUPPRESSION_REASON = exports.BASE_RULE_SUPPRESSION_REASONS = exports.QUESTION_LEFT_TO_HUMAN_SUPPRESSION_REASON = exports.QUESTION_CONFIRM_PAGE_SUPPRESSION_REASON = exports.STARTUP_TRUST_UNHANDLED_SUPPRESSION_REASON = exports.PARTIAL_ANSWER_SUPPRESSION_REASON = exports.POLICY_LOOKUP_FAILED_SUPPRESSION_REASON = exports.CONTRACT_SUPPRESSION_REASONS = void 0;
4
+ exports.isBaseRuleSuppressionReason = isBaseRuleSuppressionReason;
4
5
  /**
5
6
  * Issue #3796: the reasons `resolveAutoAnswerWithPolicy` returns — the contract's
6
7
  * verdict on the prompt as it is NOW, which a later tick re-evaluates, as
7
- * opposed to a reason that remembers an event (`partial-answer`).
8
+ * opposed to a reason that remembers an event (`partial-answer`). Issue #3822
9
+ * adds the base rules' one withholding, `allow-once-unidentified`, for the same
10
+ * reason.
8
11
  */
9
12
  exports.CONTRACT_SUPPRESSION_REASONS = new Set([
10
13
  'mode-off',
@@ -12,6 +15,11 @@ exports.CONTRACT_SUPPRESSION_REASONS = new Set([
12
15
  'deny-pattern-unusable',
13
16
  'type-not-allowed',
14
17
  'policy-lookup-failed',
18
+ // Issue #3822: not the contract's, but the same kind of verdict — on the
19
+ // prompt as it is now, from `resolveAutoAnswerWithPolicy`, re-evaluated later.
20
+ 'allow-once-unidentified',
21
+ // Issue #3863: likewise, over a question under the `recommended` answer mode.
22
+ 'recommended-option-unidentified',
15
23
  ]);
16
24
  /** Issue #3822: the reason recorded when the contract lookup failed. */
17
25
  exports.POLICY_LOOKUP_FAILED_SUPPRESSION_REASON = 'policy-lookup-failed';
@@ -21,5 +29,28 @@ exports.PARTIAL_ANSWER_SUPPRESSION_REASON = 'partial-answer';
21
29
  exports.STARTUP_TRUST_UNHANDLED_SUPPRESSION_REASON = 'startup-trust-unhandled';
22
30
  /** Issue #3748: the reason the poller records over an `AskUserQuestion` confirm page. */
23
31
  exports.QUESTION_CONFIRM_PAGE_SUPPRESSION_REASON = 'question-confirm-page';
32
+ /** Issue #3822: the reason the poller records over a question the tool asks the operator. */
33
+ exports.QUESTION_LEFT_TO_HUMAN_SUPPRESSION_REASON = 'question-left-to-human';
34
+ /**
35
+ * Issue #3822: the reasons `resolveAutoAnswerWithPolicy` returns from its base
36
+ * rules, before the contract is read. Every other reason it returns is the
37
+ * contract's verdict ({@link CONTRACT_SUPPRESSION_REASONS} holds both kinds:
38
+ * both are verdicts on the prompt as it is now). A reader that tells the
39
+ * operator what stopped the answer — the prompt observation, agy's withheld
40
+ * log line — must not send them to the contract for one of these.
41
+ */
42
+ exports.BASE_RULE_SUPPRESSION_REASONS = new Set([
43
+ 'allow-once-unidentified',
44
+ // Issue #3863: a question whose recommended option could not be told.
45
+ 'recommended-option-unidentified',
46
+ ]);
47
+ /** Whether `reason` is the base rules' withholding rather than the contract's (Issue #3822). */
48
+ function isBaseRuleSuppressionReason(reason) {
49
+ return exports.BASE_RULE_SUPPRESSION_REASONS.has(reason);
50
+ }
51
+ /** Issue #3822: the reason the resolver returns over a permission dialog with no single allow-once row. */
52
+ exports.ALLOW_ONCE_UNIDENTIFIED_SUPPRESSION_REASON = 'allow-once-unidentified';
53
+ /** Issue #3863: the reason the resolver returns over a question whose recommended option could not be told. */
54
+ exports.RECOMMENDED_OPTION_UNIDENTIFIED_SUPPRESSION_REASON = 'recommended-option-unidentified';
24
55
  /** Issue #3767: the reason the poller records over an agy dialog with no matching hook receipt. */
25
56
  exports.NO_HOOK_RECEIPT_SUPPRESSION_REASON = 'no-hook-receipt';
@@ -117,12 +117,25 @@ export interface PromptObservationPollerRecord {
117
117
  * and not "Auto-Yes will answer": the poller has gates of its own (the
118
118
  * tool-specific dialog reader, launch dialogs, partial answers) that this does
119
119
  * not run. `policy-permits` says only that the contract would not stop it.
120
+ *
121
+ * Issue #3822: `base-withholds` is the base rules stopping the answer before the
122
+ * contract is read (`allow-once-unidentified`: a permission dialog with no
123
+ * single "allow this call once" row). It is not the contract's verdict and is
124
+ * reported the same with or without a contract. Issue #3863 adds the question
125
+ * a question reader read, as the poller's base rules treat it under the answer
126
+ * mode in effect: `question-left-to-human` under `careful`, and
127
+ * `recommended-option-unidentified` under `recommended` when the recommended
128
+ * option cannot be told.
120
129
  */
121
130
  export type PromptObservationContractEvaluation = {
122
131
  state: 'policy-withholds';
123
132
  reason: AutoYesSuppressionReason;
124
133
  pattern?: string;
125
134
  contract: PromptObservationContract | null;
135
+ } | {
136
+ state: 'base-withholds';
137
+ reason: AutoYesSuppressionReason;
138
+ contract: PromptObservationContract | null;
126
139
  } | {
127
140
  state: 'policy-permits';
128
141
  contract: PromptObservationContract | null;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/prompt-observation/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM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;IAC3C,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,mFAAmF;IACnF,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACnD,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACrC,4FAA4F;IAC5F,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAC9D"}
@@ -421,7 +421,8 @@
421
421
  "claude-in-chrome": "Have Claude carry out a task in your browser through Claude in Chrome",
422
422
  "plugin-authoring": "Load the reference Claude uses to write a mod",
423
423
  "slides": "Make a new Claude Slides presentation from your brief",
424
- "daybreak": "Turn Daybreak on or off"
424
+ "daybreak": "Turn Daybreak on or off",
425
+ "presets": "Run or save reusable prompts and slash commands"
425
426
  }
426
427
  },
427
428
  "session": {
@@ -421,7 +421,8 @@
421
421
  "claude-in-chrome": "Claude in Chrome 経由でブラウザ上の作業を Claude に依頼",
422
422
  "plugin-authoring": "mod を書くときに Claude が使うリファレンスを読み込み",
423
423
  "slides": "指示から Claude Slides のプレゼンテーションを作成",
424
- "daybreak": "Daybreak のオン・オフを切り替え"
424
+ "daybreak": "Daybreak のオン・オフを切り替え",
425
+ "presets": "再利用できるプロンプトやスラッシュコマンドを実行・保存"
425
426
  }
426
427
  },
427
428
  "session": {
@@ -8,36 +8,31 @@
8
8
  *
9
9
  * Issue #225: Duration selection feature
10
10
  * Issue #314: Stop condition (regex) validation
11
+ * Issue #3913: Durations widened to 1〜24 hours (defined in auto-yes-duration.ts)
11
12
  */
12
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
13
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
14
15
  };
15
16
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.MAX_STOP_PATTERN_LENGTH = exports.AUTO_STOP_ERROR_THRESHOLD = exports.AUTO_YES_COUNTDOWN_INTERVAL_MS = exports.FULL_CAPTURE_LINES = exports.REDUCED_CAPTURE_LINES = exports.THINKING_POLLING_INTERVAL_MS = exports.DURATION_LABELS = exports.DEFAULT_AUTO_YES_DURATION = exports.ALLOWED_DURATIONS = void 0;
17
- exports.isAllowedDuration = isAllowedDuration;
17
+ exports.MAX_STOP_PATTERN_LENGTH = exports.AUTO_STOP_ERROR_THRESHOLD = exports.AUTO_YES_COUNTDOWN_INTERVAL_MS = exports.FULL_CAPTURE_LINES = exports.REDUCED_CAPTURE_LINES = exports.THINKING_POLLING_INTERVAL_MS = exports.hoursToAutoYesDuration = exports.autoYesDurationToHours = exports.isAllowedDuration = exports.MAX_AUTO_YES_HOURS = exports.MIN_AUTO_YES_HOURS = exports.DEFAULT_AUTO_YES_DURATION = exports.PRESET_AUTO_YES_DURATIONS = exports.AUTO_YES_DURATIONS = void 0;
18
18
  exports.isReleasedByRestart = isReleasedByRestart;
19
19
  exports.validateStopPattern = validateStopPattern;
20
20
  exports.executeRegexWithTimeout = executeRegexWithTimeout;
21
21
  exports.formatTimeRemaining = formatTimeRemaining;
22
22
  const safe_regex2_1 = __importDefault(require("safe-regex2"));
23
23
  const tmux_pane_config_1 = require("../config/tmux-pane-config");
24
- /** Allowed Auto-Yes durations in milliseconds */
25
- exports.ALLOWED_DURATIONS = [3600000, 10800000, 28800000];
26
- /** Default Auto-Yes duration (1 hour = 3600000ms) */
27
- exports.DEFAULT_AUTO_YES_DURATION = 3600000;
28
- /** i18n translation keys for each duration value */
29
- exports.DURATION_LABELS = {
30
- 3600000: 'autoYes.durations.1h',
31
- 10800000: 'autoYes.durations.3h',
32
- 28800000: 'autoYes.durations.8h',
33
- };
34
- /**
35
- * Type guard: check whether a value is a valid AutoYesDuration.
36
- * Replaces `as AutoYesDuration` casts with a runtime-safe check.
37
- */
38
- function isAllowedDuration(value) {
39
- return typeof value === 'number' && exports.ALLOWED_DURATIONS.includes(value);
40
- }
24
+ // Issue #3913: the duration definitions live in the dependency-free
25
+ // `auto-yes-duration.ts` so the CLI can re-export them; re-exported here so
26
+ // server and browser code keep importing from this module.
27
+ var auto_yes_duration_1 = require("./auto-yes-duration");
28
+ Object.defineProperty(exports, "AUTO_YES_DURATIONS", { enumerable: true, get: function () { return auto_yes_duration_1.AUTO_YES_DURATIONS; } });
29
+ Object.defineProperty(exports, "PRESET_AUTO_YES_DURATIONS", { enumerable: true, get: function () { return auto_yes_duration_1.PRESET_AUTO_YES_DURATIONS; } });
30
+ Object.defineProperty(exports, "DEFAULT_AUTO_YES_DURATION", { enumerable: true, get: function () { return auto_yes_duration_1.DEFAULT_AUTO_YES_DURATION; } });
31
+ Object.defineProperty(exports, "MIN_AUTO_YES_HOURS", { enumerable: true, get: function () { return auto_yes_duration_1.MIN_AUTO_YES_HOURS; } });
32
+ Object.defineProperty(exports, "MAX_AUTO_YES_HOURS", { enumerable: true, get: function () { return auto_yes_duration_1.MAX_AUTO_YES_HOURS; } });
33
+ Object.defineProperty(exports, "isAllowedDuration", { enumerable: true, get: function () { return auto_yes_duration_1.isAllowedDuration; } });
34
+ Object.defineProperty(exports, "autoYesDurationToHours", { enumerable: true, get: function () { return auto_yes_duration_1.autoYesDurationToHours; } });
35
+ Object.defineProperty(exports, "hoursToAutoYesDuration", { enumerable: true, get: function () { return auto_yes_duration_1.hoursToAutoYesDuration; } });
41
36
  // =============================================================================
42
37
  // Polling Interval Constants (Issue #499)
43
38
  // =============================================================================
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ /**
3
+ * Auto-Yes duration definitions (Issue #3913)
4
+ *
5
+ * The one definition of how long an Auto-Yes grant may last: any whole number
6
+ * of hours from 1 to 24. Server (route, state), browser (confirm dialog, new
7
+ * task) and CLI (`--duration`) all read it from here.
8
+ *
9
+ * Dependency-free on purpose: no `@/` alias and no safe-regex2, so the CLI
10
+ * build (tsconfig.cli.json sets `"paths": {}`) can re-export it through a
11
+ * relative path (`src/cli/config/duration-constants.ts`) instead of keeping a
12
+ * copy. `scripts/orchestrate/launch-worker.mjs` cannot import TypeScript and
13
+ * copies only {@link AUTO_YES_DURATION_FLAG_PATTERN}; a unit test keeps the
14
+ * copy equal to this one.
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.AUTO_YES_DURATION_FLAG_RANGE = exports.AUTO_YES_DURATION_FLAG_PATTERN = exports.DEFAULT_AUTO_YES_DURATION = exports.PRESET_AUTO_YES_DURATIONS = exports.AUTO_YES_DURATIONS = exports.MAX_AUTO_YES_HOURS = exports.MIN_AUTO_YES_HOURS = exports.AUTO_YES_MS_PER_HOUR = void 0;
18
+ exports.isAllowedDuration = isAllowedDuration;
19
+ exports.autoYesDurationToHours = autoYesDurationToHours;
20
+ exports.hoursToAutoYesDuration = hoursToAutoYesDuration;
21
+ exports.parseAutoYesDurationFlag = parseAutoYesDurationFlag;
22
+ /** Milliseconds per hour */
23
+ exports.AUTO_YES_MS_PER_HOUR = 3_600_000;
24
+ /** Shortest grant, in hours */
25
+ exports.MIN_AUTO_YES_HOURS = 1;
26
+ /** Longest grant, in hours (agreed upper bound, 2026-10-25) */
27
+ exports.MAX_AUTO_YES_HOURS = 24;
28
+ /**
29
+ * Every allowed duration in milliseconds: 1h, 2h, ..., 24h.
30
+ *
31
+ * Written out as literals so {@link AutoYesDuration} stays a literal union —
32
+ * a `number` would let NaN, Infinity and fractions through the type.
33
+ */
34
+ exports.AUTO_YES_DURATIONS = [
35
+ 3_600_000, 7_200_000, 10_800_000, 14_400_000, 18_000_000, 21_600_000,
36
+ 25_200_000, 28_800_000, 32_400_000, 36_000_000, 39_600_000, 43_200_000,
37
+ 46_800_000, 50_400_000, 54_000_000, 57_600_000, 61_200_000, 64_800_000,
38
+ 68_400_000, 72_000_000, 75_600_000, 79_200_000, 82_800_000, 86_400_000,
39
+ ];
40
+ /** The often-used durations offered as one-tap choices (1h / 3h / 8h) */
41
+ exports.PRESET_AUTO_YES_DURATIONS = [3_600_000, 10_800_000, 28_800_000];
42
+ /** Default Auto-Yes duration (1 hour = 3600000ms) */
43
+ exports.DEFAULT_AUTO_YES_DURATION = 3_600_000;
44
+ /**
45
+ * Type guard: check whether a value is one of the 24 allowed durations.
46
+ * Rejects every non-number, NaN, ±Infinity, fractions of an hour and values
47
+ * outside 1〜24h.
48
+ */
49
+ function isAllowedDuration(value) {
50
+ return typeof value === 'number' && exports.AUTO_YES_DURATIONS.includes(value);
51
+ }
52
+ /** Whole hours of an allowed duration (e.g. 18000000 → 5) */
53
+ function autoYesDurationToHours(duration) {
54
+ return duration / exports.AUTO_YES_MS_PER_HOUR;
55
+ }
56
+ /** The duration for a whole number of hours, or null outside 1〜24 */
57
+ function hoursToAutoYesDuration(hours) {
58
+ const ms = hours * exports.AUTO_YES_MS_PER_HOUR;
59
+ return isAllowedDuration(ms) ? ms : null;
60
+ }
61
+ /**
62
+ * The CLI `--duration` format: `1h`〜`24h`, lower-case `h`, no leading zero,
63
+ * sign, whitespace, fraction or other unit.
64
+ */
65
+ exports.AUTO_YES_DURATION_FLAG_PATTERN = /^(?:[1-9]|1[0-9]|2[0-4])h$/;
66
+ /** How the CLI help and errors name the accepted range */
67
+ exports.AUTO_YES_DURATION_FLAG_RANGE = '1h-24h, whole hours';
68
+ /**
69
+ * Parse a CLI `--duration` value (e.g. '5h') to milliseconds.
70
+ * @returns The duration, or null when the value is not `1h`〜`24h`
71
+ */
72
+ function parseAutoYesDurationFlag(flag) {
73
+ if (!exports.AUTO_YES_DURATION_FLAG_PATTERN.test(flag))
74
+ return null;
75
+ return hoursToAutoYesDuration(Number(flag.slice(0, -1)));
76
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * Auto-Yes poller: the wait an answer goes to, and what a tick fixed for its
4
+ * waiting-episode observations (Issue #3798) (Issue #3893: split out of
5
+ * `auto-yes-poller.ts`).
6
+ *
7
+ * Does not import `auto-yes-poller.ts` (no cycle).
8
+ *
9
+ * @module lib/auto-yes-poller-answer-target
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.fixAnswerTarget = fixAnswerTarget;
13
+ exports.answerTargetHolds = answerTargetHolds;
14
+ const waiting_episode_state_1 = require("./session/waiting-episode-state");
15
+ function fixAnswerTarget(worktreeId, cliToolId, instanceId) {
16
+ return {
17
+ episodeId: (0, waiting_episode_state_1.getWaitingEpisodeRecord)(worktreeId, cliToolId, instanceId)?.episodeId ?? null,
18
+ version: (0, waiting_episode_state_1.getEpisodeVersion)(worktreeId, cliToolId, instanceId),
19
+ };
20
+ }
21
+ /**
22
+ * Whether the wait is still the one the answer was sent to: the same episode
23
+ * open, as it was when the send began (the version has not moved) or rebound
24
+ * since to a binding the answer may still be for — the hook of the turn the
25
+ * answer resumed may have landed during the send — but not to a `screen`: a
26
+ * survey or a picker another observer saw during the send is newer than the
27
+ * prompt these keys answered, and re-observing that prompt would turn the
28
+ * person's screen back into a wait Auto-Yes answered. When none was open,
29
+ * none opened or closed since.
30
+ */
31
+ function answerTargetHolds(target, worktreeId, cliToolId, instanceId) {
32
+ if (target.episodeId === null)
33
+ return (0, waiting_episode_state_1.getEpisodeVersion)(worktreeId, cliToolId, instanceId) === target.version;
34
+ const episode = (0, waiting_episode_state_1.getWaitingEpisodeRecord)(worktreeId, cliToolId, instanceId);
35
+ if (episode?.episodeId !== target.episodeId)
36
+ return false;
37
+ return (0, waiting_episode_state_1.getEpisodeVersion)(worktreeId, cliToolId, instanceId) === target.version || episode.binding.kind !== 'screen';
38
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /**
3
+ * Auto-Yes poller: which composite keys have a poller entry (Issue #525)
4
+ * (Issue #3893: split out of `auto-yes-poller.ts`, which re-exports these).
5
+ *
6
+ * Reads `autoYesPollerStates`, owned by `polling/auto-yes-poller-generation`.
7
+ * Does not import `auto-yes-poller.ts` (no cycle).
8
+ *
9
+ * @module lib/auto-yes-poller-keys
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.getAutoYesPollerCompositeKeys = getAutoYesPollerCompositeKeys;
13
+ exports.isAnyPollerActiveForWorktree = isAnyPollerActiveForWorktree;
14
+ const auto_yes_state_1 = require("./auto-yes-state");
15
+ const auto_yes_poller_generation_1 = require("./polling/auto-yes-poller-generation");
16
+ /**
17
+ * Get all composite keys that have active auto-yes poller entries.
18
+ *
19
+ * Issue #525: Returns composite keys (worktreeId:cliToolId).
20
+ *
21
+ * @returns Array of composite keys present in the autoYesPollerStates Map
22
+ */
23
+ function getAutoYesPollerCompositeKeys() {
24
+ return Array.from(auto_yes_poller_generation_1.autoYesPollerStates.keys());
25
+ }
26
+ /**
27
+ * Check if any auto-yes poller is active for a given worktreeId.
28
+ * Uses shared filterCompositeKeysByWorktree (DRY).
29
+ *
30
+ * @param worktreeId - Worktree identifier
31
+ * @returns true if any poller is active for this worktree
32
+ */
33
+ function isAnyPollerActiveForWorktree(worktreeId) {
34
+ return (0, auto_yes_state_1.filterCompositeKeysByWorktree)(Array.from(auto_yes_poller_generation_1.autoYesPollerStates.keys()), worktreeId).length > 0;
35
+ }