@qwen-code/qwen-code 0.23.3 → 0.23.4

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 (462) hide show
  1. package/bundled/computer-use/SKILL.md +46 -198
  2. package/bundled/computer-use/references/macos.md +208 -0
  3. package/bundled/computer-use/references/windows-linux.md +247 -0
  4. package/bundled/goal-draft/SKILL.md +10 -10
  5. package/bundled/qc-helper/docs/configuration/settings.md +81 -71
  6. package/bundled/qc-helper/docs/extension/getting-started-extensions.md +2 -0
  7. package/bundled/qc-helper/docs/extension/introduction.md +9 -3
  8. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  9. package/bundled/qc-helper/docs/features/agent-board.md +89 -0
  10. package/bundled/qc-helper/docs/features/channels/dingtalk.md +3 -21
  11. package/bundled/qc-helper/docs/features/channels/dws.md +5 -1
  12. package/bundled/qc-helper/docs/features/channels/overview.md +5 -6
  13. package/bundled/qc-helper/docs/features/code-review.md +18 -4
  14. package/bundled/qc-helper/docs/features/commands.md +9 -0
  15. package/bundled/qc-helper/docs/features/computer-use.md +26 -8
  16. package/bundled/qc-helper/docs/features/cross-session-protocol.md +23 -5
  17. package/bundled/qc-helper/docs/features/followup-suggestions.md +17 -5
  18. package/bundled/qc-helper/docs/features/goals.md +22 -18
  19. package/bundled/qc-helper/docs/features/hooks.md +48 -37
  20. package/bundled/qc-helper/docs/features/skills.md +33 -3
  21. package/bundled/qc-helper/docs/features/status-line.md +2 -0
  22. package/bundled/qc-helper/docs/features/sub-agents.md +27 -0
  23. package/bundled/qc-helper/docs/qwen-serve.md +7 -3
  24. package/bundled/review/SKILL.md +20 -10
  25. package/bundled/review/references/persistence.md +2 -0
  26. package/bundled/workflow-authoring/SKILL.md +442 -0
  27. package/bundled/workflow-creator/SKILL.md +1 -1
  28. package/chunks/{MaxSizedBox-D4LW7RZZ.js → MaxSizedBox-Q44AWRWI.js} +59 -55
  29. package/chunks/{StandaloneSessionPicker-ALTTRWUP.js → StandaloneSessionPicker-UKII7M7U.js} +83 -79
  30. package/chunks/{acp-startup-profiler-KEU6VAYR.js → acp-startup-profiler-RUQNTNU5.js} +2 -2
  31. package/chunks/acp-subagent-executor-7RUAOXE7.js +141 -0
  32. package/chunks/{acpAgent-BBSW7XZG.js → acpAgent-5N3LHCO3.js} +1026 -355
  33. package/chunks/{agent-SQ6OY3QD.js → agent-LU5UJALC.js} +43 -39
  34. package/chunks/{agent-headless-RI2THRQ7.js → agent-headless-LTLADUGR.js} +43 -39
  35. package/chunks/{anthropicContentGenerator-JSKMKS6V.js → anthropicContentGenerator-H5YPXIDE.js} +37 -15
  36. package/chunks/{artifact-tool-PMYZCYNH.js → artifact-tool-MFGORTWZ.js} +59 -109
  37. package/chunks/{askUserQuestion-4M4YYIB4.js → askUserQuestion-WS4GUT7C.js} +3 -3
  38. package/chunks/{bridge-DAFMI72L.js → bridge-P34XQP3D.js} +63 -58
  39. package/chunks/{build-63BIOYWK.js → build-5KWQBWEQ.js} +1 -1
  40. package/chunks/{ca-KC2AISNS.js → ca-GZ4FDJU2.js} +3 -3
  41. package/chunks/{channel-management-service-OWDXVL7R.js → channel-management-service-AFVIT4VH.js} +8 -8
  42. package/chunks/{channel-settings-store-4I6JONT7.js → channel-settings-store-VE4ARRSR.js} +68 -64
  43. package/chunks/{channel-worker-group-F2ZZMLNS.js → channel-worker-group-JR6JOELM.js} +8 -8
  44. package/chunks/{channel-worker-manager-2SZLJJSJ.js → channel-worker-manager-AVKJEZFL.js} +8 -8
  45. package/chunks/{channel-worker-supervisor-ZFNWMG6D.js → channel-worker-supervisor-OOYY7BAQ.js} +5 -5
  46. package/chunks/{chunk-DAWWT2ID.js → chunk-2NRKLYID.js} +1374 -2164
  47. package/chunks/{chunk-53GWJOLP.js → chunk-2P2IXKDR.js} +3 -1
  48. package/chunks/{chunk-6JACAGYH.js → chunk-2S2WIGCM.js} +1 -1
  49. package/chunks/{chunk-IUVIBDKU.js → chunk-2YMRRI2C.js} +9 -10
  50. package/chunks/{chunk-MLQNSPRZ.js → chunk-3AYIKQTJ.js} +15 -5
  51. package/chunks/{chunk-F53KKZUD.js → chunk-3LMDSCLU.js} +158 -10
  52. package/chunks/{chunk-WG7BL3FY.js → chunk-473RJLIH.js} +1 -1
  53. package/chunks/{chunk-BWAMMKIS.js → chunk-4XP7WXC4.js} +135 -6
  54. package/chunks/{chunk-W5ZQMAEM.js → chunk-4Y2I3CI3.js} +1 -1
  55. package/chunks/{chunk-HGEUHUEV.js → chunk-54B2LTKP.js} +1 -1
  56. package/chunks/{chunk-IRH27ZC2.js → chunk-5EZRLTLQ.js} +4 -4
  57. package/chunks/{chunk-DLH7YIX6.js → chunk-5FK4MSHB.js} +3 -3
  58. package/chunks/chunk-5JG3DAKS.js +1416 -0
  59. package/chunks/{chunk-CUEXOHQH.js → chunk-5ODRE7E5.js} +9 -15
  60. package/chunks/{chunk-532WHF4F.js → chunk-5VQR2DD7.js} +2 -2
  61. package/chunks/chunk-62MWBTS7.js +191 -0
  62. package/chunks/{chunk-YQHLFCPU.js → chunk-65ANUQSV.js} +32 -24
  63. package/chunks/{chunk-YBUMTY7B.js → chunk-66N6C4EH.js} +1 -1
  64. package/chunks/{chunk-AC6KDLH3.js → chunk-6TFZIA2L.js} +1 -1
  65. package/chunks/{chunk-Y2MYW47X.js → chunk-6WXVEDT2.js} +9 -2
  66. package/chunks/{chunk-NRXWJXJ4.js → chunk-7GKPKIUB.js} +15 -15
  67. package/chunks/chunk-7JGH6IMU.js +2780 -0
  68. package/chunks/{chunk-ZHKTKHMO.js → chunk-7MIBD3LG.js} +1 -1
  69. package/chunks/{chunk-HGAELO7B.js → chunk-7ML2ZLQF.js} +2 -2
  70. package/chunks/{chunk-3UXUOFO6.js → chunk-7W2Y3PZD.js} +9 -10
  71. package/chunks/{chunk-76RGWKLS.js → chunk-ABNX6E6K.js} +1 -1
  72. package/chunks/chunk-ACHCT36C.js +28 -0
  73. package/chunks/{chunk-NE624IVP.js → chunk-ADQUK6WA.js} +1 -1
  74. package/chunks/{chunk-PLLIWEM3.js → chunk-AEWCOE64.js} +2 -2
  75. package/chunks/{chunk-3FPYT6QC.js → chunk-ARDHE6MM.js} +23 -0
  76. package/chunks/{chunk-LILGKQ4B.js → chunk-AXZMWAJV.js} +156 -26
  77. package/chunks/{chunk-SYLECP23.js → chunk-BBMOAZ2E.js} +4 -4
  78. package/chunks/{chunk-RWVD5RRY.js → chunk-BDDE4YNP.js} +3 -3
  79. package/chunks/{chunk-TPKQIA7G.js → chunk-BSIOCNDK.js} +1 -1
  80. package/chunks/{chunk-U7O65WKL.js → chunk-BW2SMO6L.js} +1 -1
  81. package/chunks/{chunk-WBCPROWX.js → chunk-C4HBZQNH.js} +1 -1
  82. package/chunks/{chunk-NOO4QFXM.js → chunk-C75BXMPM.js} +1 -3
  83. package/chunks/chunk-CFMZLE3L.js +75 -0
  84. package/chunks/{chunk-AXTFYDXT.js → chunk-CXXAZ2LZ.js} +1 -1
  85. package/chunks/{chunk-N7VWZDWW.js → chunk-DCRVSIK6.js} +4460 -3838
  86. package/chunks/{chunk-NJQTG2G3.js → chunk-DGTH4BSO.js} +11 -11
  87. package/chunks/{chunk-J3TJH52D.js → chunk-DOTF2PF2.js} +1 -1
  88. package/chunks/{chunk-BWQLXU37.js → chunk-E4XZSQXB.js} +381 -86
  89. package/chunks/{chunk-2ALXPGB4.js → chunk-E6IR653O.js} +1 -1
  90. package/chunks/{chunk-R4Q2PEFV.js → chunk-E7HXORS7.js} +1 -1
  91. package/chunks/{chunk-ZKYR7QS4.js → chunk-EDB556X7.js} +2 -2
  92. package/chunks/{chunk-NUQVB25K.js → chunk-EKMJR7M3.js} +2 -2
  93. package/chunks/{chunk-Q5BD56BW.js → chunk-ELHAQ5H4.js} +7 -7
  94. package/chunks/{chunk-GSILBZLN.js → chunk-EOQXU3ZE.js} +2 -2
  95. package/chunks/{chunk-7QYWGTHB.js → chunk-EPVEPTI3.js} +44 -151
  96. package/chunks/{chunk-POC3YMHG.js → chunk-F2IRY2TD.js} +4 -4
  97. package/chunks/{chunk-S6Q6Q4P2.js → chunk-FBDHP23D.js} +1 -1
  98. package/chunks/{chunk-3I7W2POO.js → chunk-FGROOEKM.js} +5 -40
  99. package/chunks/{chunk-HNLMYDQE.js → chunk-FMLBBXHB.js} +13 -9
  100. package/chunks/{chunk-Z3GF56ME.js → chunk-FRISMWG3.js} +3 -3
  101. package/chunks/{chunk-ALMR3E6Q.js → chunk-GDWE23OR.js} +3 -3
  102. package/chunks/{chunk-IAEXTMED.js → chunk-GNV2SFO7.js} +173 -7
  103. package/chunks/{chunk-CXTPVBFA.js → chunk-GSS4SZNG.js} +100 -17
  104. package/chunks/{chunk-3XLK2QMY.js → chunk-H7L725Z6.js} +59 -16
  105. package/chunks/{chunk-6HUXPLB5.js → chunk-HEOH7JZY.js} +5 -5
  106. package/chunks/{chunk-DTNV6UZY.js → chunk-HFJSQ4GL.js} +10 -24
  107. package/chunks/{chunk-BZM5U74J.js → chunk-I6JRN375.js} +724 -468
  108. package/chunks/{chunk-VZUCTJ2P.js → chunk-I6YJZGHS.js} +10 -10
  109. package/chunks/{chunk-RZHU3K6M.js → chunk-IAS753HG.js} +2 -20
  110. package/chunks/{chunk-EDMXGXAK.js → chunk-IBRQG2MP.js} +10 -13
  111. package/chunks/{chunk-NOAG7N22.js → chunk-IGLX6UXJ.js} +2 -2
  112. package/chunks/chunk-INGBUYL6.js +230 -0
  113. package/chunks/{chunk-IL5M5NYD.js → chunk-IR5CVY5G.js} +11 -9
  114. package/chunks/{chunk-OX7IZ2G5.js → chunk-ITOB3LRT.js} +4 -4
  115. package/chunks/{chunk-LDVNJZGH.js → chunk-IUXWAKVS.js} +17 -8
  116. package/chunks/{chunk-2PJRI3EH.js → chunk-J4DRBDHX.js} +218 -43
  117. package/chunks/{chunk-XGYHNWL3.js → chunk-J7LBAKDH.js} +3 -3
  118. package/chunks/{chunk-W5FIP7FC.js → chunk-JLZ5YCMV.js} +5 -5
  119. package/chunks/{chunk-LG5Y4OWO.js → chunk-JRHKM3YQ.js} +2 -2
  120. package/chunks/{chunk-2ZN3O5FT.js → chunk-JZ3FFPES.js} +6 -6
  121. package/chunks/{chunk-NMCDMLHL.js → chunk-K2DCZ6SZ.js} +50 -35
  122. package/chunks/{chunk-F42YYSCK.js → chunk-KLGCF6G7.js} +8 -8
  123. package/chunks/{chunk-K2OJUPOE.js → chunk-KP2FHIFR.js} +12 -0
  124. package/chunks/{chunk-IV7GDNKC.js → chunk-KZCK5JUN.js} +4 -4
  125. package/chunks/{acp-subagent-executor-LEUN3N7N.js → chunk-L56E7YUM.js} +11 -110
  126. package/chunks/{chunk-NMRCXKQ5.js → chunk-L5BVU4JW.js} +3 -3
  127. package/chunks/{chunk-ZW2EUO2A.js → chunk-L6DIANLD.js} +1 -1
  128. package/chunks/{chunk-GOXQL4YH.js → chunk-LFNK4DGQ.js} +2 -2
  129. package/chunks/{chunk-UKZ45TJL.js → chunk-LMDMYMSS.js} +420 -219
  130. package/chunks/chunk-LMJSPC55.js +260 -0
  131. package/chunks/{chunk-X6K77VHC.js → chunk-LWWRJRCD.js} +1 -1
  132. package/chunks/{chunk-UXEO7E3V.js → chunk-LYD3T3H7.js} +1 -0
  133. package/chunks/{chunk-HBQ2NXOU.js → chunk-M6MID3FA.js} +2 -2
  134. package/chunks/{chunk-E4UEO3XM.js → chunk-ME4JBHSB.js} +324 -2
  135. package/chunks/{chunk-MF6E7FSA.js → chunk-MFPAVOYJ.js} +8 -201
  136. package/chunks/{chunk-BV6Q5HMY.js → chunk-MJHLKWGJ.js} +8 -7
  137. package/chunks/{chunk-NFYEQRLG.js → chunk-MQRLLBMQ.js} +1 -1
  138. package/chunks/{chunk-O4KNCAX4.js → chunk-NCPFOLM2.js} +11 -0
  139. package/chunks/{chunk-2SZH22YO.js → chunk-NJ2OFVUX.js} +115 -97
  140. package/chunks/{chunk-6MBXY6WM.js → chunk-NRQI3PGS.js} +1 -1
  141. package/chunks/{chunk-3CZ2BQV6.js → chunk-NXUZFW3G.js} +49 -19
  142. package/chunks/{chunk-X7UJKOHZ.js → chunk-O75ZXPOX.js} +4 -6
  143. package/chunks/{chunk-5GLDOLNQ.js → chunk-OWUAZXXN.js} +4 -3
  144. package/chunks/{chunk-XBZTAGB7.js → chunk-OXDQETZA.js} +1 -1
  145. package/chunks/{chunk-2UWQX4FP.js → chunk-OZEV3R3S.js} +1 -1
  146. package/chunks/{chunk-SBRX4BDI.js → chunk-P225AM5U.js} +2 -2
  147. package/chunks/{chunk-ZU47FBOC.js → chunk-P6XVYPWA.js} +126 -12
  148. package/chunks/{chunk-MHAADZOZ.js → chunk-PCIYPEYV.js} +3 -3
  149. package/chunks/{chunk-SSGAAWLY.js → chunk-PNACDSCO.js} +95 -73
  150. package/chunks/chunk-PRWRNC64.js +32 -0
  151. package/chunks/{chunk-7BXXIQG4.js → chunk-PVKEYO5D.js} +36 -72
  152. package/chunks/{chunk-FCQJLMA2.js → chunk-Q3TFRP5G.js} +178 -8
  153. package/chunks/{chunk-DYFOSJHU.js → chunk-QM2MRAG4.js} +2756 -1153
  154. package/chunks/{chunk-ZKZHSB5W.js → chunk-QR4Q425T.js} +9 -9
  155. package/chunks/{chunk-J6MB5ZHZ.js → chunk-QZW6WRB7.js} +2 -1
  156. package/chunks/{chunk-3BTSSIJO.js → chunk-RHTNPDGD.js} +99 -14
  157. package/chunks/{chunk-OLTN767L.js → chunk-RJFUPP3F.js} +2 -2
  158. package/chunks/chunk-RKXAOP6F.js +154 -0
  159. package/chunks/{chunk-TP6FYVQT.js → chunk-RSWBT7AZ.js} +33 -1
  160. package/chunks/{chunk-E7LB57MB.js → chunk-RWKR4VNK.js} +6 -6
  161. package/chunks/chunk-S7UQ3V2H.js +87 -0
  162. package/chunks/{chunk-N6VQ37ZZ.js → chunk-SFL6U7U7.js} +1 -1
  163. package/chunks/{chunk-SODMFNAR.js → chunk-SQCZDHBQ.js} +5 -5
  164. package/chunks/{chunk-MOS5OAOG.js → chunk-SROLVJFY.js} +6 -6
  165. package/chunks/{chunk-3KQBQ6FM.js → chunk-SYDMM6IX.js} +190 -28
  166. package/chunks/{chunk-HUXPEUFL.js → chunk-SYROIHU7.js} +1 -1
  167. package/chunks/{chunk-PSPAM24S.js → chunk-TBSCTWKF.js} +6 -0
  168. package/chunks/{chunk-RLLRJJDR.js → chunk-TJDUJSVH.js} +2 -2
  169. package/chunks/{chunk-HBU7EKY4.js → chunk-TRKIKBUW.js} +45 -15
  170. package/chunks/{chunk-GCDXVPFK.js → chunk-TW2RLZPC.js} +31 -7
  171. package/chunks/chunk-U6H3XTFA.js +95 -0
  172. package/chunks/{chunk-NHJKAR6E.js → chunk-UGEDTVL6.js} +972 -18
  173. package/chunks/{chunk-KOKPXIAN.js → chunk-UL4DXZMP.js} +3 -3
  174. package/chunks/{chunk-MSNHNAQZ.js → chunk-UUT7EFX3.js} +3 -3
  175. package/chunks/{chunk-JXNIF2O5.js → chunk-V545KI73.js} +1 -1
  176. package/chunks/{chunk-7ICHPMBQ.js → chunk-VELFTVEO.js} +4 -4
  177. package/chunks/chunk-VGY2RGXL.js +100 -0
  178. package/chunks/{chunk-5KI7ZDTB.js → chunk-VQ3SUPLA.js} +24 -12
  179. package/chunks/{chunk-TBEXLLAO.js → chunk-VRQZESKP.js} +1 -1
  180. package/chunks/{chunk-FN3JNDRU.js → chunk-VVI7MK3V.js} +3 -3
  181. package/chunks/{chunk-EUURTIV6.js → chunk-WBSJ6VPZ.js} +10 -2
  182. package/chunks/{chunk-NLNQNBZ2.js → chunk-WD6YQI5M.js} +1 -1
  183. package/chunks/{chunk-KFZYGSJN.js → chunk-WDB57HEI.js} +3 -3
  184. package/chunks/chunk-WFNEY5G7.js +347 -0
  185. package/chunks/{chunk-XKBFYTCD.js → chunk-WK6DEH3Q.js} +46 -0
  186. package/chunks/{chunk-EVTNACMT.js → chunk-WKQX4FND.js} +12 -12
  187. package/chunks/{chunk-36HCNKDS.js → chunk-WKVZES7O.js} +65 -14
  188. package/chunks/{chunk-NHCZJQE4.js → chunk-WLFILD4T.js} +6 -6
  189. package/chunks/{chunk-JYKWOREU.js → chunk-WMEX6CFP.js} +13 -3
  190. package/chunks/{chunk-6W4HBUA2.js → chunk-WNQRJXKP.js} +1 -1
  191. package/chunks/{chunk-7APZIRH3.js → chunk-X7GOO6VM.js} +5 -5
  192. package/chunks/{chunk-VX63RJXE.js → chunk-XX5HQLCZ.js} +7 -0
  193. package/chunks/{chunk-2Z3T52OC.js → chunk-Y5TM7SBV.js} +7 -2
  194. package/chunks/{chunk-V2P3DOQR.js → chunk-YDFOHRS5.js} +1 -1
  195. package/chunks/{chunk-QMUYLYT5.js → chunk-YGFJ6BRT.js} +1 -1
  196. package/chunks/{chunk-LK2WUCDQ.js → chunk-YM6KUQ2S.js} +1 -1
  197. package/chunks/chunk-Z72PLR74.js +36 -0
  198. package/chunks/{chunk-BHTYRHJF.js → chunk-ZJ7JQUGY.js} +4 -1
  199. package/chunks/{chunk-4ALNJDHL.js → chunk-ZKIAGIGH.js} +87 -4
  200. package/chunks/{chunk-VG3Q2NC4.js → chunk-ZNI3YJHS.js} +32 -12
  201. package/chunks/{chunk-DT75RKNH.js → chunk-ZXUKZHMV.js} +3 -3
  202. package/chunks/{chunk-Q2LVVIKF.js → chunk-ZZUXUBEB.js} +29 -12
  203. package/chunks/codex-subagent-executor-WCRCJMQK.js +586 -0
  204. package/chunks/{config-utils-L6KLDYIV.js → config-utils-73C3RGYN.js} +60 -56
  205. package/chunks/{contextCommand-UYEH7NIU.js → contextCommand-4ZDPQJHD.js} +58 -54
  206. package/chunks/{core-runtime-NVHT3Z3V.js → core-runtime-ZDUA5DYE.js} +58 -55
  207. package/chunks/{create-sub-session-YWASE5VH.js → create-sub-session-JK3SSJKO.js} +169 -89
  208. package/chunks/{create-sub-session-TIGCFGCS.js → create-sub-session-MSGNIM37.js} +5 -2
  209. package/chunks/{cron-create-AKWX67FO.js → cron-create-U2JJ5CCF.js} +3 -3
  210. package/chunks/{cron-delete-XPB6IYZJ.js → cron-delete-7DM4LJWD.js} +2 -2
  211. package/chunks/{cron-list-XBKO4WU5.js → cron-list-VCUSZK2Y.js} +2 -2
  212. package/chunks/{daemon-G5TYKZD6.js → daemon-NJB4PWZ7.js} +3 -1
  213. package/chunks/{daemon-git-worktree-guard-FOW4RQSK.js → daemon-git-worktree-guard-QU2CCJIE.js} +58 -54
  214. package/chunks/{daemon-status-provider-O5KQZYMP.js → daemon-status-provider-2PO7NLDQ.js} +68 -63
  215. package/chunks/{daemon-trust-policy-3ATXEON7.js → daemon-trust-policy-IMDTIUWB.js} +64 -60
  216. package/chunks/{daemon-trust-policy-monitor-7MCNDNEC.js → daemon-trust-policy-monitor-6IVBNUAD.js} +64 -60
  217. package/chunks/{de-UU2YTO37.js → de-VGY3VNBU.js} +3 -3
  218. package/chunks/{deferred-core-runtime-JK5IXL5K.js → deferred-core-runtime-3AZUE7F3.js} +56 -52
  219. package/chunks/{discovery-XP4RMDUM.js → discovery-5KUEPR65.js} +2 -2
  220. package/chunks/{display-image-NAH3AZ63.js → display-image-QTHALY6N.js} +3 -3
  221. package/chunks/{dist-KLZ7XGEQ.js → dist-2QYIVNS6.js} +1 -4
  222. package/chunks/{dist-AHJYPSJL.js → dist-GUB7QRYA.js} +2 -5
  223. package/chunks/{dist-ZXTZTE54.js → dist-MPUZZOG5.js} +4 -17
  224. package/chunks/{dist-F2DVGTL3.js → dist-NIOJXMGY.js} +111 -101
  225. package/chunks/{dist-KJGRVIGJ.js → dist-PA7WPFVE.js} +5 -36
  226. package/chunks/{dist-AIKC5E5P.js → dist-SE4J6Z4O.js} +43 -669
  227. package/chunks/{dist-H6G3K26N.js → dist-T6DDPDLQ.js} +14 -34
  228. package/chunks/{dist-GWNQVPZT.js → dist-TFGETXFN.js} +10 -33
  229. package/chunks/{dist-ZA52JXAS.js → dist-VDLSBCLM.js} +1 -5
  230. package/chunks/{edit-SY35KYIE.js → edit-HXMBABZU.js} +46 -42
  231. package/chunks/{en-CAJHTIQT.js → en-E5ZO5TZW.js} +5 -3
  232. package/chunks/{enter-worktree-54L5QJ3N.js → enter-worktree-CAARFWBI.js} +6 -5
  233. package/chunks/{enterPlanMode-HXX6KQJR.js → enterPlanMode-KAMW2I2C.js} +43 -39
  234. package/chunks/{environment-DKXHG4HB.js → environment-HYMXOTVB.js} +59 -55
  235. package/chunks/{errors-ADY7LQJJ.js → errors-NQRH7NAM.js} +58 -54
  236. package/chunks/exec-RPKEY6HP.js +505 -0
  237. package/chunks/{exit-worktree-EORJDKDS.js → exit-worktree-JXGGUOBP.js} +6 -5
  238. package/chunks/{exitPlanMode-HSK2CQI6.js → exitPlanMode-SMEBS5EF.js} +43 -39
  239. package/chunks/{fast-path-U636VWN2.js → fast-path-CUWUTJUR.js} +10 -10
  240. package/chunks/{fast-path-settings-V7MI7EZJ.js → fast-path-settings-XDYX7X5Z.js} +2 -2
  241. package/chunks/{fr-HKNWVXRJ.js → fr-UAZJJH5N.js} +3 -3
  242. package/chunks/{glob-GUGGTH5L.js → glob-VOM5DVZ3.js} +43 -39
  243. package/chunks/{goal-tools-PXYRSQGX.js → goal-tools-YBYJ5KPM.js} +49 -41
  244. package/chunks/{grep-3PKFKLCA.js → grep-H2I33VAO.js} +8 -3
  245. package/chunks/{handleAutoUpdate-5KHS4HIN.js → handleAutoUpdate-4CEHNJ2F.js} +61 -57
  246. package/chunks/{i18n-KSGKMUPT.js → i18n-G7ODGUGN.js} +57 -53
  247. package/chunks/{image-gen-OCCR2WWU.js → image-gen-5G2TQ3DY.js} +6 -5
  248. package/chunks/{initializer-YYT5XEZF.js → initializer-GZ73HSOA.js} +64 -60
  249. package/chunks/{installationInfo-UNSBPYW2.js → installationInfo-PV472I52.js} +57 -53
  250. package/chunks/{ja-GJS5RZGU.js → ja-2RITCMAJ.js} +3 -3
  251. package/chunks/list-D4A7LFOF.js +133 -0
  252. package/chunks/{list-agents-QLDXS5OD.js → list-agents-EWDCEPIW.js} +3 -3
  253. package/chunks/{llm-XGGLBGPH.js → llm-PJU4VT3K.js} +161 -125
  254. package/chunks/{llm-content-generator-ZHQQT5W7.js → llm-content-generator-ITOMDK65.js} +14 -7
  255. package/chunks/{loadedSettingsAdapter-3DXLASK7.js → loadedSettingsAdapter-NNU4BY5Q.js} +64 -60
  256. package/chunks/{loggingContentGenerator-V72OCCJO.js → loggingContentGenerator-SMI2AJYY.js} +47 -43
  257. package/chunks/{loop-wakeup-HHMYIC7Z.js → loop-wakeup-VG6CGBQA.js} +4 -4
  258. package/chunks/{ls-N7ABR6HI.js → ls-6ZB3BEIR.js} +1 -1
  259. package/chunks/{lsp-LTOFWG5P.js → lsp-M54FQARP.js} +5 -1
  260. package/chunks/{managed-npm-update-HV5LPZH2.js → managed-npm-update-AN5RDI5D.js} +57 -53
  261. package/chunks/mcp-RIIEZ7NJ.js +127 -0
  262. package/chunks/model-configuration-E5M35A3M.js +140 -0
  263. package/chunks/modelConfigUtils-43SY2EDS.js +119 -0
  264. package/chunks/{monitor-TLBNM4MV.js → monitor-5WYDOXLI.js} +43 -39
  265. package/chunks/{nonInteractiveCli-LSJSQ2W4.js → nonInteractiveCli-D3YFYXNB.js} +112 -107
  266. package/chunks/{notebook-edit-OSPOLZP6.js → notebook-edit-GQNFJTIR.js} +45 -41
  267. package/chunks/{openaiContentGenerator-BE4S5TRD.js → openaiContentGenerator-VJAKFZ32.js} +24 -19
  268. package/chunks/{openaiResponsesContentGenerator-RTCAJ5V5.js → openaiResponsesContentGenerator-AWRYZLJU.js} +110 -19
  269. package/chunks/{pidfile-H32FEPWA.js → pidfile-I5SWEJDX.js} +56 -52
  270. package/chunks/{processUtils-SSLIPDEA.js → processUtils-NSYM3SKR.js} +2 -2
  271. package/chunks/{prompt-terminal-ledger-I5SLL6UF.js → prompt-terminal-ledger-KWBANHUE.js} +57 -53
  272. package/chunks/{pt-FXMYXEUV.js → pt-5ZF7ZQUV.js} +3 -3
  273. package/chunks/{qwenContentGenerator-TMQC623Z.js → qwenContentGenerator-LR6HNFBU.js} +47 -43
  274. package/chunks/{qwenOAuth2-3ZRQHHTC.js → qwenOAuth2-WIEUEFEY.js} +5 -4
  275. package/chunks/{read-file-T2QAIZE2.js → read-file-LOSUPKDX.js} +9 -8
  276. package/chunks/{read-mcp-resource-B37WANAQ.js → read-mcp-resource-LPSWXVOD.js} +1 -1
  277. package/chunks/{record-artifact-OAXWXZ5D.js → record-artifact-PXMNP7GZ.js} +3 -3
  278. package/chunks/{record-source-D7R7X3GT.js → record-source-2GSY5JD5.js} +6 -6
  279. package/chunks/{report-findings-AR3VC6EQ.js → report-findings-W6GR7SYZ.js} +4 -4
  280. package/chunks/{request-shutdown-IKNWTX5M.js → request-shutdown-53SNYGVR.js} +5 -5
  281. package/chunks/{resumeHistoryUtils-QLKDH5GY.js → resumeHistoryUtils-6IFK3MQO.js} +63 -59
  282. package/chunks/{ripGrep-YGWL7KCV.js → ripGrep-MBSYRHNP.js} +13 -11
  283. package/chunks/{ru-RMHURE5U.js → ru-7BNZFQKG.js} +3 -3
  284. package/chunks/{run-qwen-serve-26KZDECC.js → run-qwen-serve-WYEEYIHV.js} +314 -127
  285. package/chunks/{runtime-BMEIVDDG.js → runtime-FVTTOB4E.js} +69 -65
  286. package/chunks/{scheduled-tasks-NCFPP6VQ.js → scheduled-tasks-RN6DUY7E.js} +66 -60
  287. package/chunks/{scheduler-47TVMUVN.js → scheduler-T7DDWINW.js} +58 -54
  288. package/chunks/{sdk-exporters-http-VWTF4W6K.js → sdk-exporters-http-3R2TRQHE.js} +2 -1
  289. package/chunks/{sdk-impl-G6FVTBQZ.js → sdk-impl-4WF3VZ2F.js} +3 -3
  290. package/chunks/{send-message-TWOGWCBG.js → send-message-UMJKN27Q.js} +7 -7
  291. package/chunks/{serve-KL3G6LQQ.js → serve-LVMPJBTV.js} +66 -62
  292. package/chunks/{server-LBPYXZ5G.js → server-U7K7EJEP.js} +783 -350
  293. package/chunks/{session-YG6742LO.js → session-BQNC5QUN.js} +117 -112
  294. package/chunks/{session-attachments-root-OUBQDYC4.js → session-attachments-root-LQDHWZST.js} +56 -52
  295. package/chunks/{session-pr-refresh-EKGMYNAW.js → session-pr-refresh-J7DQYX2I.js} +66 -60
  296. package/chunks/{settings-DDNHJX2L.js → settings-WAWJIZHR.js} +67 -63
  297. package/chunks/{shell-KUCXWITU.js → shell-WFJEYGQI.js} +43 -39
  298. package/chunks/{skill-JQLKPNWZ.js → skill-RHQWSDOK.js} +128 -23
  299. package/chunks/{skill-settings-XERQCUXZ.js → skill-settings-ALFUQQD6.js} +72 -60
  300. package/chunks/{spawnChannel-GQ45QFGB.js → spawnChannel-D35CB5JB.js} +60 -55
  301. package/chunks/{standalone-update-PRF3ILGZ.js → standalone-update-NMMY6CAO.js} +58 -54
  302. package/chunks/{start-opentui-ui-JDSOZE3N.js → start-opentui-ui-F6BN46GE.js} +2693 -2160
  303. package/chunks/{startInteractiveUI-RRW3JVHN.js → startInteractiveUI-E6U7L5AD.js} +1610 -1773
  304. package/chunks/{syntheticOutput-F6F27JMK.js → syntheticOutput-EX5L5GYI.js} +2 -2
  305. package/chunks/{task-create-Y623TBHB.js → task-create-75HVPEAH.js} +7 -7
  306. package/chunks/{task-list-FCPEEGWL.js → task-list-ZLJSMRFA.js} +2 -2
  307. package/chunks/{task-stop-QTKZXLPH.js → task-stop-MD7P6QGK.js} +1 -1
  308. package/chunks/{task-update-YLSXF25N.js → task-update-RI7QNVDP.js} +20 -13
  309. package/chunks/{team-create-5DRLOLOE.js → team-create-DKAJ3OUY.js} +43 -39
  310. package/chunks/{team-delete-S7TLHZCF.js → team-delete-RIDINW6I.js} +1 -1
  311. package/chunks/{team-plan-approval-MWSGAL5T.js → team-plan-approval-ZUG32DAK.js} +43 -39
  312. package/chunks/{terminal-image-renderer-H7PD4FQW.js → terminal-image-renderer-U3Z5PMGO.js} +58 -54
  313. package/chunks/{theme-manager-7AV73D6R.js → theme-manager-GA65ZFKB.js} +56 -52
  314. package/chunks/{todoWrite-5QI2H2FW.js → todoWrite-XSTG2VT5.js} +6 -3
  315. package/chunks/{tool-search-UGYTBLUV.js → tool-search-XCEN7VXX.js} +17 -12
  316. package/chunks/{total-session-admission-JIHSTJ5S.js → total-session-admission-FZSHBR32.js} +63 -58
  317. package/chunks/{trustedFolders-5VCBXFOP.js → trustedFolders-SXPNZESV.js} +57 -53
  318. package/chunks/{update-relaunch-4LF3APCV.js → update-relaunch-QOUTZZ7Q.js} +5 -5
  319. package/chunks/{updateCheck-4T3WUE5F.js → updateCheck-DYRX7M34.js} +60 -56
  320. package/chunks/{useAutoAcceptIndicator-UMGB64Z6.js → useAutoAcceptIndicator-QOG7LUT3.js} +68 -64
  321. package/chunks/{validateNonInterActiveAuth-GFJ72U2C.js → validateNonInterActiveAuth-FJPAEMDD.js} +109 -104
  322. package/chunks/{version-EAAZN4T2.js → version-5IC46F2Z.js} +1 -1
  323. package/chunks/{web-fetch-VRU3A2NI.js → web-fetch-WSW4QZBA.js} +15 -13
  324. package/chunks/web-search-5QFKXWUV.js +39 -0
  325. package/chunks/{web-shell-static-CCN4JZEE.js → web-shell-static-T7UGLVE4.js} +2 -7
  326. package/chunks/{workflow-UHPFALVZ.js → workflow-ZF4DLK4V.js} +179 -79
  327. package/chunks/workspace-providers-status-4E4XWBFS.js +133 -0
  328. package/chunks/{workspace-registration-store-A7RGKW62.js → workspace-registration-store-M3QEP27F.js} +2 -2
  329. package/chunks/{workspace-registry-C2NGE6SD.js → workspace-registry-H2ENI5G2.js} +63 -58
  330. package/chunks/{workspace-runtime-coordinator-QKMZ24YF.js → workspace-runtime-coordinator-CRRNB7PC.js} +66 -59
  331. package/chunks/{workspace-service-RQTTAGGC.js → workspace-service-GJ2GOHKU.js} +70 -65
  332. package/chunks/workspace-skills-status-CRWHV35X.js +130 -0
  333. package/chunks/{workspace-trust-reconciler-KFWATZUU.js → workspace-trust-reconciler-GG2JA7KI.js} +73 -68
  334. package/chunks/{write-file-DPVB2SBQ.js → write-file-LZ4EMF36.js} +45 -41
  335. package/chunks/{zh-TW-2K2WRFPY.js → zh-TW-7PRVUGLW.js} +5 -3
  336. package/chunks/{zh-S5V3Z5CR.js → zh-V2EYTYJP.js} +5 -3
  337. package/chunks/{zoom-image-S7AWLAPC.js → zoom-image-J5IMS3WD.js} +11 -10
  338. package/cli.js +18 -17
  339. package/codeModeHost.js +4425 -0
  340. package/export-transcript-document.css +1 -1
  341. package/export-transcript-document.js +151 -151
  342. package/locales/ca.js +5 -6
  343. package/locales/de.js +5 -6
  344. package/locales/en.js +7 -6
  345. package/locales/fr.js +6 -6
  346. package/locales/ja.js +5 -6
  347. package/locales/pt.js +5 -6
  348. package/locales/ru.js +6 -6
  349. package/locales/zh-TW.js +7 -6
  350. package/locales/zh.js +7 -6
  351. package/package.json +4 -3
  352. package/web-shell/assets/{abnfDiagram-VCTEODGH-nU24rpIE.js → abnfDiagram-VCTEODGH-S_JCiANq.js} +1 -1
  353. package/web-shell/assets/{arc-D1hTu8QI.js → arc-DP-839Xn.js} +1 -1
  354. package/web-shell/assets/architectureDiagram-5GKGNRK7-C8rCd2KK.js +36 -0
  355. package/web-shell/assets/blockDiagram-NRAW4CY4-DQR82jwr.js +129 -0
  356. package/web-shell/assets/{c4Diagram-UCG6FXSJ-kEFoC1ei.js → c4Diagram-UCG6FXSJ-D21PNMRP.js} +4 -4
  357. package/web-shell/assets/channel-BgGrpX_z.js +1 -0
  358. package/web-shell/assets/{chunk-2Q5K7J3B-DbT9wS7j.js → chunk-2Q5K7J3B-KdDInGLi.js} +1 -1
  359. package/web-shell/assets/{chunk-5VM5RSS4-CNbULt6O.js → chunk-5VM5RSS4-ltb7zRmH.js} +1 -1
  360. package/web-shell/assets/{chunk-F27PBJKO-CbQRy4Tb.js → chunk-F27PBJKO-DcpQA0Ng.js} +1 -1
  361. package/web-shell/assets/chunk-G27WJ6UU-C8NDZxcy.js +231 -0
  362. package/web-shell/assets/chunk-JWPE2WC7-hXhhHTs1.js +1 -0
  363. package/web-shell/assets/chunk-LCL6LL3I-CLaOR-Hl.js +206 -0
  364. package/web-shell/assets/chunk-POPQ4Y6H-Y5_qlB1N.js +1 -0
  365. package/web-shell/assets/{chunk-SVP7TREG-DyBb2Axj.js → chunk-SVP7TREG-BWX2Voh7.js} +4 -4
  366. package/web-shell/assets/{chunk-XXDRQBXY-BIA0eb5B.js → chunk-XXDRQBXY-1wmj_kXI.js} +1 -1
  367. package/web-shell/assets/classDiagram-DTDB5LWJ-jUH7ADYs.js +1 -0
  368. package/web-shell/assets/classDiagram-v2-JRS7N3AN-jUH7ADYs.js +1 -0
  369. package/web-shell/assets/cose-bilkent-JH36ORCC-DpLc-cdd.js +1 -0
  370. package/web-shell/assets/cynefin-OW5HDTMX-DhxGiPZW.js +178 -0
  371. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-LENf_IUy.js → cynefinDiagram-5FMLGOSQ-Dl3jfBry.js} +1 -1
  372. package/web-shell/assets/{cytoscape.esm-CUqq0XTU.js → cytoscape.esm-DJK6lGiH.js} +3 -3
  373. package/web-shell/assets/dagre-3AP2YEHR-C8FA8vJk.js +4 -0
  374. package/web-shell/assets/diagram-S7CK7UJ4-D-quIUtW.js +30 -0
  375. package/web-shell/assets/diagram-UQ7AKVKN-Bjo09Uts.js +41 -0
  376. package/web-shell/assets/diagram-VSXAHHWV-IoI3ttq4.js +3 -0
  377. package/web-shell/assets/diagram-VX7I27RA-BKyOZ5SO.js +24 -0
  378. package/web-shell/assets/diagram-Z3DM3KII-Cu_OHEhw.js +24 -0
  379. package/web-shell/assets/{ebnfDiagram-PWID7BFC-BGpiquRm.js → ebnfDiagram-PWID7BFC-UVB-bbPg.js} +1 -1
  380. package/web-shell/assets/{erDiagram-SSCWMZ5O-D0besu_U.js → erDiagram-SSCWMZ5O-l8drddto.js} +13 -13
  381. package/web-shell/assets/flowDiagram-A5DVABFB-DU1I_VAI.js +168 -0
  382. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-CNlsAeNr.js → ganttDiagram-EL5Y4UJY-BLRH05uB.js} +1 -1
  383. package/web-shell/assets/gitGraphDiagram-WWUBYQGX-Czg_BkRE.js +106 -0
  384. package/web-shell/assets/index-CmMV8Jla.js +3 -0
  385. package/web-shell/assets/{index-CGT341lL.js → index-DohPy72Z.js} +1 -1
  386. package/web-shell/assets/index-DyMtNYuu.js +2207 -0
  387. package/web-shell/assets/index-n6N-2a3v.css +36 -0
  388. package/web-shell/assets/{infoDiagram-RXCK75RN-Bpai64Ll.js → infoDiagram-RXCK75RN-BpBvjkro.js} +1 -1
  389. package/web-shell/assets/ishikawaDiagram-5VMMS53U-phy1l3jm.js +70 -0
  390. package/web-shell/assets/{journeyDiagram-EYS64GPL-iz_DKgFX.js → journeyDiagram-EYS64GPL-oY-9LgVS.js} +1 -1
  391. package/web-shell/assets/kanban-definition-3QL26DDD-slZoy-sc.js +89 -0
  392. package/web-shell/assets/{layout-qEvKgnvU.js → layout-0hnn_P9l.js} +1 -1
  393. package/web-shell/assets/{linear-C6lklGdq.js → linear-7Wqe8DRy.js} +1 -1
  394. package/web-shell/assets/mermaid.core-BaK8n0bq.js +312 -0
  395. package/web-shell/assets/mindmap-definition-FBJOCRG2-BedUdy_E.js +96 -0
  396. package/web-shell/assets/{pegDiagram-XKGWAZYB-BhD0q0i6.js → pegDiagram-XKGWAZYB-DQLRdmxq.js} +1 -1
  397. package/web-shell/assets/pieDiagram-E7YTZNPT-UC20w9-5.js +39 -0
  398. package/web-shell/assets/quadrantDiagram-AXDQQJYC-CQx2Hmk3.js +7 -0
  399. package/web-shell/assets/qwen-code-notification-BRVagufF.png +0 -0
  400. package/web-shell/assets/{railroadDiagram-O6MQD6OU-E1g2KIFK.js → railroadDiagram-O6MQD6OU-2UEJe_y-.js} +1 -1
  401. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-CuerYJOe.js → requirementDiagram-EFPCY7ZU-DOAJggB4.js} +13 -13
  402. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CqWyCZGA.js → sankeyDiagram-P5KCCOFB-DnQ_qJo7.js} +7 -7
  403. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-B-YWb8x4.js → sequenceDiagram-WJ2MYXX4-DZrZUoCo.js} +16 -16
  404. package/web-shell/assets/sizeCapture-X5ZJPWSS-B5G4GDQB.js +1 -0
  405. package/web-shell/assets/{stateDiagram-HBIQ2CUA-C8LDpNHS.js → stateDiagram-HBIQ2CUA-Bn1cT0qF.js} +1 -1
  406. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-BF3xtNvJ.js +1 -0
  407. package/web-shell/assets/swimlanes-XN3QIQJK-Bzhcdn87.js +1 -0
  408. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-B753mA3E.js +8 -0
  409. package/web-shell/assets/timeline-definition-24CTP7MA-BqZ_3D10.js +120 -0
  410. package/web-shell/assets/vennDiagram-4TSXK5OY-z9kw1kmm.js +34 -0
  411. package/web-shell/assets/wardleyDiagram-VM6X3IG4-Cydp1zJW.js +78 -0
  412. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-ruD2Wjhg.js → xychartDiagram-S5SC5T6Z-j4X1lQKo.js} +1 -1
  413. package/web-shell/index.html +2 -2
  414. package/chunks/chunk-7Q2AXRDJ.js +0 -114
  415. package/chunks/chunk-AEY27Z35.js +0 -1411
  416. package/chunks/chunk-CFKIH3D3.js +0 -50
  417. package/chunks/chunk-HWVUSYSN.js +0 -126
  418. package/chunks/chunk-QHMLYMMS.js +0 -32
  419. package/chunks/chunk-SAH4BD2J.js +0 -92
  420. package/chunks/chunk-TWUKBNWM.js +0 -86
  421. package/chunks/chunk-ZTTC7T4X.js +0 -126
  422. package/chunks/list-YL6LDQKQ.js +0 -129
  423. package/chunks/mcp-IYVSIW6O.js +0 -123
  424. package/chunks/web-search-NEGYQNDJ.js +0 -912
  425. package/chunks/workspace-providers-status-AEYISSU2.js +0 -127
  426. package/chunks/workspace-skills-status-5HWZU3HX.js +0 -126
  427. package/web-shell/assets/architectureDiagram-5GKGNRK7-B_fgkKe7.js +0 -36
  428. package/web-shell/assets/blockDiagram-NRAW4CY4-C3pddUNg.js +0 -129
  429. package/web-shell/assets/channel-Blod4z1X.js +0 -1
  430. package/web-shell/assets/chunk-G27WJ6UU-CVbXTxYk.js +0 -231
  431. package/web-shell/assets/chunk-JWPE2WC7-D89c_BXy.js +0 -1
  432. package/web-shell/assets/chunk-LCL6LL3I-B7-I_9KB.js +0 -206
  433. package/web-shell/assets/chunk-POPQ4Y6H-DcLQFzS4.js +0 -1
  434. package/web-shell/assets/classDiagram-DTDB5LWJ-D6hFDMqb.js +0 -1
  435. package/web-shell/assets/classDiagram-v2-JRS7N3AN-D6hFDMqb.js +0 -1
  436. package/web-shell/assets/cose-bilkent-JH36ORCC-Db2FYN85.js +0 -1
  437. package/web-shell/assets/cynefin-OW5HDTMX-i4GwmBVy.js +0 -178
  438. package/web-shell/assets/dagre-3AP2YEHR-CF9XVrD9.js +0 -4
  439. package/web-shell/assets/diagram-S7CK7UJ4-DD5PJfSm.js +0 -30
  440. package/web-shell/assets/diagram-UQ7AKVKN-CjD_sBMj.js +0 -41
  441. package/web-shell/assets/diagram-VSXAHHWV-U5WwMqyA.js +0 -3
  442. package/web-shell/assets/diagram-VX7I27RA-BujpHJJf.js +0 -24
  443. package/web-shell/assets/diagram-Z3DM3KII-3ZLtKEXo.js +0 -24
  444. package/web-shell/assets/flowDiagram-A5DVABFB-9DwDuIyr.js +0 -168
  445. package/web-shell/assets/gitGraphDiagram-WWUBYQGX-C_pPFiTR.js +0 -106
  446. package/web-shell/assets/index-BYWs4JWq.js +0 -3
  447. package/web-shell/assets/index-D3YS6KuJ.js +0 -2173
  448. package/web-shell/assets/index-eBxK3rs2.css +0 -36
  449. package/web-shell/assets/ishikawaDiagram-5VMMS53U-ktpJFq4r.js +0 -70
  450. package/web-shell/assets/kanban-definition-3QL26DDD-m_gG00Yt.js +0 -89
  451. package/web-shell/assets/mermaid.core-DSCYB_2P.js +0 -312
  452. package/web-shell/assets/mindmap-definition-FBJOCRG2-DRQbT8w-.js +0 -96
  453. package/web-shell/assets/pieDiagram-E7YTZNPT-BvIGQCSd.js +0 -39
  454. package/web-shell/assets/quadrantDiagram-AXDQQJYC-BDQtfpU-.js +0 -7
  455. package/web-shell/assets/sizeCapture-X5ZJPWSS-BB7YY4Tl.js +0 -1
  456. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-C4CbdvGa.js +0 -1
  457. package/web-shell/assets/swimlanes-XN3QIQJK-D94vOoxZ.js +0 -1
  458. package/web-shell/assets/swimlanesDiagram-VK2B7HYN--QNSIOC8.js +0 -8
  459. package/web-shell/assets/timeline-definition-24CTP7MA-C9C8uEYm.js +0 -120
  460. package/web-shell/assets/vennDiagram-4TSXK5OY-CYzMHbVW.js +0 -34
  461. package/web-shell/assets/wardleyDiagram-VM6X3IG4-G9nhtLES.js +0 -78
  462. package/chunks/{open-with-auth-6MVIHMXB.js → open-with-auth-XFCCJOO6.js} +3 -3
@@ -1,5 +1,11 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ import {
4
+ deriveWebSocketBase,
5
+ openQwenAsrRealtimeStream,
6
+ openVoiceStream,
7
+ openVoiceStreamWithRetry
8
+ } from "./chunk-Q2SAQTEJ.js";
3
9
  import {
4
10
  GENERATION_MAX_PROMPT_BYTES,
5
11
  MAX_REMEMBER_CONTENT_BYTES,
@@ -14,13 +20,7 @@ import {
14
20
  shouldSuppressRememberErrorDetails,
15
21
  workspaceMemoryFailureCode,
16
22
  workspaceMemoryFailureDiagnostics
17
- } from "./chunk-KOKPXIAN.js";
18
- import {
19
- deriveWebSocketBase,
20
- openQwenAsrRealtimeStream,
21
- openVoiceStream,
22
- openVoiceStreamWithRetry
23
- } from "./chunk-Q2SAQTEJ.js";
23
+ } from "./chunk-UL4DXZMP.js";
24
24
  import {
25
25
  SetupGithubError,
26
26
  collectSessionData,
@@ -32,61 +32,19 @@ import {
32
32
  toJson,
33
33
  toJsonl,
34
34
  toMarkdown
35
- } from "./chunk-3XLK2QMY.js";
35
+ } from "./chunk-H7L725Z6.js";
36
36
  import {
37
37
  OBSERVED_CONTACT_MAX_FRESH_WITHIN_SECONDS,
38
38
  ObservedChannelContactStore
39
39
  } from "./chunk-M3JGHRMQ.js";
40
40
  import "./chunk-VFFQAOPR.js";
41
+ import "./chunk-2S2WIGCM.js";
41
42
  import {
42
43
  escapeAnsiCtrlCodes
43
44
  } from "./chunk-47ECGEJC.js";
44
- import "./chunk-6JACAGYH.js";
45
45
  import "./chunk-2MIN6GRR.js";
46
46
  import "./chunk-QHTIBUWB.js";
47
47
  import "./chunk-TXASDT2M.js";
48
- import {
49
- AONE_MAX_MR_VIEW_CALLS_PER_RUN,
50
- DaemonDrainingError,
51
- InvalidCursorError,
52
- SessionArchiveCoordinator,
53
- acquireWorktreeOwnershipOp,
54
- archiveDaemonSessions,
55
- assertSessionArchived,
56
- assertSessionLoadable,
57
- assertSessionRestorable,
58
- createSessionOrganizationService,
59
- createWorkspaceRuntimeSessionService,
60
- defaultAoneMrBackend,
61
- deleteDaemonSessionIfOrphan,
62
- deleteDaemonSessions,
63
- getWorkspaceSessionInfoForResponse,
64
- invalidateWorkspaceSessionListCache,
65
- isAoneDetailUrlForRepo,
66
- laterActivityTimestamp,
67
- listLiveWorkspaceSessionsForResponse,
68
- listWorkspaceSessionsForResponse,
69
- logSessionArchiveWarning,
70
- parseSessionPageSizeQuery,
71
- resolveAoneWorkspaceRepo,
72
- resolveSessionIdForRestore,
73
- runWithWorkspaceRuntimeStorage,
74
- searchWorkspaceSessionsForResponse,
75
- unarchiveDaemonSessions
76
- } from "./chunk-YQHLFCPU.js";
77
- import {
78
- LIVE_SESSION_SOURCE_PREFIX,
79
- isCompatibleLiveSessionSource,
80
- isReservedLiveSessionSource,
81
- isReservedStandaloneSessionSource,
82
- readLoadableConversationSession,
83
- readLoadableLiveConversationMetadata
84
- } from "./chunk-OHU2H5CS.js";
85
- import "./chunk-4VQBQLIZ.js";
86
- import {
87
- STANDALONE_SESSION_SOURCE_TYPE,
88
- isReservedStandaloneSessionSourceType
89
- } from "./chunk-N4QWUPDM.js";
90
48
  import {
91
49
  ACP_PRE_ATTACH_MAX_FRAMES_GLOBAL,
92
50
  ACP_PRE_ATTACH_MAX_FRAMES_PER_CONNECTION,
@@ -157,7 +115,7 @@ import {
157
115
  singleTokenCredentials,
158
116
  tagListener,
159
117
  unsafeRevealSecret
160
- } from "./chunk-NRXWJXJ4.js";
118
+ } from "./chunk-7GKPKIUB.js";
161
119
  import {
162
120
  ConversationDirectoryIdentityError,
163
121
  getConversationDirectoryName,
@@ -165,7 +123,47 @@ import {
165
123
  isSameConversationPath,
166
124
  normalizedInode
167
125
  } from "./chunk-PB7JBAHF.js";
168
- import "./chunk-UXEO7E3V.js";
126
+ import {
127
+ formatHostForAuthority,
128
+ isLoopbackBind
129
+ } from "./chunk-DMEUXLSS.js";
130
+ import {
131
+ AONE_MAX_MR_VIEW_CALLS_PER_RUN,
132
+ DaemonDrainingError,
133
+ InvalidCursorError,
134
+ SessionArchiveCoordinator,
135
+ acquireWorktreeOwnershipOp,
136
+ archiveDaemonSessions,
137
+ assertSessionArchived,
138
+ assertSessionLoadable,
139
+ assertSessionRestorable,
140
+ createWorkspaceRuntimeSessionService,
141
+ defaultAoneMrBackend,
142
+ deleteDaemonSessionIfOrphan,
143
+ deleteDaemonSessions,
144
+ getWorkspaceSessionInfoForResponse,
145
+ invalidateWorkspaceSessionListCache,
146
+ isAoneDetailUrlForRepo,
147
+ laterActivityTimestamp,
148
+ listLiveWorkspaceSessionsForResponse,
149
+ listWorkspaceSessionsForResponse,
150
+ logSessionArchiveWarning,
151
+ parseSessionPageSizeQuery,
152
+ resolveAoneWorkspaceRepo,
153
+ resolveSessionIdForRestore,
154
+ runWithWorkspaceRuntimeStorage,
155
+ searchWorkspaceSessionsForResponse,
156
+ unarchiveDaemonSessions
157
+ } from "./chunk-65ANUQSV.js";
158
+ import {
159
+ LIVE_SESSION_SOURCE_PREFIX,
160
+ isCompatibleLiveSessionSource,
161
+ isReservedLiveSessionSource,
162
+ isReservedStandaloneSessionSource,
163
+ readLoadableConversationSession,
164
+ readLoadableLiveConversationMetadata
165
+ } from "./chunk-OHU2H5CS.js";
166
+ import "./chunk-4VQBQLIZ.js";
169
167
  import {
170
168
  CLIENT_ID_HEADER,
171
169
  CLIENT_ID_RE,
@@ -188,6 +186,24 @@ import {
188
186
  sendJsonBodyParserError,
189
187
  validateMcpRuntimeServerName
190
188
  } from "./chunk-LAUEEBDL.js";
189
+ import {
190
+ STANDALONE_SESSION_SOURCE_TYPE,
191
+ isReservedStandaloneSessionSourceType,
192
+ isScheduledTaskRunSource
193
+ } from "./chunk-N4QWUPDM.js";
194
+ import {
195
+ readRecentPromptTerminals,
196
+ reconcileDanglingPromptTerminals,
197
+ withPromptTerminals
198
+ } from "./chunk-RJFUPP3F.js";
199
+ import {
200
+ WorkspaceGenerationClosedError,
201
+ createSingleWorkspaceRegistry,
202
+ createWorkspaceSessionOwnerIndex
203
+ } from "./chunk-R7OO56VZ.js";
204
+ import {
205
+ sessionAttachmentsRoots
206
+ } from "./chunk-XWJFDJZK.js";
191
207
  import {
192
208
  getWorkspaceRouteContext,
193
209
  isGenerationClosedError,
@@ -210,23 +226,29 @@ import {
210
226
  sendUntrustedWorkspaceResponse,
211
227
  sendWorkspaceRuntimeUnavailable,
212
228
  setWorkspaceRouteContext
213
- } from "./chunk-2PJRI3EH.js";
229
+ } from "./chunk-J4DRBDHX.js";
214
230
  import {
215
231
  normalizeChannelDelivery,
216
232
  parseChannelDelivery
217
- } from "./chunk-Z3GF56ME.js";
233
+ } from "./chunk-FRISMWG3.js";
218
234
  import {
219
235
  isValidSessionId,
220
236
  normalizeSessionIdForLookup,
221
237
  parseCallerSuppliedSessionId
222
238
  } from "./chunk-ZEZKIS2K.js";
239
+ import {
240
+ createSessionOrganizationService
241
+ } from "./chunk-PRWRNC64.js";
242
+ import {
243
+ isInternalWorkspaceRuntime
244
+ } from "./chunk-NYWWQ437.js";
223
245
  import {
224
246
  WorkspaceRuntimeInitializationError,
225
247
  WorkspaceRuntimeStillStartingError,
226
248
  getWorkspaceRuntimeCoordinator,
227
249
  getWorkspaceRuntimeCoordinatorIfSupported,
228
250
  supportsWorkspaceRuntimeLifecycle
229
- } from "./chunk-Q2LVVIKF.js";
251
+ } from "./chunk-ZZUXUBEB.js";
230
252
  import {
231
253
  EMPTY_WORKSPACE_VOICE_UPDATE_ERROR,
232
254
  MAX_WORKSPACE_SKILL_NAME_LENGTH,
@@ -242,14 +264,14 @@ import {
242
264
  validateWorkspaceSkillName,
243
265
  validateWorkspaceVoiceState,
244
266
  voiceSettingsScopeToWire
245
- } from "./chunk-LDVNJZGH.js";
267
+ } from "./chunk-IUXWAKVS.js";
246
268
  import {
247
269
  PermissionRulesValidationError,
248
270
  buildPermissionSettings,
249
271
  isPermissionRuleType,
250
272
  normalizePermissionRules,
251
273
  readPermissionRuleSet
252
- } from "./chunk-XBZTAGB7.js";
274
+ } from "./chunk-OXDQETZA.js";
253
275
  import {
254
276
  assertVoiceBaseUrlNetworkAllowed,
255
277
  isStreamingVoiceModel,
@@ -257,91 +279,95 @@ import {
257
279
  resolveVoiceTranscriptionConfig,
258
280
  sanitizeVoiceErrorMessage,
259
281
  transcribeVoiceAudio
260
- } from "./chunk-2ALXPGB4.js";
282
+ } from "./chunk-E6IR653O.js";
261
283
  import {
262
284
  isVoiceEnabled,
263
285
  isVoiceMode,
264
- readVoiceModel
265
- } from "./chunk-NE624IVP.js";
286
+ readVoiceModel,
287
+ resolveVoiceTransport
288
+ } from "./chunk-ADQUK6WA.js";
266
289
  import {
267
290
  resolvePath
268
291
  } from "./chunk-Y53DG2HA.js";
269
292
  import {
270
293
  createTotalSessionAdmissionController
271
294
  } from "./chunk-YI2YCNSP.js";
295
+ import "./chunk-OIBUG24X.js";
296
+ import {
297
+ MAX_SESSION_RESTORE_TIMEOUT_MS,
298
+ resolveSessionRestoreTimeoutMs,
299
+ restoreRetryAfterSeconds
300
+ } from "./chunk-4JRM2BSM.js";
272
301
  import {
273
302
  assertValidChannelSecretUpdates
274
- } from "./chunk-X7UJKOHZ.js";
303
+ } from "./chunk-O75ZXPOX.js";
304
+ import {
305
+ createWorkspaceProvidersStatusProvider
306
+ } from "./chunk-VQ3SUPLA.js";
307
+ import {
308
+ PERSIST_REASONING_SELECTION_META_KEY,
309
+ REASONING_SELECTION_PERSISTED_META_KEY
310
+ } from "./chunk-MJHLKWGJ.js";
311
+ import {
312
+ findModelConfiguration,
313
+ findModelConfigurationForDeletion,
314
+ isConversationModelConfiguration,
315
+ isImageModelConfiguration,
316
+ listModelConfigurations
317
+ } from "./chunk-62MWBTS7.js";
275
318
  import {
276
319
  createWorkspaceSkillsStatusProvider
277
- } from "./chunk-Q5BD56BW.js";
278
- import "./chunk-BHTYRHJF.js";
320
+ } from "./chunk-ELHAQ5H4.js";
321
+ import "./chunk-ZJ7JQUGY.js";
322
+ import {
323
+ lookupSkillDisablement,
324
+ resolveSkillSettings
325
+ } from "./chunk-LMJSPC55.js";
279
326
  import {
280
327
  WorkspacePermissionRulesSessionRequiredError,
281
328
  WorkspaceSettingsPartialPersistError,
282
329
  WorkspaceSkillNotFoundError,
283
330
  mapWorkspaceSkillToggleError
284
331
  } from "./chunk-FTJMWDND.js";
