commandmate 0.40.0 → 0.40.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +150 -150
  3. package/.next/app-path-routes-manifest.json +26 -26
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +12 -12
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/app/release-notes/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/app/update-check/route.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_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  43. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  52. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  54. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  55. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  61. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  64. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  67. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  70. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  72. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  85. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  146. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  148. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  149. package/.next/server/app/page_client-reference-manifest.js +1 -1
  150. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  152. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  153. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  154. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  155. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  156. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  157. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  158. package/.next/server/app/worktrees/[id]/page.js +1 -1
  159. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  160. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  161. package/.next/server/app-paths-manifest.json +26 -26
  162. package/.next/server/chunks/6130.js +1 -1
  163. package/.next/server/chunks/6661.js +1 -1
  164. package/.next/server/chunks/8728.js +1 -1
  165. package/.next/server/middleware-manifest.json +5 -5
  166. package/.next/server/pages/500.html +1 -1
  167. package/.next/server/server-reference-manifest.json +1 -1
  168. package/.next/static/chunks/{1642-767aed8e7c61ef7f.js → 1642-fb2e176aaadbd137.js} +1 -1
  169. package/.next/static/chunks/{2407-e259744922e0834c.js → 2407-d750620d0511e94f.js} +1 -1
  170. package/.next/static/chunks/{2619-a305ad4810f1393a.js → 2619-04bc32f026a0d946.js} +1 -1
  171. package/.next/static/chunks/{8165-8944f74c53f3021f.js → 8165-d3b7c8a7aa776bc7.js} +1 -1
  172. package/.next/static/chunks/app/{layout-b90cce6a51c91f4c.js → layout-3d3fcc8aac7b3bb5.js} +1 -1
  173. package/.next/static/chunks/app/worktrees/[id]/{page-e9ebdcd317b62e4a.js → page-a91e812ad9d94697.js} +1 -1
  174. package/.next/static/chunks/app/worktrees/[id]/terminal/{page-c601f3b3ece6557e.js → page-373ea37b16d930c7.js} +1 -1
  175. package/.next/trace +13 -13
  176. package/dist/server/src/lib/detection/model-info-extractor.js +49 -10
  177. package/dist/server/src/lib/session/agent-event-state.js +8 -1
  178. package/package.json +1 -1
  179. package/release-notes/0.40.1.json +20 -0
  180. /package/.next/static/{o3mZdwNhCks6IlcAOPinc → JfzIPPhL-ikSVcJYOKgfD}/_buildManifest.js +0 -0
  181. /package/.next/static/{o3mZdwNhCks6IlcAOPinc → JfzIPPhL-ikSVcJYOKgfD}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=6661,exports.ids=[6661],exports.modules={24581:(a,b,c)=>{c.d(b,{Mu:()=>f,RY:()=>i,Tt:()=>h,Ui:()=>p,Xq:()=>l,ZV:()=>s,h_:()=>g,jF:()=>q,kT:()=>o,nY:()=>k,qX:()=>r,wt:()=>n});var d=c(62887),e=c(36051);let f=18e5,g={predicted:2e4,confirmed:18e5},h=3,i=16,j={turnId:null,openedAt:null,closedAt:null,closedBy:null};function k(a){return null===a?j:{turnId:a.turnId,openedAt:a.openedAt,closedAt:a.closedAt,closedBy:a.closedBy}}function l(a){if("string"!=typeof a||0===a.length||a.length>128)return null;for(let b=0;b<a.length;b++){let c=a.charCodeAt(b);if(c<32||127===c)return null}return a}function m(a,b){return"string"!=typeof a||""===a?null:a.slice(0,b)}function n(a){return m(a,e.lY)}function o(a){return m(a,d.h9)}function p(a){if(!Array.isArray(a))return null;let b=[];for(let c of a)if("string"==typeof c&&""!==c&&(b.push(c.slice(0,200)),b.length>=8))break;return b.length>0?b:null}function q(a,b){let c=null===a.confirmedAt?g.predicted:g.confirmed;return b-a.at<c}function r(a,b,c){return null!==b&&c-a.at>=1e3*b}function s(a,b){return null===a.sessionId||null===b||a.sessionId===b}},26547:(a,b,c)=>{c.d(b,{Yz:()=>G,jw:()=>E});var d=c(51297),e=c(85164);let f=["minimal","low","medium","high","xhigh"];function g(){return{model:null,effort:null}}let h=/^[A-Za-z0-9][A-Za-z0-9._:@/-]*$/,i=/^[A-Za-z0-9][A-Za-z0-9 .()[\]_:@/-]*$/;function j(a){return a.length>0&&a.length<=64&&h.test(a)}function k(a){return a.length>0&&a.length<=64&&i.test(a)}function l(a,b={}){let c=a.trim().toLowerCase();if(""===c)return null;if(f.includes(c))return c;if(!b.allowTruncated||c.length<2)return null;let d=f.filter(a=>a.length===c.length+1&&a.startsWith(c));return 1===d.length?d[0]:null}let m=/^\s*([^\s·]+)(?:\s+(minimal|low|medium|high|xhigh)\b)?/i,n=/^\s*\S[^·]*·\s*~?\/\S*(?:\s*·[^\n]*|[^\S\n]{2,}\S[^\n]*)$/;function o(a){if(!e.aW.test(a)&&!n.test(a))return null;let b=a.indexOf("\xb7");if(b<0)return null;let c=m.exec(a.slice(0,b));if(!c)return null;let d=c[1];if(!j(d))return null;let f=c[2]?l(c[2]):null;return null!==f||/\d/.test(d)?{model:d,effort:f}:null}let p=/^\s*[\u2500-\u259F][\s\u2500-\u259F]*(\S[^\u2500-\u259F]*?)\s+with\s+(minimal|low|medium|high|xhigh)\s+effort\b/i;function q(a){let b=p.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:l(b[2])}:null}let r=/^\s*⎿\s+(?:Set model to|Kept model as)\s+(?!(?:and saved as your default|for this session only)\b)([A-Za-z0-9][A-Za-z0-9 .()[\]_:@/-]*?)(?:\s+(?:and saved as your default for new sessions|for this session only))?(?:\s+with\s+([A-Za-z]+)\s+effort\b[^·]*)?\s*(?:·.*)?$/;function s(a){let b=r.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:b[2]?l(b[2]):null}:null}let t=/^\s*(?:\?\s+for\s+shortcuts|esc\s+to\s+cancel)\b/i,u=/^\s*[\u2500-\u259F][\s\u2500-\u259F]*(\S[^\u2500-\u259F]*?)\s+\((minimal|low|medium|high|xhigh)\)\s*$/i;function v(a){if(!t.test(a))return null;let b=a.lastIndexOf("\xb7");if(b<0)return null;let c=l(a.slice(b+1),{allowTruncated:!0});if(!c)return null;let d=a.slice(0,b).trimEnd().split(/\s{2,}/),e=(d[d.length-1]??"").trim();return{model:k(e)?e:null,effort:c}}function w(a){let b=u.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:l(b[2])}:null}let x=/^\s*[●◉◎○]\s+Model\s+changed\s+from\s+\S+(?:\s+\([^)]*\))?\s+to\s+(\S+)(?:\s+\((minimal|low|medium|high|xhigh)\))?\s+for\s+this\s+session\b/i;function y(a){let b=x.exec(a);if(!b)return null;let c=b[1];return j(c)?{model:c,effort:b[2]?l(b[2]):null}:null}let z=/^\s*▣\s+[A-Za-z][A-Za-z0-9-]*\s+·\s+([^·]+?)(?:\s+·\s+[\d.]+\s?m?s)?\s*$/;function A(a){let b=z.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:null}:null}let B=/^\s*#\s+models:\s*([^·]+?)(?:\s+with\s+([A-Za-z]+)\s+effort)?\s*(?:·|$)/i;function C(a){let b=B.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:b[2]?l(b[2]):null}:null}function D(a,b){let c=a.split("\n");for(let a=c.length-1;a>=0;a--){let e=b((0,d.aJ)(c[a]));if(e)return e}return null}function E(a,b){if(!b)return g();switch(a){case"codex":return D(b,o)??g();case"claude":return D(b,q)??D(b,s)??g();case"antigravity":return D(b,v)??D(b,w)??g();case"copilot":{let a=function(a){let b=a.split("\n");for(let a=b.length-1;a>=0;a--){let c=(0,d.aJ)(b[a]);if(""!==c.trim()){if(!e.Ub.test(c)&&!e.tJ.test(c))return null;let a=c.trim().split(/\s{2,}/);if(a.length<2)return null;let b=a[a.length-1].split("\xb7").map(a=>a.trim());if(b.length>2)return null;let d=b[0];if(!k(d))return null;if(1===b.length)return{model:d,effort:null};let f=l(b[1]);return null===f?null:{model:d,effort:f}}}return null}(b),c=D(b,y);if(!a)return c??g();if(null!==a.effort||null===c||null===c.effort)return a;return!function(a,b){let c=a=>a.toLowerCase().replace(/[^a-z0-9]/g,"");return c(a)===c(b)}(a.model,c.model)?a:{model:a.model,effort:c.effort}}case"opencode":return D(b,A)??g();case"command-code":return D(b,C)??g();default:return g()}}let F=/-(low|medium|high)$/i;function G(a,b,c,d){let e=(b||null)??c?.model??null,f=c?.effort??null,g="antigravity"===a?function(a){if(!a)return null;let b=F.exec(a);return b?b[1].toLowerCase():null}(e)??f:f;return{model:e,effort:(d||null)??g}}},36051:(a,b,c)=>{c.d(b,{PP:()=>g,QB:()=>e,Yo:()=>j,fO:()=>k,lY:()=>f});var d=c(81254);let e=[{number:1,label:"Allow once",reply:"once"},{number:2,label:"Allow always",reply:"always"},{number:3,label:"Reject",reply:"reject"}],f=500;function g(a){return"string"==typeof a&&""!==a}let h={notification:"Notification(permission_prompt)","permission-request":"PermissionRequest (no decision)"};function i(a,b){let c=[`A dialog is open in ${a}: the agent reported it via ${h[b.source]}${b.toolName?` for ${b.toolName}`:""}, but the detection layer published no options for it.`];if(b.decisionOptions&&b.decisionOptions.length>0?c.push(`Answer it with \`commandmate respond ${a} <number>\`: `+b.decisionOptions.map(a=>`${a.number} = ${a.label} (${a.reply})`).join(", ")+". The reply goes to the agent's own API, so no keys are sent to the terminal "+`and the label works too (\`respond ${a} "Allow once"\`).`):c.push(`Answer it in the terminal, or send the option NUMBER with \`commandmate respond ${a} <number>\` — yes/no is not resolved on a numbered dialog (Issue #1681).`),b.message&&c.push(`Agent message: "${b.message}"`),b.askUserQuestion){let{question:d,labels:e,questionCount:f}=b.askUserQuestion,h=g(b.decisionId)&&1===f&&!(b.decisionOptions&&b.decisionOptions.length>0);c.push(`The agent asked${f>1?` ${f} questions, the first being`:""}: "${d}" — offering: ${e.join(" / ")}. `+(h?`Answer it with \`commandmate respond ${a} <number>\`: `+e.map((a,b)=>`${b+1} = ${a}`).join(", ")+". The number is this list's own position and the reply goes to the agent's own API, so no keys are sent to the terminal (the label works too).":"The picker renumbers and adds its own entries, so read the option NUMBER off the terminal rather than counting this list."))}return c.join(" ")}function j(a,b){return{type:d.LT,status:"pending",question:i(a,b),options:[],source:b.source,...b.message?{message:b.message}:{},...b.toolName?{toolName:b.toolName}:{},...b.askUserQuestion?{askUserQuestion:b.askUserQuestion}:{},...b.decisionOptions&&b.decisionOptions.length>0?{decisionOptions:b.decisionOptions}:{},decisionId:g(b.decisionId)?b.decisionId:null,...b.patterns&&b.patterns.length>0?{patterns:[...b.patterns]}:{}}}function k(a,b){return{type:d.LT,status:"unclassified",question:i(a,b),options:[],source:b.source,...b.message?{message:b.message}:{},...b.toolName?{toolName:b.toolName}:{},...b.askUserQuestion?{askUserQuestion:b.askUserQuestion}:{}}}},48083:(a,b,c)=>{c.r(b),c.d(b,{AGENT_EVENT_DEDUP_WINDOW_MS:()=>G,AGENT_MODEL_EFFORT_SUFFIX_PATTERN:()=>z,LIFECYCLE_AGENT_EVENT_TYPES:()=>aI,STRUCTURED_PROMPT_PROVISIONAL_MAX_AGE_MS:()=>aw,STRUCTURED_STATE_MAX_AGE_MS:()=>ar,beginAgentEventGeneration:()=>as,classifyAgentEventDelivery:()=>aJ,clearAgentStopEvents:()=>aM,clearAskUserQuestion:()=>aF,clearStructuredPromptWaiting:()=>aC,closeAgentTurn:()=>T,corroborateStructuredPromptWaiting:()=>aA,discardAgentEventState:()=>au,getAgentEventDropCounts:()=>K,getAgentEventGenerationStartedAt:()=>at,getAgentModelBaseline:()=>E,getAgentTurn:()=>R,getAskUserQuestion:()=>aE,getAwaitingInstruction:()=>_,getLastAgentEvent:()=>ah,getLastCapturedModelInfo:()=>ak,getLastKnownAgentEffort:()=>aq,getLastKnownAgentModel:()=>ai,getLastReportedAgentEffort:()=>ap,getLastStopEventAt:()=>W,getPendingDecisions:()=>Q,getPublishedAgentTurn:()=>S,getRecentEventIdentityCount:()=>aL,getRecentEventKeyCount:()=>aH,getResolvedAgentModelInfo:()=>al,getStructuredPromptWaiting:()=>az,getStructuredSessionState:()=>av,isAwaitingInstruction:()=>aa,isDuplicateAgentEvent:()=>aG,isSameAgentModelName:()=>C,markStructuredPromptRecorded:()=>aB,observeScraperCompletionEvidence:()=>U,onAgentModelChange:()=>D,recordAgentEvent:()=>Y,recordAgentReportedEffort:()=>ao,recordAgentStopEvent:()=>V,recordAskUserQuestion:()=>aD,recordCapturedModelInfo:()=>aj,reportPermissionRequestPending:()=>ax,reportQuestionPending:()=>ay});var d=c(24455),e=c(62887),f=c(49154),g=c(26547),h=c(67882),i=c(24581);let j=globalThis.__agentEventLastStopAt??(globalThis.__agentEventLastStopAt=new Map),k=globalThis.__agentEventLast??(globalThis.__agentEventLast=new Map),l=globalThis.__agentEventGenerationStartedAt??(globalThis.__agentEventGenerationStartedAt=new Map),m=globalThis.__agentEventTurns??(globalThis.__agentEventTurns=new Map),n=globalThis.__agentEventDrops??(globalThis.__agentEventDrops=new Map),o=globalThis.__agentEventTurnSeq??(globalThis.__agentEventTurnSeq={value:0}),p=globalThis.__agentEventAskUserQuestion??(globalThis.__agentEventAskUserQuestion=new Map),q=globalThis.__agentEventRecentKeys??(globalThis.__agentEventRecentKeys=new Map),r=globalThis.__agentEventRecentIdentities??(globalThis.__agentEventRecentIdentities=new Map),s=globalThis.__agentEventAwaitingInstruction??(globalThis.__agentEventAwaitingInstruction=new Map),t=globalThis.__agentEventLastModel??(globalThis.__agentEventLastModel=new Map),u=globalThis.__agentEventLastModelAt??(globalThis.__agentEventLastModelAt=new Map),v=globalThis.__agentCapturedModelInfo??(globalThis.__agentCapturedModelInfo=new Map),w=globalThis.__agentEventLastEffort??(globalThis.__agentEventLastEffort=new Map),x=globalThis.__agentModelBaseline??(globalThis.__agentModelBaseline=new Map),y=globalThis.__agentModelChangeListeners??(globalThis.__agentModelChangeListeners=new Set),z=/[-_ ](?:minimal|low|medium|high|xhigh)$/i,A=/\bcontext\b/gi;function B(a){return a.replace(z,"").replace(A,"").toLowerCase().replace(/[^a-z0-9]/g,"")}function C(a,b,c={}){let d=B(a),e=B(b);return d===e||!!c.crossSource&&0!==d.length&&0!==e.length&&(d.includes(e)||e.includes(d))}function D(a){return y.add(a),()=>{y.delete(a)}}function E(a,b,c){return x.get((0,d.v7)(a,b,c))??null}function F(a,b,c,e,f){let g=(0,d.v7)(a,b,c),{info:h,source:i}=an(g,b),j=h.model;if(null===j||null===i)return;let k=x.get(g),l={model:j,source:i};if(void 0===k){x.set(g,l),aK(x,H);return}if(C(k.model,j,{crossSource:k.source!==i}))return void x.set(g,l);x.set(g,l);var m={worktreeId:a,cliToolId:b,instanceId:c??b,from:k.model,to:j,source:e,at:f};for(let a of y)try{a(m)}catch{}}let G=3e3,H=512;function I(){return{dedupDropped:{identity:0,timeWindow:0},decisionEvicted:0,idsDiscarded:0,dialogTimedOut:0,decisionOverflow:0}}function J(a){let b=n.get(a);return b||(b=I(),n.set(a,b),aK(n,H)),b}function K(a,b,c){let e=n.get((0,d.v7)(a,b,c));return e?{...e,dedupDropped:{...e.dedupDropped}}:I()}function L(a){return l.get(a)??null}function M(a){let b=m.get(a);return b&&b.generationAt===L(a)?b:null}function N(a,b){let c=M(a);return null===c?null:(null===c.closedAt&&b-c.displayEvent.at>=i.Mu&&(c.closedAt=c.displayEvent.at+i.Mu,c.closedBy="stale"),c)}function O(a){return o.value+=1,`turn-${a}-${o.value}`}function P(a,b,c){let d=b.pendingDecisions.filter(a=>(0,i.jF)(a,c)),e=b.pendingDecisions.length-d.length;return e>0&&(J(a).dialogTimedOut+=e,b.pendingDecisions=d),d}function Q(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=N(f,e);return null===g?[]:P(f,g,e)}function R(a,b,c,e=Date.now()){return N((0,d.v7)(a,b,c),e)}function S(a,b,c,d=Date.now()){return(0,i.nY)(R(a,b,c,d))}function T(a,b,c,e,f=Date.now()){let g=M((0,d.v7)(a,b,c));return null!==g&&null===g.closedAt&&(g.closedAt=f,g.closedBy=e,!0)}function U(a,b,c,e,f=Date.now()){let g=M((0,d.v7)(a,b,c));return null!==g&&null===g.closedAt&&(e?(g.scraperCompletionPolls+=1,!(g.scraperCompletionPolls<i.Tt)&&(g.closedAt=f,g.closedBy="scraper_evidence",!0)):(g.scraperCompletionPolls=0,!1))}function V(a,b,c,e=Date.now()){j.set((0,d.v7)(a,b,c),e)}function W(a,b,c){return j.get((0,d.v7)(a,b,c))??null}let X=["running","waiting"];function Y(a,b,c,g,h={}){let j=(0,d.v7)(a,b,c);return!function(a,b,c,e,f){if("session_start"!==e.event||!0!==f.sessionStartMayArriveLate)return!1;let g=av(a,b,c,e.at);if(null===g||!X.includes(g.status))return!1;let h=k.get((0,d.v7)(a,b,c))?.sessionId??null;return null===h||null==e.sessionId||e.sessionId===h}(a,b,c,g,h)?(k.set(j,g),"session_start"===g.event&&x.delete(j),$(j,g),F(a,b,c,"hook",g.at),function(a,b){switch(b.event){case"pre_tool_use":f.mW.includes(b.detail??"")||p.delete(a);return;case"notification":"idle_prompt"===b.detail&&p.delete(a);return;case"post_tool_use":case"stop":case"user_prompt_submit":case"session_start":case"session_end":p.delete(a);return;default:b.event;return}}(j,g),"session_start"===g.event&&(l.set(j,g.at),Z(j,g.at)),function(a,b){let c=L(a);if(null===c||!(b.at<c))switch(b.event){case"user_prompt_submit":ac(a,b,c,{continueOpen:!1}),ae(a);return;case"post_tool_use":ac(a,b,c,{continueOpen:!0}),ae(a);return;case"pre_tool_use":ac(a,b,c,{continueOpen:!0});return;case"stop":!function(a,b,c){let d=M(a);if(null!==d&&null===d.closedAt&&null!==d.openedAt){if(!(0,i.ZV)(d,b.sessionId))return;d.closedAt=b.at,d.closedBy="stop",d.displayEvent=ab(b),ae(a);return}m.set(a,{turnId:O(b.at),sessionId:b.sessionId,openedAt:null,closedAt:b.at,closedBy:"stop",generationAt:c,displayEvent:ab(b),pendingDecisions:[],scraperCompletionPolls:0}),ag()}(a,b,c);return;case"session_end":(function(a,b){let c=M(a);null!==c&&(0,i.ZV)(c,b.sessionId)&&(c.closedAt=b.at,c.closedBy="session_end")})(a,b),ae(a);return;case"session_start":return;case"notification":!function(a,b,c){if("permission_prompt"===b.detail)return!0===b.promptSettled?af(a,b):ad(a,c,{source:"notification",at:b.at,message:b.message??null,toolName:b.toolName??null,patterns:b.decisionPatterns??null,decisionId:b.decisionId??null,bootstrapDisplay:ab(b)});if(b.detail===e.KC){!0===b.promptSettled&&af(a,b);return}if("idle_prompt"===b.detail){ae(a);let d=M(a);if(null!==d&&null===d.closedAt){d.displayEvent=ab(b);return}if(null!==d)return;m.set(a,{turnId:O(b.at),sessionId:b.sessionId,openedAt:null,closedAt:null,closedBy:null,generationAt:c,displayEvent:ab(b),pendingDecisions:[],scraperCompletionPolls:0}),ag()}}(a,b,c);return;default:b.event;return}}(j,g),function(a,b){switch(b.event){case"notification":"idle_prompt"===b.detail&&s.set(a,{at:b.at,message:b.message??null});return;case"user_prompt_submit":case"session_start":case"session_end":s.delete(a);return;case"stop":case"pre_tool_use":case"post_tool_use":return;default:b.event;return}}(j,g),{recorded:!0}):($(j,g),F(a,b,c,"hook",g.at),{recorded:!1,skipped:"late-session-start"})}function Z(a,b){let c=m.get(a);c&&(0!==c.pendingDecisions.length&&(J(a).decisionEvicted+=c.pendingDecisions.length,c.pendingDecisions=[]),null===c.closedAt&&(c.closedAt=b,c.closedBy="generation",c.generationAt=b))}function $(a,b){"string"==typeof b.model&&""!==b.model&&(t.set(a,b.model.slice(0,e.h9)),u.set(a,b.at))}function _(a,b,c){let e=(0,d.v7)(a,b,c),f=s.get(e);if(!f)return null;let g=l.get(e);return void 0!==g&&f.at<g?null:f}function aa(a,b,c){return null!==_(a,b,c)}function ab(a){return{event:a.event,at:a.at,detail:a.detail}}function ac(a,b,c,{continueOpen:d}){let e=M(a),f=null!==e&&null===e.closedAt&&null!==e.openedAt&&(0,i.ZV)(e,b.sessionId);if(d&&f){e.displayEvent=ab(b),e.sessionId??=b.sessionId,e.scraperCompletionPolls=0;return}let g=null!==e&&null===e.openedAt&&null===e.closedAt?e.pendingDecisions:[];m.set(a,{turnId:O(b.at),sessionId:b.sessionId,openedAt:b.at,closedAt:null,closedBy:null,generationAt:c,displayEvent:ab(b),pendingDecisions:g,scraperCompletionPolls:0}),ag()}function ad(a,b,c){let d=M(a);null===d?(d={turnId:O(c.at),sessionId:null,openedAt:null,closedAt:null,closedBy:null,generationAt:b,displayEvent:c.bootstrapDisplay,pendingDecisions:[],scraperCompletionPolls:0},m.set(a,d),ag()):null!==d.closedAt&&(d={turnId:O(c.at),sessionId:null,openedAt:null,closedAt:null,closedBy:null,generationAt:b,displayEvent:c.bootstrapDisplay,pendingDecisions:[],scraperCompletionPolls:0},m.set(a,d),ag());let e=null===c.decisionId?null:(0,i.Xq)(c.decisionId);null!==c.decisionId&&null===e&&(J(a).idsDiscarded+=1);let f="notification"===c.source,g=null!==e?d.pendingDecisions.find(a=>a.decisionId===e)??d.pendingDecisions.find(a=>null===a.decisionId&&"permission-request"===a.source):d.pendingDecisions.find(a=>null===a.decisionId);if(g){g.message=(0,i.wt)(c.message)??g.message,g.toolName=(0,i.kT)(c.toolName)??g.toolName,g.patterns=(0,i.Ui)(c.patterns)??g.patterns,g.decisionId??=e,f&&(g.source="notification",g.confirmedAt??=c.at);return}if(d.pendingDecisions.length>=i.RY){J(a).decisionOverflow+=1;return}d.pendingDecisions.push({decisionId:e,at:c.at,source:c.source,message:(0,i.wt)(c.message),toolName:(0,i.kT)(c.toolName),patterns:(0,i.Ui)(c.patterns),confirmedAt:f?c.at:null,scraperCorroborated:!1,recorded:!1})}function ae(a){let b=M(a);null!==b&&(b.pendingDecisions=[])}function af(a,b){let c=M(a);if(null===c||0===c.pendingDecisions.length)return;let d=null===b.decisionId||void 0===b.decisionId?null:(0,i.Xq)(b.decisionId);if(null===d){c.pendingDecisions=[];return}c.pendingDecisions=c.pendingDecisions.filter(a=>null!==a.decisionId&&a.decisionId!==d)}function ag(){aK(m,H)}function ah(a,b,c){return k.get((0,d.v7)(a,b,c))??null}function ai(a,b,c){return t.get((0,d.v7)(a,b,c))??null}function aj(a,b,c,f,g=Date.now()){if(!f.model&&!f.effort)return;let h=(0,d.v7)(a,b,c),i=v.get(h),j=f.model?f.model.slice(0,e.h9):i?.model??null;v.set(h,{model:j,effort:f.effort??i?.effort??null,modelChangedAt:null===j?null:j===(i?.model??null)?i?.modelChangedAt??g:g}),f.model&&F(a,b,c,"frame",g)}function ak(a,b,c){let e=v.get((0,d.v7)(a,b,c));return{model:e?.model??null,effort:e?.effort??null}}function al(a,b,c){return an((0,d.v7)(a,b,c),b).info}let am=new Set(["claude"]);function an(a,b){let c=t.get(a)??null,d=v.get(a),e={model:d?.model??null,effort:d?.effort??null},f=w.get(a)??null,h=d?.modelChangedAt??null,i=null!==c&&null!==e.model&&null!==h&&am.has(b)&&h>(u.get(a)??0)&&!C(c,e.model,{crossSource:!0}),j=(0,g.Yz)(b,i?null:c,e,f);return null===j.model?{info:j,source:null}:{info:j,source:null===c||i?"frame":"hook"}}function ao(a,b,c,f){"string"==typeof f&&""!==f&&w.set((0,d.v7)(a,b,c),f.slice(0,e.h9))}function ap(a,b,c){return w.get((0,d.v7)(a,b,c))??null}function aq(a,b,c){return al(a,b,c).effort}let ar=i.Mu;function as(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c);l.set(f,e),Z(f,e),p.delete(f),s.delete(f),t.delete(f),u.delete(f),v.delete(f),w.delete(f),x.delete(f),r.delete(f)}function at(a,b,c){return l.get((0,d.v7)(a,b,c))??null}function au(a,b,c){let e=(0,d.v7)(a,b,c);k.delete(e),l.delete(e),m.delete(e),n.delete(e),p.delete(e),s.delete(e),t.delete(e),u.delete(e),v.delete(e),w.delete(e),x.delete(e),r.delete(e)}function av(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=N(f,e);if(null===g)return null;let i=g.displayEvent;if(e-i.at>=ar)return null;let j={event:i.event,at:i.at,detail:i.detail},k=P(f,g,e);if(k.length>0)return{status:"waiting",reason:"notification"===k[0].source?h.Oh.PERMISSION_PROMPT:h.Oh.PERMISSION_REQUEST,...j};if(null!==g.closedAt)return"stop"===g.closedBy?{status:"ready",reason:h.Oh.STOP,...j}:null;let l=(0,h.DA)(i.event,i.detail);return null===l||"waiting"===l.status?null===g.openedAt?null:{status:"running",reason:h.Oh.PROMPT_SUBMIT,...j}:{...l,...j}}let aw=i.h_.predicted;function ax(a,b,c,e,f=Date.now()){let g=(0,d.v7)(a,b,c);ad(g,L(g),{source:"permission-request",at:f,message:null,toolName:e,patterns:null,decisionId:null,bootstrapDisplay:{event:"notification",at:f,detail:"permission_prompt"}})}function ay(a,b,c,e,f=Date.now()){let g=(0,d.v7)(a,b,c);ad(g,L(g),{source:"notification",at:f,message:null,toolName:e.toolName,patterns:null,decisionId:e.decisionId,bootstrapDisplay:{event:"notification",at:f,detail:e.detail}})}function az(a,b,c,d=Date.now()){return Q(a,b,c,d)[0]??null}function aA(a,b,c,d=Date.now()){let e=az(a,b,c,d);e&&(e.scraperCorroborated=!0,e.confirmedAt??=d)}function aB(a,b,c){let d=az(a,b,c);d&&(d.recorded=!0)}function aC(a,b,c){ae((0,d.v7)(a,b,c))}function aD(a,b,c,e,f=Date.now()){p.set((0,d.v7)(a,b,c),{at:f,spec:e})}function aE(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=p.get(f);if(!g)return null;let h=l.get(f);return void 0!==h&&g.at<h||e-g.at>=ar?null:g}function aF(a,b,c){p.delete((0,d.v7)(a,b,c))}function aG(a,b,c,e,f,g=Date.now(),h=null){if(!f)return!1;let i=[(0,d.v7)(a,b,c),e,h??"",f].join(" "),j=q.get(i);return void 0!==j&&g-j<G||(q.set(i,g),function(a){for(let[b,c]of q)a-c>=G&&q.delete(b);for(;q.size>H;){let a=q.keys().next();if(a.done)break;q.delete(a.value)}}(g),!1)}function aH(){return q.size}let aI=["stop","session_end"];function aJ(a){let b=(0,d.v7)(a.worktreeId,a.cliToolId,a.instanceId);if(null!==a.identityKind){let c=null===a.identity?null:(0,i.Xq)(a.identity);if(null!==a.identity&&null===c&&(J(b).idsDiscarded+=1),null!==c)return!function(a,b){let c=(0,d.v7)(a.worktreeId,a.cliToolId,a.instanceId),e=r.get(c);e||(e=new Map,r.set(c,e),aK(r,H));let f=[a.event,a.detail??"",b].join(" ");return!!e.has(f)||(e.set(f,a.at),aK(e,H),!1)}(a,c)?{duplicate:!1}:(J(b).dedupDropped.identity+=1,{duplicate:!0,by:"identity"});if(aI.includes(a.event))return{duplicate:!1}}return aG(a.worktreeId,a.cliToolId,a.instanceId,a.event,a.sessionId,a.at,a.detail)?(J(b).dedupDropped.timeWindow+=1,{duplicate:!0,by:"time-window"}):{duplicate:!1}}function aK(a,b){for(;a.size>b;){let b=a.keys().next();if(b.done)break;a.delete(b.value)}}function aL(a,b,c){if(void 0===a||void 0===b){let a=0;for(let b of r.values())a+=b.size;return a}return r.get((0,d.v7)(a,b,c))?.size??0}function aM(){j.clear(),k.clear(),q.clear(),r.clear(),l.clear(),m.clear(),n.clear(),p.clear(),s.clear(),t.clear(),u.clear(),v.clear(),w.clear(),x.clear()}},49154:(a,b,c)=>{c.d(b,{GF:()=>e,Wk:()=>g,mW:()=>f});var d=c(13287);let e="question",f=[d.k$,e];function g(a){return null!==a&&f.includes(a)?"question":"permission"}},56791:(a,b,c)=>{c.r(b),c.d(b,{ACTIVE_FILTER:()=>d.ks,ACTIVE_TASK_STATUSES:()=>d.EL,AgentInstanceLimitError:()=>d.AC,CURRENT_SCHEMA_VERSION:()=>f.FT,DEFAULT_RUN_HISTORY_LIMIT:()=>d.Tu,InvalidAgentInstanceError:()=>d.ug,MAX_DISABLED_REPOSITORIES:()=>h.nc,MAX_RUN_HISTORY_DAYS:()=>d.eP,MAX_RUN_HISTORY_LIMIT:()=>d.mg,MemoDbError:()=>d.lm,NEW_SUBSCRIPTION_DEFAULTS:()=>d.s6,PUSH_DEFAULTS_VERSION:()=>d.VP,RepositoryDbError:()=>h.j8,TASK_STATUSES:()=>d.Hi,TERMINAL_TASK_STATUSES:()=>d.sA,VERIFICATION_GATE_SOURCES:()=>d.Dx,VERIFICATION_TRIGGERS:()=>d.af,WORKTREE_TODO_STATUSES:()=>d.KG,addAgentInstance:()=>d.Uq,cancelTimer:()=>d.Ud,cancelTimersByWorktree:()=>d.$$,cleanupOldTimers:()=>d.ul,clearInProgressMessageId:()=>d.YX,clearLastUserMessage:()=>d.cf,clearTimerHistory:()=>d.jf,closeDbInstance:()=>e.closeDbInstance,countAgentInstances:()=>d.fs,countDisabledRepositories:()=>h.QJ,countPushSubscriptionsForKind:()=>d.rC,countWorktreesByRepositoryPath:()=>h.kp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteWorktreeTodo:()=>d.vg,deleteWorktreesByIds:()=>d.Rm,disableExistingRepository:()=>h.eP,disableRepository:()=>h.l$,ensureEnvRepositoriesRegistered:()=>h.ES,filterExcludedPaths:()=>h.Ho,findMessageByRequestId:()=>d.Ow,finishGateResult:()=>d.C8,finishVerificationRun:()=>d.u$,getActiveCloneJobByUrl:()=>h.fD,getActiveTask:()=>d.__,getActiveTaskForInstance:()=>d.MH,getAgentInstance:()=>d.BN,getAgentInstances:()=>d.m0,getAliasedWorktreeIds:()=>d.r3,getAllPushSubscriptions:()=>d.Se,getAllRepositories:()=>h.Yg,getAllRepositoriesWithWorktreeCount:()=>h._D,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getCloneJob:()=>h.bM,getCloneJobsByStatus:()=>h.n_,getCurrentVersion:()=>f.Mj,getDailyReport:()=>d.ap,getDbInstance:()=>e.getDbInstance,getDefaultDbPath:()=>g.$b,getExcludedRepositories:()=>h.lS,getExcludedRepositoryPaths:()=>h.pr,getInitialBranch:()=>d.p4,getIssueDbPath:()=>g.zm,getLastAssistantMessageAt:()=>d.nP,getLastMessage:()=>d.sy,getLastUserMessage:()=>d.r8,getLegacyDbPaths:()=>q,getMemoById:()=>d.DN,getMemosByWorktreeId:()=>d.pZ,getMessageById:()=>d.kA,getMessages:()=>d.VL,getMessagesByDateRange:()=>d.lr,getMigrationHistory:()=>f.PS,getPendingTimerCountByWorktree:()=>d.GF,getPendingTimers:()=>d._O,getPushSubscriptionByEndpoint:()=>d.CF,getPushSubscriptionsForKind:()=>d.gn,getRepositories:()=>d.NV,getRepositoryById:()=>h.r,getRepositoryByNormalizedUrl:()=>h.Uj,getRepositoryByPath:()=>h.Dp,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodosByWorktreeId:()=>d.fr,getVerificationRun:()=>d.J6,getWorktreeAliases:()=>d.Q2,getWorktreeById:()=>d.Ui,getWorktreeIdsByRepository:()=>d.P9,getWorktreeTodoById:()=>d.eN,getWorktrees:()=>d.vi,getWorktreesByRepository:()=>d.uJ,initDatabase:()=>d.s4,isTerminalTaskStatus:()=>d.uB,isWorktreeTodoStatus:()=>d.yT,listRunningVerificationRuns:()=>d.Fi,listTaskEvents:()=>d.HB,listTasks:()=>d.Vk,listVerificationRuns:()=>d.Mt,listVerificationRunsForPeriod:()=>d.UE,markPendingPromptsAsAnswered:()=>d.PL,migrateDbIfNeeded:()=>r,migrateWorktreeIdPreservingChildren:()=>d._h,pushSubscriptionNeedsDefaultsNotice:()=>d.Zj,recomputeLastUserMessage:()=>d.jp,recordAnsweredPrompt:()=>d.pG,recordWorktreeAlias:()=>d.xJ,recoverStuckSendingTimers:()=>d.Xm,registerAndFilterRepositories:()=>h.$G,removeAgentInstance:()=>d.NU,reorderMemos:()=>d.nQ,reorderWorktreeTodos:()=>d.yb,resolveAndValidatePath:()=>p,resolveRepositoryPath:()=>h.mE,resolveWorktreeIdWithAlias:()=>d.l0,restoreRepository:()=>h.RS,rollbackMigrations:()=>f.Wy,runMigrations:()=>f.vI,saveDailyReport:()=>d.tt,saveInitialBranch:()=>d.GA,setAgentInstances:()=>d.Cs,setInProgressMessageId:()=>d.OF,setRepositoryEnabled:()=>h.iQ,updateCliToolId:()=>d.WU,updateCloneJob:()=>h.k5,updateDailyReportContent:()=>d.IF,updateFavorite:()=>d.O,updateLastUserMessage:()=>d.EU,updateLastViewedAt:()=>d.HZ,updateMemo:()=>d.UY,updateMessageContent:()=>d.e8,updatePromptData:()=>d.cw,updatePushSubscriptionPreferences:()=>d.jJ,updateRepository:()=>h.Ir,updateSelectedAgents:()=>d.DC,updateSessionState:()=>d.PP,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateVibeLocalContextWindow:()=>d.s,updateVibeLocalModel:()=>d.iu,updateWorktreeDescription:()=>d.hq,updateWorktreeLink:()=>d.z1,updateWorktreeTodo:()=>d.bl,upsertPushSubscription:()=>d.jA,upsertWorktree:()=>d.ZL,validateDbPath:()=>g.Sv,validateRepositoryPath:()=>h.Ux,validateSchema:()=>f.i6});var d=c(683),e=c(88807),f=c(67469),g=c(20416),h=c(10406),i=c(29021),j=c.n(i),k=c(33873),l=c.n(k),m=c(21820),n=c(7956);let o=(0,c(72626).h)("db-migration-path");function p(a,b){try{if(!j().existsSync(a))return null;let c=j().realpathSync(a);if((0,n.fW)(c))return o.warn(`[Security] ${b} points to system directory, skipping: ${c}`),null;return c}catch{return o.warn(`[Security] Failed to resolve ${b}: ${a}`),null}}function q(){let a=[];a.push(l().join(process.cwd(),"data","db.sqlite")),a.push(l().join(process.cwd(),"data","cm.db")),a.push(l().join((0,m.homedir)(),".commandmate","data","db.sqlite"));let b=process.env.DATABASE_PATH;if(b)try{let c=l().resolve(b);(0,n.fW)(c)?o.warn(`[Security] Skipping DATABASE_PATH in system directory: ${c}`):a.push(b)}catch{o.warn(`[Security] Invalid DATABASE_PATH: ${b}`)}return a}function r(a){let b=l().resolve(a);if((0,n.fW)(b))throw Error(`Security error: Target path cannot be in system directory: ${b}`);if(j().existsSync(a)){let b=p(a,"target path");if(b)return{migrated:!1,targetPath:b}}for(let a of q()){let c=p(a,"legacy path");if(!c)continue;let d=`${c}.bak`;j().copyFileSync(c,d),j().chmodSync(d,384);let e=l().dirname(b);return j().existsSync(e)||j().mkdirSync(e,{recursive:!0,mode:448}),j().copyFileSync(c,b),o.info(`[Migration] Database migrated from ${c} to ${b}`),o.info(`[Migration] Backup created at ${d}`),{migrated:!0,sourcePath:c,targetPath:b,backupPath:d}}return{migrated:!1,targetPath:b}}},67882:(a,b,c)=>{c.d(b,{DA:()=>e,O_:()=>f,Oh:()=>d,_K:()=>i,kA:()=>g,px:()=>h});let d={PROMPT_SUBMIT:"hook_prompt_submit",STOP:"hook_stop",PERMISSION_PROMPT:"hook_permission_prompt",PERMISSION_REQUEST:"hook_permission_request",IDLE_PROMPT:"hook_idle_prompt",PRE_TOOL_USE:"hook_pre_tool_use",POST_TOOL_USE:"hook_post_tool_use"};function e(a,b){switch(a){case"user_prompt_submit":return{status:"running",reason:d.PROMPT_SUBMIT};case"pre_tool_use":return{status:"running",reason:d.PRE_TOOL_USE};case"post_tool_use":return{status:"running",reason:d.POST_TOOL_USE};case"stop":return{status:"ready",reason:d.STOP};case"notification":if("permission_prompt"===b)return{status:"waiting",reason:d.PERMISSION_PROMPT};if("idle_prompt"===b)return{status:"ready",reason:d.IDLE_PROMPT};return null;default:return null}}function f(a,b=!1){switch(a){case"waiting":return{isWaitingForResponse:!0,isProcessing:!1};case"running":return{isWaitingForResponse:!1,isProcessing:!b};default:return{isWaitingForResponse:!1,isProcessing:!1}}}function g(a){return a?a.isWaitingForResponse?"waiting":a.isProcessing?"running":a.isRunning?"ready":"idle":"idle"}function h(a){return a?.isUnclassified===!0&&"ready"===g(a)}function i(a){return a.isSessionRunning?a.isWaitingForResponse?"waiting":a.isProcessing?"running":"ready":null}},81254:(a,b,c)=>{function d(a){return"answer_only"===a||"answer_then_enter"===a}c.d(b,{LT:()=>e,MI:()=>d,XF:()=>f});let e="unclassified";function f(a){return null!=a&&a.type!==e}}};
1
+ "use strict";exports.id=6661,exports.ids=[6661],exports.modules={24581:(a,b,c)=>{c.d(b,{Mu:()=>f,RY:()=>i,Tt:()=>h,Ui:()=>p,Xq:()=>l,ZV:()=>s,h_:()=>g,jF:()=>q,kT:()=>o,nY:()=>k,qX:()=>r,wt:()=>n});var d=c(62887),e=c(36051);let f=18e5,g={predicted:2e4,confirmed:18e5},h=3,i=16,j={turnId:null,openedAt:null,closedAt:null,closedBy:null};function k(a){return null===a?j:{turnId:a.turnId,openedAt:a.openedAt,closedAt:a.closedAt,closedBy:a.closedBy}}function l(a){if("string"!=typeof a||0===a.length||a.length>128)return null;for(let b=0;b<a.length;b++){let c=a.charCodeAt(b);if(c<32||127===c)return null}return a}function m(a,b){return"string"!=typeof a||""===a?null:a.slice(0,b)}function n(a){return m(a,e.lY)}function o(a){return m(a,d.h9)}function p(a){if(!Array.isArray(a))return null;let b=[];for(let c of a)if("string"==typeof c&&""!==c&&(b.push(c.slice(0,200)),b.length>=8))break;return b.length>0?b:null}function q(a,b){let c=null===a.confirmedAt?g.predicted:g.confirmed;return b-a.at<c}function r(a,b,c){return null!==b&&c-a.at>=1e3*b}function s(a,b){return null===a.sessionId||null===b||a.sessionId===b}},26547:(a,b,c)=>{c.d(b,{Yz:()=>H,jw:()=>F});var d=c(51297),e=c(85164);let f=["minimal","low","medium","high","xhigh","max","ultra","persistent"];function g(){return{model:null,effort:null}}let h=/^[A-Za-z0-9][A-Za-z0-9._:@/-]*$/,i=/^[A-Za-z0-9][A-Za-z0-9 .()[\]_:@/-]*$/;function j(a){return a.length>0&&a.length<=64&&h.test(a)}function k(a){return a.length>0&&a.length<=64&&i.test(a)}function l(a,b={}){let c=a.trim().toLowerCase();if(""===c)return null;if(f.includes(c))return c;if(!b.allowTruncated||c.length<2)return null;let d=f.filter(a=>a.length===c.length+1&&a.startsWith(c));return 1===d.length?d[0]:null}let m=/^\s*([^\s·]+)(?:\s+(minimal|low|medium|high|xhigh|max|ultra|persistent)\b)?/i,n=/^\s*[^\s·]+\s+[A-Za-z][A-Za-z_-]*(?=\s|$)/,o=/^\s*\S[^·]*·\s*~?\/\S*(?:\s*·[^\n]*|[^\S\n]{2,}\S[^\n]*)$/;function p(a){if(!e.aW.test(a)&&!o.test(a))return null;let b=a.indexOf("\xb7");if(b<0)return null;let c=a.slice(0,b),d=m.exec(c);if(!d)return null;let f=d[1];if(!j(f))return null;let g=d[2]?l(d[2]):null;return null!==g||/\d/.test(f)?null===g&&n.test(c)?{model:f,effort:null,effortUnreadable:!0}:{model:f,effort:g}:null}let q=/^\s*[\u2500-\u259F][\s\u2500-\u259F]*(\S[^\u2500-\u259F]*?)\s+with\s+(minimal|low|medium|high|xhigh)\s+effort\b/i;function r(a){let b=q.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:l(b[2])}:null}let s=/^\s*⎿\s+(?:Set model to|Kept model as)\s+(?!(?:and saved as your default|for this session only)\b)([A-Za-z0-9][A-Za-z0-9 .()[\]_:@/-]*?)(?:\s+(?:and saved as your default for new sessions|for this session only))?(?:\s+with\s+([A-Za-z]+)\s+effort\b[^·]*)?\s*(?:·.*)?$/;function t(a){let b=s.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:b[2]?l(b[2]):null}:null}let u=/^\s*(?:\?\s+for\s+shortcuts|esc\s+to\s+cancel)\b/i,v=/^\s*[\u2500-\u259F][\s\u2500-\u259F]*(\S[^\u2500-\u259F]*?)\s+\((minimal|low|medium|high|xhigh)\)\s*$/i;function w(a){if(!u.test(a))return null;let b=a.lastIndexOf("\xb7");if(b<0)return null;let c=l(a.slice(b+1),{allowTruncated:!0});if(!c)return null;let d=a.slice(0,b).trimEnd().split(/\s{2,}/),e=(d[d.length-1]??"").trim();return{model:k(e)?e:null,effort:c}}function x(a){let b=v.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:l(b[2])}:null}let y=/^\s*[●◉◎○]\s+Model\s+changed\s+from\s+\S+(?:\s+\([^)]*\))?\s+to\s+(\S+)(?:\s+\((minimal|low|medium|high|xhigh)\))?\s+for\s+this\s+session\b/i;function z(a){let b=y.exec(a);if(!b)return null;let c=b[1];return j(c)?{model:c,effort:b[2]?l(b[2]):null}:null}let A=/^\s*▣\s+[A-Za-z][A-Za-z0-9-]*\s+·\s+([^·]+?)(?:\s+·\s+[\d.]+\s?m?s)?\s*$/;function B(a){let b=A.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:null}:null}let C=/^\s*#\s+models:\s*([^·]+?)(?:\s+with\s+([A-Za-z]+)\s+effort)?\s*(?:·|$)/i;function D(a){let b=C.exec(a);if(!b)return null;let c=b[1].trim();return k(c)?{model:c,effort:b[2]?l(b[2]):null}:null}function E(a,b){let c=a.split("\n");for(let a=c.length-1;a>=0;a--){let e=b((0,d.aJ)(c[a]));if(e)return e}return null}function F(a,b){if(!b)return g();switch(a){case"codex":return E(b,p)??g();case"claude":return E(b,r)??E(b,t)??g();case"antigravity":return E(b,w)??E(b,x)??g();case"copilot":{let a=function(a){let b=a.split("\n");for(let a=b.length-1;a>=0;a--){let c=(0,d.aJ)(b[a]);if(""!==c.trim()){if(!e.Ub.test(c)&&!e.tJ.test(c))return null;let a=c.trim().split(/\s{2,}/);if(a.length<2)return null;let b=a[a.length-1].split("\xb7").map(a=>a.trim());if(b.length>2)return null;let d=b[0];if(!k(d))return null;if(1===b.length)return{model:d,effort:null};let f=l(b[1]);return null===f?null:{model:d,effort:f}}}return null}(b),c=E(b,z);if(!a)return c??g();if(null!==a.effort||null===c||null===c.effort)return a;return!function(a,b){let c=a=>a.toLowerCase().replace(/[^a-z0-9]/g,"");return c(a)===c(b)}(a.model,c.model)?a:{model:a.model,effort:c.effort}}case"opencode":return E(b,B)??g();case"command-code":return E(b,D)??g();default:return g()}}let G=/-(low|medium|high)$/i;function H(a,b,c,d){let e=(b||null)??c?.model??null,f=c?.effort??null,g="antigravity"===a?function(a){if(!a)return null;let b=G.exec(a);return b?b[1].toLowerCase():null}(e)??f:f;return{model:e,effort:(d||null)??g}}},36051:(a,b,c)=>{c.d(b,{PP:()=>g,QB:()=>e,Yo:()=>j,fO:()=>k,lY:()=>f});var d=c(81254);let e=[{number:1,label:"Allow once",reply:"once"},{number:2,label:"Allow always",reply:"always"},{number:3,label:"Reject",reply:"reject"}],f=500;function g(a){return"string"==typeof a&&""!==a}let h={notification:"Notification(permission_prompt)","permission-request":"PermissionRequest (no decision)"};function i(a,b){let c=[`A dialog is open in ${a}: the agent reported it via ${h[b.source]}${b.toolName?` for ${b.toolName}`:""}, but the detection layer published no options for it.`];if(b.decisionOptions&&b.decisionOptions.length>0?c.push(`Answer it with \`commandmate respond ${a} <number>\`: `+b.decisionOptions.map(a=>`${a.number} = ${a.label} (${a.reply})`).join(", ")+". The reply goes to the agent's own API, so no keys are sent to the terminal "+`and the label works too (\`respond ${a} "Allow once"\`).`):c.push(`Answer it in the terminal, or send the option NUMBER with \`commandmate respond ${a} <number>\` — yes/no is not resolved on a numbered dialog (Issue #1681).`),b.message&&c.push(`Agent message: "${b.message}"`),b.askUserQuestion){let{question:d,labels:e,questionCount:f}=b.askUserQuestion,h=g(b.decisionId)&&1===f&&!(b.decisionOptions&&b.decisionOptions.length>0);c.push(`The agent asked${f>1?` ${f} questions, the first being`:""}: "${d}" — offering: ${e.join(" / ")}. `+(h?`Answer it with \`commandmate respond ${a} <number>\`: `+e.map((a,b)=>`${b+1} = ${a}`).join(", ")+". The number is this list's own position and the reply goes to the agent's own API, so no keys are sent to the terminal (the label works too).":"The picker renumbers and adds its own entries, so read the option NUMBER off the terminal rather than counting this list."))}return c.join(" ")}function j(a,b){return{type:d.LT,status:"pending",question:i(a,b),options:[],source:b.source,...b.message?{message:b.message}:{},...b.toolName?{toolName:b.toolName}:{},...b.askUserQuestion?{askUserQuestion:b.askUserQuestion}:{},...b.decisionOptions&&b.decisionOptions.length>0?{decisionOptions:b.decisionOptions}:{},decisionId:g(b.decisionId)?b.decisionId:null,...b.patterns&&b.patterns.length>0?{patterns:[...b.patterns]}:{}}}function k(a,b){return{type:d.LT,status:"unclassified",question:i(a,b),options:[],source:b.source,...b.message?{message:b.message}:{},...b.toolName?{toolName:b.toolName}:{},...b.askUserQuestion?{askUserQuestion:b.askUserQuestion}:{}}}},48083:(a,b,c)=>{c.r(b),c.d(b,{AGENT_EVENT_DEDUP_WINDOW_MS:()=>G,AGENT_MODEL_EFFORT_SUFFIX_PATTERN:()=>z,LIFECYCLE_AGENT_EVENT_TYPES:()=>aI,STRUCTURED_PROMPT_PROVISIONAL_MAX_AGE_MS:()=>aw,STRUCTURED_STATE_MAX_AGE_MS:()=>ar,beginAgentEventGeneration:()=>as,classifyAgentEventDelivery:()=>aJ,clearAgentStopEvents:()=>aM,clearAskUserQuestion:()=>aF,clearStructuredPromptWaiting:()=>aC,closeAgentTurn:()=>T,corroborateStructuredPromptWaiting:()=>aA,discardAgentEventState:()=>au,getAgentEventDropCounts:()=>K,getAgentEventGenerationStartedAt:()=>at,getAgentModelBaseline:()=>E,getAgentTurn:()=>R,getAskUserQuestion:()=>aE,getAwaitingInstruction:()=>_,getLastAgentEvent:()=>ah,getLastCapturedModelInfo:()=>ak,getLastKnownAgentEffort:()=>aq,getLastKnownAgentModel:()=>ai,getLastReportedAgentEffort:()=>ap,getLastStopEventAt:()=>W,getPendingDecisions:()=>Q,getPublishedAgentTurn:()=>S,getRecentEventIdentityCount:()=>aL,getRecentEventKeyCount:()=>aH,getResolvedAgentModelInfo:()=>al,getStructuredPromptWaiting:()=>az,getStructuredSessionState:()=>av,isAwaitingInstruction:()=>aa,isDuplicateAgentEvent:()=>aG,isSameAgentModelName:()=>C,markStructuredPromptRecorded:()=>aB,observeScraperCompletionEvidence:()=>U,onAgentModelChange:()=>D,recordAgentEvent:()=>Y,recordAgentReportedEffort:()=>ao,recordAgentStopEvent:()=>V,recordAskUserQuestion:()=>aD,recordCapturedModelInfo:()=>aj,reportPermissionRequestPending:()=>ax,reportQuestionPending:()=>ay});var d=c(24455),e=c(62887),f=c(49154),g=c(26547),h=c(67882),i=c(24581);let j=globalThis.__agentEventLastStopAt??(globalThis.__agentEventLastStopAt=new Map),k=globalThis.__agentEventLast??(globalThis.__agentEventLast=new Map),l=globalThis.__agentEventGenerationStartedAt??(globalThis.__agentEventGenerationStartedAt=new Map),m=globalThis.__agentEventTurns??(globalThis.__agentEventTurns=new Map),n=globalThis.__agentEventDrops??(globalThis.__agentEventDrops=new Map),o=globalThis.__agentEventTurnSeq??(globalThis.__agentEventTurnSeq={value:0}),p=globalThis.__agentEventAskUserQuestion??(globalThis.__agentEventAskUserQuestion=new Map),q=globalThis.__agentEventRecentKeys??(globalThis.__agentEventRecentKeys=new Map),r=globalThis.__agentEventRecentIdentities??(globalThis.__agentEventRecentIdentities=new Map),s=globalThis.__agentEventAwaitingInstruction??(globalThis.__agentEventAwaitingInstruction=new Map),t=globalThis.__agentEventLastModel??(globalThis.__agentEventLastModel=new Map),u=globalThis.__agentEventLastModelAt??(globalThis.__agentEventLastModelAt=new Map),v=globalThis.__agentCapturedModelInfo??(globalThis.__agentCapturedModelInfo=new Map),w=globalThis.__agentEventLastEffort??(globalThis.__agentEventLastEffort=new Map),x=globalThis.__agentModelBaseline??(globalThis.__agentModelBaseline=new Map),y=globalThis.__agentModelChangeListeners??(globalThis.__agentModelChangeListeners=new Set),z=/[-_ ](?:minimal|low|medium|high|xhigh)$/i,A=/\bcontext\b/gi;function B(a){return a.replace(z,"").replace(A,"").toLowerCase().replace(/[^a-z0-9]/g,"")}function C(a,b,c={}){let d=B(a),e=B(b);return d===e||!!c.crossSource&&0!==d.length&&0!==e.length&&(d.includes(e)||e.includes(d))}function D(a){return y.add(a),()=>{y.delete(a)}}function E(a,b,c){return x.get((0,d.v7)(a,b,c))??null}function F(a,b,c,e,f){let g=(0,d.v7)(a,b,c),{info:h,source:i}=an(g,b),j=h.model;if(null===j||null===i)return;let k=x.get(g),l={model:j,source:i};if(void 0===k){x.set(g,l),aK(x,H);return}if(C(k.model,j,{crossSource:k.source!==i}))return void x.set(g,l);x.set(g,l);var m={worktreeId:a,cliToolId:b,instanceId:c??b,from:k.model,to:j,source:e,at:f};for(let a of y)try{a(m)}catch{}}let G=3e3,H=512;function I(){return{dedupDropped:{identity:0,timeWindow:0},decisionEvicted:0,idsDiscarded:0,dialogTimedOut:0,decisionOverflow:0}}function J(a){let b=n.get(a);return b||(b=I(),n.set(a,b),aK(n,H)),b}function K(a,b,c){let e=n.get((0,d.v7)(a,b,c));return e?{...e,dedupDropped:{...e.dedupDropped}}:I()}function L(a){return l.get(a)??null}function M(a){let b=m.get(a);return b&&b.generationAt===L(a)?b:null}function N(a,b){let c=M(a);return null===c?null:(null===c.closedAt&&b-c.displayEvent.at>=i.Mu&&(c.closedAt=c.displayEvent.at+i.Mu,c.closedBy="stale"),c)}function O(a){return o.value+=1,`turn-${a}-${o.value}`}function P(a,b,c){let d=b.pendingDecisions.filter(a=>(0,i.jF)(a,c)),e=b.pendingDecisions.length-d.length;return e>0&&(J(a).dialogTimedOut+=e,b.pendingDecisions=d),d}function Q(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=N(f,e);return null===g?[]:P(f,g,e)}function R(a,b,c,e=Date.now()){return N((0,d.v7)(a,b,c),e)}function S(a,b,c,d=Date.now()){return(0,i.nY)(R(a,b,c,d))}function T(a,b,c,e,f=Date.now()){let g=M((0,d.v7)(a,b,c));return null!==g&&null===g.closedAt&&(g.closedAt=f,g.closedBy=e,!0)}function U(a,b,c,e,f=Date.now()){let g=M((0,d.v7)(a,b,c));return null!==g&&null===g.closedAt&&(e?(g.scraperCompletionPolls+=1,!(g.scraperCompletionPolls<i.Tt)&&(g.closedAt=f,g.closedBy="scraper_evidence",!0)):(g.scraperCompletionPolls=0,!1))}function V(a,b,c,e=Date.now()){j.set((0,d.v7)(a,b,c),e)}function W(a,b,c){return j.get((0,d.v7)(a,b,c))??null}let X=["running","waiting"];function Y(a,b,c,g,h={}){let j=(0,d.v7)(a,b,c);return!function(a,b,c,e,f){if("session_start"!==e.event||!0!==f.sessionStartMayArriveLate)return!1;let g=av(a,b,c,e.at);if(null===g||!X.includes(g.status))return!1;let h=k.get((0,d.v7)(a,b,c))?.sessionId??null;return null===h||null==e.sessionId||e.sessionId===h}(a,b,c,g,h)?(k.set(j,g),"session_start"===g.event&&x.delete(j),$(j,g),F(a,b,c,"hook",g.at),function(a,b){switch(b.event){case"pre_tool_use":f.mW.includes(b.detail??"")||p.delete(a);return;case"notification":"idle_prompt"===b.detail&&p.delete(a);return;case"post_tool_use":case"stop":case"user_prompt_submit":case"session_start":case"session_end":p.delete(a);return;default:b.event;return}}(j,g),"session_start"===g.event&&(l.set(j,g.at),Z(j,g.at)),function(a,b){let c=L(a);if(null===c||!(b.at<c))switch(b.event){case"user_prompt_submit":ac(a,b,c,{continueOpen:!1}),ae(a);return;case"post_tool_use":ac(a,b,c,{continueOpen:!0}),ae(a);return;case"pre_tool_use":ac(a,b,c,{continueOpen:!0});return;case"stop":!function(a,b,c){let d=M(a);if(null!==d&&null===d.closedAt&&null!==d.openedAt){if(!(0,i.ZV)(d,b.sessionId))return;d.closedAt=b.at,d.closedBy="stop",d.displayEvent=ab(b),ae(a);return}m.set(a,{turnId:O(b.at),sessionId:b.sessionId,openedAt:null,closedAt:b.at,closedBy:"stop",generationAt:c,displayEvent:ab(b),pendingDecisions:[],scraperCompletionPolls:0}),ag()}(a,b,c);return;case"session_end":(function(a,b){let c=M(a);null!==c&&(0,i.ZV)(c,b.sessionId)&&(c.closedAt=b.at,c.closedBy="session_end")})(a,b),ae(a);return;case"session_start":return;case"notification":!function(a,b,c){if("permission_prompt"===b.detail)return!0===b.promptSettled?af(a,b):ad(a,c,{source:"notification",at:b.at,message:b.message??null,toolName:b.toolName??null,patterns:b.decisionPatterns??null,decisionId:b.decisionId??null,bootstrapDisplay:ab(b)});if(b.detail===e.KC){!0===b.promptSettled&&af(a,b);return}if("idle_prompt"===b.detail){ae(a);let d=M(a);if(null!==d&&null===d.closedAt){d.displayEvent=ab(b);return}if(null!==d)return;m.set(a,{turnId:O(b.at),sessionId:b.sessionId,openedAt:null,closedAt:null,closedBy:null,generationAt:c,displayEvent:ab(b),pendingDecisions:[],scraperCompletionPolls:0}),ag()}}(a,b,c);return;default:b.event;return}}(j,g),function(a,b){switch(b.event){case"notification":"idle_prompt"===b.detail&&s.set(a,{at:b.at,message:b.message??null});return;case"user_prompt_submit":case"session_start":case"session_end":s.delete(a);return;case"stop":case"pre_tool_use":case"post_tool_use":return;default:b.event;return}}(j,g),{recorded:!0}):($(j,g),F(a,b,c,"hook",g.at),{recorded:!1,skipped:"late-session-start"})}function Z(a,b){let c=m.get(a);c&&(0!==c.pendingDecisions.length&&(J(a).decisionEvicted+=c.pendingDecisions.length,c.pendingDecisions=[]),null===c.closedAt&&(c.closedAt=b,c.closedBy="generation",c.generationAt=b))}function $(a,b){"string"==typeof b.model&&""!==b.model&&(t.set(a,b.model.slice(0,e.h9)),u.set(a,b.at))}function _(a,b,c){let e=(0,d.v7)(a,b,c),f=s.get(e);if(!f)return null;let g=l.get(e);return void 0!==g&&f.at<g?null:f}function aa(a,b,c){return null!==_(a,b,c)}function ab(a){return{event:a.event,at:a.at,detail:a.detail}}function ac(a,b,c,{continueOpen:d}){let e=M(a),f=null!==e&&null===e.closedAt&&null!==e.openedAt&&(0,i.ZV)(e,b.sessionId);if(d&&f){e.displayEvent=ab(b),e.sessionId??=b.sessionId,e.scraperCompletionPolls=0;return}let g=null!==e&&null===e.openedAt&&null===e.closedAt?e.pendingDecisions:[];m.set(a,{turnId:O(b.at),sessionId:b.sessionId,openedAt:b.at,closedAt:null,closedBy:null,generationAt:c,displayEvent:ab(b),pendingDecisions:g,scraperCompletionPolls:0}),ag()}function ad(a,b,c){let d=M(a);null===d?(d={turnId:O(c.at),sessionId:null,openedAt:null,closedAt:null,closedBy:null,generationAt:b,displayEvent:c.bootstrapDisplay,pendingDecisions:[],scraperCompletionPolls:0},m.set(a,d),ag()):null!==d.closedAt&&(d={turnId:O(c.at),sessionId:null,openedAt:null,closedAt:null,closedBy:null,generationAt:b,displayEvent:c.bootstrapDisplay,pendingDecisions:[],scraperCompletionPolls:0},m.set(a,d),ag());let e=null===c.decisionId?null:(0,i.Xq)(c.decisionId);null!==c.decisionId&&null===e&&(J(a).idsDiscarded+=1);let f="notification"===c.source,g=null!==e?d.pendingDecisions.find(a=>a.decisionId===e)??d.pendingDecisions.find(a=>null===a.decisionId&&"permission-request"===a.source):d.pendingDecisions.find(a=>null===a.decisionId);if(g){g.message=(0,i.wt)(c.message)??g.message,g.toolName=(0,i.kT)(c.toolName)??g.toolName,g.patterns=(0,i.Ui)(c.patterns)??g.patterns,g.decisionId??=e,f&&(g.source="notification",g.confirmedAt??=c.at);return}if(d.pendingDecisions.length>=i.RY){J(a).decisionOverflow+=1;return}d.pendingDecisions.push({decisionId:e,at:c.at,source:c.source,message:(0,i.wt)(c.message),toolName:(0,i.kT)(c.toolName),patterns:(0,i.Ui)(c.patterns),confirmedAt:f?c.at:null,scraperCorroborated:!1,recorded:!1})}function ae(a){let b=M(a);null!==b&&(b.pendingDecisions=[])}function af(a,b){let c=M(a);if(null===c||0===c.pendingDecisions.length)return;let d=null===b.decisionId||void 0===b.decisionId?null:(0,i.Xq)(b.decisionId);if(null===d){c.pendingDecisions=[];return}c.pendingDecisions=c.pendingDecisions.filter(a=>null!==a.decisionId&&a.decisionId!==d)}function ag(){aK(m,H)}function ah(a,b,c){return k.get((0,d.v7)(a,b,c))??null}function ai(a,b,c){return t.get((0,d.v7)(a,b,c))??null}function aj(a,b,c,f,g=Date.now()){if(!f.model&&!f.effort)return;let h=(0,d.v7)(a,b,c),i=v.get(h),j=f.model?f.model.slice(0,e.h9):i?.model??null;v.set(h,{model:j,effort:f.effortUnreadable?null:f.effort??i?.effort??null,modelChangedAt:null===j?null:j===(i?.model??null)?i?.modelChangedAt??g:g}),f.model&&F(a,b,c,"frame",g)}function ak(a,b,c){let e=v.get((0,d.v7)(a,b,c));return{model:e?.model??null,effort:e?.effort??null}}function al(a,b,c){return an((0,d.v7)(a,b,c),b).info}let am=new Set(["claude"]);function an(a,b){let c=t.get(a)??null,d=v.get(a),e={model:d?.model??null,effort:d?.effort??null},f=w.get(a)??null,h=d?.modelChangedAt??null,i=null!==c&&null!==e.model&&null!==h&&am.has(b)&&h>(u.get(a)??0)&&!C(c,e.model,{crossSource:!0}),j=(0,g.Yz)(b,i?null:c,e,f);return null===j.model?{info:j,source:null}:{info:j,source:null===c||i?"frame":"hook"}}function ao(a,b,c,f){"string"==typeof f&&""!==f&&w.set((0,d.v7)(a,b,c),f.slice(0,e.h9))}function ap(a,b,c){return w.get((0,d.v7)(a,b,c))??null}function aq(a,b,c){return al(a,b,c).effort}let ar=i.Mu;function as(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c);l.set(f,e),Z(f,e),p.delete(f),s.delete(f),t.delete(f),u.delete(f),v.delete(f),w.delete(f),x.delete(f),r.delete(f)}function at(a,b,c){return l.get((0,d.v7)(a,b,c))??null}function au(a,b,c){let e=(0,d.v7)(a,b,c);k.delete(e),l.delete(e),m.delete(e),n.delete(e),p.delete(e),s.delete(e),t.delete(e),u.delete(e),v.delete(e),w.delete(e),x.delete(e),r.delete(e)}function av(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=N(f,e);if(null===g)return null;let i=g.displayEvent;if(e-i.at>=ar)return null;let j={event:i.event,at:i.at,detail:i.detail},k=P(f,g,e);if(k.length>0)return{status:"waiting",reason:"notification"===k[0].source?h.Oh.PERMISSION_PROMPT:h.Oh.PERMISSION_REQUEST,...j};if(null!==g.closedAt)return"stop"===g.closedBy?{status:"ready",reason:h.Oh.STOP,...j}:null;let l=(0,h.DA)(i.event,i.detail);return null===l||"waiting"===l.status?null===g.openedAt?null:{status:"running",reason:h.Oh.PROMPT_SUBMIT,...j}:{...l,...j}}let aw=i.h_.predicted;function ax(a,b,c,e,f=Date.now()){let g=(0,d.v7)(a,b,c);ad(g,L(g),{source:"permission-request",at:f,message:null,toolName:e,patterns:null,decisionId:null,bootstrapDisplay:{event:"notification",at:f,detail:"permission_prompt"}})}function ay(a,b,c,e,f=Date.now()){let g=(0,d.v7)(a,b,c);ad(g,L(g),{source:"notification",at:f,message:null,toolName:e.toolName,patterns:null,decisionId:e.decisionId,bootstrapDisplay:{event:"notification",at:f,detail:e.detail}})}function az(a,b,c,d=Date.now()){return Q(a,b,c,d)[0]??null}function aA(a,b,c,d=Date.now()){let e=az(a,b,c,d);e&&(e.scraperCorroborated=!0,e.confirmedAt??=d)}function aB(a,b,c){let d=az(a,b,c);d&&(d.recorded=!0)}function aC(a,b,c){ae((0,d.v7)(a,b,c))}function aD(a,b,c,e,f=Date.now()){p.set((0,d.v7)(a,b,c),{at:f,spec:e})}function aE(a,b,c,e=Date.now()){let f=(0,d.v7)(a,b,c),g=p.get(f);if(!g)return null;let h=l.get(f);return void 0!==h&&g.at<h||e-g.at>=ar?null:g}function aF(a,b,c){p.delete((0,d.v7)(a,b,c))}function aG(a,b,c,e,f,g=Date.now(),h=null){if(!f)return!1;let i=[(0,d.v7)(a,b,c),e,h??"",f].join(" "),j=q.get(i);return void 0!==j&&g-j<G||(q.set(i,g),function(a){for(let[b,c]of q)a-c>=G&&q.delete(b);for(;q.size>H;){let a=q.keys().next();if(a.done)break;q.delete(a.value)}}(g),!1)}function aH(){return q.size}let aI=["stop","session_end"];function aJ(a){let b=(0,d.v7)(a.worktreeId,a.cliToolId,a.instanceId);if(null!==a.identityKind){let c=null===a.identity?null:(0,i.Xq)(a.identity);if(null!==a.identity&&null===c&&(J(b).idsDiscarded+=1),null!==c)return!function(a,b){let c=(0,d.v7)(a.worktreeId,a.cliToolId,a.instanceId),e=r.get(c);e||(e=new Map,r.set(c,e),aK(r,H));let f=[a.event,a.detail??"",b].join(" ");return!!e.has(f)||(e.set(f,a.at),aK(e,H),!1)}(a,c)?{duplicate:!1}:(J(b).dedupDropped.identity+=1,{duplicate:!0,by:"identity"});if(aI.includes(a.event))return{duplicate:!1}}return aG(a.worktreeId,a.cliToolId,a.instanceId,a.event,a.sessionId,a.at,a.detail)?(J(b).dedupDropped.timeWindow+=1,{duplicate:!0,by:"time-window"}):{duplicate:!1}}function aK(a,b){for(;a.size>b;){let b=a.keys().next();if(b.done)break;a.delete(b.value)}}function aL(a,b,c){if(void 0===a||void 0===b){let a=0;for(let b of r.values())a+=b.size;return a}return r.get((0,d.v7)(a,b,c))?.size??0}function aM(){j.clear(),k.clear(),q.clear(),r.clear(),l.clear(),m.clear(),n.clear(),p.clear(),s.clear(),t.clear(),u.clear(),v.clear(),w.clear(),x.clear()}},49154:(a,b,c)=>{c.d(b,{GF:()=>e,Wk:()=>g,mW:()=>f});var d=c(13287);let e="question",f=[d.k$,e];function g(a){return null!==a&&f.includes(a)?"question":"permission"}},56791:(a,b,c)=>{c.r(b),c.d(b,{ACTIVE_FILTER:()=>d.ks,ACTIVE_TASK_STATUSES:()=>d.EL,AgentInstanceLimitError:()=>d.AC,CURRENT_SCHEMA_VERSION:()=>f.FT,DEFAULT_RUN_HISTORY_LIMIT:()=>d.Tu,InvalidAgentInstanceError:()=>d.ug,MAX_DISABLED_REPOSITORIES:()=>h.nc,MAX_RUN_HISTORY_DAYS:()=>d.eP,MAX_RUN_HISTORY_LIMIT:()=>d.mg,MemoDbError:()=>d.lm,NEW_SUBSCRIPTION_DEFAULTS:()=>d.s6,PUSH_DEFAULTS_VERSION:()=>d.VP,RepositoryDbError:()=>h.j8,TASK_STATUSES:()=>d.Hi,TERMINAL_TASK_STATUSES:()=>d.sA,VERIFICATION_GATE_SOURCES:()=>d.Dx,VERIFICATION_TRIGGERS:()=>d.af,WORKTREE_TODO_STATUSES:()=>d.KG,addAgentInstance:()=>d.Uq,cancelTimer:()=>d.Ud,cancelTimersByWorktree:()=>d.$$,cleanupOldTimers:()=>d.ul,clearInProgressMessageId:()=>d.YX,clearLastUserMessage:()=>d.cf,clearTimerHistory:()=>d.jf,closeDbInstance:()=>e.closeDbInstance,countAgentInstances:()=>d.fs,countDisabledRepositories:()=>h.QJ,countPushSubscriptionsForKind:()=>d.rC,countWorktreesByRepositoryPath:()=>h.kp,createCloneJob:()=>h.tw,createGateResult:()=>d.hl,createMemo:()=>d.To,createMessage:()=>d.oH,createRepository:()=>h.vB,createTask:()=>d.UT,createTimer:()=>d.CR,createVerificationRun:()=>d.rY,createWorktreeTodo:()=>d.yy,deleteAllMessages:()=>d.pE,deleteMemo:()=>d.cP,deleteMessageById:()=>d.DF,deleteMessagesByCliTool:()=>d.lA,deleteMessagesByInstance:()=>d.Qp,deletePushSubscriptionByEndpoint:()=>d.th,deleteRepository:()=>h.oG,deleteRepositoryWorktrees:()=>d.oZ,deleteSessionState:()=>d.ZP,deleteWorktreeTodo:()=>d.vg,deleteWorktreesByIds:()=>d.Rm,disableExistingRepository:()=>h.eP,disableRepository:()=>h.l$,ensureEnvRepositoriesRegistered:()=>h.ES,filterExcludedPaths:()=>h.Ho,findMessageByRequestId:()=>d.Ow,finishGateResult:()=>d.C8,finishVerificationRun:()=>d.u$,getActiveCloneJobByUrl:()=>h.fD,getActiveTask:()=>d.__,getActiveTaskForInstance:()=>d.MH,getAgentInstance:()=>d.BN,getAgentInstances:()=>d.m0,getAliasedWorktreeIds:()=>d.r3,getAllPushSubscriptions:()=>d.Se,getAllRepositories:()=>h.Yg,getAllRepositoriesWithWorktreeCount:()=>h._D,getAllWorktreeAliases:()=>d.fX,getAllWorktreeIds:()=>d.nO,getAllWorktreePathIds:()=>d.Sj,getCloneJob:()=>h.bM,getCloneJobsByStatus:()=>h.n_,getCurrentVersion:()=>f.Mj,getDailyReport:()=>d.ap,getDbInstance:()=>e.getDbInstance,getDefaultDbPath:()=>g.$b,getExcludedRepositories:()=>h.lS,getExcludedRepositoryPaths:()=>h.pr,getInitialBranch:()=>d.p4,getIssueDbPath:()=>g.zm,getLastAssistantMessageAt:()=>d.nP,getLastMessage:()=>d.sy,getLastUserMessage:()=>d.r8,getLegacyDbPaths:()=>q,getMemoById:()=>d.DN,getMemosByWorktreeId:()=>d.pZ,getMessageById:()=>d.kA,getMessages:()=>d.VL,getMessagesByDateRange:()=>d.lr,getMigrationHistory:()=>f.PS,getPendingTimerCountByWorktree:()=>d.GF,getPendingTimers:()=>d._O,getPushSubscriptionByEndpoint:()=>d.CF,getPushSubscriptionsForKind:()=>d.gn,getRepositories:()=>d.NV,getRepositoryById:()=>h.r,getRepositoryByNormalizedUrl:()=>h.Uj,getRepositoryByPath:()=>h.Dp,getRunningVerificationRun:()=>d.WZ,getSessionState:()=>d.y1,getTask:()=>d.gg,getTimerById:()=>d.kx,getTimersByWorktree:()=>d.DP,getTodosByWorktreeId:()=>d.fr,getVerificationRun:()=>d.J6,getWorktreeAliases:()=>d.Q2,getWorktreeById:()=>d.Ui,getWorktreeIdsByRepository:()=>d.P9,getWorktreeTodoById:()=>d.eN,getWorktrees:()=>d.vi,getWorktreesByRepository:()=>d.uJ,initDatabase:()=>d.s4,isTerminalTaskStatus:()=>d.uB,isWorktreeTodoStatus:()=>d.yT,listRunningVerificationRuns:()=>d.Fi,listTaskEvents:()=>d.HB,listTasks:()=>d.Vk,listVerificationRuns:()=>d.Mt,listVerificationRunsForPeriod:()=>d.UE,markPendingPromptsAsAnswered:()=>d.PL,migrateDbIfNeeded:()=>r,migrateWorktreeIdPreservingChildren:()=>d._h,pushSubscriptionNeedsDefaultsNotice:()=>d.Zj,recomputeLastUserMessage:()=>d.jp,recordAnsweredPrompt:()=>d.pG,recordWorktreeAlias:()=>d.xJ,recoverStuckSendingTimers:()=>d.Xm,registerAndFilterRepositories:()=>h.$G,removeAgentInstance:()=>d.NU,reorderMemos:()=>d.nQ,reorderWorktreeTodos:()=>d.yb,resolveAndValidatePath:()=>p,resolveRepositoryPath:()=>h.mE,resolveWorktreeIdWithAlias:()=>d.l0,restoreRepository:()=>h.RS,rollbackMigrations:()=>f.Wy,runMigrations:()=>f.vI,saveDailyReport:()=>d.tt,saveInitialBranch:()=>d.GA,setAgentInstances:()=>d.Cs,setInProgressMessageId:()=>d.OF,setRepositoryEnabled:()=>h.iQ,updateCliToolId:()=>d.WU,updateCloneJob:()=>h.k5,updateDailyReportContent:()=>d.IF,updateFavorite:()=>d.O,updateLastUserMessage:()=>d.EU,updateLastViewedAt:()=>d.HZ,updateMemo:()=>d.UY,updateMessageContent:()=>d.e8,updatePromptData:()=>d.cw,updatePushSubscriptionPreferences:()=>d.jJ,updateRepository:()=>h.Ir,updateSelectedAgents:()=>d.DC,updateSessionState:()=>d.PP,updateStatus:()=>d.yB,updateTimerStatus:()=>d.j2,updateVibeLocalContextWindow:()=>d.s,updateVibeLocalModel:()=>d.iu,updateWorktreeDescription:()=>d.hq,updateWorktreeLink:()=>d.z1,updateWorktreeTodo:()=>d.bl,upsertPushSubscription:()=>d.jA,upsertWorktree:()=>d.ZL,validateDbPath:()=>g.Sv,validateRepositoryPath:()=>h.Ux,validateSchema:()=>f.i6});var d=c(683),e=c(88807),f=c(67469),g=c(20416),h=c(10406),i=c(29021),j=c.n(i),k=c(33873),l=c.n(k),m=c(21820),n=c(7956);let o=(0,c(72626).h)("db-migration-path");function p(a,b){try{if(!j().existsSync(a))return null;let c=j().realpathSync(a);if((0,n.fW)(c))return o.warn(`[Security] ${b} points to system directory, skipping: ${c}`),null;return c}catch{return o.warn(`[Security] Failed to resolve ${b}: ${a}`),null}}function q(){let a=[];a.push(l().join(process.cwd(),"data","db.sqlite")),a.push(l().join(process.cwd(),"data","cm.db")),a.push(l().join((0,m.homedir)(),".commandmate","data","db.sqlite"));let b=process.env.DATABASE_PATH;if(b)try{let c=l().resolve(b);(0,n.fW)(c)?o.warn(`[Security] Skipping DATABASE_PATH in system directory: ${c}`):a.push(b)}catch{o.warn(`[Security] Invalid DATABASE_PATH: ${b}`)}return a}function r(a){let b=l().resolve(a);if((0,n.fW)(b))throw Error(`Security error: Target path cannot be in system directory: ${b}`);if(j().existsSync(a)){let b=p(a,"target path");if(b)return{migrated:!1,targetPath:b}}for(let a of q()){let c=p(a,"legacy path");if(!c)continue;let d=`${c}.bak`;j().copyFileSync(c,d),j().chmodSync(d,384);let e=l().dirname(b);return j().existsSync(e)||j().mkdirSync(e,{recursive:!0,mode:448}),j().copyFileSync(c,b),o.info(`[Migration] Database migrated from ${c} to ${b}`),o.info(`[Migration] Backup created at ${d}`),{migrated:!0,sourcePath:c,targetPath:b,backupPath:d}}return{migrated:!1,targetPath:b}}},67882:(a,b,c)=>{c.d(b,{DA:()=>e,O_:()=>f,Oh:()=>d,_K:()=>i,kA:()=>g,px:()=>h});let d={PROMPT_SUBMIT:"hook_prompt_submit",STOP:"hook_stop",PERMISSION_PROMPT:"hook_permission_prompt",PERMISSION_REQUEST:"hook_permission_request",IDLE_PROMPT:"hook_idle_prompt",PRE_TOOL_USE:"hook_pre_tool_use",POST_TOOL_USE:"hook_post_tool_use"};function e(a,b){switch(a){case"user_prompt_submit":return{status:"running",reason:d.PROMPT_SUBMIT};case"pre_tool_use":return{status:"running",reason:d.PRE_TOOL_USE};case"post_tool_use":return{status:"running",reason:d.POST_TOOL_USE};case"stop":return{status:"ready",reason:d.STOP};case"notification":if("permission_prompt"===b)return{status:"waiting",reason:d.PERMISSION_PROMPT};if("idle_prompt"===b)return{status:"ready",reason:d.IDLE_PROMPT};return null;default:return null}}function f(a,b=!1){switch(a){case"waiting":return{isWaitingForResponse:!0,isProcessing:!1};case"running":return{isWaitingForResponse:!1,isProcessing:!b};default:return{isWaitingForResponse:!1,isProcessing:!1}}}function g(a){return a?a.isWaitingForResponse?"waiting":a.isProcessing?"running":a.isRunning?"ready":"idle":"idle"}function h(a){return a?.isUnclassified===!0&&"ready"===g(a)}function i(a){return a.isSessionRunning?a.isWaitingForResponse?"waiting":a.isProcessing?"running":"ready":null}},81254:(a,b,c)=>{function d(a){return"answer_only"===a||"answer_then_enter"===a}c.d(b,{LT:()=>e,MI:()=>d,XF:()=>f});let e="unclassified";function f(a){return null!=a&&a.type!==e}}};
@@ -1,4 +1,4 @@
1
- exports.id=8728,exports.ids=[8728],exports.modules={3453:(a,b,c)=>{"use strict";c.d(b,{Rh:()=>r,T1:()=>o,Z2:()=>m,c$:()=>n,nu:()=>q});var d=c(72626),e=c(80438);let f=(0,d.h)("ip-restriction"),g="::ffff:",h=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,i=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\/(\d{1,2})$/,j=process.env.CM_ALLOWED_IPS?.trim()||"",k=process.env.CM_TRUST_PROXY?.trim()||"";""!==k&&"true"!==k&&"false"!==k&&(0,e.h)(f,"trust-proxy-unexpected",{value:k});let l="true"===k;function m(a){return a?a.toLowerCase().startsWith(g)?a.substring(g.length):a:""}function n(a,b){if(0===b.length)return!1;let c=function(a){let b=a.match(h);if(!b)return null;let c=[parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10),parseInt(b[4],10)];for(let a of c)if(a<0||a>255)return null;return(c[0]<<24|c[1]<<16|c[2]<<8|c[3])>>>0}(m(a));if(null===c)return!1;for(let a of b)if((c&a.mask)>>>0===a.network)return!0;return!1}function o(a){if(l){let b=a.get("x-forwarded-for");if(b){let a=b.split(",")[0].trim();if(a)return a}}return a.get("x-real-ip")||null}let p=j.length>0?function(a){let b=a.trim();if(0===b.length)return[];let c=b.split(",").map(a=>a.trim()).filter(a=>a.length>0);if(c.length>256)throw Error(`CM_ALLOWED_IPS: too many entries (${c.length}). Maximum is 256.`);let d=[];for(let a of c){if(a.length>18)throw Error(`CM_ALLOWED_IPS: entry "${a}" exceeds maximum length of 18 characters.`);let b=a.match(i);if(b){let c=[parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10),parseInt(b[4],10)],e=parseInt(b[5],10);for(let b of c)if(b<0||b>255)throw Error(`CM_ALLOWED_IPS: invalid octet in "${a}". Octets must be 0-255.`);if(e<0||e>32)throw Error(`CM_ALLOWED_IPS: invalid prefix length in "${a}". Must be 0-32.`);let f=(c[0]<<24|c[1]<<16|c[2]<<8|c[3])>>>0,g=0===e?0:0xffffffff<<32-e>>>0;d.push({network:(f&g)>>>0,mask:g});continue}let c=a.match(h);if(c){let b=[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10),parseInt(c[4],10)];for(let c of b)if(c<0||c>255)throw Error(`CM_ALLOWED_IPS: invalid octet in "${a}". Octets must be 0-255.`);let e=(b[0]<<24|b[1]<<16|b[2]<<8|b[3])>>>0;d.push({network:e,mask:0xffffffff});continue}throw Error(`CM_ALLOWED_IPS: invalid entry "${a}". Expected IPv4 address or CIDR notation.`)}return d}(j):[];function q(){return p}function r(){return j.length>0}},7015:(a,b,c)=>{"use strict";c.d(b,{Ds:()=>g});var d=c(81719);class e{constructor(a,b=3e4){this.cache=new Map,this.allAppsCache=null,this.lastRefresh=0,this.db=a,this.ttl=b}getTTL(){return this.ttl}isStale(){return Date.now()-this.lastRefresh>this.ttl}async refresh(){let a=(0,d.$i)(this.db);for(let b of(this.cache.clear(),a))this.cache.set(b.pathPrefix,b);this.allAppsCache=a,this.lastRefresh=Date.now()}async getByPathPrefix(a){return this.isStale()&&await this.refresh(),this.cache.get(a)??null}async getAll(){return this.isStale()&&await this.refresh(),this.allAppsCache??[]}invalidate(){this.cache.clear(),this.allAppsCache=null,this.lastRefresh=0}invalidateByIssueNo(a){this.invalidate()}}let f=null;function g(a){if(!f){if(!a)throw Error("Database instance required to initialize cache");f=new e(a)}return f}},23854:(a,b,c)=>{"use strict";c.d(b,{$G:()=>f,AL:()=>h,DZ:()=>d,Qe:()=>g,ie:()=>e});let d=4e3,e=15e3;function f(a){var b,c;if(b=a.from,c=a.to,b.worktreeId===c.worktreeId&&b.instanceId===c.instanceId)return{code:"RELAY_SELF_TARGET",message:"A session cannot relay a reply to itself. --reply-to must name a different worktree or a different agent instance."};let d=null===a.parentHops?1:a.parentHops+1;return null===a.parentHops||a.allowRelayChain?d>3?{code:"RELAY_HOPS_EXCEEDED",message:`Relay chains stop at 3 hops; this one would be ${d}. Report the reply to whoever asked instead of forwarding it again.`}:a.openBetween>=1?{code:"RELAY_DUPLICATE_PENDING",message:"There is already an open relay between these two sessions. Wait for it, or withdraw it with `commandmate relays cancel <id>`."}:{ok:!0,hops:d}:{code:"RELAY_CHAIN_BLOCKED",message:"The last message this session was given arrived over a relay, so opening another one would chain two deliveries together. Pass --allow-relay-chain if that is what you mean."}}function g(a){return"code"in a}function h(a){return void 0!==a&&Number.isFinite(a)?Math.min(6048e5,Math.max(6e4,Math.trunc(a))):864e5}},26838:(a,b,c)=>{"use strict";c.d(b,{E2:()=>o,Mj:()=>m,Sw:()=>l,lX:()=>p});var d=c(29021),e=c(33873),f=c(54325),g=c(90164);let h=/^v?\d+\.\d+\.\d+$/,i=/^[a-zA-Z0-9.\-\s_v]+$/,j=[".next","required-server-files.json"],k=globalThis.__versionCheckCache??(globalThis.__versionCheckCache={result:null,fetchedAt:0,rateLimitResetAt:null});function l(){return function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),"package.json"),"utf-8"),b=JSON.parse(a);if("commandmate"===b.name&&"string"==typeof b.version&&b.version.length>0)return b.version;return null}catch{return null}}()??"0.40.0"}function m(){return l()}let n=null;function o(a){let b=n??=function(){{let a=function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),...j),"utf-8"),b=JSON.parse(a),c=b.config?.env?.NEXT_PUBLIC_APP_VERSION;if("string"==typeof c&&c.length>0)return c;return null}catch{return null}}();if(a)return a}return"0.40.0"}();return(0,f.LE)(b,a)?{serverVersion:b,clientVersion:a}:null}async function p(){try{var a,b,c;if(null!==k.result&&Date.now()-k.fetchedAt<36e5||k.rateLimitResetAt&&(!(Date.now()>=k.rateLimitResetAt)||(k.rateLimitResetAt=null,0)))return k.result;let d=await fetch("https://api.github.com/repos/Kewton/CommandMate/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":`CommandMate/${m()}`},cache:"no-store",signal:AbortSignal.timeout(5e3)});if(403===d.status)return function(a){let b=a.headers.get("X-RateLimit-Reset");b?k.rateLimitResetAt=1e3*parseInt(b,10):k.rateLimitResetAt=Date.now()+36e5}(d),k.result;if(!d.ok)return k.result;let e=await d.json(),f=m(),j=e.tag_name.replace(/^v/,""),l={hasUpdate:function(a,b){if(!h.test(a)||!h.test(b))return!1;let c=a=>a.replace(/^v/,"").split(".").map(Number),[d,e,f]=c(a),[g,i,j]=c(b);return g!==d?g>d:i!==e?i>e:j>f}(f,e.tag_name),currentVersion:f,latestVersion:j,releaseUrl:(a=e.html_url).startsWith(g.Dk)?a:null,releaseName:(b=e.name,c=e.tag_name,i.test(b)&&b.length<=128?b:c),publishedAt:e.published_at};return k.result=l,k.fetchedAt=Date.now(),l}catch{return k.result}}},39727:()=>{},43015:(a,b,c)=>{"use strict";c.r(b),c.d(b,{CM_INGRESS_HEADER:()=>T,REMOTE_ONLY_AUTH_SCOPE:()=>U,WORKTREE_RENAMED_EVENT_TYPE:()=>ar,__internal:()=>ax,broadcast:()=>ao,broadcastMessage:()=>aq,cleanupRooms:()=>au,closeWebSocket:()=>aw,handleProxyUpgrade:()=>Y,hasRoomSubscribers:()=>ap,isIngressAuthExempt:()=>W,migrateWorktreeRooms:()=>as,setupWebSocket:()=>aa,stampIngress:()=>V});var d=c(81503),e=c(91645),f=c(88081),g=c(3453),h=c(15194),i=c(40964),j=c(88807),k=c(56791);let l={capturePaneCalls:0,activeControlSessions:0,subscriberCount:0,cleanupCount:0,firstOutputLatencyCount:0,firstOutputLatencyTotalMs:0,firstOutputLatencyLastMs:null,firstOutputLatencyMinMs:null,firstOutputLatencyMaxMs:null};var m=c(79892),n=c(72626),o=c(79646);class p{push(a){if(0===a.length)return[];let b=(this.remainder+a).split("\n");this.remainder=b.pop()??"";let c=[];for(let a of b){let b=a.endsWith("\r")?a.slice(0,-1):a,d=this.parseLine(b);d&&c.push(d)}return c}flush(){if(0===this.remainder.length)return[];let a=this.parseLine(this.remainder);return this.remainder="",a?[a]:[]}parseLine(a){return 0===a.length?{type:"output",data:"\n"}:a.startsWith("%output ")?{type:"output",data:`${a.slice(8)}
1
+ exports.id=8728,exports.ids=[8728],exports.modules={3453:(a,b,c)=>{"use strict";c.d(b,{Rh:()=>r,T1:()=>o,Z2:()=>m,c$:()=>n,nu:()=>q});var d=c(72626),e=c(80438);let f=(0,d.h)("ip-restriction"),g="::ffff:",h=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,i=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\/(\d{1,2})$/,j=process.env.CM_ALLOWED_IPS?.trim()||"",k=process.env.CM_TRUST_PROXY?.trim()||"";""!==k&&"true"!==k&&"false"!==k&&(0,e.h)(f,"trust-proxy-unexpected",{value:k});let l="true"===k;function m(a){return a?a.toLowerCase().startsWith(g)?a.substring(g.length):a:""}function n(a,b){if(0===b.length)return!1;let c=function(a){let b=a.match(h);if(!b)return null;let c=[parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10),parseInt(b[4],10)];for(let a of c)if(a<0||a>255)return null;return(c[0]<<24|c[1]<<16|c[2]<<8|c[3])>>>0}(m(a));if(null===c)return!1;for(let a of b)if((c&a.mask)>>>0===a.network)return!0;return!1}function o(a){if(l){let b=a.get("x-forwarded-for");if(b){let a=b.split(",")[0].trim();if(a)return a}}return a.get("x-real-ip")||null}let p=j.length>0?function(a){let b=a.trim();if(0===b.length)return[];let c=b.split(",").map(a=>a.trim()).filter(a=>a.length>0);if(c.length>256)throw Error(`CM_ALLOWED_IPS: too many entries (${c.length}). Maximum is 256.`);let d=[];for(let a of c){if(a.length>18)throw Error(`CM_ALLOWED_IPS: entry "${a}" exceeds maximum length of 18 characters.`);let b=a.match(i);if(b){let c=[parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10),parseInt(b[4],10)],e=parseInt(b[5],10);for(let b of c)if(b<0||b>255)throw Error(`CM_ALLOWED_IPS: invalid octet in "${a}". Octets must be 0-255.`);if(e<0||e>32)throw Error(`CM_ALLOWED_IPS: invalid prefix length in "${a}". Must be 0-32.`);let f=(c[0]<<24|c[1]<<16|c[2]<<8|c[3])>>>0,g=0===e?0:0xffffffff<<32-e>>>0;d.push({network:(f&g)>>>0,mask:g});continue}let c=a.match(h);if(c){let b=[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10),parseInt(c[4],10)];for(let c of b)if(c<0||c>255)throw Error(`CM_ALLOWED_IPS: invalid octet in "${a}". Octets must be 0-255.`);let e=(b[0]<<24|b[1]<<16|b[2]<<8|b[3])>>>0;d.push({network:e,mask:0xffffffff});continue}throw Error(`CM_ALLOWED_IPS: invalid entry "${a}". Expected IPv4 address or CIDR notation.`)}return d}(j):[];function q(){return p}function r(){return j.length>0}},7015:(a,b,c)=>{"use strict";c.d(b,{Ds:()=>g});var d=c(81719);class e{constructor(a,b=3e4){this.cache=new Map,this.allAppsCache=null,this.lastRefresh=0,this.db=a,this.ttl=b}getTTL(){return this.ttl}isStale(){return Date.now()-this.lastRefresh>this.ttl}async refresh(){let a=(0,d.$i)(this.db);for(let b of(this.cache.clear(),a))this.cache.set(b.pathPrefix,b);this.allAppsCache=a,this.lastRefresh=Date.now()}async getByPathPrefix(a){return this.isStale()&&await this.refresh(),this.cache.get(a)??null}async getAll(){return this.isStale()&&await this.refresh(),this.allAppsCache??[]}invalidate(){this.cache.clear(),this.allAppsCache=null,this.lastRefresh=0}invalidateByIssueNo(a){this.invalidate()}}let f=null;function g(a){if(!f){if(!a)throw Error("Database instance required to initialize cache");f=new e(a)}return f}},23854:(a,b,c)=>{"use strict";c.d(b,{$G:()=>f,AL:()=>h,DZ:()=>d,Qe:()=>g,ie:()=>e});let d=4e3,e=15e3;function f(a){var b,c;if(b=a.from,c=a.to,b.worktreeId===c.worktreeId&&b.instanceId===c.instanceId)return{code:"RELAY_SELF_TARGET",message:"A session cannot relay a reply to itself. --reply-to must name a different worktree or a different agent instance."};let d=null===a.parentHops?1:a.parentHops+1;return null===a.parentHops||a.allowRelayChain?d>3?{code:"RELAY_HOPS_EXCEEDED",message:`Relay chains stop at 3 hops; this one would be ${d}. Report the reply to whoever asked instead of forwarding it again.`}:a.openBetween>=1?{code:"RELAY_DUPLICATE_PENDING",message:"There is already an open relay between these two sessions. Wait for it, or withdraw it with `commandmate relays cancel <id>`."}:{ok:!0,hops:d}:{code:"RELAY_CHAIN_BLOCKED",message:"The last message this session was given arrived over a relay, so opening another one would chain two deliveries together. Pass --allow-relay-chain if that is what you mean."}}function g(a){return"code"in a}function h(a){return void 0!==a&&Number.isFinite(a)?Math.min(6048e5,Math.max(6e4,Math.trunc(a))):864e5}},26838:(a,b,c)=>{"use strict";c.d(b,{E2:()=>o,Mj:()=>m,Sw:()=>l,lX:()=>p});var d=c(29021),e=c(33873),f=c(54325),g=c(90164);let h=/^v?\d+\.\d+\.\d+$/,i=/^[a-zA-Z0-9.\-\s_v]+$/,j=[".next","required-server-files.json"],k=globalThis.__versionCheckCache??(globalThis.__versionCheckCache={result:null,fetchedAt:0,rateLimitResetAt:null});function l(){return function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),"package.json"),"utf-8"),b=JSON.parse(a);if("commandmate"===b.name&&"string"==typeof b.version&&b.version.length>0)return b.version;return null}catch{return null}}()??"0.40.1"}function m(){return l()}let n=null;function o(a){let b=n??=function(){{let a=function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),...j),"utf-8"),b=JSON.parse(a),c=b.config?.env?.NEXT_PUBLIC_APP_VERSION;if("string"==typeof c&&c.length>0)return c;return null}catch{return null}}();if(a)return a}return"0.40.1"}();return(0,f.LE)(b,a)?{serverVersion:b,clientVersion:a}:null}async function p(){try{var a,b,c;if(null!==k.result&&Date.now()-k.fetchedAt<36e5||k.rateLimitResetAt&&(!(Date.now()>=k.rateLimitResetAt)||(k.rateLimitResetAt=null,0)))return k.result;let d=await fetch("https://api.github.com/repos/Kewton/CommandMate/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":`CommandMate/${m()}`},cache:"no-store",signal:AbortSignal.timeout(5e3)});if(403===d.status)return function(a){let b=a.headers.get("X-RateLimit-Reset");b?k.rateLimitResetAt=1e3*parseInt(b,10):k.rateLimitResetAt=Date.now()+36e5}(d),k.result;if(!d.ok)return k.result;let e=await d.json(),f=m(),j=e.tag_name.replace(/^v/,""),l={hasUpdate:function(a,b){if(!h.test(a)||!h.test(b))return!1;let c=a=>a.replace(/^v/,"").split(".").map(Number),[d,e,f]=c(a),[g,i,j]=c(b);return g!==d?g>d:i!==e?i>e:j>f}(f,e.tag_name),currentVersion:f,latestVersion:j,releaseUrl:(a=e.html_url).startsWith(g.Dk)?a:null,releaseName:(b=e.name,c=e.tag_name,i.test(b)&&b.length<=128?b:c),publishedAt:e.published_at};return k.result=l,k.fetchedAt=Date.now(),l}catch{return k.result}}},39727:()=>{},43015:(a,b,c)=>{"use strict";c.r(b),c.d(b,{CM_INGRESS_HEADER:()=>T,REMOTE_ONLY_AUTH_SCOPE:()=>U,WORKTREE_RENAMED_EVENT_TYPE:()=>ar,__internal:()=>ax,broadcast:()=>ao,broadcastMessage:()=>aq,cleanupRooms:()=>au,closeWebSocket:()=>aw,handleProxyUpgrade:()=>Y,hasRoomSubscribers:()=>ap,isIngressAuthExempt:()=>W,migrateWorktreeRooms:()=>as,setupWebSocket:()=>aa,stampIngress:()=>V});var d=c(81503),e=c(91645),f=c(88081),g=c(3453),h=c(15194),i=c(40964),j=c(88807),k=c(56791);let l={capturePaneCalls:0,activeControlSessions:0,subscriberCount:0,cleanupCount:0,firstOutputLatencyCount:0,firstOutputLatencyTotalMs:0,firstOutputLatencyLastMs:null,firstOutputLatencyMinMs:null,firstOutputLatencyMaxMs:null};var m=c(79892),n=c(72626),o=c(79646);class p{push(a){if(0===a.length)return[];let b=(this.remainder+a).split("\n");this.remainder=b.pop()??"";let c=[];for(let a of b){let b=a.endsWith("\r")?a.slice(0,-1):a,d=this.parseLine(b);d&&c.push(d)}return c}flush(){if(0===this.remainder.length)return[];let a=this.parseLine(this.remainder);return this.remainder="",a?[a]:[]}parseLine(a){return 0===a.length?{type:"output",data:"\n"}:a.startsWith("%output ")?{type:"output",data:`${a.slice(8)}
2
2
  `}:"%exit"===a||a.startsWith("%exit ")?{type:"exit",exitCode:null}:a.startsWith("%error ")?{type:"error",error:Error(a.slice(7))}:a.startsWith("%")?null:{type:"output",data:`${a}
3
3
  `}}constructor(){this.remainder=""}}let q=(0,n.h)("tmux-control-client");class r{constructor(a={}){this.parser=new p,this.handlers=new Set,this.child=null,this.sessionName=null,this.idleTimer=null,this.started=!1,this.spawnProcess=a.spawnProcess??((a,b,c)=>(0,o.spawn)(a,b,c)),this.tmuxBinary=a.tmuxBinary??"tmux",this.idleTimeoutMs=a.idleTimeoutMs??3e4}start(a){this.started||(this.sessionName=a,this.child=this.spawnProcess(this.tmuxBinary,["-C","attach-session","-t",(0,m.lA)(a)],{stdio:"pipe"}),this.started=!0,this.child.stdout.setEncoding("utf8"),this.child.stdout.on("data",a=>{this.touch();let b="string"==typeof a?a:a.toString("utf8");for(let a of this.parser.push(b))this.emit(a)}),this.child.stderr.setEncoding("utf8"),this.child.stderr.on("data",a=>{let b="string"==typeof a?a:a.toString("utf8");this.emit({type:"error",error:Error(b.trim()||"tmux control stderr")})}),this.child.on("close",a=>{for(let a of this.parser.flush())this.emit(a);this.emit({type:"exit",exitCode:a}),this.stop()}),this.child.on("error",a=>{this.emit({type:"error",error:a}),this.stop()}),this.resetIdleTimer(),q.debug("start",{sessionName:a}))}onEvent(a){return this.handlers.add(a),()=>{this.handlers.delete(a)}}sendInput(a){if(!this.child?.stdin.writable||null===this.sessionName)throw Error("Tmux control client is not writable");this.touch();let b=Buffer.from(a,"utf8");for(let a=0;a<b.length;a+=256){let c=Array.from(b.subarray(a,a+256),a=>a.toString(16).padStart(2,"0")).join(" ");this.child.stdin.write(`send-keys -t ${(0,m.lA)(this.sessionName)} -H ${c}
4
4
  `)}}resize(a,b){if(!this.child?.stdin.writable)throw Error("Tmux control client is not writable");this.touch(),this.child.stdin.write(`refresh-client -C ${a}x${b}
@@ -17,11 +17,11 @@
17
17
  "wasm": [],
18
18
  "assets": [],
19
19
  "env": {
20
- "__NEXT_BUILD_ID": "o3mZdwNhCks6IlcAOPinc",
21
- "NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "vkJAGRBYVGDWWuTB9rSleZ9NhAmu8xN+jXnkTy/RNQ4=",
22
- "__NEXT_PREVIEW_MODE_ID": "50970c8990f1324ae528bcfa3ffb6343",
23
- "__NEXT_PREVIEW_MODE_SIGNING_KEY": "ef930cce7b4181683c9f197defc897cf213242a6a1eff1d61ed711a07c455788",
24
- "__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "7a8b0d25cf9786ae1984ac67b6d2080175461249c595d1e26e781708994356e1"
20
+ "__NEXT_BUILD_ID": "JfzIPPhL-ikSVcJYOKgfD",
21
+ "NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "rlP8PTvZiXLbNFK+TqoEmnccKsyPiz4/e6r7OZ2puHg=",
22
+ "__NEXT_PREVIEW_MODE_ID": "84d9df3842a2b97d56d5ab1587e13490",
23
+ "__NEXT_PREVIEW_MODE_SIGNING_KEY": "6fc6667428ad0af0ac8df22bc75311d8952b1b91f0bcafa7af9955d05090b472",
24
+ "__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "82ab5fc716d526f6d260e4c19391d4bc9248942d369435747e637b52d2a79cae"
25
25
  }
26
26
  }
27
27
  },
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-7e5907979c182510.js" defer=""></script><script src="/_next/static/chunks/framework-eaf13c96191cb608.js" defer=""></script><script src="/_next/static/chunks/main-ac91ed6e71380841.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4b3fb5e477a0267f.js" defer=""></script><script src="/_next/static/chunks/pages/_error-c970d8b55ace1b48.js" defer=""></script><script src="/_next/static/o3mZdwNhCks6IlcAOPinc/_buildManifest.js" defer=""></script><script src="/_next/static/o3mZdwNhCks6IlcAOPinc/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"o3mZdwNhCks6IlcAOPinc","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-7e5907979c182510.js" defer=""></script><script src="/_next/static/chunks/framework-eaf13c96191cb608.js" defer=""></script><script src="/_next/static/chunks/main-ac91ed6e71380841.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4b3fb5e477a0267f.js" defer=""></script><script src="/_next/static/chunks/pages/_error-c970d8b55ace1b48.js" defer=""></script><script src="/_next/static/JfzIPPhL-ikSVcJYOKgfD/_buildManifest.js" defer=""></script><script src="/_next/static/JfzIPPhL-ikSVcJYOKgfD/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"JfzIPPhL-ikSVcJYOKgfD","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- {"node":{},"edge":{},"encryptionKey":"vkJAGRBYVGDWWuTB9rSleZ9NhAmu8xN+jXnkTy/RNQ4="}
1
+ {"node":{},"edge":{},"encryptionKey":"rlP8PTvZiXLbNFK+TqoEmnccKsyPiz4/e6r7OZ2puHg="}