commandmate 0.44.2 → 0.44.3

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 (581) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +149 -149
  3. package/.next/app-path-routes-manifest.json +21 -21
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +12 -12
  6. package/.next/react-loadable-manifest.json +0 -6
  7. package/.next/required-server-files.json +1 -1
  8. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/agents/update/route.js +1 -1
  10. package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/agents/versions/route.js +1 -1
  12. package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/app/release-notes/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/app/update/route.js +2 -2
  15. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/auth/login/route.js +1 -1
  18. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/capabilities/route.js +1 -1
  22. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/daily-summary/route.js +1 -1
  24. package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
  25. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/daily-summary/status/route.js +1 -1
  27. package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
  28. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/external-apps/[id]/route.js +1 -1
  31. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/external-apps/route.js +1 -1
  33. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/hooks/agent-event/route.js +2 -2
  37. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  38. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/hooks/claude-done/route.js +2 -2
  40. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  41. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  43. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  44. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/push/escalation/route.js +1 -1
  48. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/push/subscriptions/route.js +2 -2
  50. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/push/vapid/route.js +1 -1
  52. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/relays/[relayId]/cancel/route.js +1 -1
  54. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
  55. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/relays/route.js +1 -1
  57. package/.next/server/app/api/relays/route.js.nft.json +1 -1
  58. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/repositories/[id]/route.js +1 -1
  61. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  63. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  64. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/repositories/clone/route.js +1 -1
  66. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  67. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/repositories/restore/route.js +1 -1
  70. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  71. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  72. package/.next/server/app/api/repositories/route.js +1 -1
  73. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  74. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/repositories/scan/route.js +1 -1
  76. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  77. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/repositories/sync/route.js +1 -1
  79. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  80. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  83. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  84. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  85. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/sidebar/group-order/route.js +1 -1
  87. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/skills/[id]/route.js +1 -1
  89. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/skills/route.js +1 -1
  94. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/templates/[id]/route.js +2 -2
  99. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/templates/route.js +2 -2
  101. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  106. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  109. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  112. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +3 -3
  117. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js.nft.json +1 -1
  118. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  121. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
  124. package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +2 -2
  128. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js.nft.json +1 -1
  129. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/instances/notes/route.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  173. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  176. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  179. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
  193. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
  196. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  199. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  203. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  206. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +2 -2
  208. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js.nft.json +1 -1
  209. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +2 -2
  211. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
  212. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/schedules/route.js +3 -3
  214. package/.next/server/app/api/worktrees/[id]/schedules/route.js.nft.json +1 -1
  215. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  218. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  219. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +2 -2
  221. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  222. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  224. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js +1 -1
  225. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  226. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  227. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  228. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  229. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js +1 -1
  230. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  231. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  232. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  233. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  234. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  235. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  236. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  237. package/.next/server/app/api/worktrees/[id]/tasks/route.js +1 -1
  238. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  239. package/.next/server/app/api/worktrees/[id]/terminal/route.js +2 -2
  240. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  241. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  242. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  243. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  244. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  245. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  246. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  247. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  248. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  249. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  250. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  251. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  252. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  253. package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
  254. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  255. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  256. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  257. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  258. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  259. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  260. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  261. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  262. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  263. package/.next/server/app/api/worktrees/route.js +1 -1
  264. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  265. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  266. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  267. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  268. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  269. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  270. package/.next/server/app/page_client-reference-manifest.js +1 -1
  271. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  272. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  273. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  274. package/.next/server/app/sessions/page.js +1 -1
  275. package/.next/server/app/sessions/page.js.nft.json +1 -1
  276. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  277. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  278. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  279. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  280. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  281. package/.next/server/app/worktrees/[id]/page.js +11 -11
  282. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  283. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  284. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  285. package/.next/server/app-paths-manifest.json +21 -21
  286. package/.next/server/chunks/1191.js +2 -2
  287. package/.next/server/chunks/1210.js +1 -1
  288. package/.next/server/chunks/1559.js +2 -0
  289. package/.next/server/chunks/1789.js +1 -0
  290. package/.next/server/chunks/2119.js +1 -1
  291. package/.next/server/chunks/2404.js +1 -1
  292. package/.next/server/chunks/2445.js +1 -1
  293. package/.next/server/chunks/2460.js +1 -1
  294. package/.next/server/chunks/2710.js +1 -1
  295. package/.next/server/chunks/2908.js +1 -1
  296. package/.next/server/chunks/2980.js +1 -1
  297. package/.next/server/chunks/3241.js +1 -1
  298. package/.next/server/chunks/3480.js +1 -1
  299. package/.next/server/chunks/3718.js +1 -1
  300. package/.next/server/chunks/4207.js +2 -2
  301. package/.next/server/chunks/450.js +1 -1
  302. package/.next/server/chunks/4672.js +5 -0
  303. package/.next/server/chunks/{9353.js → 4718.js} +2 -2
  304. package/.next/server/chunks/4837.js +14 -0
  305. package/.next/server/chunks/5048.js +1 -1
  306. package/.next/server/chunks/5209.js +1 -0
  307. package/.next/server/chunks/5595.js +1 -1
  308. package/.next/server/chunks/5625.js +25 -0
  309. package/.next/server/chunks/611.js +1 -1
  310. package/.next/server/chunks/6130.js +1 -1
  311. package/.next/server/chunks/6401.js +1 -1
  312. package/.next/server/chunks/6781.js +1 -1
  313. package/.next/server/chunks/6793.js +3 -3
  314. package/.next/server/chunks/7491.js +2 -2
  315. package/.next/server/chunks/7905.js +1 -1
  316. package/.next/server/chunks/850.js +1 -1
  317. package/.next/server/chunks/8728.js +3 -3
  318. package/.next/server/chunks/8791.js +1 -1
  319. package/.next/server/chunks/8800.js +1 -1
  320. package/.next/server/chunks/8918.js +7 -7
  321. package/.next/server/chunks/9130.js +1 -1
  322. package/.next/server/chunks/9390.js +2 -2
  323. package/.next/server/chunks/9584.js +1 -1
  324. package/.next/server/chunks/9627.js +6 -6
  325. package/.next/server/chunks/9731.js +3 -3
  326. package/.next/server/middleware-manifest.json +5 -5
  327. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  328. package/.next/server/pages/500.html +1 -1
  329. package/.next/server/server-reference-manifest.json +1 -1
  330. package/.next/static/chunks/{1642-fb2e176aaadbd137.js → 1642-767aed8e7c61ef7f.js} +1 -1
  331. package/.next/static/chunks/{2407-051f6f84226a9f2c.js → 2407-06d35bb1aa02de80.js} +1 -1
  332. package/.next/static/chunks/{2619-04bc32f026a0d946.js → 2619-a305ad4810f1393a.js} +1 -1
  333. package/.next/static/chunks/4727-5d695d71e3fdf97b.js +1 -0
  334. package/.next/static/chunks/{8165-3853772f6ae1299b.js → 8165-3525fb42f1b4976e.js} +1 -1
  335. package/.next/static/chunks/app/{layout-9da1ab602bcb3051.js → layout-0d1750b833f5cc3e.js} +1 -1
  336. package/.next/static/chunks/app/sessions/page-2af68c63211c751f.js +1 -0
  337. package/.next/static/chunks/app/worktrees/[id]/page-e36898c3a80e7302.js +1 -0
  338. package/.next/static/chunks/app/worktrees/[id]/terminal/{page-373ea37b16d930c7.js → page-c601f3b3ece6557e.js} +1 -1
  339. package/.next/static/css/057f64a65726c439.css +1 -0
  340. package/.next/trace +13 -13
  341. package/dist/cli/commands/ask.d.ts.map +1 -1
  342. package/dist/cli/commands/ask.js +120 -119
  343. package/dist/cli/commands/attach.d.ts +94 -0
  344. package/dist/cli/commands/attach.d.ts.map +1 -1
  345. package/dist/cli/commands/attach.js +145 -7
  346. package/dist/cli/commands/auto-yes.js +1 -1
  347. package/dist/cli/commands/capture.d.ts.map +1 -1
  348. package/dist/cli/commands/capture.js +3 -5
  349. package/dist/cli/commands/command-target.d.ts +23 -0
  350. package/dist/cli/commands/command-target.d.ts.map +1 -0
  351. package/dist/cli/commands/command-target.js +25 -0
  352. package/dist/cli/commands/instances.d.ts.map +1 -1
  353. package/dist/cli/commands/instances.js +41 -2
  354. package/dist/cli/commands/message-dispatch.d.ts +36 -0
  355. package/dist/cli/commands/message-dispatch.d.ts.map +1 -0
  356. package/dist/cli/commands/message-dispatch.js +63 -0
  357. package/dist/cli/commands/reply.d.ts.map +1 -1
  358. package/dist/cli/commands/reply.js +2 -5
  359. package/dist/cli/commands/respond.d.ts.map +1 -1
  360. package/dist/cli/commands/respond.js +3 -6
  361. package/dist/cli/commands/send.d.ts.map +1 -1
  362. package/dist/cli/commands/send.js +149 -146
  363. package/dist/cli/commands/wait.d.ts.map +1 -1
  364. package/dist/cli/commands/wait.js +589 -431
  365. package/dist/cli/types/api-responses.d.ts +159 -27
  366. package/dist/cli/types/api-responses.d.ts.map +1 -1
  367. package/dist/cli/types/api-responses.js +4 -2
  368. package/dist/cli/utils/api-client.d.ts +25 -5
  369. package/dist/cli/utils/api-client.d.ts.map +1 -1
  370. package/dist/cli/utils/api-client.js +87 -55
  371. package/dist/cli/utils/server-url.d.ts +1 -0
  372. package/dist/cli/utils/server-url.d.ts.map +1 -1
  373. package/dist/cli/utils/server-url.js +7 -0
  374. package/dist/config/uat-isolation.d.ts +140 -0
  375. package/dist/config/uat-isolation.d.ts.map +1 -0
  376. package/dist/config/uat-isolation.js +246 -0
  377. package/dist/lib/global-state.d.ts +12 -0
  378. package/dist/lib/global-state.d.ts.map +1 -0
  379. package/dist/lib/global-state.js +16 -0
  380. package/dist/lib/polling/auto-yes-suppression-reason.d.ts +33 -0
  381. package/dist/lib/polling/auto-yes-suppression-reason.d.ts.map +1 -0
  382. package/dist/lib/polling/auto-yes-suppression-reason.js +2 -0
  383. package/dist/lib/session/prompt-view.d.ts +26 -3
  384. package/dist/lib/session/prompt-view.d.ts.map +1 -1
  385. package/dist/lib/session/prompt-view.js +26 -3
  386. package/dist/lib/session/status-evidence-type.d.ts +16 -0
  387. package/dist/lib/session/status-evidence-type.d.ts.map +1 -0
  388. package/dist/lib/session/status-evidence-type.js +2 -0
  389. package/dist/lib/tmux/legacy-session-alias.d.ts.map +1 -1
  390. package/dist/lib/tmux/legacy-session-alias.js +2 -1
  391. package/dist/server/locales/en/worktree.json +3 -1
  392. package/dist/server/locales/ja/worktree.json +3 -1
  393. package/dist/server/src/cli/types/api-responses.js +4 -2
  394. package/dist/server/src/config/cli-tool-timing-config.js +1 -6
  395. package/dist/server/src/config/uat-isolation.js +246 -0
  396. package/dist/server/src/lib/assistant-response-saver.js +62 -3
  397. package/dist/server/src/lib/auto-yes-lifecycle.js +6 -0
  398. package/dist/server/src/lib/auto-yes-poller.js +450 -160
  399. package/dist/server/src/lib/auto-yes-state.js +2 -2
  400. package/dist/server/src/lib/cli-tools/antigravity.js +38 -79
  401. package/dist/server/src/lib/cli-tools/base.js +151 -0
  402. package/dist/server/src/lib/cli-tools/codex.js +44 -80
  403. package/dist/server/src/lib/cli-tools/command-code.js +24 -56
  404. package/dist/server/src/lib/cli-tools/copilot.js +25 -67
  405. package/dist/server/src/lib/cli-tools/direct-input.js +8 -0
  406. package/dist/server/src/lib/cli-tools/gemini.js +23 -73
  407. package/dist/server/src/lib/cli-tools/opencode-pane-width.js +53 -0
  408. package/dist/server/src/lib/cli-tools/opencode-v2.js +9 -7
  409. package/dist/server/src/lib/cli-tools/opencode.js +21 -85
  410. package/dist/server/src/lib/cli-tools/submit-verified-sender.js +127 -4
  411. package/dist/server/src/lib/cli-tools/vibe-local.js +21 -66
  412. package/dist/server/src/lib/detection/cli-patterns.js +374 -3065
  413. package/dist/server/src/lib/detection/idle-evidence-observation.js +2 -2
  414. package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +7 -32
  415. package/dist/server/src/lib/detection/prompt-detector.js +2 -35
  416. package/dist/server/src/lib/detection/selection-shape-patterns.js +69 -0
  417. package/dist/server/src/lib/detection/selection-shape.js +32 -520
  418. package/dist/server/src/lib/detection/shared/pasted-text.js +41 -0
  419. package/dist/server/src/lib/detection/shared/shell-pane-command.js +16 -0
  420. package/dist/server/src/lib/detection/shared/strip-box-drawing.js +25 -0
  421. package/dist/server/src/lib/detection/tools/antigravity/detect.js +5 -29
  422. package/dist/server/src/lib/detection/tools/antigravity/dialog.js +2 -15
  423. package/dist/server/src/lib/detection/tools/antigravity/patterns.js +286 -0
  424. package/dist/server/src/lib/detection/tools/claude/detect.js +3 -14
  425. package/dist/server/src/lib/detection/tools/claude/patterns.js +264 -4
  426. package/dist/server/src/lib/detection/tools/claude/prompt.js +2 -10
  427. package/dist/server/src/lib/detection/tools/codex/detect.js +46 -85
  428. package/dist/server/src/lib/detection/tools/codex/live-region.js +33 -2
  429. package/dist/server/src/lib/detection/tools/codex/patterns.js +855 -0
  430. package/dist/server/src/lib/detection/tools/codex/prompt.js +2 -10
  431. package/dist/server/src/lib/detection/tools/command-code/detect.js +8 -50
  432. package/dist/server/src/lib/detection/tools/command-code/dialog.js +2 -18
  433. package/dist/server/src/lib/detection/tools/command-code/patterns.js +234 -0
  434. package/dist/server/src/lib/detection/tools/command-code/selection-shape.js +461 -0
  435. package/dist/server/src/lib/detection/tools/context-above.js +20 -0
  436. package/dist/server/src/lib/detection/tools/copilot/detect.js +10 -35
  437. package/dist/server/src/lib/detection/tools/copilot/patterns.js +640 -0
  438. package/dist/server/src/lib/detection/tools/copilot/prompt.js +2 -10
  439. package/dist/server/src/lib/detection/tools/gemini/patterns.js +29 -0
  440. package/dist/server/src/lib/detection/tools/live-region-specs.js +1 -1
  441. package/dist/server/src/lib/detection/tools/opencode/detect.js +8 -49
  442. package/dist/server/src/lib/detection/tools/opencode/patterns.js +508 -0
  443. package/dist/server/src/lib/detection/tools/opencode-v2/detect.js +7 -42
  444. package/dist/server/src/lib/detection/tools/opencode-v2/patterns.js +63 -0
  445. package/dist/server/src/lib/detection/tools/run-detection.js +6 -47
  446. package/dist/server/src/lib/detection/tools/verdicts.js +59 -0
  447. package/dist/server/src/lib/detection/tools/vibe-local/patterns.js +20 -0
  448. package/dist/server/src/lib/detection/truncate-raw-content.js +38 -0
  449. package/dist/server/src/lib/detection/turn-abandoned.js +66 -0
  450. package/dist/server/src/lib/detection/unclassified-frame-tracker.js +2 -2
  451. package/dist/server/src/lib/global-state.js +16 -0
  452. package/dist/server/src/lib/hooks/agent-session-telemetry.js +4 -6
  453. package/dist/server/src/lib/hooks/permission-decision-state.js +2 -2
  454. package/dist/server/src/lib/hooks/sources/antigravity/history.js +11 -76
  455. package/dist/server/src/lib/hooks/sources/antigravity/hooks-config.js +63 -1
  456. package/dist/server/src/lib/hooks/sources/antigravity/source.js +16 -0
  457. package/dist/server/src/lib/hooks/sources/antigravity/transcript.js +3 -12
  458. package/dist/server/src/lib/hooks/sources/claude/history.js +17 -156
  459. package/dist/server/src/lib/hooks/sources/claude/queued-notice.js +53 -0
  460. package/dist/server/src/lib/hooks/sources/claude/source.js +33 -3
  461. package/dist/server/src/lib/hooks/sources/claude/transcript.js +3 -13
  462. package/dist/server/src/lib/hooks/sources/codex/history.js +11 -74
  463. package/dist/server/src/lib/hooks/sources/codex/hooks-config.js +147 -11
  464. package/dist/server/src/lib/hooks/sources/codex/relay-install.js +64 -21
  465. package/dist/server/src/lib/hooks/sources/codex/transcript.js +5 -15
  466. package/dist/server/src/lib/hooks/sources/command-code/history.js +20 -121
  467. package/dist/server/src/lib/hooks/sources/command-code/transcript.js +3 -13
  468. package/dist/server/src/lib/hooks/sources/copilot/hook-settings.js +161 -31
  469. package/dist/server/src/lib/hooks/sources/define-source.js +40 -55
  470. package/dist/server/src/lib/hooks/sources/event-mapper.js +2 -1
  471. package/dist/server/src/lib/hooks/sources/opencode/diff.js +3 -4
  472. package/dist/server/src/lib/hooks/sources/opencode/history.js +2 -1
  473. package/dist/server/src/lib/hooks/sources/opencode/launch-settings.js +2 -1
  474. package/dist/server/src/lib/hooks/sources/opencode/payloads.js +2 -1
  475. package/dist/server/src/lib/hooks/sources/opencode/ports.js +2 -1
  476. package/dist/server/src/lib/hooks/sources/opencode/subscription.js +4 -3
  477. package/dist/server/src/lib/hooks/sources/opencode/transcript.js +3 -16
  478. package/dist/server/src/lib/hooks/sources/opencode-v2/history.js +2 -1
  479. package/dist/server/src/lib/hooks/sources/opencode-v2/mappers.js +5 -4
  480. package/dist/server/src/lib/hooks/sources/opencode-v2/ports.js +2 -1
  481. package/dist/server/src/lib/hooks/sources/opencode-v2/subscription.js +3 -7
  482. package/dist/server/src/lib/hooks/sources/opencode-v2/usage.js +2 -1
  483. package/dist/server/src/lib/hooks/sources/pending-decisions.js +2 -1
  484. package/dist/server/src/lib/hooks/sources/registry.js +3 -2
  485. package/dist/server/src/lib/hooks/sources/transcript-history.js +262 -0
  486. package/dist/server/src/lib/hooks/sources/turn-body.js +31 -0
  487. package/dist/server/src/lib/hooks/tool-input-normalization-state.js +2 -2
  488. package/dist/server/src/lib/polling/antigravity-permission-receipts.js +2 -2
  489. package/dist/server/src/lib/polling/auto-yes-enter-fallback-state.js +142 -0
  490. package/dist/server/src/lib/polling/auto-yes-enter-fallback.js +187 -0
  491. package/dist/server/src/lib/polling/auto-yes-resolver.js +9 -3
  492. package/dist/server/src/lib/polling/auto-yes-suppression-reason.js +2 -0
  493. package/dist/server/src/lib/polling/auto-yes-suppression-state.js +2 -2
  494. package/dist/server/src/lib/polling/pending-scraped-response.js +190 -0
  495. package/dist/server/src/lib/polling/prompt-dedup-state.js +2 -2
  496. package/dist/server/src/lib/polling/prompt-dedup.js +2 -2
  497. package/dist/server/src/lib/polling/response-checker-dialog-gate.js +95 -0
  498. package/dist/server/src/lib/polling/response-checker-extraction-result.js +50 -0
  499. package/dist/server/src/lib/polling/response-checker-extraction-steps.js +670 -0
  500. package/dist/server/src/lib/polling/response-checker.js +641 -1142
  501. package/dist/server/src/lib/polling/response-dedup.js +3 -4
  502. package/dist/server/src/lib/polling/response-poller-constants.js +17 -0
  503. package/dist/server/src/lib/polling/response-poller-core.js +54 -20
  504. package/dist/server/src/lib/polling/startup-screen.js +142 -0
  505. package/dist/server/src/lib/polling/structured-history-gate.js +3 -2
  506. package/dist/server/src/lib/prompt-answer-semantic.js +178 -0
  507. package/dist/server/src/lib/prompt-answer-sender.js +5 -4
  508. package/dist/server/src/lib/push/failure-episode-state.js +2 -2
  509. package/dist/server/src/lib/push/notification-dedup.js +3 -4
  510. package/dist/server/src/lib/push/prompt-card-state.js +2 -2
  511. package/dist/server/src/lib/push/waiting-push-notifier.js +3 -4
  512. package/dist/server/src/lib/realtime/publisher-registry.js +3 -2
  513. package/dist/server/src/lib/realtime/terminal-broadcast.js +38 -5
  514. package/dist/server/src/lib/realtime/terminal-session-ownership.js +45 -0
  515. package/dist/server/src/lib/relay/relay-delivery.js +3 -2
  516. package/dist/server/src/lib/relay/relay-readiness.js +38 -1
  517. package/dist/server/src/lib/response-cleaner.js +24 -1
  518. package/dist/server/src/lib/response-extractor.js +16 -0
  519. package/dist/server/src/lib/schedule-manager.js +8 -10
  520. package/dist/server/src/lib/session/agent-event-ask-user-question.js +168 -0
  521. package/dist/server/src/lib/session/agent-event-awaiting-instruction.js +104 -0
  522. package/dist/server/src/lib/session/agent-event-dedup.js +539 -0
  523. package/dist/server/src/lib/session/agent-event-model.js +562 -0
  524. package/dist/server/src/lib/session/agent-event-record.js +10 -0
  525. package/dist/server/src/lib/session/agent-event-state.js +106 -1854
  526. package/dist/server/src/lib/session/agent-event-structured-state.js +109 -0
  527. package/dist/server/src/lib/session/agent-event-turn.js +811 -0
  528. package/dist/server/src/lib/session/agent-session-lifecycle.js +11 -2
  529. package/dist/server/src/lib/session/chat-turn-progress.js +322 -0
  530. package/dist/server/src/lib/session/claude-executor.js +45 -5
  531. package/dist/server/src/lib/session/claude-session.js +21 -65
  532. package/dist/server/src/lib/session/cli-session.js +17 -0
  533. package/dist/server/src/lib/session/current-output-builder.js +450 -1103
  534. package/dist/server/src/lib/session/current-output-history-writers.js +255 -0
  535. package/dist/server/src/lib/session/current-output-types.js +9 -0
  536. package/dist/server/src/lib/session/detection-divergence.js +55 -0
  537. package/dist/server/src/lib/session/global-session-constants.js +2 -13
  538. package/dist/server/src/lib/session/hook-turn-hold.js +102 -0
  539. package/dist/server/src/lib/session/layer-disagreement.js +2 -2
  540. package/dist/server/src/lib/session/opencode-session-store.js +2 -1
  541. package/dist/server/src/lib/session/prompt-view.js +26 -3
  542. package/dist/server/src/lib/session/prompt-waiting-composition.js +3 -2
  543. package/dist/server/src/lib/session/provisional-turn.js +3 -1
  544. package/dist/server/src/lib/session/send-user-message.js +1 -1
  545. package/dist/server/src/lib/session/session-starting-state.js +4 -6
  546. package/dist/server/src/lib/session/status-evidence-type.js +2 -0
  547. package/dist/server/src/lib/session/status-evidence.js +2 -2
  548. package/dist/server/src/lib/session/structured-status-merge.js +335 -0
  549. package/dist/server/src/lib/session/waiting-episode-state.js +3 -4
  550. package/dist/server/src/lib/session-cleanup.js +1 -5
  551. package/dist/server/src/lib/skills/install-plan.js +2 -1
  552. package/dist/server/src/lib/skills/snapshot-store.js +2 -2
  553. package/dist/server/src/lib/skills/uninstall-plan.js +2 -2
  554. package/dist/server/src/lib/timer-manager.js +6 -8
  555. package/dist/server/src/lib/tmux/geometry-delegation.js +3 -4
  556. package/dist/server/src/lib/tmux/legacy-session-alias.js +2 -1
  557. package/dist/server/src/lib/tmux/session-hooks.js +2 -1
  558. package/dist/server/src/lib/tmux/session-status-options.js +3 -3
  559. package/dist/server/src/lib/tmux/tmux-capture-cache.js +3 -2
  560. package/dist/server/src/lib/tmux/tmux.js +33 -59
  561. package/dist/server/src/lib/tui-accumulator.js +2 -2
  562. package/dist/server/src/lib/version-checker.js +6 -6
  563. package/dist/server/src/lib/ws-server.js +47 -11
  564. package/docs/en/user-guide/webapp-guide.md +27 -3
  565. package/package.json +1 -1
  566. package/release-notes/0.44.3.json +82 -0
  567. package/scripts/hooks/cmate-agent-event.sh +18 -0
  568. package/.next/server/chunks/1068.js +0 -1
  569. package/.next/server/chunks/4372.js +0 -5
  570. package/.next/server/chunks/6474.js +0 -14
  571. package/.next/server/chunks/967.js +0 -1
  572. package/.next/server/chunks/9798.js +0 -2
  573. package/.next/server/chunks/9882.js +0 -25
  574. package/.next/static/chunks/591-539fec878c9dec5e.js +0 -1
  575. package/.next/static/chunks/app/sessions/page-049e06335187aa91.js +0 -1
  576. package/.next/static/chunks/app/worktrees/[id]/page-2a81397e60f17e63.js +0 -1
  577. package/.next/static/css/38070d879efa1371.css +0 -1
  578. package/dist/server/src/lib/cli-tools/index.js +0 -41
  579. package/dist/server/src/lib/polling/global-session-poller.js +0 -140
  580. /package/.next/static/{QlCqLjorauDDBXPa-C7TK → tWwHQzmvc-rv9KKUtDWfQ}/_buildManifest.js +0 -0
  581. /package/.next/static/{QlCqLjorauDDBXPa-C7TK → tWwHQzmvc-rv9KKUtDWfQ}/_ssgManifest.js +0 -0