285
- import "./chunk-FCQJLMA2.js";
332
+ import "./chunk-Q3TFRP5G.js";
286
333
  import {
287
334
  isServeDebugMode,
288
335
  mountWebShellAssets,
289
336
  mountWebShellSpaFallback
290
- } from "./chunk-3I7W2POO.js";
337
+ } from "./chunk-FGROOEKM.js";
291
338
  import {
292
339
  require_express
293
340
  } from "./chunk-SVWWF5TZ.js";
294
341
  import "./chunk-FBX2SDQ4.js";
295
- import {
296
- formatHostForAuthority,
297
- isLoopbackBind
298
- } from "./chunk-DMEUXLSS.js";
299
342
  import {
300
343
  evaluateDaemonWorkspaceTrust,
301
344
  readDaemonTrustPolicySnapshot
302
- } from "./chunk-KFZYGSJN.js";
303
- import {
304
- readRecentPromptTerminals,
305
- reconcileDanglingPromptTerminals,
306
- withPromptTerminals
307
- } from "./chunk-OLTN767L.js";
308
- import {
309
- WorkspaceGenerationClosedError,
310
- createSingleWorkspaceRegistry,
311
- createWorkspaceSessionOwnerIndex
312
- } from "./chunk-R7OO56VZ.js";
313
- import {
314
- isInternalWorkspaceRuntime
315
- } from "./chunk-NYWWQ437.js";
316
- import "./chunk-OIBUG24X.js";
317
- import {
318
- MAX_SESSION_RESTORE_TIMEOUT_MS,
319
- resolveSessionRestoreTimeoutMs,
320
- restoreRetryAfterSeconds
321
- } from "./chunk-4JRM2BSM.js";
322
- import {
323
- sessionAttachmentsRoots
324
- } from "./chunk-XWJFDJZK.js";
345
+ } from "./chunk-WDB57HEI.js";
325
346
  import {
326
347
  assertLiveDiscoveryPublisher,
327
348
  getStableLiveDiscoveryBaseDir
328
- } from "./chunk-WG7BL3FY.js";
349
+ } from "./chunk-473RJLIH.js";
329
350
  import {
330
351
  ConversationRuntimeOwnershipError,
331
352
  LIVE_HOST_BUNDLE_ID,
332
353
  LIVE_HOST_PROTOCOL_VERSION,
333
354
  LIVE_INPUT_AUDIO_EPOCH_BYTES,
355
+ LIVE_OUTPUT_AUDIO_EPOCH_BYTES,
356
+ LIVE_OUTPUT_AUDIO_HEADER_BYTES,
334
357
  conversationRootCompromisedError,
335
358
  conversationRuntimeInUseError,
336
359
  conversationRuntimeOwnershipCompromisedError,
337
360
  conversationRuntimeUnavailableError
338
- } from "./chunk-2Z3T52OC.js";
361
+ } from "./chunk-Y5TM7SBV.js";
339
362
  import {
340
363
  createDaemonStatusProvider
341
- } from "./chunk-POC3YMHG.js";
342
- import "./chunk-RWVD5RRY.js";
343
- import "./chunk-HBQ2NXOU.js";
364
+ } from "./chunk-F2IRY2TD.js";
365
+ import "./chunk-BDDE4YNP.js";
366
+ import "./chunk-M6MID3FA.js";
344
367
  import "./chunk-JS73NNWF.js";
368
+ import {
369
+ snapshotProcessEnv
370
+ } from "./chunk-VRQZESKP.js";
345
371
  import {
346
372
  SessionArtifactAuthorizationError,
347
373
  SessionArtifactValidationError,
@@ -349,7 +375,7 @@ import {
349
375
  extractErrorCode,
350
376
  extractErrorMessage,
351
377
  parseSessionSource
352
- } from "./chunk-3KQBQ6FM.js";
378
+ } from "./chunk-SYDMM6IX.js";
353
379
  import {
354
380
  EVENT_SCHEMA_VERSION,
355
381
  EventBus,
@@ -359,21 +385,8 @@ import "./chunk-WCCLLK7X.js";
359
385
  import "./chunk-OCPBI7J5.js";
360
386
  import {
361
387
  createSpawnChannelFactory
362
- } from "./chunk-IUVIBDKU.js";
363
- import {
364
- createWorkspaceProvidersStatusProvider
365
- } from "./chunk-5KI7ZDTB.js";
366
- import {
367
- PERSIST_REASONING_SELECTION_META_KEY,
368
- REASONING_SELECTION_PERSISTED_META_KEY
369
- } from "./chunk-BV6Q5HMY.js";
370
- import {
371
- getAuthTypeFromEnv,
372
- resolveCliGenerationConfig
373
- } from "./chunk-MF6E7FSA.js";
374
- import {
375
- snapshotProcessEnv
376
- } from "./chunk-TBEXLLAO.js";
388
+ } from "./chunk-2YMRRI2C.js";
389
+ import "./chunk-LYD3T3H7.js";
377
390
  import {
378
391
  BridgeTimeoutError,
379
392
  SERVE_CONTROL_EXT_METHODS,
@@ -381,31 +394,45 @@ import {
381
394
  SessionRestoreTimeoutError,
382
395
  createIdleWorkspaceMemoryStatus,
383
396
  mapDomainErrorToErrorKind
384
- } from "./chunk-HGEUHUEV.js";
397
+ } from "./chunk-54B2LTKP.js";
385
398
  import {
386
- resolveSkillSettings
387
- } from "./chunk-HWVUSYSN.js";
399
+ getAuthTypeFromEnv,
400
+ resolveCliGenerationConfig
401
+ } from "./chunk-MFPAVOYJ.js";
402
+ import "./chunk-INGBUYL6.js";
388
403
  import "./chunk-ZL4HFSL6.js";
389
404
  import {
390
405
  daemonObservedContactsPath,
391
406
  loadChannelsConfig
392
- } from "./chunk-NHCZJQE4.js";
393
- import "./chunk-SODMFNAR.js";
407
+ } from "./chunk-WLFILD4T.js";
408
+ import "./chunk-SQCZDHBQ.js";
394
409
  import "./chunk-57OAHC2Y.js";
395
410
  import {
396
411
  parseChannelWebhookConfigLenient
397
- } from "./chunk-RZHU3K6M.js";
412
+ } from "./chunk-IAS753HG.js";
398
413
  import {
399
414
  supportedChannelCatalog
400
- } from "./chunk-CUEXOHQH.js";
401
- import "./chunk-76RGWKLS.js";
415
+ } from "./chunk-5ODRE7E5.js";
416
+ import "./chunk-ABNX6E6K.js";
402
417
  import "./chunk-V6WHFGST.js";
418
+ import {
419
+ MAX_REGISTERED_WORKSPACES,
420
+ WorkspaceDisplayNameValidationError,
421
+ WorkspaceRegistrationStoreCommittedError,
422
+ WorkspaceRegistrationStoreLimitError,
423
+ WorkspaceRegistrationStoreTooLargeError,
424
+ normalizeWorkspaceDisplayName,
425
+ resolveMaxRegisteredWorkspaces,
426
+ workspaceRegistrationId
427
+ } from "./chunk-P225AM5U.js";
403
428
  import {
404
429
  CHANNEL_PROMPT_META_KEY,
405
430
  DAEMON_PROMPT_DISPLAY_TEXT_META_KEY,
431
+ DAEMON_SUBMITTED_PROMPT_META_KEY,
406
432
  REQUESTED_SESSION_ID_META_KEY,
433
+ SUBMITTED_PROMPT_META_KEY,
407
434
  gradeActiveWorkCoverage
408
- } from "./chunk-PSPAM24S.js";
435
+ } from "./chunk-TBSCTWKF.js";
409
436
  import {
410
437
  BranchWhilePromptActiveError,
411
438
  BridgeChannelQuarantinedError,
@@ -443,6 +470,12 @@ import {
443
470
  WorkspaceInitSymlinkError,
444
471
  WorkspaceMismatchError
445
472
  } from "./chunk-FAWTMDX7.js";
473
+ import {
474
+ MAX_WORKSPACE_PATH_LENGTH,
475
+ canonicalizeWorkspace,
476
+ canonicalizeWorkspaces,
477
+ translateAndCheckAbsoluteWorkspacePath
478
+ } from "./chunk-6PLDPT2C.js";
446
479
  import {
447
480
  CHANNEL_WORKER_PROMPT_AUTHORIZATION_META_KEY,
448
481
  isChannelWorkerPromptAuthorized
@@ -454,30 +487,30 @@ import {
454
487
  MAX_CHANNEL_STARTUP_FAILURE_MESSAGE_LENGTH,
455
488
  isChannelWebhookEnqueueError
456
489
  } from "./chunk-STUJ7IMZ.js";
490
+ import {
491
+ QWEN_SERVER_TOKEN_ENV
492
+ } from "./chunk-GYTKQYDB.js";
457
493
  import {
458
494
  normalizeWorkerDiagnostic
459
- } from "./chunk-NLNQNBZ2.js";
495
+ } from "./chunk-WD6YQI5M.js";
460
496
  import {
461
497
  normalizeServeChannelSelection
462
- } from "./chunk-ALMR3E6Q.js";
463
- import {
464
- QWEN_SERVER_TOKEN_ENV
465
- } from "./chunk-GYTKQYDB.js";
498
+ } from "./chunk-GDWE23OR.js";
466
499
  import {
467
500
  ChannelDeliveryError,
468
501
  isChannelDeliveryError
469
502
  } from "./chunk-RKFGE7JH.js";
470
503
  import "./chunk-CJ3DHN5I.js";
471
504
  import "./chunk-UDG5EZJI.js";
505
+ import "./chunk-3VUENPWF.js";
472
506
  import {
473
507
  redactLogCredentials
474
508
  } from "./chunk-M5GB774H.js";
475
- import "./chunk-3VUENPWF.js";
476
509
  import "./chunk-K6KS3LTN.js";
477
510
  import "./chunk-OSHQMOBS.js";
478
511
  import {
479
512
  sanitizeLogText
480
- } from "./chunk-7QYWGTHB.js";
513
+ } from "./chunk-EPVEPTI3.js";
481
514
  import "./chunk-IJOS26LH.js";
482
515
  import {
483
516
  WORKSPACE_RESTRICTED_SETTING_KEYS,
@@ -491,44 +524,28 @@ import {
491
524
  resolveOutputLanguageOrPreserveAuto,
492
525
  updateOutputLanguageFile,
493
526
  validateSettingValue
494
- } from "./chunk-7BXXIQG4.js";
527
+ } from "./chunk-PVKEYO5D.js";
528
+ import "./chunk-P6XVYPWA.js";
495
529
  import "./chunk-RKUWKYED.js";
496
- import "./chunk-ZU47FBOC.js";
497
- import "./chunk-NOAG7N22.js";
498
- import "./chunk-BW4333PP.js";
499
- import "./chunk-VX63RJXE.js";
500
- import {
501
- MAX_REGISTERED_WORKSPACES,
502
- WorkspaceDisplayNameValidationError,
503
- WorkspaceRegistrationStoreCommittedError,
504
- WorkspaceRegistrationStoreLimitError,
505
- WorkspaceRegistrationStoreTooLargeError,
506
- normalizeWorkspaceDisplayName,
507
- resolveMaxRegisteredWorkspaces,
508
- workspaceRegistrationId
509
- } from "./chunk-SBRX4BDI.js";
510
- import {
511
- MAX_WORKSPACE_PATH_LENGTH,
512
- canonicalizeWorkspace,
513
- canonicalizeWorkspaces,
514
- translateAndCheckAbsoluteWorkspacePath
515
- } from "./chunk-6PLDPT2C.js";
516
- import "./chunk-IDS7MSUP.js";
517
530
  import {
518
531
  detectSystemLanguage,
519
532
  getCurrentLanguage,
520
533
  resolveLanguageSetting,
521
534
  setLanguageAsync
522
- } from "./chunk-VZUCTJ2P.js";
535
+ } from "./chunk-I6YJZGHS.js";
523
536
  import {
524
537
  SUPPORTED_LANGUAGES,
525
538
  resolveSupportedLanguage
526
539
  } from "./chunk-5EJZE3FP.js";
527
- import "./chunk-R4Q2PEFV.js";
540
+ import "./chunk-IGLX6UXJ.js";
541
+ import "./chunk-BW4333PP.js";
542
+ import "./chunk-IDS7MSUP.js";
543
+ import "./chunk-XX5HQLCZ.js";
544
+ import "./chunk-E7HXORS7.js";
528
545
  import "./chunk-W3N5XAZ6.js";
529
546
  import {
530
547
  getWorkspaceTrustStatus
531
- } from "./chunk-53GWJOLP.js";
548
+ } from "./chunk-2P2IXKDR.js";
532
549
  import "./chunk-NPQ5ZKRP.js";
533
550
  import {
534
551
  isWithinRoot as isWithinRoot2
@@ -543,32 +560,33 @@ import {
543
560
  buildUsageDashboard,
544
561
  loadIgnoreRules,
545
562
  writeWorkspaceContextFile
546
- } from "./chunk-BZM5U74J.js";
563
+ } from "./chunk-I6JRN375.js";
547
564
  import "./chunk-GELRJXE2.js";
548
565
  import "./chunk-32CM56LO.js";
566
+ import "./chunk-6WXVEDT2.js";
567
+ import "./chunk-LJZSMWOH.js";
549
568
  import {
550
569
  ALL_PROVIDERS,
570
+ ProviderInstallError,
551
571
  shouldShowStep
552
- } from "./chunk-AEY27Z35.js";
553
- import "./chunk-Y2MYW47X.js";
554
- import "./chunk-LJZSMWOH.js";
555
- import "./chunk-F42YYSCK.js";
556
- import "./chunk-NUQVB25K.js";
572
+ } from "./chunk-7JGH6IMU.js";
573
+ import "./chunk-KLGCF6G7.js";
574
+ import "./chunk-EKMJR7M3.js";
575
+ import "./chunk-EDB556X7.js";
557
576
  import {
558
577
  clearWorktreeSession,
559
578
  readWorktreeSession,
560
579
  readWorktreeSessionStrict,
561
580
  writeWorktreeSession
562
- } from "./chunk-ZKZHSB5W.js";
563
- import "./chunk-MSNHNAQZ.js";
581
+ } from "./chunk-QR4Q425T.js";
582
+ import "./chunk-UUT7EFX3.js";
564
583
  import "./chunk-DJXSOEFB.js";
565
- import "./chunk-ZKYR7QS4.js";
566
- import "./chunk-532WHF4F.js";
584
+ import "./chunk-5VQR2DD7.js";
567
585
  import "./chunk-BUQN5LTI.js";
568
586
  import "./chunk-ZPJWUGCS.js";
569
- import "./chunk-LK2WUCDQ.js";
570
- import "./chunk-UKZ45TJL.js";
571
- import "./chunk-RLLRJJDR.js";
587
+ import "./chunk-YM6KUQ2S.js";
588
+ import "./chunk-LMDMYMSS.js";
589
+ import "./chunk-TJDUJSVH.js";
572
590
  import {
573
591
  BuiltinAgentRegistry,
574
592
  Client,
@@ -581,7 +599,6 @@ import {
581
599
  InvalidSessionTranscriptCursorError,
582
600
  InvalidSessionTranscriptTurnAnchorError,
583
601
  MAX_LOG_LIMIT,
584
- ModelsConfig,
585
602
  RUNTIME_MCP_IF_ABSENT_CONFIG_FLAG,
586
603
  SESSION_PR_LIST_LIMIT,
587
604
  SESSION_PR_URL_MAX_LENGTH,
@@ -644,32 +661,39 @@ import {
644
661
  replaceSessionPrs,
645
662
  repoKeyFromWebUrl,
646
663
  resolveBranchName,
647
- resolveProviderProtocol,
648
664
  sessionPrSourceAuthority,
649
665
  sleepInhibitor,
650
666
  stripTerminalControlSequences,
651
667
  toSessionPrInfo,
652
668
  upsertSessionPr,
653
669
  watchRepoBranch
654
- } from "./chunk-N7VWZDWW.js";
670
+ } from "./chunk-DCRVSIK6.js";
655
671
  import "./chunk-GOFAQQZA.js";
672
+ import "./chunk-HEOH7JZY.js";
656
673
  import "./chunk-TWPJO254.js";
657
674
  import "./chunk-CQ35AJ4Z.js";
658
675
  import "./chunk-65I7S4Z3.js";
659
- import "./chunk-6HUXPLB5.js";
660
676
  import "./chunk-7CLLH5TI.js";
661
- import "./chunk-XKBFYTCD.js";
662
- import "./chunk-ZTTC7T4X.js";
663
- import "./chunk-E4UEO3XM.js";
664
- import "./chunk-IAEXTMED.js";
665
- import "./chunk-IRH27ZC2.js";
677
+ import "./chunk-WK6DEH3Q.js";
678
+ import "./chunk-6PVPNMXU.js";
679
+ import {
680
+ ModelsConfig,
681
+ resolveModelId,
682
+ resolveProviderProtocol
683
+ } from "./chunk-5JG3DAKS.js";
684
+ import {
685
+ readArtifactSnapshot
686
+ } from "./chunk-ME4JBHSB.js";
687
+ import "./chunk-GNV2SFO7.js";
688
+ import "./chunk-5EZRLTLQ.js";
666
689
  import "./chunk-QHWCP53L.js";
667
690
  import {
691
+ MAX_CRON_TASK_ROUTING_ID_LENGTH,
668
692
  getCronFilePath,
669
693
  readCronTasks,
670
694
  taskHasLegacyCondition,
671
695
  updateCronTasks
672
- } from "./chunk-F53KKZUD.js";
696
+ } from "./chunk-3LMDSCLU.js";
673
697
  import "./chunk-O6GEWCJA.js";
674
698
  import {
675
699
  GitWorktreeService,
@@ -677,50 +701,53 @@ import {
677
701
  createWorktreeSessionMarkerExclusive,
678
702
  readWorktreeSessionMarkerStrict,
679
703
  transferWorktreeSessionMarkerOwner
680
- } from "./chunk-36HCNKDS.js";
681
- import "./chunk-6PVPNMXU.js";
704
+ } from "./chunk-WKVZES7O.js";
682
705
  import {
706
+ qualifySkillName,
683
707
  recordDaemonBridgeError,
684
708
  recordDaemonHttpRequest,
685
709
  validateSkillName
686
- } from "./chunk-2SZH22YO.js";
687
- import "./chunk-DTNV6UZY.js";
710
+ } from "./chunk-NJ2OFVUX.js";
711
+ import "./chunk-HFJSQ4GL.js";
688
712
  import {
689
713
  glob
690
714
  } from "./chunk-QJNDUTOL.js";
691
- import "./chunk-JXNIF2O5.js";
692
- import "./chunk-NFYEQRLG.js";
715
+ import "./chunk-V545KI73.js";
716
+ import "./chunk-MQRLLBMQ.js";
693
717
  import {
694
718
  SessionSourceError
695
719
  } from "./chunk-ELRMZTPF.js";
720
+ import "./chunk-U6H3XTFA.js";
721
+ import "./chunk-ACHCT36C.js";
696
722
  import "./chunk-CHEIIBT3.js";
697
- import "./chunk-PLLIWEM3.js";
698
- import "./chunk-5GLDOLNQ.js";
723
+ import "./chunk-AEWCOE64.js";
724
+ import "./chunk-OWUAZXXN.js";
699
725
  import "./chunk-CH2YDT6X.js";
700
726
  import {
701
727
  APPROVAL_MODES
702
728
  } from "./chunk-JX6XHPTX.js";
703
729
  import "./chunk-ZSTCM3MX.js";
704
730
  import "./chunk-MLXTMF7H.js";
705
- import "./chunk-LILGKQ4B.js";
731
+ import "./chunk-AXZMWAJV.js";
706
732
  import {
733
+ NO_EXEC_CONFIG,
707
734
  findGitRoot
708
- } from "./chunk-3CZ2BQV6.js";
709
- import "./chunk-SAH4BD2J.js";
710
- import "./chunk-CXTPVBFA.js";
711
- import "./chunk-U7O65WKL.js";
735
+ } from "./chunk-NXUZFW3G.js";
736
+ import "./chunk-WFNEY5G7.js";
737
+ import "./chunk-GSS4SZNG.js";
738
+ import "./chunk-BW2SMO6L.js";
712
739
  import "./chunk-S6LOFUVP.js";
713
740
  import {
714
741
  SubagentError,
715
742
  SubagentErrorCode
716
- } from "./chunk-FN3JNDRU.js";
717
- import "./chunk-EUURTIV6.js";
743
+ } from "./chunk-VVI7MK3V.js";
744
+ import "./chunk-WBSJ6VPZ.js";
718
745
  import {
719
746
  escapeXml
720
747
  } from "./chunk-G6UUOCUT.js";
721
748
  import "./chunk-IZ2U57NY.js";
749
+ import "./chunk-Z72PLR74.js";
722
750
  import "./chunk-NUQ4GK5I.js";
723
- import "./chunk-K2OJUPOE.js";
724
751
  import {
725
752
  QwenOAuth2Client,
726
753
  QwenOAuthPollError,
@@ -729,18 +756,19 @@ import {
729
756
  isDeviceAuthorizationSuccess,
730
757
  isDeviceTokenPending,
731
758
  isDeviceTokenSuccess
732
- } from "./chunk-AXTFYDXT.js";
759
+ } from "./chunk-CXXAZ2LZ.js";
733
760
  import "./chunk-NAVJD2PQ.js";
734
- import "./chunk-YBUMTY7B.js";
735
- import "./chunk-HNLMYDQE.js";
736
- import "./chunk-QHMLYMMS.js";
761
+ import "./chunk-66N6C4EH.js";
762
+ import "./chunk-FMLBBXHB.js";
737
763
  import "./chunk-VNOVK4I7.js";
738
- import "./chunk-CFKIH3D3.js";
764
+ import "./chunk-S7UQ3V2H.js";
739
765
  import "./chunk-JL6APGBX.js";
740
766
  import "./chunk-DJ2GSRLV.js";
741
- import "./chunk-4ALNJDHL.js";
742
- import "./chunk-NOO4QFXM.js";
767
+ import "./chunk-ZKIAGIGH.js";
768
+ import "./chunk-VGY2RGXL.js";
769
+ import "./chunk-C75BXMPM.js";
743
770
  import "./chunk-KFFCDLKV.js";
771
+ import "./chunk-KP2FHIFR.js";
744
772
  import {
745
773
  addDaemonRequestAttribute,
746
774
  captureDaemonTelemetryContext,
@@ -752,17 +780,15 @@ import {
752
780
  recordDaemonHttpResponse,
753
781
  runWithDaemonTelemetryContext,
754
782
  withDaemonRequestSpan
755
- } from "./chunk-ZW2EUO2A.js";
783
+ } from "./chunk-L6DIANLD.js";
756
784
  import "./chunk-XWRJCPHC.js";
757
785
  import {
758
786
  parseLineTolerant,
759
787
  read
760
- } from "./chunk-HBU7EKY4.js";
788
+ } from "./chunk-TRKIKBUW.js";
761
789
  import "./chunk-5ETULJLP.js";
762
- import "./chunk-ZHKTKHMO.js";
790
+ import "./chunk-7MIBD3LG.js";
763
791
  import "./chunk-VGC4I5JJ.js";
764
- import "./chunk-EDIDYZBT.js";
765
- import "./chunk-HD7O6WLV.js";
766
792
  import {
767
793
  CursorNotAtLineBoundaryError,
768
794
  LargeNonUtf8TextError,
@@ -771,12 +797,15 @@ import {
771
797
  getAllMemoryFilenames,
772
798
  isUtf8CompatibleEncoding,
773
799
  isWithinRoot
774
- } from "./chunk-J6MB5ZHZ.js";
800
+ } from "./chunk-QZW6WRB7.js";
801
+ import "./chunk-EDIDYZBT.js";
802
+ import "./chunk-HD7O6WLV.js";
803
+ import "./chunk-CFMZLE3L.js";
775
804
  import "./chunk-WZAD4ZNJ.js";
776
- import "./chunk-3FPYT6QC.js";
805
+ import "./chunk-ARDHE6MM.js";
777
806
  import "./chunk-FPGTNKCP.js";
778
807
  import "./chunk-TIGXX4PA.js";
779
- import "./chunk-3UXUOFO6.js";
808
+ import "./chunk-7W2Y3PZD.js";
780
809
  import "./chunk-XFFRI3WM.js";
781
810
  import "./chunk-ERU3SDXT.js";
782
811
  import "./chunk-EWJTAP3Y.js";
@@ -785,10 +814,10 @@ import {
785
814
  isTelemetrySdkInitialized,
786
815
  redactUrlCredentials,
787
816
  stripAnsiAndControl
788
- } from "./chunk-W5ZQMAEM.js";
817
+ } from "./chunk-4Y2I3CI3.js";
789
818
  import "./chunk-74TONY4F.js";
790
- import "./chunk-HUXPEUFL.js";
791
- import "./chunk-TP6FYVQT.js";
819
+ import "./chunk-SYROIHU7.js";
820
+ import "./chunk-RSWBT7AZ.js";
792
821
  import {
793
822
  FatalConfigError,
794
823
  Storage,
@@ -3872,13 +3901,13 @@ async function resolveSameHostToolWriteTarget(input) {
3872
3901
  }
3873
3902
  let leaf;
3874
3903
  try {
3875
- leaf = await fsp2.lstat(input);
3904
+ leaf = await fsp2.lstat(input, { bigint: true });
3876
3905
  } catch (err) {
3877
3906
  if (err?.code !== "ENOENT") {
3878
3907
  throw err;
3879
3908
  }
3880
3909
  const parent = await fsp2.realpath(path4.dirname(input));
3881
- const parentStat = await fsp2.lstat(parent);
3910
+ const parentStat = await fsp2.lstat(parent, { bigint: true });
3882
3911
  if (!parentStat.isDirectory()) {
3883
3912
  throw new FsError(
3884
3913
  "parse_error",
@@ -3898,7 +3927,7 @@ async function resolveSameHostToolWriteTarget(input) {
3898
3927
  throw new FsError("parse_error", `path is not a regular file: ${input}`);
3899
3928
  }
3900
3929
  const canonical = await fsp2.realpath(input);
3901
- const canonicalStat = await fsp2.lstat(canonical);
3930
+ const canonicalStat = await fsp2.lstat(canonical, { bigint: true });
3902
3931
  if (!canonicalStat.isFile()) {
3903
3932
  throw new FsError(
3904
3933
  "parse_error",
@@ -8731,6 +8760,7 @@ var StandaloneDeletionJournal = class {
8731
8760
  };
8732
8761
 
8733
8762
  // packages/cli/src/serve/conversations/standalone-session-service.ts
8763
+ var debugLogger2 = createDebugLogger("STANDALONE_SESSION_SERVICE");
8734
8764
  var StandaloneSessionServiceError = class extends Error {
8735
8765
  constructor(code, sessionId, message, retryable = false) {
8736
8766
  super(message);
@@ -8774,6 +8804,7 @@ function serviceError(code, sessionId, retryable = code === "working_directory_m
8774
8804
  standalone_session_operation_failed: "The standalone session operation failed.",
8775
8805
  session_archived: "The standalone session is archived.",
8776
8806
  session_busy: "The standalone session is busy.",
8807
+ model_selection_failed: "The selected model could not be applied to the standalone session.",
8777
8808
  standalone_creation_rolled_back: "Standalone session creation failed before durable source persistence and was rolled back.",
8778
8809
  standalone_creation_outcome_unknown: "Standalone session creation could not be safely completed or rolled back.",
8779
8810
  working_directory_missing: "The standalone working directory is missing.",
@@ -10671,6 +10702,20 @@ var StandaloneSessionService = class {
10671
10702
  this.beginTerminalQuarantine(runtime);
10672
10703
  }
10673
10704
  this.assertRuntimeCurrentOrQuarantine(runtime);
10705
+ if (isScheduledTaskRunSource(request2) && request2.modelServiceId !== void 0 && session.modelApplied === false) {
10706
+ await this.cleanRollbackBeforePersistence(runtime, sessionId);
10707
+ try {
10708
+ await this.options.workspace.discardEmptyConversationDirectory(
10709
+ sessionId
10710
+ );
10711
+ } catch (error2) {
10712
+ debugLogger2.warn(
10713
+ `Could not discard the rolled-back standalone directory for ${sessionId}: ${error2 instanceof Error ? error2.message : String(error2)}`
10714
+ );
10715
+ }
10716
+ this.directoryStates.delete(sessionId);
10717
+ throw serviceError("model_selection_failed", sessionId, true);
10718
+ }
10674
10719
  let initialPrompt;
10675
10720
  try {
10676
10721
  await this.bindAndRelease(runtime, sessionId, prepared.identity);
@@ -13220,7 +13265,7 @@ function sessionWriterRpcError(err) {
13220
13265
  };
13221
13266
  }
13222
13267
  __name(sessionWriterRpcError, "sessionWriterRpcError");
13223
- var debugLogger2 = createDebugLogger("ACP_HTTP_DISPATCH");
13268
+ var debugLogger3 = createDebugLogger("ACP_HTTP_DISPATCH");
13224
13269
  var SESSION_SHELL_METHOD = `${QWEN_METHOD_NS}session/shell`;
13225
13270
  var INVALID_PERMISSION_OUTCOME_ERROR = '`outcome` must be `{ outcome: "cancelled" }` or `{ outcome: "selected", optionId: string }`';
13226
13271
  var ALL_QWEN_VENDOR_METHODS = [
@@ -16407,7 +16452,7 @@ var AcpDispatcher = class {
16407
16452
  })
16408
16453
  );
16409
16454
  } else {
16410
- debugLogger2.warn(
16455
+ debugLogger3.warn(
16411
16456
  "workspace memory remember notification failed:",
16412
16457
  err
16413
16458
  );
@@ -16518,7 +16563,7 @@ var AcpDispatcher = class {
16518
16563
  })
16519
16564
  );
16520
16565
  } else {
16521
- debugLogger2.warn(
16566
+ debugLogger3.warn(
16522
16567
  "workspace memory forget notification failed:",
16523
16568
  err
16524
16569
  );
@@ -16588,7 +16633,7 @@ var AcpDispatcher = class {
16588
16633
  })
16589
16634
  );
16590
16635
  } else {
16591
- debugLogger2.warn(
16636
+ debugLogger3.warn(
16592
16637
  "workspace memory dream notification failed:",
16593
16638
  err
16594
16639
  );
@@ -17764,6 +17809,8 @@ var AcpDispatcher = class {
17764
17809
  binding.promptAbort?.abort();
17765
17810
  const abort = new AbortController();
17766
17811
  binding.promptAbort = abort;
17812
+ const metadata = params["_meta"];
17813
+ const submittedPrompt = metadata?.[SUBMITTED_PROMPT_META_KEY];
17767
17814
  try {
17768
17815
  const result = await this.bridge.sendPrompt(
17769
17816
  sessionId,
@@ -17775,7 +17822,10 @@ var AcpDispatcher = class {
17775
17822
  // sessionId, prompt }`) so it can't become client-controlled.
17776
17823
  params,
17777
17824
  abort.signal,
17778
- this.sessionCtx(conn, sessionId, fromLoopback)
17825
+ {
17826
+ ...this.sessionCtx(conn, sessionId, fromLoopback),
17827
+ ...typeof submittedPrompt === "string" && metadata?.[CHANNEL_PROMPT_META_KEY] === void 0 && metadata?.[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY] === void 0 && metadata?.[CHANNEL_WORKER_PROMPT_AUTHORIZATION_META_KEY] === void 0 ? { submittedPrompt } : {}
17828
+ }
17779
17829
  );
17780
17830
  if (id !== void 0) this.replySession(conn, sessionId, id, result);
17781
17831
  } catch (err) {
@@ -21928,7 +21978,7 @@ function loadDaemonVoiceContext(workspaceCwd, options = {}) {
21928
21978
  __name(loadDaemonVoiceContext, "loadDaemonVoiceContext");
21929
21979
 
21930
21980
  // packages/cli/src/serve/voice/voice-ws.ts
21931
- var debugLogger3 = createDebugLogger("VOICE_WS");
21981
+ var debugLogger4 = createDebugLogger("VOICE_WS");
21932
21982
  var MAX_BATCH_AUDIO_BYTES = 10 * 1024 * 1024;
21933
21983
  var MAX_QUEUED_AUDIO_BYTES = MAX_BATCH_AUDIO_BYTES * 2;
21934
21984
  var MAX_CONNECTION_MS = 6 * 6e4;
@@ -21968,7 +22018,7 @@ async function defaultOpenStream(ctx, callbacks, abortSignal) {
21968
22018
  { abortSignal }
21969
22019
  );
21970
22020
  } catch (error2) {
21971
- debugLogger3.debug(`[voice-ws] stream open error: ${errMessage(error2)}`);
22021
+ debugLogger4.debug(`[voice-ws] stream open error: ${errMessage(error2)}`);
21972
22022
  throw new Error(GENERIC_TRANSCRIPTION_ERROR);
21973
22023
  }
21974
22024
  }
@@ -21984,7 +22034,7 @@ function defaultTranscribe(ctx, pcm, abortSignal) {
21984
22034
  abortSignal
21985
22035
  }
21986
22036
  ).catch((error2) => {
21987
- debugLogger3.debug(
22037
+ debugLogger4.debug(
21988
22038
  `[voice-ws] batch transcription error: ${errMessage(error2)}`
21989
22039
  );
21990
22040
  throw new Error(GENERIC_TRANSCRIPTION_ERROR);
@@ -22166,7 +22216,7 @@ function createVoiceWsConnectionHandler(boundWorkspace, deps = {}) {
22166
22216
  try {
22167
22217
  ctx = loadContext(boundWorkspace);
22168
22218
  } catch (error2) {
22169
- debugLogger3.debug(
22219
+ debugLogger4.debug(
22170
22220
  `[voice-ws] load context error: ${errMessage(error2)}`
22171
22221
  );
22172
22222
  fail(voiceConfigErrorMessage(error2));
@@ -22181,7 +22231,7 @@ function createVoiceWsConnectionHandler(boundWorkspace, deps = {}) {
22181
22231
  const callbacks = {
22182
22232
  onInterim: /* @__PURE__ */ __name((text) => sendJson({ type: "interim", text }), "onInterim"),
22183
22233
  onError: /* @__PURE__ */ __name((error2) => {
22184
- debugLogger3.debug(
22234
+ debugLogger4.debug(
22185
22235
  `[voice-ws] upstream error: ${errMessage(error2)}`
22186
22236
  );
22187
22237
  fail(GENERIC_TRANSCRIPTION_ERROR);
@@ -22305,7 +22355,7 @@ function createVoiceWsConnectionHandler(boundWorkspace, deps = {}) {
22305
22355
  releaseSlotWhenIdle();
22306
22356
  }
22307
22357
  }).catch((error2) => {
22308
- debugLogger3.debug(`[voice-ws] ${errMessage(error2)}`);
22358
+ debugLogger4.debug(`[voice-ws] ${errMessage(error2)}`);
22309
22359
  fail(GENERIC_TRANSCRIPTION_ERROR);
22310
22360
  releaseSlotWhenIdle();
22311
22361
  });
@@ -22315,7 +22365,7 @@ function createVoiceWsConnectionHandler(boundWorkspace, deps = {}) {
22315
22365
  releaseSlotWhenIdle();
22316
22366
  });
22317
22367
  ws.on("error", (error2) => {
22318
- debugLogger3.debug(`[voice-ws] socket error: ${error2.message}`);
22368
+ debugLogger4.debug(`[voice-ws] socket error: ${error2.message}`);
22319
22369
  if (state !== "closed") cleanup();
22320
22370
  releaseSlotWhenIdle();
22321
22371
  });
@@ -22429,6 +22479,14 @@ function createTerminalWsHandler(registry, resolveWorkspace) {
22429
22479
  ws.close(4004, "Terminal released");
22430
22480
  return;
22431
22481
  }
22482
+ if (url.searchParams.get("replay") !== "1") {
22483
+ sendControl(ws, {
22484
+ type: "error",
22485
+ message: "Terminal protocol changed; reload this page."
22486
+ });
22487
+ ws.close(4002, "Terminal protocol mismatch");
22488
+ return;
22489
+ }
22432
22490
  const workspaceSelector = selector;
22433
22491
  let created = false;
22434
22492
  let inputRejected = false;
@@ -22589,6 +22647,11 @@ function createTerminalWsHandler(registry, resolveWorkspace) {
22589
22647
  ws.off("error", markClosed);
22590
22648
  ws.on("error", cleanup);
22591
22649
  if (!ensureWorkspaceAvailable()) return;
22650
+ sendControl(ws, {
22651
+ type: "snapshot",
22652
+ replay: !created,
22653
+ handlesPrimaryDa: snapshot.handlesPrimaryDa === true
22654
+ });
22592
22655
  if (!sendOutput(ws, snapshot.output)) {
22593
22656
  cleanup();
22594
22657
  ws.close(1013, "Terminal output backpressure");
@@ -23247,6 +23310,35 @@ function parseAuthProviderInstallRequest(body, options) {
23247
23310
  }
23248
23311
  const modelIds = parseStringArray2(body["modelIds"]);
23249
23312
  const rawAdvanced = body["advancedConfig"] && typeof body["advancedConfig"] === "object" ? body["advancedConfig"] : void 0;
23313
+ const purpose = rawAdvanced?.["purpose"];
23314
+ if (purpose !== void 0 && purpose !== "image" && purpose !== "voice") {
23315
+ return {
23316
+ ok: false,
23317
+ code: "invalid_model_purpose",
23318
+ error: "Invalid model purpose"
23319
+ };
23320
+ }
23321
+ if (purpose && providerId.trim() !== "custom-openai-compatible") {
23322
+ return {
23323
+ ok: false,
23324
+ code: "invalid_model_purpose",
23325
+ error: "Model purpose requires a custom provider"
23326
+ };
23327
+ }
23328
+ if (purpose === "voice" && ((protocol ?? "openai") !== "openai" || !baseUrl || !modelIds?.length || modelIds.some((id) => resolveVoiceTransport(id) === "unsupported"))) {
23329
+ return {
23330
+ ok: false,
23331
+ code: "invalid_voice_model",
23332
+ error: "Voice transcription requires OpenAI protocol and a supported ASR model ID"
23333
+ };
23334
+ }
23335
+ if (purpose === "image" && (!modelIds?.length || !baseUrl?.startsWith("https://") || new URL(baseUrl).search || new URL(baseUrl).hash)) {
23336
+ return {
23337
+ ok: false,
23338
+ code: "invalid_image_model",
23339
+ error: "Image generation requires an HTTPS endpoint without query or fragment"
23340
+ };
23341
+ }
23250
23342
  const rawMultimodal = rawAdvanced?.["multimodal"] && typeof rawAdvanced["multimodal"] === "object" ? rawAdvanced["multimodal"] : void 0;
23251
23343
  const contextWindowSize = parsePositiveBoundedInteger(
23252
23344
  rawAdvanced?.["contextWindowSize"],
@@ -23257,6 +23349,8 @@ function parseAuthProviderInstallRequest(body, options) {
23257
23349
  1e7
23258
23350
  );
23259
23351
  const advancedConfig = rawAdvanced ? {
23352
+ ...rawAdvanced["replaceExisting"] === true ? { replaceExisting: true } : {},
23353
+ ...purpose ? { purpose } : {},
23260
23354
  ...typeof rawAdvanced["enableThinking"] === "boolean" ? { enableThinking: rawAdvanced["enableThinking"] } : {},
23261
23355
  ...rawMultimodal ? {
23262
23356
  multimodal: {
@@ -23537,6 +23631,10 @@ function registerWorkspaceAuthRoutes(app, deps) {
23537
23631
  ...runtimeSync ? { runtimeSync } : {}
23538
23632
  });
23539
23633
  } catch (err) {
23634
+ if (err instanceof ProviderInstallError && err.step === "modelPurpose") {
23635
+ res.status(400).json({ error: err.message, code: "model_purpose_conflict" });
23636
+ return;
23637
+ }
23540
23638
  sendBridgeError2(res, err, {
23541
23639
  route: "POST /workspace/auth/provider",
23542
23640
  providerId: installRequest.providerId
@@ -24624,15 +24722,20 @@ var buildExtensionSkillStates = /* @__PURE__ */ __name((manager, extension, snap
24624
24722
  runtime.workspaceCwd
24625
24723
  ).effective === "enabled";
24626
24724
  return (extension.skills ?? []).map((skill) => {
24627
- const name = skill.name.trim().toLowerCase();
24725
+ const registryName = qualifySkillName(extension.name, skill.name);
24628
24726
  const internal = manager.getExtensionSkillState(
24629
24727
  extension.id,
24630
24728
  skill.name,
24631
24729
  runtime.workspaceCwd,
24632
24730
  snapshot
24633
24731
  );
24634
- const disablement = settings.disablements.get(name);
24635
- const disabledReason = !parentEnabled ? "inactive_extension" : disablement?.reason ?? (!settings.enabledNames.has(name) && !(internal.workspaceEnabled ?? internal.defaultEnabled) ? "default" : void 0);
24732
+ const disablement = lookupSkillDisablement(settings.disablements, {
24733
+ name: registryName,
24734
+ authoredName: skill.name
24735
+ });
24736
+ const disabledReason = !parentEnabled ? "inactive_extension" : disablement?.reason ?? // A grant matches the registry identity only, so a legacy bare
24737
+ // `skills.enabled` entry no longer opts an extension skill in.
24738
+ (!settings.enabledNames.has(registryName.trim().toLowerCase()) && !(internal.workspaceEnabled ?? internal.defaultEnabled) ? "default" : void 0);
24636
24739
  return {
24637
24740
  name: skill.name,
24638
24741
  ...internal,
@@ -27526,6 +27629,12 @@ var legacySessionTelemetryRoutes = [
27526
27629
  attribution: "handler_resolved",
27527
27630
  route: "GET /session/:id/artifacts"
27528
27631
  },
27632
+ {
27633
+ method: "GET",
27634
+ path: "/session/:id/artifacts/:artifactId/content",
27635
+ attribution: "handler_resolved",
27636
+ route: "GET /session/:id/artifacts/:artifactId/content"
27637
+ },
27529
27638
  {
27530
27639
  method: "POST",
27531
27640
  path: "/session/:id/artifacts",
@@ -28550,7 +28659,7 @@ async function branchExists(cwd, name) {
28550
28659
  try {
28551
28660
  await execFileAsync(
28552
28661
  "git",
28553
- ["rev-parse", "--verify", `refs/heads/${name}`],
28662
+ [...NO_EXEC_CONFIG, "rev-parse", "--verify", `refs/heads/${name}`],
28554
28663
  { cwd, timeout: GIT_BRANCH_TIMEOUT_MS }
28555
28664
  );
28556
28665
  return true;
@@ -28562,7 +28671,13 @@ __name(branchExists, "branchExists");
28562
28671
  async function isDirtyTree(cwd) {
28563
28672
  const { stdout } = await execFileAsync(
28564
28673
  "git",
28565
- ["status", "--porcelain", "--untracked-files=no"],
28674
+ [
28675
+ ...NO_EXEC_CONFIG,
28676
+ "--no-optional-locks",
28677
+ "status",
28678
+ "--porcelain",
28679
+ "--untracked-files=no"
28680
+ ],
28566
28681
  {
28567
28682
  cwd,
28568
28683
  maxBuffer: 10 * 1024 * 1024,
@@ -28573,28 +28688,28 @@ async function isDirtyTree(cwd) {
28573
28688
  }
28574
28689
  __name(isDirtyTree, "isDirtyTree");
28575
28690
  async function getHeadCommit(cwd) {
28576
- return execFileAsync("git", ["rev-parse", "HEAD"], {
28691
+ return execFileAsync("git", [...NO_EXEC_CONFIG, "rev-parse", "HEAD"], {
28577
28692
  cwd,
28578
28693
  timeout: GIT_BRANCH_TIMEOUT_MS
28579
28694
  }).then(({ stdout }) => stdout.trim()).catch(() => void 0);
28580
28695
  }
28581
28696
  __name(getHeadCommit, "getHeadCommit");
28582
28697
  async function createBranch(cwd, name) {
28583
- await execFileAsync("git", ["checkout", "-b", name], {
28698
+ await execFileAsync("git", [...NO_EXEC_CONFIG, "checkout", "-b", name], {
28584
28699
  cwd,
28585
28700
  timeout: GIT_BRANCH_TIMEOUT_MS
28586
28701
  });
28587
28702
  }
28588
28703
  __name(createBranch, "createBranch");
28589
28704
  async function checkoutRef(cwd, ref) {
28590
- await execFileAsync("git", ["checkout", ref], {
28705
+ await execFileAsync("git", [...NO_EXEC_CONFIG, "checkout", ref], {
28591
28706
  cwd,
28592
28707
  timeout: GIT_BRANCH_TIMEOUT_MS
28593
28708
  });
28594
28709
  }
28595
28710
  __name(checkoutRef, "checkoutRef");
28596
28711
  async function deleteBranch(cwd, name) {
28597
- await execFileAsync("git", ["branch", "-D", name], {
28712
+ await execFileAsync("git", [...NO_EXEC_CONFIG, "branch", "-D", name], {
28598
28713
  cwd,
28599
28714
  timeout: GIT_BRANCH_TIMEOUT_MS
28600
28715
  });
@@ -33843,6 +33958,44 @@ function registerSessionRoutes(app, deps) {
33843
33958
  { cwdBound: true }
33844
33959
  )
33845
33960
  );
33961
+ app.get(
33962
+ "/session/:id/artifacts/:artifactId/content",
33963
+ withOwnerReadSession(
33964
+ "GET /session/:id/artifacts/:artifactId/content",
33965
+ async (req, res, sessionId, runtime) => {
33966
+ const clientId = parseClientIdHeader(req, res);
33967
+ if (clientId === null) return;
33968
+ const { artifacts } = await runtime.bridge.getSessionArtifacts(
33969
+ sessionId,
33970
+ clientId !== void 0 ? { clientId } : void 0
33971
+ );
33972
+ const artifact = artifacts.find(
33973
+ (item) => item.id === req.params["artifactId"]
33974
+ );
33975
+ let content;
33976
+ try {
33977
+ if (!artifact) throw new Error("Snapshot not registered");
33978
+ content = await readArtifactSnapshot(
33979
+ artifact,
33980
+ runtime.sessionRuntimeBaseDir
33981
+ );
33982
+ } catch {
33983
+ res.status(404).json({
33984
+ error: "artifact_snapshot_unavailable",
33985
+ message: "Saved webpage version is missing or has changed."
33986
+ });
33987
+ return;
33988
+ }
33989
+ res.status(200).set({
33990
+ "Content-Type": "text/html; charset=utf-8",
33991
+ "Content-Disposition": 'attachment; filename="saved-webpage.html"',
33992
+ "X-Content-Type-Options": "nosniff",
33993
+ "Cache-Control": "private, no-store"
33994
+ }).send(content);
33995
+ },
33996
+ { cwdBound: true }
33997
+ )
33998
+ );
33846
33999
  app.post(
33847
34000
  "/session/:id/artifacts",
33848
34001
  mutate({ strict: true }),
@@ -34274,12 +34427,15 @@ function registerSessionRoutes(app, deps) {
34274
34427
  delete forwardedBody["deadlineMs"];
34275
34428
  delete forwardedBody["delivery"];
34276
34429
  const forwardedMeta = typeof forwardedBody["_meta"] === "object" && forwardedBody["_meta"] !== null && !Array.isArray(forwardedBody["_meta"]) ? { ...forwardedBody["_meta"] } : void 0;
34430
+ const submittedPrompt = forwardedMeta?.[SUBMITTED_PROMPT_META_KEY];
34277
34431
  const promptAuthorization = forwardedMeta?.[CHANNEL_WORKER_PROMPT_AUTHORIZATION_META_KEY];
34278
34432
  const promptDisplayText = forwardedMeta?.[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY];
34279
34433
  const channelPrompt = forwardedMeta?.[CHANNEL_PROMPT_META_KEY];
34280
34434
  if (forwardedMeta) {
34281
34435
  delete forwardedMeta[CHANNEL_WORKER_PROMPT_AUTHORIZATION_META_KEY];
34282
34436
  delete forwardedMeta[DAEMON_PROMPT_DISPLAY_TEXT_META_KEY];
34437
+ delete forwardedMeta[SUBMITTED_PROMPT_META_KEY];
34438
+ delete forwardedMeta[DAEMON_SUBMITTED_PROMPT_META_KEY];
34283
34439
  delete forwardedMeta[CHANNEL_PROMPT_META_KEY];
34284
34440
  if (Object.keys(forwardedMeta).length > 0) {
34285
34441
  forwardedBody["_meta"] = forwardedMeta;
@@ -34326,6 +34482,7 @@ function registerSessionRoutes(app, deps) {
34326
34482
  promptId,
34327
34483
  ...effectiveDeadlineMs !== void 0 ? { deadlineMs: effectiveDeadlineMs } : {},
34328
34484
  ...trustedPromptDisplayText !== void 0 ? { promptDisplayText: trustedPromptDisplayText } : {},
34485
+ ...typeof submittedPrompt === "string" && channelPrompt === void 0 && promptAuthorization === void 0 && promptDisplayText === void 0 ? { submittedPrompt } : {},
34329
34486
  ...trustedChannelPrompt ? { channelPrompt: true } : {},
34330
34487
  ...delivery !== void 0 ? {
34331
34488
  channelDelivery: {
@@ -36905,10 +37062,10 @@ function registerStandaloneSessionRoutes(app, deps) {
36905
37062
  sendInvalidRequest(res, "`sessionId` must be an RFC UUID v1-v5.");
36906
37063
  return;
36907
37064
  }
36908
- if (body["modelServiceId"] !== void 0 && (typeof body["modelServiceId"] !== "string" || body["modelServiceId"].length === 0 || body["modelServiceId"].length > 256)) {
37065
+ if (body["modelServiceId"] !== void 0 && (typeof body["modelServiceId"] !== "string" || body["modelServiceId"].length === 0 || body["modelServiceId"].length > MAX_CRON_TASK_ROUTING_ID_LENGTH)) {
36909
37066
  sendInvalidRequest(
36910
37067
  res,
36911
- "`modelServiceId` must be a non-empty string of at most 256 characters."
37068
+ `\`modelServiceId\` must be a non-empty string of at most ${MAX_CRON_TASK_ROUTING_ID_LENGTH} characters.`
36912
37069
  );
36913
37070
  return;
36914
37071
  }
@@ -38175,7 +38332,7 @@ init_esbuild_shims();
38175
38332
  import * as fs8 from "node:fs";
38176
38333
  import * as path14 from "node:path";
38177
38334
  var import_saxes = __toESM(require_saxes(), 1);
38178
- var debugLogger4 = createDebugLogger("WEB_SHELL_BRAND");
38335
+ var debugLogger5 = createDebugLogger("WEB_SHELL_BRAND");
38179
38336
  var MAX_BRAND_LOGO_BYTES = 32 * 1024;
38180
38337
  var MAX_BRAND_NAME_LENGTH = 80;
38181
38338
  function resolveWebShellBrand(settings) {
@@ -38236,7 +38393,7 @@ function sanitizeBrandName(raw) {
38236
38393
  let name = stripTerminalControlSequences(raw).replace(/\s+/g, " ").trim();
38237
38394
  if (!name) return void 0;
38238
38395
  if (name.length > MAX_BRAND_NAME_LENGTH) {
38239
- debugLogger4.warn(
38396
+ debugLogger5.warn(
38240
38397
  `Truncated ui.brand.name to ${MAX_BRAND_NAME_LENGTH} characters.`
38241
38398
  );
38242
38399
  name = name.slice(0, MAX_BRAND_NAME_LENGTH);
@@ -38259,7 +38416,7 @@ function readBrandLogo(configuredPath, declaringDir) {
38259
38416
  }
38260
38417
  let stat3;
38261
38418
  try {
38262
- stat3 = fs8.lstatSync(filePath, { throwIfNoEntry: false });
38419
+ stat3 = fs8.lstatSync(filePath, { bigint: true, throwIfNoEntry: false });
38263
38420
  } catch {
38264
38421
  return { warnings: [`ui.brand.logoPath is not readable: ${filePath}`] };
38265
38422
  }
@@ -38279,14 +38436,14 @@ function readBrandLogo(configuredPath, declaringDir) {
38279
38436
  warnings: [`ui.brand.logoPath must be a regular file: ${filePath}`]
38280
38437
  };
38281
38438
  }
38282
- if (stat3.nlink > 1) {
38439
+ if (stat3.nlink > 1n) {
38283
38440
  return {
38284
38441
  warnings: [
38285
38442
  `ui.brand.logoPath must not have multiple hard links (nlink=${stat3.nlink}): ${filePath}`
38286
38443
  ]
38287
38444
  };
38288
38445
  }
38289
- if (stat3.size > MAX_BRAND_LOGO_BYTES) {
38446
+ if (stat3.size > BigInt(MAX_BRAND_LOGO_BYTES)) {
38290
38447
  return {
38291
38448
  warnings: [
38292
38449
  `ui.brand.logoPath exceeds ${MAX_BRAND_LOGO_BYTES} bytes: ${filePath}`
@@ -38342,7 +38499,7 @@ function readRegularFileNoFollow(filePath, expectedStat) {
38342
38499
  flags |= fs8.constants.O_NONBLOCK;
38343
38500
  }
38344
38501
  fd = fs8.openSync(filePath, flags);
38345
- const stat3 = fs8.fstatSync(fd);
38502
+ const stat3 = fs8.fstatSync(fd, { bigint: true });
38346
38503
  if (stat3.dev !== expectedStat.dev || stat3.ino !== expectedStat.ino || stat3.mode !== expectedStat.mode || stat3.size !== expectedStat.size || stat3.mtimeMs !== expectedStat.mtimeMs || stat3.ctimeMs !== expectedStat.ctimeMs || !stat3.isFile() || stat3.nlink > 1) {
38347
38504
  return { reason: "changed while it was being read" };
38348
38505
  }
@@ -38929,6 +39086,7 @@ var TUI_ONLY_SETTINGS = /* @__PURE__ */ new Set([
38929
39086
  var WEB_SHELL_SETTINGS = /* @__PURE__ */ new Set([
38930
39087
  "ui.compactMode",
38931
39088
  "voiceModel",
39089
+ "imageModel",
38932
39090
  "mcpServers"
38933
39091
  ]);
38934
39092
  var LIVE_WEB_SHELL_SETTINGS = [
@@ -39351,11 +39509,26 @@ function registerWorkspaceSettingsRoutes(app, deps) {
39351
39509
  );
39352
39510
  }
39353
39511
  if (writeOutcome !== "ok") return;
39512
+ let imageSyncFailed = false;
39513
+ if (key === "imageModel") {
39514
+ try {
39515
+ imageSyncFailed = !deps.syncImageModel || (await deps.syncImageModel(settingScope)).status === "failed";
39516
+ } catch (error2) {
39517
+ if (sendGenerationClosedError(res, error2)) return;
39518
+ imageSyncFailed = true;
39519
+ }
39520
+ try {
39521
+ assertGenerationOpen();
39522
+ } catch (error2) {
39523
+ if (sendGenerationClosedError(res, error2)) return;
39524
+ throw error2;
39525
+ }
39526
+ }
39354
39527
  res.status(200).json({
39355
39528
  key,
39356
39529
  scope,
39357
39530
  value: publicValue,
39358
- requiresRestart: def.requiresRestart
39531
+ requiresRestart: def.requiresRestart || imageSyncFailed
39359
39532
  });
39360
39533
  }
39361
39534
  );
@@ -39562,11 +39735,29 @@ function registerWorkspaceQualifiedSettingsRoutes(app, deps) {
39562
39735
  ...clientId ? { originatorClientId: clientId } : {}
39563
39736
  });
39564
39737
  if (writeOutcome !== "ok") return;
39738
+ let imageSyncFailed = false;
39739
+ if (key === "imageModel") {
39740
+ try {
39741
+ imageSyncFailed = (await runtime.workspaceService.reloadModelProviders({
39742
+ route: "POST /workspaces/:workspace/settings imageModel",
39743
+ workspaceCwd: runtime.workspaceCwd
39744
+ })).status === "failed";
39745
+ } catch (error2) {
39746
+ if (sendGenerationClosedError(res, error2)) return;
39747
+ imageSyncFailed = true;
39748
+ }
39749
+ try {
39750
+ assertGenerationOpen();
39751
+ } catch (error2) {
39752
+ if (sendGenerationClosedError(res, error2)) return;
39753
+ throw error2;
39754
+ }
39755
+ }
39565
39756
  res.status(200).json({
39566
39757
  key,
39567
39758
  scope,
39568
39759
  value: publicValue,
39569
- requiresRestart: def.requiresRestart
39760
+ requiresRestart: def.requiresRestart || imageSyncFailed
39570
39761
  });
39571
39762
  }
39572
39763
  );
@@ -41235,37 +41426,6 @@ init_esbuild_shims();
41235
41426
 
41236
41427
  // packages/cli/src/serve/model-providers-edit.ts
41237
41428
  init_esbuild_shims();
41238
- function removeModelFromProviders(modelProviders, providerProtocol, target) {
41239
- let idOnly;
41240
- for (const [key, models] of Object.entries(modelProviders)) {
41241
- if (!Array.isArray(models)) continue;
41242
- const protocol = resolveProviderProtocol(key, providerProtocol) ?? key;
41243
- if (protocol !== target.authType) continue;
41244
- for (let index = 0; index < models.length; index++) {
41245
- if (models[index].id !== target.modelId) continue;
41246
- if (target.baseUrl === void 0 || (models[index].baseUrl ?? void 0) === target.baseUrl) {
41247
- return buildRemoval(modelProviders, key, index);
41248
- }
41249
- if (!idOnly) idOnly = { key, index };
41250
- }
41251
- }
41252
- if (idOnly) return buildRemoval(modelProviders, idOnly.key, idOnly.index);
41253
- return { next: modelProviders, removed: false };
41254
- }
41255
- __name(removeModelFromProviders, "removeModelFromProviders");
41256
- function buildRemoval(modelProviders, key, index) {
41257
- const models = modelProviders[key] ?? [];
41258
- const removedBaseUrl = models[index]?.baseUrl;
41259
- const nextModels = models.filter((_, i) => i !== index);
41260
- const next = { ...modelProviders };
41261
- next[key] = nextModels;
41262
- return {
41263
- next,
41264
- removed: true,
41265
- ...removedBaseUrl ? { removedBaseUrl } : {}
41266
- };
41267
- }
41268
- __name(buildRemoval, "buildRemoval");
41269
41429
  function isActiveModelSelection(activeModelName, activeBaseUrl, target) {
41270
41430
  if (!activeModelName || activeModelName !== target.modelId) return false;
41271
41431
  if (!activeBaseUrl) return true;
@@ -41283,6 +41443,13 @@ function scopeToWire(scope) {
41283
41443
  }
41284
41444
  __name(scopeToWire, "scopeToWire");
41285
41445
  function parseTarget(body) {
41446
+ const key = body["key"];
41447
+ if (key !== void 0 && (typeof key !== "string" || !/^[a-f0-9]{64}$/.test(key))) {
41448
+ return {
41449
+ error: "Invalid model configuration key",
41450
+ code: "invalid_model_key"
41451
+ };
41452
+ }
41286
41453
  const authType = body["authType"];
41287
41454
  const modelId = body["modelId"];
41288
41455
  const baseUrl = body["baseUrl"];
@@ -41306,6 +41473,7 @@ function parseTarget(body) {
41306
41473
  }
41307
41474
  const trimmedBaseUrl = typeof baseUrl === "string" ? baseUrl.trim() : "";
41308
41475
  return {
41476
+ ...key ? { key } : {},
41309
41477
  authType: authType.trim(),
41310
41478
  modelId: modelId.trim(),
41311
41479
  ...trimmedBaseUrl ? { baseUrl: trimmedBaseUrl } : {}
@@ -41321,6 +41489,80 @@ function registerWorkspaceModelsRoutes(app, deps) {
41321
41489
  broadcastSettingsChanged,
41322
41490
  parseAndValidateClientId
41323
41491
  } = deps;
41492
+ app.get("/workspace/models", (_req, res) => {
41493
+ try {
41494
+ deps.captureGenerationAssertion?.()?.();
41495
+ const trusted = deps.isWorkspaceTrusted?.();
41496
+ const loaded = loadSettings(boundWorkspace, {
41497
+ skipLoadEnvironment: true,
41498
+ skipWorkspaceSettings: trusted === false,
41499
+ workspaceTrusted: trusted
41500
+ });
41501
+ res.json({ models: listModelConfigurations(loaded) });
41502
+ } catch (error2) {
41503
+ if (sendGenerationClosedError(res, error2)) return;
41504
+ writeStderrLine("qwen serve: GET /workspace/models failed");
41505
+ res.status(500).json({ error: "Unable to load model configurations" });
41506
+ }
41507
+ });
41508
+ app.patch("/workspace/models", mutate({ strict: true }), async (req, res) => {
41509
+ const assertGenerationOpen = deps.captureGenerationAssertion?.() ?? (() => {
41510
+ });
41511
+ try {
41512
+ assertGenerationOpen();
41513
+ const body = safeBody2(req);
41514
+ const key = body["key"];
41515
+ const size = body["contextWindowSize"];
41516
+ if (typeof key !== "string" || !/^[a-f0-9]{64}$/.test(key) || size !== null && (typeof size !== "number" || !Number.isInteger(size) || size < 1 || size > 1e7)) {
41517
+ res.status(400).json({ error: "Invalid model key or context window size" });
41518
+ return;
41519
+ }
41520
+ const clientId = parseAndValidateClientId(req, res);
41521
+ if (clientId === null) return;
41522
+ if (!deps.updateModelContextWindow) {
41523
+ res.status(501).json({ error: "Model configuration editing is unavailable" });
41524
+ return;
41525
+ }
41526
+ const scope = await deps.updateModelContextWindow(
41527
+ boundWorkspace,
41528
+ key,
41529
+ size,
41530
+ assertGenerationOpen
41531
+ );
41532
+ assertGenerationOpen();
41533
+ if (!scope) {
41534
+ res.status(409).json({
41535
+ error: "Model configuration changed or is ambiguous. Reload and try again."
41536
+ });
41537
+ return;
41538
+ }
41539
+ try {
41540
+ broadcastSettingsChanged("modelProviders", void 0, scope, clientId);
41541
+ } catch {
41542
+ writeStderrLine("qwen serve: model configuration broadcast failed");
41543
+ }
41544
+ let runtimeSync;
41545
+ try {
41546
+ runtimeSync = await deps.syncModelProvidersRuntime?.(
41547
+ scope === "user" ? "User" /* User */ : "Workspace" /* Workspace */,
41548
+ "PATCH"
41549
+ );
41550
+ } catch (error2) {
41551
+ if (sendGenerationClosedError(res, error2)) return;
41552
+ runtimeSync = { status: "failed" };
41553
+ }
41554
+ assertGenerationOpen();
41555
+ res.json({
41556
+ updated: true,
41557
+ requiresRestart: true,
41558
+ ...runtimeSync ? { runtimeSync } : {}
41559
+ });
41560
+ } catch (error2) {
41561
+ if (sendGenerationClosedError(res, error2)) return;
41562
+ writeStderrLine("qwen serve: PATCH /workspace/models failed");
41563
+ res.status(500).json({ error: "Unable to update model configuration" });
41564
+ }
41565
+ });
41324
41566
  app.delete(
41325
41567
  "/workspace/models",
41326
41568
  mutate({ strict: true }),
@@ -41358,6 +41600,9 @@ function registerWorkspaceModelsRoutes(app, deps) {
41358
41600
  );
41359
41601
  }
41360
41602
  }, "broadcastWrite");
41603
+ const conflict = new Error(
41604
+ "Model settings changed. Reload and try again."
41605
+ );
41361
41606
  let writes;
41362
41607
  try {
41363
41608
  const workspaceTrusted = deps.isWorkspaceTrusted?.();
@@ -41366,29 +41611,58 @@ function registerWorkspaceModelsRoutes(app, deps) {
41366
41611
  skipWorkspaceSettings: workspaceTrusted === false,
41367
41612
  workspaceTrusted
41368
41613
  });
41369
- const scope = getModelProvidersOwnerScope(loaded) ?? "User" /* User */;
41370
- const modelProviders = loaded.forScope(scope).settings.modelProviders ?? {};
41371
- const { next, removed, removedBaseUrl } = removeModelFromProviders(
41372
- modelProviders,
41373
- loaded.merged.providerProtocol,
41374
- parsed
41375
- );
41376
- if (!removed) {
41614
+ const configuration = parsed.key ? findModelConfiguration(loaded, parsed.key) : findModelConfigurationForDeletion(loaded, parsed);
41615
+ if (configuration === "ambiguous" || parsed.key && !configuration || configuration && configuration.authType !== parsed.authType) {
41616
+ res.status(409).json({
41617
+ error: "Model configuration changed or is ambiguous. Reload and try again."
41618
+ });
41619
+ return;
41620
+ }
41621
+ if (!configuration) {
41377
41622
  res.status(404).json({
41378
41623
  error: "Model not found in configured providers",
41379
41624
  code: "model_not_found"
41380
41625
  });
41381
41626
  return;
41382
41627
  }
41628
+ const scope = configuration.scope;
41629
+ const modelProviders = loaded.forScope(scope).originalSettings.modelProviders ?? {};
41630
+ const resolvedProviders = loaded.forScope(scope).settings.modelProviders ?? {};
41631
+ const removedBaseUrl = configuration.model.baseUrl;
41632
+ const next = { ...modelProviders };
41633
+ const remainingProviders = { ...loaded.merged.modelProviders };
41634
+ next[configuration.provider] = modelProviders[configuration.provider].filter((_, index) => index !== configuration.index);
41635
+ remainingProviders[configuration.provider] = resolvedProviders[configuration.provider].filter((_, index) => index !== configuration.index);
41636
+ const removedModelId = configuration.model.id;
41637
+ const seenRoutes = /* @__PURE__ */ new Set();
41638
+ const remaining = Object.entries(remainingProviders).flatMap(
41639
+ ([provider, models]) => {
41640
+ const authType = resolveProviderProtocol(
41641
+ provider,
41642
+ loaded.merged.providerProtocol
41643
+ );
41644
+ if (!authType || authType === "qwen-oauth" || !Array.isArray(models))
41645
+ return [];
41646
+ return models.filter((model) => model?.id === removedModelId).filter((model) => {
41647
+ const route = JSON.stringify([authType, model.baseUrl ?? ""]);
41648
+ if (seenRoutes.has(route)) return false;
41649
+ seenRoutes.add(route);
41650
+ return true;
41651
+ }).map((model) => ({ model, authType }));
41652
+ }
41653
+ );
41383
41654
  writes = [{ scope, key: "modelProviders", value: next }];
41384
41655
  const activeTarget = {
41385
41656
  authType: parsed.authType,
41386
- modelId: parsed.modelId,
41657
+ modelId: removedModelId,
41387
41658
  ...removedBaseUrl ? { baseUrl: removedBaseUrl } : {}
41388
41659
  };
41660
+ const remainingRoute = remaining.find(
41661
+ ({ model, authType }) => authType === parsed.authType && (model.baseUrl ?? "") === (removedBaseUrl ?? "")
41662
+ )?.model;
41389
41663
  for (const activeScope of getWritableScopes(loaded)) {
41390
41664
  const scopeModel = loaded.forScope(activeScope).settings.model;
41391
- if (isActiveModelSelection(
41665
+ if ((!remainingRoute || !isConversationModelConfiguration(remainingRoute)) && isActiveModelSelection(
41392
41666
  scopeModel?.name,
41393
41667
  scopeModel?.baseUrl,
41394
41668
  activeTarget
@@ -41401,14 +41675,47 @@ function registerWorkspaceModelsRoutes(app, deps) {
41401
41675
  });
41402
41676
  }
41403
41677
  }
41404
- const stillConfigured = Object.values(next).some(
41405
- (models) => Array.isArray(models) && models.some((model) => model.id === parsed.modelId)
41406
- );
41678
+ const stillConfigured = remaining.length > 0;
41679
+ for (const selectionScope of getWritableScopes(loaded)) {
41680
+ const settings = loaded.forScope(selectionScope).settings;
41681
+ if (typeof settings.voiceModel === "string" && settings.voiceModel.trim() === removedModelId && !stillConfigured) {
41682
+ writes.push({
41683
+ scope: selectionScope,
41684
+ key: "voiceModel",
41685
+ value: ""
41686
+ });
41687
+ }
41688
+ for (const key of [
41689
+ "imageModel",
41690
+ "advisorModel",
41691
+ "visionModel",
41692
+ "fastModel",
41693
+ "compactionModel"
41694
+ ]) {
41695
+ const value = settings[key];
41696
+ if (typeof value !== "string" || !value) continue;
41697
+ const separator = value.indexOf("\0");
41698
+ let selector;
41699
+ try {
41700
+ selector = resolveModelId(
41701
+ separator < 0 ? value : value.slice(0, separator)
41702
+ );
41703
+ } catch {
41704
+ continue;
41705
+ }
41706
+ const endpoint = separator < 0 ? void 0 : value.slice(separator + 1);
41707
+ if (selector?.modelId === removedModelId && (!selector.authType || selector.authType === parsed.authType) && (endpoint === void 0 || endpoint === (removedBaseUrl ?? "")) && !remaining.some(
41708
+ ({ model, authType }) => (!selector.authType || authType === selector.authType) && (endpoint === void 0 || endpoint === (model.baseUrl ?? "")) && (key === "imageModel" ? isImageModelConfiguration(model) : key === "fastModel" ? !model.imageOnly && !model.voiceOnly && !model.visionOnly : key === "visionModel" ? !model.imageOnly && !model.voiceOnly && !model.fastOnly : isConversationModelConfiguration(model))
41709
+ )) {
41710
+ writes.push({ scope: selectionScope, key, value: "" });
41711
+ }
41712
+ }
41713
+ }
41407
41714
  const fallbacksScope = getOwnKeyScope(loaded, "modelFallbacks");
41408
41715
  const fallbacks = fallbacksScope ? loaded.forScope(fallbacksScope).settings.modelFallbacks : void 0;
41409
41716
  if (!stillConfigured && fallbacksScope && typeof fallbacks === "string" && fallbacks.length > 0) {
41410
41717
  const original = fallbacks.split(",").map((entry) => entry.trim()).filter(Boolean);
41411
- const kept = original.filter((id) => id !== parsed.modelId);
41718
+ const kept = original.filter((id) => id !== removedModelId);
41412
41719
  if (kept.length !== original.length) {
41413
41720
  writes.push({
41414
41721
  scope: fallbacksScope,
@@ -41417,12 +41724,27 @@ function registerWorkspaceModelsRoutes(app, deps) {
41417
41724
  });
41418
41725
  }
41419
41726
  }
41727
+ const snapshots = getWritableScopes(loaded).map((scope2) => ({
41728
+ scope: scope2,
41729
+ value: JSON.stringify(loaded.forScope(scope2).originalSettings)
41730
+ }));
41731
+ let checked = false;
41732
+ const assertCanPersist = /* @__PURE__ */ __name(() => {
41733
+ assertGenerationOpen();
41734
+ if (checked) return;
41735
+ const fresh = loadSettings(boundWorkspace, {
41736
+ skipLoadEnvironment: true,
41737
+ skipWorkspaceSettings: workspaceTrusted === false,
41738
+ workspaceTrusted
41739
+ });
41740
+ if (snapshots.some(
41741
+ ({ scope: scope2, value }) => JSON.stringify(fresh.forScope(scope2).originalSettings) !== value
41742
+ ))
41743
+ throw conflict;
41744
+ checked = true;
41745
+ }, "assertCanPersist");
41420
41746
  try {
41421
- if (deps.captureGenerationAssertion) {
41422
- await persistSettings(boundWorkspace, writes, assertGenerationOpen);
41423
- } else {
41424
- await persistSettings(boundWorkspace, writes);
41425
- }
41747
+ await persistSettings(boundWorkspace, writes, assertCanPersist);
41426
41748
  } catch (err) {
41427
41749
  if (err instanceof WorkspaceSettingsPartialPersistError) {
41428
41750
  assertGenerationOpen();
@@ -41431,16 +41753,26 @@ function registerWorkspaceModelsRoutes(app, deps) {
41431
41753
  throw err;
41432
41754
  }
41433
41755
  } catch (err) {
41756
+ if (err === conflict || err instanceof WorkspaceSettingsPartialPersistError && err.committedWrites.length === 0 && err.cause === conflict) {
41757
+ res.status(409).json({ error: conflict.message });
41758
+ return;
41759
+ }
41434
41760
  if (sendGenerationClosedError(res, err)) return;
41435
41761
  writeStderrLine(
41436
41762
  `qwen serve: DELETE /workspace/models error (authType=${parsed.authType}, modelId=${parsed.modelId}): ${err instanceof Error ? err.message : String(err)}`
41437
41763
  );
41438
41764
  if (err instanceof WorkspaceSettingsPartialPersistError) {
41439
- if (err.committedWrites.some(
41765
+ const providerWrite = err.committedWrites.find(
41440
41766
  (write) => write.key === "modelProviders"
41441
- ) && deps.syncModelProvidersRuntime) {
41767
+ );
41768
+ if (providerWrite && deps.syncModelProvidersRuntime) {
41442
41769
  try {
41443
- await deps.syncModelProvidersRuntime();
41770
+ await deps.syncModelProvidersRuntime(
41771
+ err.committedWrites.some(
41772
+ (write) => write.scope === "User" /* User */
41773
+ ) ? "User" /* User */ : providerWrite.scope,
41774
+ "DELETE"
41775
+ );
41444
41776
  } catch (syncError) {
41445
41777
  if (sendGenerationClosedError(res, syncError)) return;
41446
41778
  writeStderrLine(
@@ -41477,7 +41809,10 @@ function registerWorkspaceModelsRoutes(app, deps) {
41477
41809
  let runtimeSync;
41478
41810
  if (deps.syncModelProvidersRuntime) {
41479
41811
  try {
41480
- runtimeSync = await deps.syncModelProvidersRuntime();
41812
+ runtimeSync = await deps.syncModelProvidersRuntime(
41813
+ writes.some((write) => write.scope === "User" /* User */) ? "User" /* User */ : writes[0].scope,
41814
+ "DELETE"
41815
+ );
41481
41816
  } catch (err) {
41482
41817
  if (sendGenerationClosedError(res, err)) return;
41483
41818
  writeStderrLine(
@@ -48201,8 +48536,10 @@ var DEFAULT_HELLO_TIMEOUT_MS = 5e3;
48201
48536
  var DEFAULT_HEARTBEAT_INTERVAL_MS = 5e3;
48202
48537
  var DEFAULT_HEARTBEAT_TIMEOUT_MS = 15e3;
48203
48538
  var DEFAULT_SHORTCUT_TIMEOUT_MS = 5e3;
48204
- var MAX_HOST_TEXT_BYTES = 64 * 1024;
48539
+ var MAX_HOST_TEXT_BYTES = 512 * 1024;
48205
48540
  var MAX_HOST_AUDIO_BYTES = 64 * 1024;
48541
+ var MAX_HOST_VISUAL_IMAGE_BYTES = 190 * 1024;
48542
+ var MAX_HOST_VISUAL_BASE64_LENGTH = Math.ceil(MAX_HOST_VISUAL_IMAGE_BYTES / 3) * 4;
48206
48543
  var MAX_HOST_AUDIO_WIRE_BYTES = LIVE_INPUT_AUDIO_EPOCH_BYTES + MAX_HOST_AUDIO_BYTES;
48207
48544
  var MAX_DAEMON_AUDIO_BYTES = 256 * 1024;
48208
48545
  var MAX_SOCKET_BUFFERED_BYTES2 = 1024 * 1024;
@@ -48246,17 +48583,30 @@ function isBoundedString(value, maxLength = MAX_ID_LENGTH) {
48246
48583
  return typeof value === "string" && value.length > 0 && value.length <= maxLength;
48247
48584
  }
48248
48585
  __name(isBoundedString, "isBoundedString");
48586
+ function isNonNegativeSafeInteger(value) {
48587
+ return typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
48588
+ }
48589
+ __name(isNonNegativeSafeInteger, "isNonNegativeSafeInteger");
48249
48590
  function isPermissionState(value) {
48250
48591
  return value === "granted" || value === "denied" || value === "not_determined";
48251
48592
  }
48252
48593
  __name(isPermissionState, "isPermissionState");
48253
48594
  function parseHello(value) {
48595
+ const protocolVersion = value["protocolVersion"];
48254
48596
  const permissions = value["permissions"];
48255
48597
  const selfChecks = value["selfChecks"];
48256
- if (value["type"] !== "host.hello" || typeof value["protocolVersion"] !== "number" || !Number.isInteger(value["protocolVersion"]) || !isBoundedString(value["hostVersion"], MAX_VERSION_LENGTH) || !isBoundedString(value["bundleId"]) || !isBoundedString(value["instanceNonce"]) || !isObject2(permissions) || !isPermissionState(permissions["microphone"]) || !isPermissionState(permissions["accessibility"]) || !isPermissionState(permissions["screenRecording"]) || !isObject2(selfChecks) || typeof selfChecks["audioInput"] !== "boolean" || typeof selfChecks["audioOutput"] !== "boolean" || typeof selfChecks["globalShortcut"] !== "boolean" || typeof selfChecks["appshot"] !== "boolean") {
48598
+ const cameraPermission = isObject2(permissions) ? permissions["camera"] : void 0;
48599
+ const legacyHelloWithoutCamera = protocolVersion !== LIVE_HOST_PROTOCOL_VERSION && cameraPermission === void 0;
48600
+ if (value["type"] !== "host.hello" || typeof protocolVersion !== "number" || !Number.isInteger(protocolVersion) || !isBoundedString(value["hostVersion"], MAX_VERSION_LENGTH) || !isBoundedString(value["bundleId"]) || !isBoundedString(value["instanceNonce"]) || !isObject2(permissions) || !isPermissionState(permissions["microphone"]) || !isPermissionState(cameraPermission) && !legacyHelloWithoutCamera || !isPermissionState(permissions["accessibility"]) || !isPermissionState(permissions["screenRecording"]) || !isObject2(selfChecks) || typeof selfChecks["audioInput"] !== "boolean" || typeof selfChecks["audioOutput"] !== "boolean" || typeof selfChecks["globalShortcut"] !== "boolean" || typeof selfChecks["appshot"] !== "boolean") {
48257
48601
  return void 0;
48258
48602
  }
48259
- return value;
48603
+ return {
48604
+ ...value,
48605
+ permissions: {
48606
+ ...permissions,
48607
+ camera: isPermissionState(cameraPermission) ? cameraPermission : "not_determined"
48608
+ }
48609
+ };
48260
48610
  }
48261
48611
  __name(parseHello, "parseHello");
48262
48612
  function parseAction(value) {
@@ -48290,6 +48640,47 @@ function parseAction(value) {
48290
48640
  return void 0;
48291
48641
  }
48292
48642
  __name(parseAction, "parseAction");
48643
+ function isBoundedVisualImage(image) {
48644
+ if (typeof image !== "string" || image.length === 0 || image.length > MAX_HOST_VISUAL_BASE64_LENGTH || image.length % 4 !== 0 || !/^[A-Za-z0-9+/]*={0,2}$/.test(image)) {
48645
+ return false;
48646
+ }
48647
+ const jpeg = Buffer.from(image, "base64");
48648
+ return jpeg.byteLength >= 4 && jpeg.byteLength <= MAX_HOST_VISUAL_IMAGE_BYTES && jpeg[0] === 255 && jpeg[1] === 216 && jpeg[jpeg.byteLength - 2] === 255 && jpeg[jpeg.byteLength - 1] === 217 && jpeg.toString("base64") === image;
48649
+ }
48650
+ __name(isBoundedVisualImage, "isBoundedVisualImage");
48651
+ function parseVisualCaptureResult(value) {
48652
+ const requestId = value["requestId"];
48653
+ if (value["type"] !== "host.visual_capture_result" || !isBoundedString(requestId)) {
48654
+ return void 0;
48655
+ }
48656
+ if (value["success"] === false && isBoundedString(value["error"], 1024)) {
48657
+ return {
48658
+ type: "host.visual_capture_result",
48659
+ requestId,
48660
+ success: false,
48661
+ error: value["error"]
48662
+ };
48663
+ }
48664
+ const width = value["width"];
48665
+ const height = value["height"];
48666
+ if (value["success"] !== true || value["source"] !== "screen" || !isBoundedVisualImage(value["image"]) || typeof width !== "number" || !Number.isSafeInteger(width) || width <= 0 || typeof height !== "number" || !Number.isSafeInteger(height) || height <= 0 || !isBoundedString(value["appName"], 512) || value["windowTitle"] !== void 0 && !isBoundedString(value["windowTitle"], 2048) || typeof value["accessibilityText"] !== "string" || value["accessibilityText"].length > MAX_APPSHOT_TEXT_LENGTH || !isBoundedString(value["screenshotPath"], 4096)) {
48667
+ return void 0;
48668
+ }
48669
+ return {
48670
+ type: "host.visual_capture_result",
48671
+ requestId,
48672
+ success: true,
48673
+ source: "screen",
48674
+ image: value["image"],
48675
+ width,
48676
+ height,
48677
+ appName: value["appName"],
48678
+ ...value["windowTitle"] ? { windowTitle: value["windowTitle"] } : {},
48679
+ accessibilityText: value["accessibilityText"],
48680
+ screenshotPath: value["screenshotPath"]
48681
+ };
48682
+ }
48683
+ __name(parseVisualCaptureResult, "parseVisualCaptureResult");
48293
48684
  function parseHostMessage(text) {
48294
48685
  let value;
48295
48686
  try {
@@ -48300,6 +48691,9 @@ function parseHostMessage(text) {
48300
48691
  if (!isObject2(value)) return void 0;
48301
48692
  if (value["type"] === "host.hello") return parseHello(value);
48302
48693
  if (value["type"] === "host.action") return parseAction(value);
48694
+ if (value["type"] === "host.visual_capture_result") {
48695
+ return parseVisualCaptureResult(value);
48696
+ }
48303
48697
  if (value["type"] === "host.pong" && isBoundedString(value["pingId"])) {
48304
48698
  return { type: "host.pong", pingId: value["pingId"] };
48305
48699
  }
@@ -48318,34 +48712,19 @@ function parseHostMessage(text) {
48318
48712
  };
48319
48713
  }
48320
48714
  }
48321
- if (value["type"] === "host.screen_context_result") {
48322
- const requestId = value["requestId"];
48323
- if (!isBoundedString(requestId)) return void 0;
48324
- if (value["success"] === false && isBoundedString(value["error"], 1024)) {
48325
- return {
48326
- type: "host.screen_context_result",
48327
- requestId,
48328
- success: false,
48329
- error: value["error"]
48330
- };
48331
- }
48332
- if (value["success"] === true && isBoundedString(value["appName"], 512) && (value["windowTitle"] === void 0 || isBoundedString(value["windowTitle"], 2048)) && typeof value["accessibilityText"] === "string" && value["accessibilityText"].length <= MAX_APPSHOT_TEXT_LENGTH && isBoundedString(value["screenshotPath"], 4096)) {
48333
- return {
48334
- type: "host.screen_context_result",
48335
- requestId,
48336
- success: true,
48337
- appName: value["appName"],
48338
- ...value["windowTitle"] ? { windowTitle: value["windowTitle"] } : {},
48339
- accessibilityText: value["accessibilityText"],
48340
- screenshotPath: value["screenshotPath"]
48341
- };
48342
- }
48343
- }
48344
- if (value["type"] === "host.playback_started" && typeof value["epoch"] === "number") {
48345
- return { type: "host.playback_started", epoch: value["epoch"] };
48715
+ if (value["type"] === "host.playback_started" && isNonNegativeSafeInteger(value["epoch"]) && isNonNegativeSafeInteger(value["outputId"])) {
48716
+ return {
48717
+ type: "host.playback_started",
48718
+ epoch: value["epoch"],
48719
+ outputId: value["outputId"]
48720
+ };
48346
48721
  }
48347
- if (value["type"] === "host.playback_completed" && typeof value["epoch"] === "number") {
48348
- return { type: "host.playback_completed", epoch: value["epoch"] };
48722
+ if (value["type"] === "host.playback_completed" && isNonNegativeSafeInteger(value["epoch"]) && isNonNegativeSafeInteger(value["outputId"])) {
48723
+ return {
48724
+ type: "host.playback_completed",
48725
+ epoch: value["epoch"],
48726
+ outputId: value["outputId"]
48727
+ };
48349
48728
  }
48350
48729
  return void 0;
48351
48730
  }
@@ -48412,6 +48791,8 @@ var LiveHostCoordinator = class {
48412
48791
  pendingStartMode;
48413
48792
  actionGeneration = 0;
48414
48793
  nextEpoch = 0;
48794
+ nextOutputId = 0;
48795
+ activeOutputId;
48415
48796
  inputMuted = false;
48416
48797
  outputMuted = false;
48417
48798
  lastCallError;
@@ -48725,7 +49106,7 @@ var LiveHostCoordinator = class {
48725
49106
  const call = this.call;
48726
49107
  return call !== void 0 && (call.coordinator?.sessionId === sessionId || call.workers.some((worker) => worker.sessionId === sessionId));
48727
49108
  }
48728
- captureScreenContext(callerSessionId) {
49109
+ captureVisualContext(callerSessionId) {
48729
49110
  const call = this.call;
48730
49111
  const host = this.host;
48731
49112
  if (!call || call.coordinator?.sessionId !== callerSessionId || !host?.hello || !this.isLeaseHealthy(host) || host.hello.permissions.accessibility !== "granted" || host.hello.permissions.screenRecording !== "granted" || !host.hello.selfChecks.appshot) {
@@ -48749,9 +49130,10 @@ var LiveHostCoordinator = class {
48749
49130
  reject
48750
49131
  });
48751
49132
  if (!this.sendHost({
48752
- type: "host.capture_screen_context",
49133
+ type: "host.capture_visual",
48753
49134
  requestId,
48754
- epoch: call.epoch
49135
+ epoch: call.epoch,
49136
+ source: "screen"
48755
49137
  })) {
48756
49138
  this.rejectPendingAppshot(
48757
49139
  requestId,
@@ -48786,9 +49168,18 @@ var LiveHostCoordinator = class {
48786
49168
  if (!socket || socket.readyState !== import_websocket.default.OPEN || socket.bufferedAmount > MAX_SOCKET_BUFFERED_BYTES2) {
48787
49169
  return false;
48788
49170
  }
48789
- socket.send(pcm16, { binary: true });
49171
+ const outputId = this.activeOutputId ?? this.allocateOutputId();
49172
+ const frame = Buffer.allocUnsafe(
49173
+ LIVE_OUTPUT_AUDIO_HEADER_BYTES + pcm16.byteLength
49174
+ );
49175
+ frame.writeBigUInt64BE(BigInt(epoch), 0);
49176
+ frame.writeBigUInt64BE(BigInt(outputId), LIVE_OUTPUT_AUDIO_EPOCH_BYTES);
49177
+ frame.set(pcm16, LIVE_OUTPUT_AUDIO_HEADER_BYTES);
49178
+ socket.send(frame, { binary: true });
49179
+ this.activeOutputId = outputId;
48790
49180
  writeLiveHostDiagnostic("output_audio_sent", {
48791
49181
  epoch,
49182
+ outputId,
48792
49183
  bytes: pcm16.byteLength,
48793
49184
  socketBufferedBytes: socket.bufferedAmount
48794
49185
  });
@@ -48796,6 +49187,7 @@ var LiveHostCoordinator = class {
48796
49187
  }
48797
49188
  clearOutput(epoch) {
48798
49189
  if (this.call && this.call.epoch !== epoch) return;
49190
+ this.activeOutputId = void 0;
48799
49191
  writeLiveHostDiagnostic("clear_output_sent", { epoch });
48800
49192
  this.sendHost({ type: "host.clear_output", epoch });
48801
49193
  }
@@ -48863,6 +49255,7 @@ var LiveHostCoordinator = class {
48863
49255
  host_disconnected: "Qwen Live Host disconnected.",
48864
49256
  host_version: "Qwen Live Host is not protocol-compatible.",
48865
49257
  microphone_permission: "Microphone permission is required.",
49258
+ camera_permission: "Camera permission is required.",
48866
49259
  accessibility_permission: "Accessibility permission is required.",
48867
49260
  screen_recording_permission: "Screen Recording permission is required.",
48868
49261
  audio_input: "Live Host audio input self-check failed.",
@@ -48904,15 +49297,15 @@ var LiveHostCoordinator = class {
48904
49297
  }
48905
49298
  return;
48906
49299
  }
48907
- if (message.type === "host.screen_context_result") {
48908
- this.handleScreenContextResult(message);
49300
+ if (message.type === "host.visual_capture_result") {
49301
+ this.handleVisualCaptureResult(message);
48909
49302
  return;
48910
49303
  }
48911
49304
  if (message.type === "host.shortcut_result") {
48912
49305
  this.handleShortcutResult(message);
48913
49306
  return;
48914
49307
  }
48915
- if (message.type === "host.playback_started" || message.type === "host.playback_completed") {
49308
+ if (message.type === "host.playback_started" || message.type === "host.playback_completed" || message.type === "host.visual_frame" || message.type === "host.visual_settings" || message.type === "host.memory_action") {
48916
49309
  return;
48917
49310
  }
48918
49311
  this.handleAction(message);
@@ -48941,7 +49334,7 @@ var LiveHostCoordinator = class {
48941
49334
  this.sendState(status);
48942
49335
  pending.resolve(status);
48943
49336
  }
48944
- handleScreenContextResult(message) {
49337
+ handleVisualCaptureResult(message) {
48945
49338
  const pending = this.pendingAppshots.get(message.requestId);
48946
49339
  if (!pending) return;
48947
49340
  const call = this.call;
@@ -48958,6 +49351,18 @@ var LiveHostCoordinator = class {
48958
49351
  pending.reject(new Error(message.error));
48959
49352
  return;
48960
49353
  }
49354
+ if (message.source !== "screen") {
49355
+ pending.reject(
49356
+ new Error("Qwen Live Host returned a non-screen Appshot.")
49357
+ );
49358
+ return;
49359
+ }
49360
+ if (!message.screenshotPath) {
49361
+ pending.reject(
49362
+ new Error("Qwen Live Host did not persist the requested Appshot.")
49363
+ );
49364
+ return;
49365
+ }
48961
49366
  pending.resolve({
48962
49367
  appName: message.appName,
48963
49368
  ...message.windowTitle ? { windowTitle: message.windowTitle } : {},
@@ -48968,8 +49373,8 @@ var LiveHostCoordinator = class {
48968
49373
  handleHello(lease, hello) {
48969
49374
  if (hello.protocolVersion !== LIVE_HOST_PROTOCOL_VERSION || hello.bundleId !== LIVE_HOST_BUNDLE_ID || lease.hello && lease.hello.instanceNonce !== hello.instanceNonce) {
48970
49375
  this.lastHostFailure = "host_version";
48971
- lease.socket.close(4006, "Incompatible Live Host.");
48972
49376
  this.detachHost(lease, "host_version");
49377
+ lease.socket.close(4006, "Incompatible Live Host.");
48973
49378
  return;
48974
49379
  }
48975
49380
  lease.hello = hello;
@@ -49228,6 +49633,13 @@ var LiveHostCoordinator = class {
49228
49633
  socket.send(JSON.stringify(message));
49229
49634
  return true;
49230
49635
  }
49636
+ allocateOutputId() {
49637
+ if (this.nextOutputId >= Number.MAX_SAFE_INTEGER) {
49638
+ this.nextOutputId = 0;
49639
+ }
49640
+ this.nextOutputId += 1;
49641
+ return this.nextOutputId;
49642
+ }
49231
49643
  notifyInactive() {
49232
49644
  if (this.call) return;
49233
49645
  for (const resolve8 of this.inactiveWaiters) resolve8();
@@ -51625,6 +52037,11 @@ async function inspectApp(appPath) {
51625
52037
  if (!VERSION_PATTERN.test(version)) {
51626
52038
  throw new Error("Qwen Live Host version is invalid.");
51627
52039
  }
52040
+ const rawProtocolVersion = await readBundleValue(
52041
+ appPath,
52042
+ "QwenLiveProtocolVersion"
52043
+ ).catch(() => "0");
52044
+ const protocolVersion = Number(rawProtocolVersion);
51628
52045
  await run("/usr/bin/codesign", [
51629
52046
  "--verify",
51630
52047
  "--deep",
@@ -51646,9 +52063,16 @@ async function inspectApp(appPath) {
51646
52063
  throw new Error("Qwen Live Host signing identity is invalid.");
51647
52064
  }
51648
52065
  await run("/usr/sbin/spctl", ["-a", "-t", "exec", appPath]);
51649
- return { version };
52066
+ return {
52067
+ version,
52068
+ protocolVersion: Number.isSafeInteger(protocolVersion) ? protocolVersion : 0
52069
+ };
51650
52070
  }
51651
52071
  __name(inspectApp, "inspectApp");
52072
+ function isCompatibleInstalledHost(host) {
52073
+ return host.protocolVersion === LIVE_HOST_PROTOCOL_VERSION;
52074
+ }
52075
+ __name(isCompatibleInstalledHost, "isCompatibleInstalledHost");
51652
52076
  async function inspectInstalledHost() {
51653
52077
  try {
51654
52078
  return await inspectApp(LIVE_HOST_APP_PATH);
@@ -51772,7 +52196,7 @@ async function installLatestHost(currentArchitecture, onStatus) {
51772
52196
  await fsp5.mkdir(extractedPath, { mode: 448 });
51773
52197
  await run("/usr/bin/ditto", ["-x", "-k", archivePath, extractedPath]);
51774
52198
  const candidate = await inspectApp(candidatePath);
51775
- if (candidate.version !== manifest.version) {
52199
+ if (candidate.version !== manifest.version || !isCompatibleInstalledHost(candidate)) {
51776
52200
  throw new Error("Live Host package version does not match its manifest.");
51777
52201
  }
51778
52202
  onStatus({ state: "installing", version: manifest.version });
@@ -51787,7 +52211,7 @@ async function installLatestHost(currentArchitecture, onStatus) {
51787
52211
  await fsp5.rename(stagingPath, LIVE_HOST_APP_PATH);
51788
52212
  installedCandidate = true;
51789
52213
  const installed = await inspectApp(LIVE_HOST_APP_PATH);
51790
- if (installed.version !== manifest.version) {
52214
+ if (installed.version !== manifest.version || !isCompatibleInstalledHost(installed)) {
51791
52215
  throw new Error("Installed Live Host version is invalid.");
51792
52216
  }
51793
52217
  if (movedExisting) {
@@ -51848,7 +52272,7 @@ var LiveHostInstaller = class {
51848
52272
  this.status = { state: "checking" };
51849
52273
  try {
51850
52274
  const installed = await this.inspectInstalled();
51851
- this.status = installed ? { state: "installed", version: installed.version } : { state: "missing" };
52275
+ this.status = installed && isCompatibleInstalledHost(installed) ? { state: "installed", version: installed.version } : { state: "missing" };
51852
52276
  } catch (error2) {
51853
52277
  this.setError(errorMessage2(error2), true);
51854
52278
  }
@@ -51871,6 +52295,12 @@ var LiveHostInstaller = class {
51871
52295
  const installed = await this.inspectInstalled();
51872
52296
  if (!installed)
51873
52297
  return this.setError("Qwen Live Host is not installed.", true);
52298
+ if (!isCompatibleInstalledHost(installed)) {
52299
+ return this.setError(
52300
+ `Qwen Live Host protocol v${installed.protocolVersion} is incompatible; v${LIVE_HOST_PROTOCOL_VERSION} is required.`,
52301
+ true
52302
+ );
52303
+ }
51874
52304
  this.status = { state: "launching", version: installed.version };
51875
52305
  await this.launchHost();
51876
52306
  this.status = { state: "installed", version: installed.version };
@@ -51888,7 +52318,7 @@ var LiveHostInstaller = class {
51888
52318
  currentArchitecture = architecture(this.currentArchitecture);
51889
52319
  this.status = { state: "checking" };
51890
52320
  const installed = force ? void 0 : await this.inspectInstalled();
51891
- const ready = installed ?? await this.installLatest(currentArchitecture, (status) => {
52321
+ const ready = (installed && isCompatibleInstalledHost(installed) ? installed : void 0) ?? await this.installLatest(currentArchitecture, (status) => {
51892
52322
  this.status = { ...status };
51893
52323
  });
51894
52324
  this.status = { state: "launching", version: ready.version };
@@ -51942,7 +52372,7 @@ var NOISY_DIR_NAMES = /* @__PURE__ */ new Set([
51942
52372
  "out",
51943
52373
  "target"
51944
52374
  ]);
51945
- var debugLogger5 = createDebugLogger("LIVE_REALTIME_CONTEXT");
52375
+ var debugLogger6 = createDebugLogger("LIVE_REALTIME_CONTEXT");
51946
52376
  function approxTokenCount(text) {
51947
52377
  return Math.ceil(Buffer.byteLength(text, "utf8") / APPROX_BYTES_PER_TOKEN);
51948
52378
  }
@@ -52079,7 +52509,7 @@ async function loadRecentThreads(workspaceRegistry) {
52079
52509
  );
52080
52510
  return pages.flat().sort((left, right) => right.updatedAt - left.updatedAt).slice(0, MAX_RECENT_THREADS);
52081
52511
  } catch (error2) {
52082
- debugLogger5.warn(
52512
+ debugLogger6.warn(
52083
52513
  "Failed to load Live startup tasks from the session catalog:",
52084
52514
  error2
52085
52515
  );
@@ -55384,6 +55814,7 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
55384
55814
  Storage.getRuntimeBaseDir()
55385
55815
  );
55386
55816
  const bridge = injectedWorkspaceRegistry?.primary.bridge ?? deps.bridge ?? createAcpSessionBridge({
55817
+ artifactSnapshotRuntimeBaseDir: Storage.getRuntimeBaseDir(),
55387
55818
  sessionAttachmentsRoot: attachmentsRoots.root,
55388
55819
  sessionAttachmentsFallbackRoot: attachmentsRoots.fallback,
55389
55820
  maxSessions: opts.maxSessions,
@@ -55697,7 +56128,7 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
55697
56128
  try {
55698
56129
  setScreenHandler.call(
55699
56130
  runtime.bridge,
55700
- ({ callerSessionId }) => liveCoordinator.captureScreenContext(callerSessionId)
56131
+ ({ callerSessionId }) => liveCoordinator.captureVisualContext(callerSessionId)
55701
56132
  );
55702
56133
  setTaskHandler.call(
55703
56134
  runtime.bridge,
@@ -56112,14 +56543,14 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
56112
56543
  }, deps.recordDaemonRequest)
56113
56544
  );
56114
56545
  const buildWorkspaceCtx = createBuildWorkspaceCtx(primaryBoundWorkspace);
56115
- const syncModelProvidersRuntime = /* @__PURE__ */ __name(async (route) => {
56546
+ const syncModelProvidersRuntime = /* @__PURE__ */ __name(async (route, writeScope) => {
56116
56547
  const trusted = isPrimaryWorkspaceTrusted();
56117
56548
  const settings = loadSettings(primaryBoundWorkspace, {
56118
56549
  skipLoadEnvironment: true,
56119
56550
  skipWorkspaceSettings: !trusted,
56120
56551
  workspaceTrusted: trusted
56121
56552
  });
56122
- const scope = getModelProvidersOwnerScope(settings) ?? "User" /* User */;
56553
+ const scope = writeScope ?? getModelProvidersOwnerScope(settings) ?? "User" /* User */;
56123
56554
  const primaryContext = buildWorkspaceCtx(route);
56124
56555
  const secondaryRuntimes = scope === "User" /* User */ ? workspaceRegistry.listAll().filter((runtime) => !runtime.primary) : [];
56125
56556
  const [primaryResult, ...secondaryResults] = await Promise.allSettled([
@@ -56575,6 +57006,7 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
56575
57006
  persistSetting: /* @__PURE__ */ __name(async (...args) => {
56576
57007
  await persistSetting(...args);
56577
57008
  }, "persistSetting"),
57009
+ syncImageModel: /* @__PURE__ */ __name((scope) => syncModelProvidersRuntime("POST /workspace/settings imageModel", scope), "syncImageModel"),
56578
57010
  updateSessionWorkflow: /* @__PURE__ */ __name((enabled) => primaryBridge.invokeWorkspaceCommand(
56579
57011
  SERVE_CONTROL_EXT_METHODS.workspaceSessionWorkflow,
56580
57012
  { enabled }
@@ -56688,9 +57120,10 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
56688
57120
  mutate,
56689
57121
  safeBody,
56690
57122
  persistSettings: deps.persistSettings,
57123
+ updateModelContextWindow: deps.updateModelContextWindow,
56691
57124
  broadcastSettingsChanged,
56692
57125
  parseAndValidateClientId: /* @__PURE__ */ __name((req, res) => parseAndValidateWorkspaceClientId(req, res, primaryBridge), "parseAndValidateClientId"),
56693
- syncModelProvidersRuntime: /* @__PURE__ */ __name(() => syncModelProvidersRuntime("DELETE /workspace/models"), "syncModelProvidersRuntime")
57126
+ syncModelProvidersRuntime: /* @__PURE__ */ __name((writeScope, method) => syncModelProvidersRuntime(`${method} /workspace/models`, writeScope), "syncModelProvidersRuntime")
56694
57127
  });
56695
57128
  }
56696
57129
  registerA2uiActionRoutes(app, {