@@ -0,0 +1,562 @@
1
+ "use strict";
2
+ /**
3
+ * Which model and effort an agent instance is on: the hook latch, the frame
4
+ * latch, the reported effort, their precedence, and the model-change edge.
5
+ *
6
+ * Split out of `agent-event-state` (Issue #3375), which re-exports the public
7
+ * names.
8
+ *
9
+ * @module lib/session/agent-event-model
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.AGENT_MODEL_EFFORT_SUFFIX_PATTERN = exports.modelBaseline = exports.reportedEffort = exports.capturedModelInfo = exports.lastAgentModelAt = exports.lastAgentModel = void 0;
13
+ exports.isSameAgentModelName = isSameAgentModelName;
14
+ exports.onAgentModelChange = onAgentModelChange;
15
+ exports.getAgentModelBaseline = getAgentModelBaseline;
16
+ exports.observeAgentModel = observeAgentModel;
17
+ exports.latchAgentModel = latchAgentModel;
18
+ exports.getLastKnownAgentModel = getLastKnownAgentModel;
19
+ exports.recordAgentReportedModel = recordAgentReportedModel;
20
+ exports.recordCapturedModelInfo = recordCapturedModelInfo;
21
+ exports.getLastCapturedModelInfo = getLastCapturedModelInfo;
22
+ exports.getResolvedAgentModelInfo = getResolvedAgentModelInfo;
23
+ exports.recordAgentReportedEffort = recordAgentReportedEffort;
24
+ exports.getLastReportedAgentEffort = getLastReportedAgentEffort;
25
+ exports.getLastKnownAgentEffort = getLastKnownAgentEffort;
26
+ const auto_yes_state_1 = require("../../lib/auto-yes-state");
27
+ const agent_event_types_1 = require("../../lib/hooks/agent-event-types");
28
+ // Issue #1784: the terminal-frame half of "which model / effort is this on".
29
+ const model_info_extractor_1 = require("../../lib/detection/model-info-extractor");
30
+ const agent_event_dedup_1 = require("../../lib/session/agent-event-dedup");
31
+ const global_state_1 = require("../global-state");
32
+ /**
33
+ * compositeKey -> the last non-null model this instance reported (Issue #1783).
34
+ *
35
+ * A *separate* map, not a field read off {@link lastAgentEvent}, and that is the
36
+ * whole point of it. `lastAgentEvent` is replaced wholesale on every delivery,
37
+ * and Claude puts the model on `SessionStart` and on a `PostModelSwitch`
38
+ * (Issue #2363) and on nothing else — so the very next `UserPromptSubmit` would
39
+ * overwrite the only record that ever knew it, and
40
+ * the UI would show the model for the fraction of a second between session start
41
+ * and the first prompt. Keeping the last *non-null* sighting separately is what
42
+ * makes "which model is this session on" answerable at all for that tool.
43
+ *
44
+ * Never written with null: absent means "nothing has ever said", which is the
45
+ * honest state for gemini, copilot, and any session that predates this server
46
+ * process. See {@link getLastKnownAgentModel}.
47
+ */
48
+ exports.lastAgentModel = (0, global_state_1.getOrInitGlobal)('__agentEventLastModel', () => new Map());
49
+ /**
50
+ * compositeKey -> epoch ms of the report that last wrote {@link lastAgentModel}
51
+ * (Issue #2361).
52
+ *
53
+ * Kept so the frame can be judged NEWER than the hook. When #2361 was measured
54
+ * on 2.1.263, Claude named its model on `SessionStart` and on nothing
55
+ * CommandMate registered — `/model` fired none of the seven events, and the
56
+ * `SessionStart` a `/clear` emits carries no `model` key — so after a switch
57
+ * the hook latch was a true statement about a process that had since changed
58
+ * its mind, and the screen was the only channel that heard it. Issue #2363
59
+ * registers `PostModelSwitch`, which re-stamps this on every switch; the stamp
60
+ * now matters for the sessions where that hook does not arrive. See
61
+ * {@link resolveAgentModel}.
62
+ */
63
+ exports.lastAgentModelAt = (0, global_state_1.getOrInitGlobal)('__agentEventLastModelAt', () => new Map());
64
+ /**
65
+ * compositeKey -> what the terminal frame last showed for this instance (#1784).
66
+ *
67
+ * The second source, and a strictly different kind of fact from
68
+ * {@link lastAgentModel}: that one is the agent naming itself over the hook
69
+ * channel, this one is the TUI's own chrome read back off the screen. It is
70
+ * kept apart rather than folded into the first map because the two have a
71
+ * precedence between them ({@link getResolvedAgentModelInfo}) — merging on write
72
+ * would let a scraped display name ("Gemini 3.7 Flash") overwrite the exact id
73
+ * the agent reported, with nothing left to recover it from.
74
+ *
75
+ * Latched the same way and for a sharper reason: Claude prints its model in the
76
+ * startup banner and nowhere else, and tmux keeps 2000 lines of history, so on
77
+ * any session that has been talking for a while the banner is simply gone. The
78
+ * screen going quiet is not the model changing, so the last non-null sighting
79
+ * stands until the process it described does not (see
80
+ * {@link beginAgentEventGeneration} / {@link discardAgentEventState}).
81
+ */
82
+ exports.capturedModelInfo = (0, global_state_1.getOrInitGlobal)('__agentCapturedModelInfo', () => new Map());
83
+ /**
84
+ * compositeKey -> the effort the *agent itself* last reported (Issue #2048).
85
+ *
86
+ * The third source, and until #2048 there was no such thing: #1784's whole
87
+ * premise was that "no hook payload of any tool carries an effort field", which
88
+ * was true of the five push tools and stayed true of opencode's own screen —
89
+ * `model-info-extractor` still records that opencode prints no effort anywhere
90
+ * in its pane, across 17 live frames.
91
+ *
92
+ * What changed is the *channel*, not the screen. opencode calls it a **variant**
93
+ * and publishes it on the frames CommandMate is subscribed to —
94
+ * `Session.model.variant` on `session.updated` and `info.variant` on
95
+ * `message.updated`, measured on 1.18.22 in an isolated `HOME`
96
+ * (`docs/design/opencode-server-live-verification.md` §20.4). The names in that
97
+ * catalogue are `low` / `medium` / `high` / `max` / `minimal` / `none` /
98
+ * `xhigh`, and each one's entry carries an `effort` (or `reasoningEffort`) equal
99
+ * to itself — so the value is an effort in opencode's own vocabulary as well as
100
+ * in this map's.
101
+ *
102
+ * Kept apart from {@link capturedModelInfo} for the reason that map is kept
103
+ * apart from {@link lastAgentModel}: there is a precedence between them
104
+ * ({@link getResolvedAgentModelInfo}), and merging on write would lose it.
105
+ * Latched the same way, and never written with null — a turn that reports no
106
+ * variant is opencode running the model's default, not the previous choice
107
+ * being withdrawn.
108
+ */
109
+ exports.reportedEffort = (0, global_state_1.getOrInitGlobal)('__agentEventLastEffort', () => new Map());
110
+ /**
111
+ * compositeKey -> the model this instance was last observed on (Issue #2357).
112
+ *
113
+ * A *fourth* map beside the three latches rather than a comparison against
114
+ * them, because the latches are what they are for a reason: each remembers the
115
+ * last non-null value its channel produced, and none of them can say "and the
116
+ * value before that". This map holds exactly that — the previous answer of
117
+ * {@link getResolvedAgentModelInfo} — so a write to either latch can be judged
118
+ * as "same model", "first sighting" or "changed" without re-deriving history
119
+ * from maps that never kept it.
120
+ *
121
+ * Cleared wherever the latches are cleared (generation, discard, test seam) and
122
+ * on `session_start`, so the first model a new agent process reports is
123
+ * recorded as its starting model and announced to nobody.
124
+ */
125
+ exports.modelBaseline = (0, global_state_1.getOrInitGlobal)('__agentModelBaseline', () => new Map());
126
+ /**
127
+ * Listeners for the model edge, on `globalThis` for the reason the maps above
128
+ * are: under `next dev` each route bundle evaluates this module once, and the
129
+ * hook route (which writes the hook latch) and the status poll (which writes
130
+ * the frame latch) are different bundles. A module-scoped set would let each
131
+ * bundle notify only the listeners registered in the same bundle — which is
132
+ * none, for the one that receives the hook.
133
+ */
134
+ const modelChangeListeners = (0, global_state_1.getOrInitGlobal)('__agentModelChangeListeners', () => new Set());
135
+ /**
136
+ * A trailing reasoning-effort token in a model id (`gemini-3.7-flash-high`).
137
+ *
138
+ * The same five words `model-info-extractor` recognises, matched only at the
139
+ * very end and only after a separator, so `gpt-5-mini` keeps its `mini` and a
140
+ * model that merely ends in these letters is untouched. agy encodes the effort
141
+ * in the id it reports on every event (`deriveEffortFromModelId`), and a user
142
+ * moving the same model from `high` to `low` has not changed model.
143
+ */
144
+ exports.AGENT_MODEL_EFFORT_SUFFIX_PATTERN = /[-_ ](?:minimal|low|medium|high|xhigh)$/i;
145
+ /**
146
+ * Tokens a display label carries that the id does not, dropped before comparing.
147
+ *
148
+ * Measured pairs only: claude's banner reads `Opus 5 (1M context)` for the id
149
+ * `claude-opus-5[1m]` — the `1m` is part of the model, the word is not.
150
+ */
151
+ const MODEL_LABEL_NOISE_PATTERN = /\bcontext\b/gi;
152
+ /** Lowercase alphanumerics, effort suffix and label-only words removed. */
153
+ function modelNameKey(value) {
154
+ return value
155
+ .replace(exports.AGENT_MODEL_EFFORT_SUFFIX_PATTERN, '')
156
+ .replace(MODEL_LABEL_NOISE_PATTERN, '')
157
+ .toLowerCase()
158
+ .replace(/[^a-z0-9]/g, '');
159
+ }
160
+ /**
161
+ * Do two model names name the same model? (Issue #2357)
162
+ *
163
+ * Within one channel the answer is exact on alphanumerics — `GPT-5 mini` and
164
+ * `gpt-5-mini` are one model rendered two ways (copilot's bar and its notice,
165
+ * both read off the frame), while `gpt-5` and `gpt-5-mini` are two models and
166
+ * the second is precisely the downgrade this Issue exists to announce. The
167
+ * effort suffix is stripped first, because agy's id carries it and an effort
168
+ * change is not a model change.
169
+ *
170
+ * *Across* channels the rule is widened to containment: the hook reports an
171
+ * id, the screen prints a label, and every measured pair is the label's key
172
+ * inside the id's (`gemini37flash` ⊂ `gemini37flashhigh`, `opus51m` ⊂
173
+ * `claudeopus51m`, `claudesonnet46` ⊂ `anthropicclaudesonnet46`). Containment
174
+ * is NOT applied within a channel — it would fold `gpt-5` into `gpt-5-mini` —
175
+ * and a caller has to say which case it is in.
176
+ *
177
+ * Exported for the tests and for anything that has to agree with this module
178
+ * about identity; deliberately local rather than the extractor's `sameModel`,
179
+ * which is a single-channel exact match and is shared with #2358's edit.
180
+ */
181
+ function isSameAgentModelName(a, b, options = {}) {
182
+ const ka = modelNameKey(a);
183
+ const kb = modelNameKey(b);
184
+ if (ka === kb)
185
+ return true;
186
+ if (!options.crossSource)
187
+ return false;
188
+ if (ka.length === 0 || kb.length === 0)
189
+ return false;
190
+ return ka.includes(kb) || kb.includes(ka);
191
+ }
192
+ /**
193
+ * Subscribe to the model edge (Issue #2357).
194
+ *
195
+ * The listener receives every transition {@link observeAgentModel} judged to be
196
+ * a change — never a first sighting, never a value going quiet. `#2357`'s
197
+ * realtime broadcaster and push notifier are the two subscribers; neither keeps
198
+ * a "what was it last time?" of its own, which is the point of this being an
199
+ * edge rather than a level.
200
+ *
201
+ * @returns The unsubscribe function
202
+ */
203
+ function onAgentModelChange(listener) {
204
+ modelChangeListeners.add(listener);
205
+ return () => {
206
+ modelChangeListeners.delete(listener);
207
+ };
208
+ }
209
+ /** Deliver one change; a listener that throws must not disturb the write that observed it. */
210
+ function emitAgentModelChange(change) {
211
+ for (const listener of modelChangeListeners) {
212
+ try {
213
+ listener(change);
214
+ }
215
+ catch {
216
+ // Advisory. The hook route and the status poll are the callers, and a
217
+ // notification failure is not a reason to fail either.
218
+ }
219
+ }
220
+ }
221
+ /**
222
+ * The model this instance was last observed on, or null. Test seam.
223
+ */
224
+ function getAgentModelBaseline(worktreeId, cliToolId, instanceId) {
225
+ return exports.modelBaseline.get((0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, instanceId)) ?? null;
226
+ }
227
+ /**
228
+ * Judge the resolved model after a latch wrote, and announce a change
229
+ * (Issue #2357).
230
+ *
231
+ * Called after every write to {@link lastAgentModel} and
232
+ * {@link capturedModelInfo}, with the channel that wrote. What it compares is
233
+ * {@link getResolvedAgentModelInfo}'s *model* — the merged value the UI shows —
234
+ * against the previous merged value this map remembers. The suppression rules,
235
+ * each of which is a measured false positive:
236
+ *
237
+ * - **`null → value`** (first report, server restart): recorded as the
238
+ * starting model, announced to nobody.
239
+ * - **`value → null`**: cannot reach here — the latches never write null, so
240
+ * a frame that stopped showing the banner leaves the merged value where it
241
+ * was. A generation reset clears this map along with the latches, so the
242
+ * next value is a first sighting again.
243
+ * - **same name, either channel**: `GPT-5 mini` after `gpt-5-mini` is not a
244
+ * change. Compared with {@link isSameAgentModelName}; the cross-channel
245
+ * widening applies only when the merged value's source actually moved.
246
+ * - **`session_start`**: {@link recordAgentEvent} drops the baseline first, so
247
+ * the model a relaunched process reports is that process's starting model.
248
+ *
249
+ * Everything else is a change and is emitted exactly once — the baseline is
250
+ * advanced before the listeners run, so a listener that re-enters this module
251
+ * cannot see the same edge twice.
252
+ */
253
+ function observeAgentModel(worktreeId, cliToolId, instanceId, source, at) {
254
+ const key = (0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, instanceId);
255
+ // Where the merged value came from is decided in one place
256
+ // (`resolveAgentModel`, Issue #2361): the hook's, unless the frame overtook
257
+ // it — and that is independent of which channel just wrote.
258
+ const { info, source: resolvedSource } = resolveAgentModel(key, cliToolId);
259
+ const resolved = info.model;
260
+ if (resolved === null || resolvedSource === null)
261
+ return;
262
+ const previous = exports.modelBaseline.get(key);
263
+ const next = { model: resolved, source: resolvedSource };
264
+ if (previous === undefined) {
265
+ exports.modelBaseline.set(key, next);
266
+ (0, agent_event_dedup_1.trimOldestEntries)(exports.modelBaseline, agent_event_dedup_1.MAX_RECENT_EVENT_KEYS);
267
+ return;
268
+ }
269
+ if (isSameAgentModelName(previous.model, resolved, {
270
+ crossSource: previous.source !== resolvedSource,
271
+ })) {
272
+ // Same model, possibly a new spelling or a new channel: follow it so the
273
+ // next comparison is against the current representation.
274
+ exports.modelBaseline.set(key, next);
275
+ return;
276
+ }
277
+ exports.modelBaseline.set(key, next);
278
+ emitAgentModelChange({
279
+ worktreeId,
280
+ cliToolId,
281
+ instanceId: instanceId ?? cliToolId,
282
+ from: previous.model,
283
+ to: resolved,
284
+ source,
285
+ at,
286
+ });
287
+ }
288
+ /**
289
+ * Issue #1783: latch, never clear. An event without a model is the ordinary
290
+ * case (Claude sends one on `SessionStart` and, since #2363, on a model
291
+ * switch), and reading it as "the model is now unknown" would blank the display
292
+ * on the very next event.
293
+ */
294
+ function latchAgentModel(key, record) {
295
+ if (typeof record.model === 'string' && record.model !== '') {
296
+ exports.lastAgentModel.set(key, record.model.slice(0, agent_event_types_1.MAX_EVENT_DETAIL_LENGTH));
297
+ // Issue #2361: stamped on every model-bearing report, not only on a change
298
+ // of value — a hook that names the same model again is the agent
299
+ // re-affirming it, and a frame has to be newer than THAT to overtake.
300
+ exports.lastAgentModelAt.set(key, record.at);
301
+ }
302
+ }
303
+ /**
304
+ * The last model this instance reported running, or null (Issue #1783).
305
+ *
306
+ * "Last **non-null**", which is the only useful reading: three of the four tools
307
+ * that publish a model publish it on some events and not others, and Claude
308
+ * publishes it on two (`SessionStart`, and each switch since #2363). Reading
309
+ * `getLastAgentEvent()?.model` would therefore answer null for almost every
310
+ * moment of almost every session.
311
+ *
312
+ * Deliberately **not** bounded by {@link STRUCTURED_STATE_MAX_AGE_MS}, unlike
313
+ * every other reader in this module. That bound exists because a *status* that
314
+ * nothing has refreshed is a claim about right now that may have expired — a
315
+ * lost `Stop` leaving the layer asserting `running` forever. A model is not that
316
+ * kind of claim: an eight-hour turn is on the same model at the end as at the
317
+ * start, and expiring it would blank the display on precisely the long-running
318
+ * sessions this is most useful for. What *is* honoured is identity: a new
319
+ * generation or a discarded session drops the value, because the process that
320
+ * reported it is gone. See {@link beginAgentEventGeneration} /
321
+ * {@link discardAgentEventState}.
322
+ *
323
+ * In-memory only — nothing is written to `session_states`. After a server
324
+ * restart codex and antigravity repopulate on their next event; Claude stays
325
+ * null until its next `SessionStart`, a gap Phase 2 (#1784) closes from the
326
+ * terminal frame.
327
+ */
328
+ function getLastKnownAgentModel(worktreeId, cliToolId, instanceId) {
329
+ return exports.lastAgentModel.get((0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, instanceId)) ?? null;
330
+ }
331
+ /**
332
+ * Latch the model the agent named for itself outside an agent event
333
+ * (Issue #2964).
334
+ *
335
+ * The hook channel's latch — the one {@link recordAgentEvent} writes from
336
+ * `record.model` — for a source whose model arrives on something that is not
337
+ * one of the seven event words. OpenCode V2 is that source: its `session.*`
338
+ * frames carry no model, and the model it actually answered with is read off
339
+ * the assistant messages of `GET /api/session/{id}/message` after the turn.
340
+ *
341
+ * Latch, never clear ({@link latchAgentModel}'s rule), and judged for a change
342
+ * exactly as a hook-borne model is, so #2357's broadcast and push fire for it.
343
+ *
344
+ * @param model - The model name, or null/empty to leave the latch alone
345
+ */
346
+ function recordAgentReportedModel(worktreeId, cliToolId, instanceId, model, at = Date.now()) {
347
+ if (typeof model !== 'string' || model === '')
348
+ return;
349
+ const key = (0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, instanceId);
350
+ exports.lastAgentModel.set(key, model.slice(0, agent_event_types_1.MAX_EVENT_DETAIL_LENGTH));
351
+ exports.lastAgentModelAt.set(key, at);
352
+ observeAgentModel(worktreeId, cliToolId, instanceId, 'hook', at);
353
+ }
354
+ /**
355
+ * Latch what a terminal capture showed for this instance (Issue #1784).
356
+ *
357
+ * Called from the status-detection poll with the text that poll already
358
+ * captured — no `capture-pane` is issued for this, so the feature costs nothing
359
+ * in tmux round-trips.
360
+ *
361
+ * **Each half latches independently.** A Codex footer carries a model on every
362
+ * frame but an effort only on some formats; a Claude banner carries both and
363
+ * then scrolls away entirely. Writing `{model, effort}` wholesale would let the
364
+ * frame that stopped showing one of them blank a value the other frame proved.
365
+ * Nothing is ever written as null: absent means "no frame has ever shown this",
366
+ * which is the honest state for gemini/copilot and for any session whose chrome
367
+ * this module has no rule for.
368
+ *
369
+ * **The one exception is an effort the frame shows but cannot name** (Issue
370
+ * #2835, `info.effortUnreadable`). A codex bar that draws `default` or a
371
+ * model-defined value where `xhigh` used to be is not "not showing" the effort
372
+ * — it is showing a different one. Keeping `xhigh` would publish a value the
373
+ * session is no longer running at, so the effort half is dropped to null and
374
+ * the model half latches as usual.
375
+ *
376
+ * @param info - {@link import('../../lib/detection/model-info-extractor').extractModelInfo}'s answer
377
+ */
378
+ function recordCapturedModelInfo(worktreeId, cliToolId, instanceId, info, at = Date.now()) {
379
+ if (!info.model && !info.effort)
380
+ return;
381
+ const key = (0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, instanceId);
382
+ const previous = exports.capturedModelInfo.get(key);
383
+ const model = info.model ? info.model.slice(0, agent_event_types_1.MAX_EVENT_DETAIL_LENGTH) : (previous?.model ?? null);
384
+ exports.capturedModelInfo.set(key, {
385
+ model,
386
+ effort: info.effortUnreadable ? null : (info.effort ?? previous?.effort ?? null),
387
+ // Issue #2361: the change stamp moves only when the model half takes a
388
+ // different value. A banner re-read on every poll keeps the stamp where the
389
+ // first sighting put it, so it never out-dates a hook by mere repetition.
390
+ modelChangedAt: model === null
391
+ ? null
392
+ : model === (previous?.model ?? null)
393
+ ? (previous?.modelChangedAt ?? at)
394
+ : at,
395
+ });
396
+ // Issue #2357: an effort-only frame leaves the model half where it was, so
397
+ // there is nothing to judge; a frame that named a model is the screen's
398
+ // report and is compared against what this instance was last seen on.
399
+ if (info.model)
400
+ observeAgentModel(worktreeId, cliToolId, instanceId, 'frame', at);
401
+ }
402
+ /**
403
+ * The last model/effort a terminal capture showed, both halves possibly null.
404
+ *
405
+ * The raw scraped value, before precedence is applied — {@link
406
+ * getResolvedAgentModelInfo} is what callers publishing to the UI or the API
407
+ * want. Exported for the tests and for anything that needs to tell "the screen
408
+ * said" apart from "the agent said".
409
+ */
410
+ function getLastCapturedModelInfo(worktreeId, cliToolId, instanceId) {
411
+ const record = exports.capturedModelInfo.get((0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, instanceId));
412
+ return { model: record?.model ?? null, effort: record?.effort ?? null };
413
+ }
414
+ /**
415
+ * The model and reasoning effort to publish for this instance (Issue #1784).
416
+ *
417
+ * The single answer both surfaces should read: it folds the hook channel
418
+ * (#1783) together with the screen under the precedence documented on
419
+ * {@link mergeModelInfo} — hooks win for the model, the screen is the only
420
+ * source of effort for codex/claude, and antigravity's effort is derived from
421
+ * the id it reports rather than from its (renderer-truncated) status bar —
422
+ * with the one exception {@link resolveAgentModel} documents (Issue #2361): a
423
+ * claude frame that started naming a different model after the hook last
424
+ * spoke is the newer statement, and wins.
425
+ *
426
+ * Both halves may be null, and routinely are: no tool publishes an effort over
427
+ * hooks, and most tools publish neither. Callers omit the key rather than
428
+ * emitting null — see `CliToolSessionStatus`.
429
+ */
430
+ function getResolvedAgentModelInfo(worktreeId, cliToolId, instanceId) {
431
+ return resolveAgentModel((0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, instanceId), cliToolId).info;
432
+ }
433
+ /**
434
+ * Tools whose hook channel may name the model at session start and never again
435
+ * (Issue #2361).
436
+ *
437
+ * For these, a frame that starts naming a DIFFERENT model after the hook last
438
+ * spoke may be the only report of a mid-session switch there is, and it
439
+ * overtakes the hook in {@link resolveAgentModel}. For every other tool the
440
+ * rule stays #1784's — hooks win — because their hook channel re-reports the
441
+ * model on later events (codex and antigravity on every one, opencode on every
442
+ * `message.updated`), so a switch reaches the hook latch by itself and a frame
443
+ * that disagrees with a hook that is still re-affirming its value is a
444
+ * misread, not news.
445
+ *
446
+ * Measured on claude 2.1.263 for #2361: `SessionStart` alone carried `model`
447
+ * among the events then registered; `/model`, `/fast` and `/effort` fired none
448
+ * of them; the `SessionStart` that `/clear` emits carries no `model`.
449
+ *
450
+ * Issue #2363 registers `PostModelSwitch`, so on 2.1.263 and later the hook
451
+ * DOES re-report every `/model` and `/fast` that changes the model, in the
452
+ * `SessionStart` spelling (`claude-sonnet-5`, `claude-opus-5[1m]`). Claude
453
+ * stays on this list all the same, as the **fallback** rather than the rule,
454
+ * and the two cases the rule exists for were weighed against each other:
455
+ *
456
+ * - *The hook re-reports.* The switch lands here as a hook write, stamping
457
+ * {@link lastAgentModelAt}; the pane re-reads the rewritten banner or the
458
+ * confirmation line moments later and names the same model in its label
459
+ * spelling, which {@link isSameAgentModelName} (cross-channel) folds into
460
+ * the hook's exact id. The frame does not overtake, the hook's id is what
461
+ * is published, and the edge fires once. Nothing in this rule had to change
462
+ * for that — it was written to defer to a hook that re-affirms.
463
+ * - *The hook does not arrive.* A claude older than the hook, a session
464
+ * launched without injection (`CM_AGENT_HOOKS_INJECT=0`, a hand-written
465
+ * `--settings`), a delivery lost to a wedged server or the 3 s
466
+ * de-duplication window: the latch is stale, the frame is the only channel
467
+ * that heard the switch, and this rule is what publishes it. Removing the
468
+ * tool from this set would take that back to the #2361 symptom — a stale
469
+ * id shown with no edge — on precisely the sessions that have no other way
470
+ * of reporting.
471
+ *
472
+ * The price of keeping it is the case #2361 already carried: a frame that
473
+ * starts showing a stale confirmation line AFTER the hook spoke (the banner
474
+ * scrolls away, an older `Set model to …` row becomes the fallback the
475
+ * extractor reads) overtakes a hook that was right. That was possible before
476
+ * #2363 — with a staler hook value underneath — and is no wider now; a switch
477
+ * whose confirmation line the extractor does read leaves the newer row on the
478
+ * pane, so the stale row is reachable only after a `/fast` or an automatic
479
+ * fallback, and only until the next `/model` line or hook.
480
+ */
481
+ const FRAME_OVERTAKES_HOOK_MODEL_TOOLS = new Set(['claude']);
482
+ /**
483
+ * The merged model/effort for one instance, and which channel the model half
484
+ * came from (Issue #2361).
485
+ *
486
+ * {@link mergeModelInfo}'s precedence — hooks win the model — with one
487
+ * exception layered on top for {@link FRAME_OVERTAKES_HOOK_MODEL_TOOLS}: when
488
+ * the frame's model half CHANGED after the hook last named a model
489
+ * ({@link CapturedModelRecord.modelChangedAt} > {@link lastAgentModelAt}) and
490
+ * the two do not name the same model ({@link isSameAgentModelName}, cross
491
+ * channel), the frame's value is the newer statement and is published in the
492
+ * hook's place. Every other case is unchanged:
493
+ *
494
+ * - the frame names the same model as the hook (the startup banner after
495
+ * `SessionStart`, or `/model` back to the model the hook named): the hook's
496
+ * exact id is published, as before;
497
+ * - the frame's value predates the hook (a switch line still on screen when a
498
+ * relaunched process reports its starting model): the hook wins;
499
+ * - no hook has spoken: the frame is the only source, as before.
500
+ *
501
+ * `source` is null when neither channel has a model.
502
+ */
503
+ function resolveAgentModel(key, cliToolId) {
504
+ const hooksModel = exports.lastAgentModel.get(key) ?? null;
505
+ const captured = exports.capturedModelInfo.get(key);
506
+ const capturedInfo = { model: captured?.model ?? null, effort: captured?.effort ?? null };
507
+ // Issue #2048: the third source. Null for every tool but opencode and for
508
+ // every opencode session running on a model's default, so every other
509
+ // surface's string is byte-identical to pre-#2048.
510
+ const hooksEffort = exports.reportedEffort.get(key) ?? null;
511
+ const frameChangedAt = captured?.modelChangedAt ?? null;
512
+ const frameOvertakes = hooksModel !== null &&
513
+ capturedInfo.model !== null &&
514
+ frameChangedAt !== null &&
515
+ FRAME_OVERTAKES_HOOK_MODEL_TOOLS.has(cliToolId) &&
516
+ frameChangedAt > (exports.lastAgentModelAt.get(key) ?? 0) &&
517
+ !isSameAgentModelName(hooksModel, capturedInfo.model, { crossSource: true });
518
+ const info = (0, model_info_extractor_1.mergeModelInfo)(cliToolId, frameOvertakes ? null : hooksModel, capturedInfo, hooksEffort);
519
+ if (info.model === null)
520
+ return { info, source: null };
521
+ return { info, source: hooksModel !== null && !frameOvertakes ? 'hook' : 'frame' };
522
+ }
523
+ /**
524
+ * Latch the effort (opencode's *variant*) the agent named for itself (#2048).
525
+ *
526
+ * Latch, never clear — {@link latchAgentModel}'s rule, and for the same reason:
527
+ * `session.updated` omits `Session.model.variant` entirely when the session is
528
+ * on a model's default, and `message.updated` omits `info.variant` on the
529
+ * assistant message a turn opens with. Reading either absence as "the variant
530
+ * is now unknown" would blank the display between frames of the same turn.
531
+ *
532
+ * Called by the tool's own reader — `lib/hooks/sources/opencode/subscription` —
533
+ * rather than from the generic event path, because the value lives on frames
534
+ * that map to none of the seven event words.
535
+ *
536
+ * @param effort - The variant name, or null/empty to leave the latch alone
537
+ */
538
+ function recordAgentReportedEffort(worktreeId, cliToolId, instanceId, effort) {
539
+ if (typeof effort !== 'string' || effort === '')
540
+ return;
541
+ exports.reportedEffort.set((0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, instanceId), effort.slice(0, agent_event_types_1.MAX_EVENT_DETAIL_LENGTH));
542
+ }
543
+ /**
544
+ * The effort the agent last reported for this instance, or null (#2048).
545
+ *
546
+ * The raw latched value, before precedence — {@link getResolvedAgentModelInfo}
547
+ * is what callers publishing to the UI or the API want. Exported so a test can
548
+ * tell "the agent said" apart from "the screen said", the same way
549
+ * {@link getLastCapturedModelInfo} lets it.
550
+ */
551
+ function getLastReportedAgentEffort(worktreeId, cliToolId, instanceId) {
552
+ return exports.reportedEffort.get((0, auto_yes_state_1.buildCompositeKey)(worktreeId, cliToolId, instanceId)) ?? null;
553
+ }
554
+ /**
555
+ * The reasoning effort this instance is running at, or null (Issue #1784).
556
+ *
557
+ * Convenience reader over {@link getResolvedAgentModelInfo} for callers that
558
+ * want only the effort — `capture --json` and `instances` (#1785) among them.
559
+ */
560
+ function getLastKnownAgentEffort(worktreeId, cliToolId, instanceId) {
561
+ return getResolvedAgentModelInfo(worktreeId, cliToolId, instanceId).effort;
562
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * The structured event record `agent-event-state` keeps per agent instance.
4
+ *
5
+ * Split out of `agent-event-state` (Issue #3375) so the modules that read the
6
+ * record can share the type without importing that module.
7
+ *
8
+ * @module lib/session/agent-event-record
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });