@qwen-code/qwen-code 0.26.2-preview.0 → 0.26.2-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/chunks/{MaxSizedBox-K6YUM3DX.js → MaxSizedBox-EGHZ2BPF.js} +1 -1
  2. package/chunks/{StandaloneSessionPicker-75IC33SN.js → StandaloneSessionPicker-UVCW6YW3.js} +1 -1
  3. package/chunks/{acp-subagent-executor-3NHBJRPL.js → acp-subagent-executor-AQ7AWSD4.js} +1 -1
  4. package/chunks/{acpAgent-JT6KQPTH.js → acpAgent-IV7JAGD7.js} +3 -3
  5. package/chunks/{advisor-TI2UVEZK.js → advisor-UZ4TF65D.js} +1 -1
  6. package/chunks/{agent-SWIZZZMY.js → agent-CNLVAWDD.js} +1 -1
  7. package/chunks/{agent-headless-USWEJ4GW.js → agent-headless-ZJUJLUJS.js} +1 -1
  8. package/chunks/{agent-host-client-ZFIMQX33.js → agent-host-client-SN5V2KBH.js} +1 -1
  9. package/chunks/{agent-host-connections-LOFD7O7Q.js → agent-host-connections-VKMAJIIU.js} +1 -1
  10. package/chunks/{anthropicContentGenerator-HMLEI4FI.js → anthropicContentGenerator-QTJVPAMI.js} +1 -1
  11. package/chunks/{autofix-pr-NKR2VSLB.js → autofix-pr-U7GNSH27.js} +1 -1
  12. package/chunks/{batch-JQZ3TOHA.js → batch-MBEWETXN.js} +1 -1
  13. package/chunks/{bridge-EIWWT4P6.js → bridge-TEJLNYV3.js} +1 -1
  14. package/chunks/{channel-settings-store-FLRLUA67.js → channel-settings-store-QNCKWWBL.js} +1 -1
  15. package/chunks/{chunk-244YTFYD.js → chunk-23KDY7UW.js} +1 -1
  16. package/chunks/{chunk-7TDMQJTD.js → chunk-2DWWSMTV.js} +1 -1
  17. package/chunks/{chunk-UU2LTNSF.js → chunk-3IZMVLVZ.js} +1 -1
  18. package/chunks/{chunk-B6T4ESBM.js → chunk-3JI7IKJL.js} +1 -1
  19. package/chunks/{chunk-Y5TT2G3N.js → chunk-427MARCP.js} +1 -1
  20. package/chunks/{chunk-KX7JS2P7.js → chunk-4NNNGSQY.js} +3 -3
  21. package/chunks/{chunk-6TQS2WQO.js → chunk-4RM7KY3Z.js} +2 -2
  22. package/chunks/{chunk-YL3N2UGG.js → chunk-5X7S4AE6.js} +5 -5
  23. package/chunks/{chunk-K2HAY5PY.js → chunk-5XAECBED.js} +1 -1
  24. package/chunks/{chunk-VCHFBETO.js → chunk-66KKSLUO.js} +1 -1
  25. package/chunks/{chunk-BSJR2KEF.js → chunk-6CIIDUZW.js} +1 -1
  26. package/chunks/{chunk-22CLK7PK.js → chunk-7EBRMQYW.js} +1 -1
  27. package/chunks/{chunk-J4TFGZ4A.js → chunk-7FSC2NKA.js} +1 -1
  28. package/chunks/{chunk-6JFC5M6B.js → chunk-A5TAAMML.js} +1 -1
  29. package/chunks/{chunk-DHHACQVN.js → chunk-AOYSX44A.js} +1 -1
  30. package/chunks/{chunk-VFVZ2DY7.js → chunk-AZCMQ3DD.js} +2 -2
  31. package/chunks/{chunk-BQJXWIMR.js → chunk-B6F7CVBP.js} +1 -1
  32. package/chunks/{chunk-OVPEAKOQ.js → chunk-BDQOLT37.js} +1 -1
  33. package/chunks/{chunk-5SYUBQNO.js → chunk-BIWEUAKG.js} +1 -1
  34. package/chunks/{chunk-BZM66PQO.js → chunk-BJ5R7LOM.js} +1 -1
  35. package/chunks/{chunk-4R2OHBH3.js → chunk-BKUFRNME.js} +1 -1
  36. package/chunks/{chunk-NIYWNFVF.js → chunk-BNZSPX2I.js} +1 -1
  37. package/chunks/{chunk-FJV2ECNY.js → chunk-D2URRVOK.js} +1 -1
  38. package/chunks/{chunk-GT6CHVAI.js → chunk-DANP7CMW.js} +1 -1
  39. package/chunks/{chunk-FHFLD4DR.js → chunk-DBHLRZGI.js} +1 -1
  40. package/chunks/{chunk-Y2UXZJLM.js → chunk-DL7TKH2E.js} +2 -2
  41. package/chunks/{chunk-MCQE2U7N.js → chunk-DOWKH5OZ.js} +6 -6
  42. package/chunks/{chunk-UHRLBY3C.js → chunk-DPHQJPCU.js} +1 -1
  43. package/chunks/{chunk-PV2VT25U.js → chunk-DPNGBOI7.js} +1 -1
  44. package/chunks/{chunk-NCDNF7UJ.js → chunk-DXRXF4QD.js} +1 -1
  45. package/chunks/{chunk-OCVRMNEQ.js → chunk-DZ3GV34J.js} +1 -1
  46. package/chunks/{chunk-3QIAXWWW.js → chunk-EU2MKUK4.js} +1 -1
  47. package/chunks/{chunk-KMAVI6FB.js → chunk-EVBUXPGM.js} +1 -1
  48. package/chunks/{chunk-BVSTV4JM.js → chunk-F3ZRU2SA.js} +1 -1
  49. package/chunks/{chunk-TBZY477Y.js → chunk-FCZYH27X.js} +1 -1
  50. package/chunks/{chunk-JCOK67LT.js → chunk-FNDMWG43.js} +1 -1
  51. package/chunks/{chunk-5SF32OGU.js → chunk-GDXLJJSW.js} +1 -1
  52. package/chunks/{chunk-SO6FCPRI.js → chunk-GZYIXB7Y.js} +1 -1
  53. package/chunks/{chunk-WZPTWC7X.js → chunk-HHNAH4IH.js} +1 -1
  54. package/chunks/{chunk-7KCAOXNL.js → chunk-HOKROBQZ.js} +1 -1
  55. package/chunks/{chunk-34ZBUQJV.js → chunk-IGPAATQW.js} +1 -1
  56. package/chunks/{chunk-2ZTRKK2O.js → chunk-INFBJDWM.js} +1 -1
  57. package/chunks/{chunk-IEJ2CGRN.js → chunk-J3R7ZNSA.js} +1 -1
  58. package/chunks/{chunk-KT5MPRYB.js → chunk-JCRS367I.js} +1 -1
  59. package/chunks/{chunk-7JWJTRP6.js → chunk-JFVXZFMV.js} +1 -1
  60. package/chunks/{chunk-47LP4MBD.js → chunk-JKMGS2VD.js} +1 -1
  61. package/chunks/{chunk-WRJ3PMDZ.js → chunk-JUQ7T2MV.js} +1 -1
  62. package/chunks/{chunk-NZX3UWNF.js → chunk-KQ4TDFNE.js} +1 -1
  63. package/chunks/{chunk-X7D4VKMX.js → chunk-L6BKKN42.js} +1 -1
  64. package/chunks/{chunk-YG5HVFMY.js → chunk-L7Y6MOHS.js} +1 -1
  65. package/chunks/{chunk-UFTIUKD4.js → chunk-LGYXZJI3.js} +1 -1
  66. package/chunks/{chunk-JQGGILML.js → chunk-LPOEVTKD.js} +1 -1
  67. package/chunks/{chunk-5KI55A6S.js → chunk-LRXS7ZI2.js} +1 -1
  68. package/chunks/{chunk-CKVHEYXW.js → chunk-LYYVSCNL.js} +1 -1
  69. package/chunks/{chunk-LIIMQ4DI.js → chunk-LZNBHBAJ.js} +6 -6
  70. package/chunks/{chunk-H4GDEXMF.js → chunk-M3C6RDGC.js} +1 -1
  71. package/chunks/{chunk-KKKUB3RQ.js → chunk-MNVMHVQJ.js} +1 -1
  72. package/chunks/{chunk-2B3W7IQY.js → chunk-MVGQFFIK.js} +1 -1
  73. package/chunks/{chunk-Q35A2RGO.js → chunk-NC7BCZPQ.js} +1 -1
  74. package/chunks/{chunk-2ZOTG3NW.js → chunk-NE627MUW.js} +1 -1
  75. package/chunks/{chunk-W4P2EN3V.js → chunk-NZNRCPGE.js} +1 -1
  76. package/chunks/{chunk-YPDQJQ3S.js → chunk-P3M4WWRA.js} +1 -1
  77. package/chunks/{chunk-DVB36ASH.js → chunk-P534ONQN.js} +1 -1
  78. package/chunks/{chunk-EL5J4ESB.js → chunk-QF44NNSC.js} +1 -1
  79. package/chunks/{chunk-IQPJOBPI.js → chunk-QHGCDHNW.js} +1 -1
  80. package/chunks/{chunk-EVZC4KEQ.js → chunk-QWJX7NIP.js} +1 -1
  81. package/chunks/{chunk-J2TJL2F4.js → chunk-S53G54DW.js} +2 -2
  82. package/chunks/{chunk-3A6LFJJV.js → chunk-SMNFL3AD.js} +1 -1
  83. package/chunks/{chunk-WDO3K3P2.js → chunk-TOBNWST4.js} +1 -1
  84. package/chunks/{chunk-AVGJ4HE3.js → chunk-TQSBUHAM.js} +1 -1
  85. package/chunks/{chunk-ABUS7DNN.js → chunk-TW5QEP2J.js} +1 -1
  86. package/chunks/{chunk-WYM4Z4D5.js → chunk-UEB2F43V.js} +1 -1
  87. package/chunks/{chunk-FUUPMVD2.js → chunk-UPPE4I6H.js} +1 -1
  88. package/chunks/{chunk-UHBJVFZA.js → chunk-US42COBM.js} +1 -1
  89. package/chunks/{chunk-RMQNBSMK.js → chunk-UUY6XSQI.js} +1 -1
  90. package/chunks/{chunk-UVQUQNCA.js → chunk-UZI3IA27.js} +1 -1
  91. package/chunks/{chunk-SXJ2E33J.js → chunk-V6VMUJ47.js} +1 -1
  92. package/chunks/{chunk-5UFCNJGN.js → chunk-VG2ZINTO.js} +1 -1
  93. package/chunks/{chunk-JPPPJ2GN.js → chunk-VJI6MHWX.js} +1 -1
  94. package/chunks/{chunk-AUI7WVSU.js → chunk-VOBNHBCJ.js} +1 -1
  95. package/chunks/{chunk-3BNJDZHU.js → chunk-VUEZWMI4.js} +1 -1
  96. package/chunks/{chunk-LMNKCL55.js → chunk-W7ZX6WB3.js} +2 -2
  97. package/chunks/{chunk-HVS6V2UZ.js → chunk-WA2LKUVP.js} +1 -1
  98. package/chunks/{chunk-7APLU2XE.js → chunk-WFFCJ5PF.js} +1 -1
  99. package/chunks/{chunk-3TD4WAG5.js → chunk-WQY5GE65.js} +1 -1
  100. package/chunks/{chunk-3YWRMF6C.js → chunk-WSESLSKK.js} +1 -1
  101. package/chunks/{chunk-NILCQMZ7.js → chunk-XFJV5NYT.js} +1 -1
  102. package/chunks/{chunk-LGBGUITT.js → chunk-XIYLRIW4.js} +1 -1
  103. package/chunks/{chunk-KS74L67R.js → chunk-XQ2NYKJH.js} +1 -1
  104. package/chunks/{chunk-JB2NOB6W.js → chunk-Y3VRWG52.js} +1 -1
  105. package/chunks/{chunk-GVZ6D2NL.js → chunk-YBISME5B.js} +1 -1
  106. package/chunks/{chunk-2C2253QI.js → chunk-YJNWPSB3.js} +1 -1
  107. package/chunks/{chunk-O2T3GQ6F.js → chunk-YWVV5STA.js} +1 -1
  108. package/chunks/{chunk-MAQZSOHI.js → chunk-ZH4J3FL6.js} +1 -1
  109. package/chunks/{chunk-THNEKTPK.js → chunk-ZSKCF6DI.js} +1 -1
  110. package/chunks/{chunk-Z7BAHKO5.js → chunk-ZW6456SD.js} +1 -1
  111. package/chunks/{chunk-DMSZ2TB3.js → chunk-ZWM3LLT7.js} +1 -1
  112. package/chunks/{codex-subagent-executor-DQ5LQQWO.js → codex-subagent-executor-DWWT7246.js} +1 -1
  113. package/chunks/{config-utils-CY6HLKZ5.js → config-utils-NGZB522W.js} +1 -1
  114. package/chunks/{contextCommand-SGBWI7O6.js → contextCommand-7QCW2YNX.js} +1 -1
  115. package/chunks/{core-runtime-4DP27LCC.js → core-runtime-PSVNDJPD.js} +1 -1
  116. package/chunks/{create-sub-session-ECPDZMBX.js → create-sub-session-JTSEMEJE.js} +1 -1
  117. package/chunks/{cron-create-OO4OG3EI.js → cron-create-VGIDTUMX.js} +1 -1
  118. package/chunks/{daemon-git-worktree-guard-OYDNHT7P.js → daemon-git-worktree-guard-IQRGS7IH.js} +1 -1
  119. package/chunks/{daemon-status-provider-JGDLXPC6.js → daemon-status-provider-R4MYCYPG.js} +1 -1
  120. package/chunks/{daemon-trust-policy-5HRARS54.js → daemon-trust-policy-VAUKFZ2N.js} +1 -1
  121. package/chunks/{daemon-trust-policy-monitor-RM7FVIIC.js → daemon-trust-policy-monitor-E5HIO6RP.js} +1 -1
  122. package/chunks/{deferred-core-runtime-3CXBZIOG.js → deferred-core-runtime-FLOFQJPU.js} +1 -1
  123. package/chunks/{edit-DJPESAAY.js → edit-OOVQUGKV.js} +1 -1
  124. package/chunks/{enterPlanMode-IHBLRIF3.js → enterPlanMode-AUWVTQLT.js} +1 -1
  125. package/chunks/{environment-JN5SD347.js → environment-RM5OXYP4.js} +1 -1
  126. package/chunks/{errors-NUJCME3Y.js → errors-CLDJGHVD.js} +1 -1
  127. package/chunks/{execution-tool-I3SWG6I3.js → execution-tool-JFBVOKPW.js} +1 -1
  128. package/chunks/{execution-worker-62UZMAMJ.js → execution-worker-MNJZD72W.js} +1 -1
  129. package/chunks/{exitPlanMode-JIC4V3FE.js → exitPlanMode-PC6XG4TW.js} +1 -1
  130. package/chunks/{fast-path-NIOIL5YI.js → fast-path-V4DN3CRZ.js} +1 -1
  131. package/chunks/{glob-EQ4QNAHF.js → glob-DTZROBDS.js} +1 -1
  132. package/chunks/{goal-tools-DYTTSBQG.js → goal-tools-FUVGTY33.js} +1 -1
  133. package/chunks/{handleAutoUpdate-44BTG5L5.js → handleAutoUpdate-U4LVTHGU.js} +1 -1
  134. package/chunks/{i18n-FTHZAHCT.js → i18n-XOKNDFYP.js} +1 -1
  135. package/chunks/{initializer-MSGKXC75.js → initializer-XBR5J4CY.js} +1 -1
  136. package/chunks/{installationInfo-4XJMJJYU.js → installationInfo-4AOEOUI6.js} +1 -1
  137. package/chunks/{interactive-mod-session-DFLRYO2Q.js → interactive-mod-session-YGZK2JK2.js} +1 -1
  138. package/chunks/{list-ODZ7Z6VI.js → list-TCGKVPH4.js} +1 -1
  139. package/chunks/{llm-O64DHKP7.js → llm-SKFTN5UN.js} +4 -4
  140. package/chunks/{llm-content-generator-SK24I6QS.js → llm-content-generator-GWHXT3WS.js} +1 -1
  141. package/chunks/{loadedSettingsAdapter-6PEBUZT5.js → loadedSettingsAdapter-ZALZGZE7.js} +1 -1
  142. package/chunks/{local-ED3UEKWP.js → local-RWTWYS5Z.js} +1 -1
  143. package/chunks/{local-execution-environment-PUKES5LO.js → local-execution-environment-R6JWLD65.js} +1 -1
  144. package/chunks/{loggingContentGenerator-UHOJVSRR.js → loggingContentGenerator-UJV6QFOY.js} +1 -1
  145. package/chunks/{loop-wakeup-NSJQETPZ.js → loop-wakeup-BU2RRYHA.js} +1 -1
  146. package/chunks/{manage-memory-5RRB6FLH.js → manage-memory-XI57JN4T.js} +1 -1
  147. package/chunks/{managed-execution-engine-MZAP7SK6.js → managed-execution-engine-BA5PABMP.js} +1 -1
  148. package/chunks/{managed-local-serve-XMES3HXL.js → managed-local-serve-MFKN22K6.js} +1 -1
  149. package/chunks/{managed-npm-update-R5KGY7G2.js → managed-npm-update-ZGN43NUA.js} +1 -1
  150. package/chunks/{managed-runtime-attestation-worker-O2KNHHV6.js → managed-runtime-attestation-worker-YN2VBGYN.js} +1 -1
  151. package/chunks/{managed-runtime-bootstrap-HOTLM6DE.js → managed-runtime-bootstrap-SGQVMUJE.js} +1 -1
  152. package/chunks/{managed-runtime-session-worker-QZX44ZTD.js → managed-runtime-session-worker-4UMF3VBY.js} +1 -1
  153. package/chunks/{managed-runtime-ssh-worker-U425WQ65.js → managed-runtime-ssh-worker-7XA6KRBN.js} +1 -1
  154. package/chunks/{managed-session-authority-THHDHCBP.js → managed-session-authority-IJGYAOEL.js} +1 -1
  155. package/chunks/{mcp-AR7EK4WY.js → mcp-V3L7B5YK.js} +1 -1
  156. package/chunks/{memory-C2TSF6BK.js → memory-3T6FPNAK.js} +1 -1
  157. package/chunks/{model-call-collection-25WR55OH.js → model-call-collection-WTTITWWM.js} +1 -1
  158. package/chunks/{model-configuration-KC7DQGKV.js → model-configuration-T6SSGI4J.js} +1 -1
  159. package/chunks/{modelConfigUtils-QEHMVLSQ.js → modelConfigUtils-TQA25QJC.js} +1 -1
  160. package/chunks/{monitor-PDQUZD23.js → monitor-5ZAOJSEE.js} +1 -1
  161. package/chunks/{nonInteractiveCli-WY2YFONU.js → nonInteractiveCli-YFINLVA7.js} +1 -1
  162. package/chunks/{nonInteractiveToolExecutor-7RJZYPHJ.js → nonInteractiveToolExecutor-DE3WACL5.js} +1 -1
  163. package/chunks/{notebook-edit-P4ITXF5H.js → notebook-edit-UK6HBRO3.js} +1 -1
  164. package/chunks/{omni-AYUPB2QM.js → omni-65LF5QK4.js} +1 -1
  165. package/chunks/{openaiContentGenerator-V5IK4ITO.js → openaiContentGenerator-HX7NCSV5.js} +1 -1
  166. package/chunks/{openaiResponsesContentGenerator-DYDH6KWT.js → openaiResponsesContentGenerator-CFA6U6Y5.js} +1 -1
  167. package/chunks/{pidfile-INPBL2DK.js → pidfile-ZVKJUNTZ.js} +1 -1
  168. package/chunks/{processUtils-J4UDEDS4.js → processUtils-VS6CJT7E.js} +1 -1
  169. package/chunks/{prompt-terminal-ledger-QLOQWHYE.js → prompt-terminal-ledger-UF5RDB57.js} +1 -1
  170. package/chunks/{qwenContentGenerator-RU43XKKB.js → qwenContentGenerator-GM3ZSI7E.js} +1 -1
  171. package/chunks/{reactive-degrade-2Q3Z3KAR.js → reactive-degrade-TSAQWZ5F.js} +1 -1
  172. package/chunks/{read-file-472BQ25I.js → read-file-J267NT45.js} +1 -1
  173. package/chunks/{resumeHistoryUtils-7SUFKZDC.js → resumeHistoryUtils-IM46VFDV.js} +1 -1
  174. package/chunks/{review-WX52IWJR.js → review-4B64XTCL.js} +1 -1
  175. package/chunks/{ripGrep-4GPGLKAM.js → ripGrep-YLOSXO7P.js} +1 -1
  176. package/chunks/{run-qwen-serve-MXK4RBKL.js → run-qwen-serve-SAHEC44O.js} +1 -1
  177. package/chunks/{runtime-WHU3AGFT.js → runtime-SJDZHV6J.js} +1 -1
  178. package/chunks/{sandboxConfig-7DBXEQJH.js → sandboxConfig-47EXXMUA.js} +1 -1
  179. package/chunks/{scheduled-tasks-O5RV6G6U.js → scheduled-tasks-E6RCTUUS.js} +1 -1
  180. package/chunks/{scheduler-HLMS5LR5.js → scheduler-SE3IWIWA.js} +1 -1
  181. package/chunks/{search-memory-PYND7ZX3.js → search-memory-2W7VJC4Q.js} +1 -1
  182. package/chunks/{send-message-TMLYTQOI.js → send-message-63YGQP6G.js} +1 -1
  183. package/chunks/{serve-EBNBRAME.js → serve-F4ML2WNL.js} +1 -1
  184. package/chunks/{server-63BRDBL5.js → server-S56IB4TT.js} +3 -3
  185. package/chunks/{session-XB6J4CZD.js → session-2CUVLZ4H.js} +1 -1
  186. package/chunks/{session-attachments-root-PFK475N2.js → session-attachments-root-FINBX7K5.js} +1 -1
  187. package/chunks/{session-execution-engine-selector-P6TJTCKR.js → session-execution-engine-selector-UGC7DGUN.js} +1 -1
  188. package/chunks/{session-pr-refresh-PM7VAQTV.js → session-pr-refresh-KQLQ4MZY.js} +1 -1
  189. package/chunks/{sessionService-PO3LLZIZ.js → sessionService-Q6N7LF7Z.js} +1 -1
  190. package/chunks/{settings-JDQSRXP3.js → settings-23I6H76E.js} +1 -1
  191. package/chunks/{shell-JCEX3HKM.js → shell-IUECEVVY.js} +1 -1
  192. package/chunks/{skill-JSZBONIZ.js → skill-YKUETMPC.js} +1 -1
  193. package/chunks/{skill-settings-YGFG6GPN.js → skill-settings-ODYXOPCA.js} +1 -1
  194. package/chunks/{spawnChannel-VIIWSWTL.js → spawnChannel-7XU2SRWZ.js} +1 -1
  195. package/chunks/{standalone-update-2UU6FQZL.js → standalone-update-SWI2RL3L.js} +1 -1
  196. package/chunks/{start-opentui-ui-OSZZNSLY.js → start-opentui-ui-T53QJGCH.js} +1 -1
  197. package/chunks/{startInteractiveUI-FFH66MYH.js → startInteractiveUI-USTZGQOE.js} +1 -1
  198. package/chunks/{team-create-TKGDJ3NU.js → team-create-4A2XUE3D.js} +1 -1
  199. package/chunks/{team-plan-approval-3VJF4G6Z.js → team-plan-approval-4TS5CYN6.js} +1 -1
  200. package/chunks/{terminal-image-renderer-T3VJRZGP.js → terminal-image-renderer-C7553YV6.js} +1 -1
  201. package/chunks/{theme-manager-ZGUFLFUI.js → theme-manager-GTW75GOO.js} +1 -1
  202. package/chunks/{tool-call-3EQS5KSE.js → tool-call-YTUMWL3A.js} +1 -1
  203. package/chunks/{tool-result-media-7LFNVQ6E.js → tool-result-media-JYOYBX4J.js} +1 -1
  204. package/chunks/{tool-search-UDZ4S7T5.js → tool-search-Y4XTT2WF.js} +1 -1
  205. package/chunks/{total-session-admission-U4MII4RA.js → total-session-admission-EMJ5NRGL.js} +1 -1
  206. package/chunks/{trustedFolders-2NQJCIN3.js → trustedFolders-YG6WAVRE.js} +1 -1
  207. package/chunks/{update-relaunch-YKLWSCLC.js → update-relaunch-4QYQRCP4.js} +1 -1
  208. package/chunks/{updateCheck-YDLTQQRU.js → updateCheck-VRFPSX4G.js} +1 -1
  209. package/chunks/{upload-config-5QQKWF4O.js → upload-config-UCKGUYYQ.js} +1 -1
  210. package/chunks/{useAutoAcceptIndicator-AJS4WTU2.js → useAutoAcceptIndicator-2VGLKD7B.js} +1 -1
  211. package/chunks/{validateNonInterActiveAuth-AETOT7ZW.js → validateNonInterActiveAuth-GGMQXKKU.js} +1 -1
  212. package/chunks/{version-IB6DLRAG.js → version-Y46PG7II.js} +1 -1
  213. package/chunks/{web-fetch-LS3QARNR.js → web-fetch-7MPU555L.js} +1 -1
  214. package/chunks/{web-search-FGHRIVEB.js → web-search-HU2CL2X2.js} +1 -1
  215. package/chunks/{workflow-FX6XNETQ.js → workflow-U3D34QQX.js} +1 -1
  216. package/chunks/{workflow-ancestor-trust-5XXBGN6F.js → workflow-ancestor-trust-OWC4YTMR.js} +1 -1
  217. package/chunks/{workspace-agents-UJKLYPUK.js → workspace-agents-KHLAWSAR.js} +1 -1
  218. package/chunks/{workspace-providers-status-4JOHMTAW.js → workspace-providers-status-T57SE3YX.js} +1 -1
  219. package/chunks/{workspace-recovery-worker-XFEYQ4TP.js → workspace-recovery-worker-VYQ723ZE.js} +1 -1
  220. package/chunks/{workspace-registration-store-LWAPVNYC.js → workspace-registration-store-I7PR3A2Y.js} +1 -1
  221. package/chunks/{workspace-registry-M7OC376O.js → workspace-registry-YYUBXCLH.js} +1 -1
  222. package/chunks/{workspace-runtime-coordinator-CYHIL47L.js → workspace-runtime-coordinator-5ICAQO7W.js} +1 -1
  223. package/chunks/{workspace-service-43VZZ56B.js → workspace-service-YROWXOLQ.js} +1 -1
  224. package/chunks/{workspace-skills-status-V2TT6UJQ.js → workspace-skills-status-DKKQDTZJ.js} +1 -1
  225. package/chunks/{workspace-trust-reconciler-YZ4AG5ZW.js → workspace-trust-reconciler-3FPMUZDO.js} +1 -1
  226. package/chunks/{write-file-TGEH5MEZ.js → write-file-7QQVYFDT.js} +1 -1
  227. package/chunks/{zoom-image-TT6R7H2H.js → zoom-image-WL5EB6Q7.js} +1 -1
  228. package/cli.js +2 -2
  229. package/execution-worker.js +1 -1
  230. package/export-transcript-document.js +1 -1
  231. package/package.json +3 -3
  232. package/web-shell/assets/{PierreFilePreview-OsApm5-S.js → PierreFilePreview-BZ17f56_.js} +1 -1
  233. package/web-shell/assets/{SpreadsheetPreview-I1v1EzV7.js → SpreadsheetPreview-Bvkvr_5u.js} +1 -1
  234. package/web-shell/assets/{WorkspaceFileBrowser-BO6aug7i.js → WorkspaceFileBrowser-BJ_I4Uoz.js} +1 -1
  235. package/web-shell/assets/{abnfDiagram-VCTEODGH-DxuLMyN0.js → abnfDiagram-VCTEODGH-iuaBM15V.js} +1 -1
  236. package/web-shell/assets/{agents-route-CSJf6QPO.js → agents-route-CycwfNSC.js} +1 -1
  237. package/web-shell/assets/{arc-3--LekYQ.js → arc-C0lt8n55.js} +1 -1
  238. package/web-shell/assets/{architectureDiagram-5GKGNRK7-Dihq4uto.js → architectureDiagram-5GKGNRK7-Bw326d-A.js} +1 -1
  239. package/web-shell/assets/{blockDiagram-NRAW4CY4-BnaRPM2o.js → blockDiagram-NRAW4CY4-CHtFgBjV.js} +1 -1
  240. package/web-shell/assets/{c4Diagram-UCG6FXSJ-BtC94eMa.js → c4Diagram-UCG6FXSJ-Bx66oJT9.js} +1 -1
  241. package/web-shell/assets/channel-CRJuO00u.js +1 -0
  242. package/web-shell/assets/{chunk-2Q5K7J3B-2ZTXWP6M.js → chunk-2Q5K7J3B-BIshvfa_.js} +1 -1
  243. package/web-shell/assets/{chunk-5VM5RSS4-DBh7DP1F.js → chunk-5VM5RSS4-BZeRS6uD.js} +1 -1
  244. package/web-shell/assets/{chunk-F27PBJKO-xzqbWXBw.js → chunk-F27PBJKO-El-CGY2R.js} +1 -1
  245. package/web-shell/assets/{chunk-G27WJ6UU-DxnCrpxK.js → chunk-G27WJ6UU-DO8ZfQL_.js} +1 -1
  246. package/web-shell/assets/{chunk-JWPE2WC7-BPjRsozm.js → chunk-JWPE2WC7-yYFrrKAj.js} +1 -1
  247. package/web-shell/assets/{chunk-LCL6LL3I-Q2HgB3lf.js → chunk-LCL6LL3I-BFGuOKN0.js} +1 -1
  248. package/web-shell/assets/{chunk-POPQ4Y6H-9tlPaKu-.js → chunk-POPQ4Y6H-GRHK6sdV.js} +1 -1
  249. package/web-shell/assets/{chunk-SVP7TREG-DkNdOHCU.js → chunk-SVP7TREG-DwDu6GqZ.js} +1 -1
  250. package/web-shell/assets/{chunk-XXDRQBXY-D0G-Dhfi.js → chunk-XXDRQBXY-RoNDjkIy.js} +1 -1
  251. package/web-shell/assets/classDiagram-DTDB5LWJ-pPPByLA7.js +1 -0
  252. package/web-shell/assets/classDiagram-v2-JRS7N3AN-pPPByLA7.js +1 -0
  253. package/web-shell/assets/{cose-bilkent-JH36ORCC-Ck0tHxul.js → cose-bilkent-JH36ORCC-CYNiiONE.js} +1 -1
  254. package/web-shell/assets/{cynefin-OW5HDTMX-a4-NTMHi.js → cynefin-OW5HDTMX-DC1_lDIG.js} +1 -1
  255. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-Pg41Zbf2.js → cynefinDiagram-5FMLGOSQ-D2VxKm2n.js} +1 -1
  256. package/web-shell/assets/{dagre-3AP2YEHR-DT_ZmqkF.js → dagre-3AP2YEHR-C4_BHzpM.js} +1 -1
  257. package/web-shell/assets/{diagram-S7CK7UJ4-hapdMOl1.js → diagram-S7CK7UJ4-BpAO4-Gv.js} +1 -1
  258. package/web-shell/assets/{diagram-UQ7AKVKN-YZ0nbk56.js → diagram-UQ7AKVKN-DqUsFdsX.js} +1 -1
  259. package/web-shell/assets/{diagram-VSXAHHWV-DA_yNbWy.js → diagram-VSXAHHWV-DcMXIYMy.js} +1 -1
  260. package/web-shell/assets/{diagram-VX7I27RA-DoULuCLT.js → diagram-VX7I27RA-I3nr09ex.js} +1 -1
  261. package/web-shell/assets/{diagram-Z3DM3KII-B5c9o9zL.js → diagram-Z3DM3KII-CN-gvsTo.js} +1 -1
  262. package/web-shell/assets/{docx-preview-BulxdBjs.js → docx-preview-31J6RsS0.js} +1 -1
  263. package/web-shell/assets/{ebnfDiagram-PWID7BFC-B5hgIg3m.js → ebnfDiagram-PWID7BFC-DOQvLWlM.js} +1 -1
  264. package/web-shell/assets/{erDiagram-SSCWMZ5O-BEfEPozi.js → erDiagram-SSCWMZ5O-Cb5ijFZh.js} +1 -1
  265. package/web-shell/assets/{flowDiagram-A5DVABFB-CQHNk92v.js → flowDiagram-A5DVABFB-BecqqjnZ.js} +1 -1
  266. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-BabdVgIM.js → ganttDiagram-EL5Y4UJY-DWY5vzQl.js} +1 -1
  267. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-ujRZBFUo.js → gitGraphDiagram-WWUBYQGX-DqBnsZmZ.js} +1 -1
  268. package/web-shell/assets/{index-B9uXebIR.js → index-DDmiUW3b.js} +6 -6
  269. package/web-shell/assets/{index-DSZXdZnu.js → index-DabH7kHA.js} +1 -1
  270. package/web-shell/assets/{infoDiagram-RXCK75RN-CUHj9jJC.js → infoDiagram-RXCK75RN-MlotyOdT.js} +1 -1
  271. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-CulW_q81.js → ishikawaDiagram-5VMMS53U-Daq_85C7.js} +1 -1
  272. package/web-shell/assets/{journeyDiagram-EYS64GPL-BR46CvRQ.js → journeyDiagram-EYS64GPL-OipivCxL.js} +1 -1
  273. package/web-shell/assets/{kanban-definition-3QL26DDD-HAoUqzFy.js → kanban-definition-3QL26DDD-zqaz7dLu.js} +1 -1
  274. package/web-shell/assets/{layout-DYLl7fyA.js → layout-Bi3msQMQ.js} +1 -1
  275. package/web-shell/assets/{linear-DPXABjDZ.js → linear-D4gPORvD.js} +1 -1
  276. package/web-shell/assets/{mermaid.core-Bi30Gi0n.js → mermaid.core-BUnytF7a.js} +6 -6
  277. package/web-shell/assets/{mindmap-definition-FBJOCRG2-B1_lUq4o.js → mindmap-definition-FBJOCRG2-B_X4iChu.js} +1 -1
  278. package/web-shell/assets/{pegDiagram-XKGWAZYB-Cy8tjJJC.js → pegDiagram-XKGWAZYB-z4wYBoBW.js} +1 -1
  279. package/web-shell/assets/{pieDiagram-E7YTZNPT-D6waLVVi.js → pieDiagram-E7YTZNPT-Dvyg6FYo.js} +1 -1
  280. package/web-shell/assets/{quadrantDiagram-AXDQQJYC--6ehi_FI.js → quadrantDiagram-AXDQQJYC-CJBWU2Dk.js} +1 -1
  281. package/web-shell/assets/{railroadDiagram-O6MQD6OU-BhLy40X4.js → railroadDiagram-O6MQD6OU-Dl_An1O0.js} +1 -1
  282. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BVNXTgNP.js → requirementDiagram-EFPCY7ZU-Tw8FwaYU.js} +1 -1
  283. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-BHgTytxV.js → sankeyDiagram-P5KCCOFB-BCPCkbR0.js} +1 -1
  284. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-CgOsTvhu.js → sequenceDiagram-WJ2MYXX4-DDj7uFTG.js} +1 -1
  285. package/web-shell/assets/{sizeCapture-X5ZJPWSS-vCQBQ5FI.js → sizeCapture-X5ZJPWSS-B9eVSpKb.js} +1 -1
  286. package/web-shell/assets/{stateDiagram-HBIQ2CUA-DytMYRWJ.js → stateDiagram-HBIQ2CUA-Bf4BZP_V.js} +1 -1
  287. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-BPJi6Gre.js +1 -0
  288. package/web-shell/assets/{swimlanes-XN3QIQJK-CTGnifOP.js → swimlanes-XN3QIQJK-dyTWsZFj.js} +1 -1
  289. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-Bw4NRtJQ.js +8 -0
  290. package/web-shell/assets/{timeline-definition-24CTP7MA-DEJ1cbn2.js → timeline-definition-24CTP7MA-DVl1A4uL.js} +1 -1
  291. package/web-shell/assets/{vennDiagram-4TSXK5OY-K1e4SjS0.js → vennDiagram-4TSXK5OY-Boosxy9D.js} +1 -1
  292. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-DEX-GkRp.js → wardleyDiagram-VM6X3IG4-C6wlY8jy.js} +1 -1
  293. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-B6wYXreH.js → xychartDiagram-S5SC5T6Z-CkzZe3ro.js} +1 -1
  294. package/web-shell/index.html +1 -1
  295. package/web-shell/sw.js +1 -1
  296. package/web-shell/assets/channel-CLVrtVFX.js +0 -1
  297. package/web-shell/assets/classDiagram-DTDB5LWJ-Df2T70oB.js +0 -1
  298. package/web-shell/assets/classDiagram-v2-JRS7N3AN-Df2T70oB.js +0 -1
  299. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-CcjUJGng.js +0 -1
  300. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-Dt8NvQfX.js +0 -8
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{MAX_AGENT_MESSAGE_DISPLAY_TEXT_CHARS,MAX_AGENT_MESSAGE_STEPS,SESSION_AGENTS_SCHEMA_VERSION}from"./chunk-6JFC5M6B.js";import{STORE_DIR_MODE,STORE_FILE_OPTIONS,getAgentsDir,withAgentStoreTransaction}from"./chunk-LIIMQ4DI.js";import{atomicWriteJSON}from"./chunk-BMHYEQTI.js";import{isNodeError}from"./chunk-XYB7GC5U.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__name}from"./chunk-KBWJGX7I.js";init_esbuild_shims();import*as fs from"node:fs/promises";import*as path from"node:path";var SESSIONS_DIRNAME="sessions";var MAX_TERMINAL_SESSION_AGENT_RUNS=50;var SESSION_ID_PATTERN=/^[0-9a-fA-F-]{32,36}$/;var MAX_BINDING_SCAN_FILES=5e3;var LIVE_RUN_STATUSES=new Set(["queued","running","awaiting_approval"]);var TERMINAL_RUN_STATUSES=new Set(["completed","failed","cancelled","offline"]);var EXECUTING_RUN_STATUSES=new Set(["running","awaiting_approval"]);function isValidSessionAgentsSessionId(value){return typeof value==="string"&&SESSION_ID_PATTERN.test(value)}__name(isValidSessionAgentsSessionId,"isValidSessionAgentsSessionId");function isTerminalSessionAgentRunStatus(status){return TERMINAL_RUN_STATUSES.has(status)}__name(isTerminalSessionAgentRunStatus,"isTerminalSessionAgentRunStatus");function getSessionAgentsDir(projectRoot){return path.join(getAgentsDir(projectRoot),SESSIONS_DIRNAME)}__name(getSessionAgentsDir,"getSessionAgentsDir");function getSessionAgentsFilePath(projectRoot,sessionId){if(!isValidSessionAgentsSessionId(sessionId)){throw new Error(`Invalid chat session id: ${JSON.stringify(sessionId)}`)}return path.join(getSessionAgentsDir(projectRoot),`${sessionId}.json`)}__name(getSessionAgentsFilePath,"getSessionAgentsFilePath");function emptySessionAgentsFile(sessionId){return{schemaVersion:SESSION_AGENTS_SCHEMA_VERSION,sessionId,bindings:{},runs:[]}}__name(emptySessionAgentsFile,"emptySessionAgentsFile");function isRecord(value){return typeof value==="object"&&value!==null&&!Array.isArray(value)}__name(isRecord,"isRecord");function isOptionalString(value){return value===void 0||typeof value==="string"}__name(isOptionalString,"isOptionalString");function isOptionalFiniteNumber(value){return value===void 0||typeof value==="number"&&Number.isFinite(value)}__name(isOptionalFiniteNumber,"isOptionalFiniteNumber");var RUN_STATUSES=new Set([...LIVE_RUN_STATUSES,...TERMINAL_RUN_STATUSES]);function isValidBinding(value){return isRecord(value)&&typeof value["agentId"]==="string"&&isOptionalString(value["nativeSessionId"])&&isOptionalString(value["runtimeId"])&&(value["program"]===void 0||value["program"]==="qwen"||value["program"]==="claude"||value["program"]==="codex")&&isOptionalString(value["readThroughRecordId"])&&(value["remotePersona"]===void 0||isRecord(value["remotePersona"])&&typeof value["remotePersona"]["name"]==="string"&&isOptionalString(value["remotePersona"]["instructions"])&&isOptionalString(value["remotePersona"]["model"]))}__name(isValidBinding,"isValidBinding");function isValidLease(value){return value===void 0||isRecord(value)&&typeof value["hostId"]==="string"&&typeof value["leaseId"]==="string"&&typeof value["attempt"]==="number"&&typeof value["expiresAt"]==="number"&&isOptionalFiniteNumber(value["lastSequence"])}__name(isValidLease,"isValidLease");function isValidRun(value){return isRecord(value)&&typeof value["id"]==="string"&&typeof value["agentId"]==="string"&&typeof value["status"]==="string"&&RUN_STATUSES.has(value["status"])&&Array.isArray(value["triggerRecordIds"])&&value["triggerRecordIds"].every(id=>typeof id==="string")&&typeof value["chainDepth"]==="number"&&typeof value["createdAt"]==="number"&&typeof value["attempts"]==="number"&&isOptionalFiniteNumber(value["startedAt"])&&isOptionalFiniteNumber(value["endedAt"])&&isOptionalString(value["error"])&&isOptionalFiniteNumber(value["totalTokens"])&&isOptionalString(value["retryOf"])&&isOptionalString(value["squadId"])&&(value["recorded"]===void 0||typeof value["recorded"]==="boolean")&&isValidLease(value["lease"])}__name(isValidRun,"isValidRun");function isValidEngagement(value){return isRecord(value)&&typeof value["leaderAgentId"]==="string"&&typeof value["startedByRecordId"]==="string"&&Array.isArray(value["outstandingRunIds"])&&value["outstandingRunIds"].every(id=>typeof id==="string")&&(value["pendingWakeRunIds"]===void 0||Array.isArray(value["pendingWakeRunIds"])&&value["pendingWakeRunIds"].every(id=>typeof id==="string"))&&typeof value["active"]==="boolean"}__name(isValidEngagement,"isValidEngagement");function isValidEngagements(value){return value===void 0||isRecord(value)&&Object.values(value).every(isValidEngagement)}__name(isValidEngagements,"isValidEngagements");function parseSessionAgentsFile(value,sessionId,filePath="<memory>"){if(!isRecord(value)){throw new Error(`Malformed session agents file ${filePath}.`)}if(value["schemaVersion"]!==SESSION_AGENTS_SCHEMA_VERSION){throw new Error(`Unsupported session agents schema version ${JSON.stringify(value["schemaVersion"])} in ${filePath}; this build supports version ${SESSION_AGENTS_SCHEMA_VERSION}.`)}if(value["sessionId"]!==sessionId){throw new Error(`Session agents file ${filePath} names session ${JSON.stringify(value["sessionId"])}, not ${sessionId}.`)}const bindings=value["bindings"];const runs=value["runs"];if(!isRecord(bindings)||!Object.entries(bindings).every(([agentId,binding])=>isValidBinding(binding)&&binding.agentId===agentId)||!Array.isArray(runs)||!runs.every(isValidRun)||!isValidEngagements(value["squads"])){throw new Error(`Malformed session agents file ${filePath}.`)}const squads=value["squads"];return{schemaVersion:SESSION_AGENTS_SCHEMA_VERSION,sessionId,bindings,runs,...typeof value["chainTokens"]==="number"&&Number.isFinite(value["chainTokens"])&&value["chainTokens"]>0?{chainTokens:value["chainTokens"]}:{},...squads&&Object.keys(squads).length>0?{squads}:{}}}__name(parseSessionAgentsFile,"parseSessionAgentsFile");function trimTerminalRuns(runs,max=MAX_TERMINAL_SESSION_AGENT_RUNS){const terminal=runs.filter(run=>isTerminalSessionAgentRunStatus(run.status)&&run.recorded!==false);if(terminal.length<=max)return[...runs];const keep=new Set([...terminal].sort((a,b)=>(b.endedAt??b.createdAt)-(a.endedAt??a.createdAt)).slice(0,Math.max(0,max)).map(run=>run.id));return runs.filter(run=>!isTerminalSessionAgentRunStatus(run.status)||run.recorded===false||keep.has(run.id))}__name(trimTerminalRuns,"trimTerminalRuns");async function readFileUnlocked(projectRoot,sessionId){const filePath=getSessionAgentsFilePath(projectRoot,sessionId);let raw;try{raw=await fs.readFile(filePath,"utf-8")}catch(error){if(isNodeError(error)&&error.code==="ENOENT")return void 0;throw error}let parsed;try{parsed=JSON.parse(raw)}catch{throw new Error(`Malformed JSON in ${filePath} \u2014 fix or delete the file; refusing to treat it as empty.`)}return parseSessionAgentsFile(parsed,sessionId,filePath)}__name(readFileUnlocked,"readFileUnlocked");async function readSessionAgents(projectRoot,sessionId){return await readFileUnlocked(projectRoot,sessionId)??emptySessionAgentsFile(sessionId)}__name(readSessionAgents,"readSessionAgents");async function updateSessionAgents(projectRoot,sessionId,mutate){const filePath=getSessionAgentsFilePath(projectRoot,sessionId);return withAgentStoreTransaction(projectRoot,async()=>{const current=await readFileUnlocked(projectRoot,sessionId)??emptySessionAgentsFile(sessionId);const mutated=mutate(current)??current;const next={schemaVersion:SESSION_AGENTS_SCHEMA_VERSION,sessionId,bindings:mutated.bindings,runs:trimTerminalRuns(mutated.runs),...mutated.chainTokens?{chainTokens:mutated.chainTokens}:{},...mutated.squads&&Object.keys(mutated.squads).length>0?{squads:mutated.squads}:{}};parseSessionAgentsFile(next,sessionId,filePath);await fs.mkdir(getSessionAgentsDir(projectRoot),{recursive:true,mode:STORE_DIR_MODE});await atomicWriteJSON(filePath,next,STORE_FILE_OPTIONS);return next})}__name(updateSessionAgents,"updateSessionAgents");async function writeSessionAgents(projectRoot,file){return updateSessionAgents(projectRoot,file.sessionId,()=>({...file,bindings:structuredClone(file.bindings),runs:structuredClone(file.runs),...file.chainTokens?{chainTokens:file.chainTokens}:{},...file.squads?{squads:structuredClone(file.squads)}:{}}))}__name(writeSessionAgents,"writeSessionAgents");async function listSessionAgentsSessionIds(projectRoot){let names;try{names=await fs.readdir(getSessionAgentsDir(projectRoot))}catch(error){if(isNodeError(error)&&error.code==="ENOENT")return[];throw error}return names.filter(name=>name.endsWith(".json")).map(name=>name.slice(0,-".json".length)).filter(isValidSessionAgentsSessionId)}__name(listSessionAgentsSessionIds,"listSessionAgentsSessionIds");async function findSessionAgentBinding(projectRoot,nativeSessionId,agentId){if(!nativeSessionId||!agentId)return void 0;const ids=(await listSessionAgentsSessionIds(projectRoot)).slice(0,MAX_BINDING_SCAN_FILES);for(const chatSessionId of ids){let file;try{file=await readFileUnlocked(projectRoot,chatSessionId)}catch{continue}if(!file)continue;const binding=file.bindings[agentId];if(binding?.nativeSessionId!==nativeSessionId)continue;const run=file.runs.find(candidate=>candidate.agentId===agentId&&EXECUTING_RUN_STATUSES.has(candidate.status)&&candidate.lease===void 0);if(!run)continue;return{chatSessionId,agentId,runId:run.id,status:run.status,...binding.remotePersona?{remotePersona:{...binding.remotePersona}}:{}}}return void 0}__name(findSessionAgentBinding,"findSessionAgentBinding");function canReuseNativeSession(binding,runtimeId,program){return(binding.runtimeId===void 0||binding.runtimeId===runtimeId)&&(binding.program===void 0||binding.program===program)}__name(canReuseNativeSession,"canReuseNativeSession");init_esbuild_shims();var MAX_EXTERNAL_RECORD_KEY_LENGTH=256;var MAX_EXTERNAL_RECORD_TEXT_LENGTH=65536;var MAX_EXTERNAL_RECORD_DISPLAY_TEXT_LENGTH=MAX_AGENT_MESSAGE_DISPLAY_TEXT_CHARS;var MAX_EXTERNAL_RECORD_STEPS=MAX_AGENT_MESSAGE_STEPS;var MAX_EXTERNAL_RECORD_MENTION_IDS=32;var MAX_EXTERNAL_RECORD_ID_LENGTH=256;var MAX_EXTERNAL_RECORD_STEP_TITLE_LENGTH=1024;var STEP_STATUSES=new Set(["running","completed","failed"]);var TERMINAL_STATUSES=new Set(["completed","failed","cancelled","offline"]);function isObject(value){return typeof value==="object"&&value!==null&&!Array.isArray(value)}__name(isObject,"isObject");function isBoundedString(value,maxLength){return typeof value==="string"&&value.length<=maxLength}__name(isBoundedString,"isBoundedString");function isIdList(value){return Array.isArray(value)&&value.length<=MAX_EXTERNAL_RECORD_MENTION_IDS&&value.every(id=>isBoundedString(id,MAX_EXTERNAL_RECORD_ID_LENGTH))}__name(isIdList,"isIdList");function isSteps(value){return Array.isArray(value)&&value.length<=MAX_EXTERNAL_RECORD_STEPS&&value.every(step=>isObject(step)&&isBoundedString(step["id"],MAX_EXTERNAL_RECORD_ID_LENGTH)&&typeof step["title"]==="string"&&step["title"].length<=MAX_EXTERNAL_RECORD_STEP_TITLE_LENGTH&&typeof step["status"]==="string"&&STEP_STATUSES.has(step["status"]))}__name(isSteps,"isSteps");function isAuthor(value){return isObject(value)&&typeof value["agentId"]==="string"&&value["agentId"].length>0&&typeof value["name"]==="string"&&value["name"].length>0}__name(isAuthor,"isAuthor");function parseSessionExternalRecordParams(params){const{kind,recordKey,modelText,payload}=params;if(kind!=="agent_mention"&&kind!=="agent_message"){return"Invalid external record kind"}if(typeof recordKey!=="string"||recordKey.length===0||recordKey.length>MAX_EXTERNAL_RECORD_KEY_LENGTH){return"Invalid or missing external record recordKey"}if(typeof modelText!=="string"||modelText.length===0||modelText.length>MAX_EXTERNAL_RECORD_TEXT_LENGTH){return"Invalid or missing external record modelText"}if(!isObject(payload)||typeof payload["displayText"]!=="string"||payload["displayText"].length>(kind==="agent_message"?MAX_EXTERNAL_RECORD_DISPLAY_TEXT_LENGTH:MAX_EXTERNAL_RECORD_TEXT_LENGTH)){return"Invalid or missing external record payload.displayText"}if(kind==="agent_message"){if(!isAuthor(payload["author"])){return"Invalid agent_message payload.author"}if(typeof payload["runId"]!=="string"||payload["runId"].length===0){return"Invalid agent_message payload.runId"}if(typeof payload["status"]!=="string"||!TERMINAL_STATUSES.has(payload["status"])){return"Invalid agent_message payload.status"}if(payload["steps"]!==void 0&&!isSteps(payload["steps"])){return"Invalid or oversized agent_message payload.steps"}return{kind,recordKey,modelText,payload}}if(!isIdList(payload["mentionedAgentIds"])){return"Invalid or oversized agent_mention payload.mentionedAgentIds"}if(payload["mentionedSquadIds"]!==void 0&&!isIdList(payload["mentionedSquadIds"])){return"Invalid or oversized agent_mention payload.mentionedSquadIds"}if(payload["author"]!==void 0&&!isAuthor(payload["author"])){return"Invalid agent_mention payload.author"}return{kind,recordKey,modelText,payload}}__name(parseSessionExternalRecordParams,"parseSessionExternalRecordParams");export{isValidSessionAgentsSessionId,isTerminalSessionAgentRunStatus,trimTerminalRuns,readSessionAgents,updateSessionAgents,writeSessionAgents,listSessionAgentsSessionIds,findSessionAgentBinding,canReuseNativeSession,MAX_EXTERNAL_RECORD_TEXT_LENGTH,MAX_EXTERNAL_RECORD_MENTION_IDS,MAX_EXTERNAL_RECORD_ID_LENGTH,MAX_EXTERNAL_RECORD_STEP_TITLE_LENGTH,parseSessionExternalRecordParams};
3
+ import{MAX_AGENT_MESSAGE_DISPLAY_TEXT_CHARS,MAX_AGENT_MESSAGE_STEPS,SESSION_AGENTS_SCHEMA_VERSION}from"./chunk-A5TAAMML.js";import{STORE_DIR_MODE,STORE_FILE_OPTIONS,getAgentsDir,withAgentStoreTransaction}from"./chunk-LZNBHBAJ.js";import{atomicWriteJSON}from"./chunk-BMHYEQTI.js";import{isNodeError}from"./chunk-XYB7GC5U.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__name}from"./chunk-KBWJGX7I.js";init_esbuild_shims();import*as fs from"node:fs/promises";import*as path from"node:path";var SESSIONS_DIRNAME="sessions";var MAX_TERMINAL_SESSION_AGENT_RUNS=50;var SESSION_ID_PATTERN=/^[0-9a-fA-F-]{32,36}$/;var MAX_BINDING_SCAN_FILES=5e3;var LIVE_RUN_STATUSES=new Set(["queued","running","awaiting_approval"]);var TERMINAL_RUN_STATUSES=new Set(["completed","failed","cancelled","offline"]);var EXECUTING_RUN_STATUSES=new Set(["running","awaiting_approval"]);function isValidSessionAgentsSessionId(value){return typeof value==="string"&&SESSION_ID_PATTERN.test(value)}__name(isValidSessionAgentsSessionId,"isValidSessionAgentsSessionId");function isTerminalSessionAgentRunStatus(status){return TERMINAL_RUN_STATUSES.has(status)}__name(isTerminalSessionAgentRunStatus,"isTerminalSessionAgentRunStatus");function getSessionAgentsDir(projectRoot){return path.join(getAgentsDir(projectRoot),SESSIONS_DIRNAME)}__name(getSessionAgentsDir,"getSessionAgentsDir");function getSessionAgentsFilePath(projectRoot,sessionId){if(!isValidSessionAgentsSessionId(sessionId)){throw new Error(`Invalid chat session id: ${JSON.stringify(sessionId)}`)}return path.join(getSessionAgentsDir(projectRoot),`${sessionId}.json`)}__name(getSessionAgentsFilePath,"getSessionAgentsFilePath");function emptySessionAgentsFile(sessionId){return{schemaVersion:SESSION_AGENTS_SCHEMA_VERSION,sessionId,bindings:{},runs:[]}}__name(emptySessionAgentsFile,"emptySessionAgentsFile");function isRecord(value){return typeof value==="object"&&value!==null&&!Array.isArray(value)}__name(isRecord,"isRecord");function isOptionalString(value){return value===void 0||typeof value==="string"}__name(isOptionalString,"isOptionalString");function isOptionalFiniteNumber(value){return value===void 0||typeof value==="number"&&Number.isFinite(value)}__name(isOptionalFiniteNumber,"isOptionalFiniteNumber");var RUN_STATUSES=new Set([...LIVE_RUN_STATUSES,...TERMINAL_RUN_STATUSES]);function isValidBinding(value){return isRecord(value)&&typeof value["agentId"]==="string"&&isOptionalString(value["nativeSessionId"])&&isOptionalString(value["runtimeId"])&&(value["program"]===void 0||value["program"]==="qwen"||value["program"]==="claude"||value["program"]==="codex")&&isOptionalString(value["readThroughRecordId"])&&(value["remotePersona"]===void 0||isRecord(value["remotePersona"])&&typeof value["remotePersona"]["name"]==="string"&&isOptionalString(value["remotePersona"]["instructions"])&&isOptionalString(value["remotePersona"]["model"]))}__name(isValidBinding,"isValidBinding");function isValidLease(value){return value===void 0||isRecord(value)&&typeof value["hostId"]==="string"&&typeof value["leaseId"]==="string"&&typeof value["attempt"]==="number"&&typeof value["expiresAt"]==="number"&&isOptionalFiniteNumber(value["lastSequence"])}__name(isValidLease,"isValidLease");function isValidRun(value){return isRecord(value)&&typeof value["id"]==="string"&&typeof value["agentId"]==="string"&&typeof value["status"]==="string"&&RUN_STATUSES.has(value["status"])&&Array.isArray(value["triggerRecordIds"])&&value["triggerRecordIds"].every(id=>typeof id==="string")&&typeof value["chainDepth"]==="number"&&typeof value["createdAt"]==="number"&&typeof value["attempts"]==="number"&&isOptionalFiniteNumber(value["startedAt"])&&isOptionalFiniteNumber(value["endedAt"])&&isOptionalString(value["error"])&&isOptionalFiniteNumber(value["totalTokens"])&&isOptionalString(value["retryOf"])&&isOptionalString(value["squadId"])&&(value["recorded"]===void 0||typeof value["recorded"]==="boolean")&&isValidLease(value["lease"])}__name(isValidRun,"isValidRun");function isValidEngagement(value){return isRecord(value)&&typeof value["leaderAgentId"]==="string"&&typeof value["startedByRecordId"]==="string"&&Array.isArray(value["outstandingRunIds"])&&value["outstandingRunIds"].every(id=>typeof id==="string")&&(value["pendingWakeRunIds"]===void 0||Array.isArray(value["pendingWakeRunIds"])&&value["pendingWakeRunIds"].every(id=>typeof id==="string"))&&typeof value["active"]==="boolean"}__name(isValidEngagement,"isValidEngagement");function isValidEngagements(value){return value===void 0||isRecord(value)&&Object.values(value).every(isValidEngagement)}__name(isValidEngagements,"isValidEngagements");function parseSessionAgentsFile(value,sessionId,filePath="<memory>"){if(!isRecord(value)){throw new Error(`Malformed session agents file ${filePath}.`)}if(value["schemaVersion"]!==SESSION_AGENTS_SCHEMA_VERSION){throw new Error(`Unsupported session agents schema version ${JSON.stringify(value["schemaVersion"])} in ${filePath}; this build supports version ${SESSION_AGENTS_SCHEMA_VERSION}.`)}if(value["sessionId"]!==sessionId){throw new Error(`Session agents file ${filePath} names session ${JSON.stringify(value["sessionId"])}, not ${sessionId}.`)}const bindings=value["bindings"];const runs=value["runs"];if(!isRecord(bindings)||!Object.entries(bindings).every(([agentId,binding])=>isValidBinding(binding)&&binding.agentId===agentId)||!Array.isArray(runs)||!runs.every(isValidRun)||!isValidEngagements(value["squads"])){throw new Error(`Malformed session agents file ${filePath}.`)}const squads=value["squads"];return{schemaVersion:SESSION_AGENTS_SCHEMA_VERSION,sessionId,bindings,runs,...typeof value["chainTokens"]==="number"&&Number.isFinite(value["chainTokens"])&&value["chainTokens"]>0?{chainTokens:value["chainTokens"]}:{},...squads&&Object.keys(squads).length>0?{squads}:{}}}__name(parseSessionAgentsFile,"parseSessionAgentsFile");function trimTerminalRuns(runs,max=MAX_TERMINAL_SESSION_AGENT_RUNS){const terminal=runs.filter(run=>isTerminalSessionAgentRunStatus(run.status)&&run.recorded!==false);if(terminal.length<=max)return[...runs];const keep=new Set([...terminal].sort((a,b)=>(b.endedAt??b.createdAt)-(a.endedAt??a.createdAt)).slice(0,Math.max(0,max)).map(run=>run.id));return runs.filter(run=>!isTerminalSessionAgentRunStatus(run.status)||run.recorded===false||keep.has(run.id))}__name(trimTerminalRuns,"trimTerminalRuns");async function readFileUnlocked(projectRoot,sessionId){const filePath=getSessionAgentsFilePath(projectRoot,sessionId);let raw;try{raw=await fs.readFile(filePath,"utf-8")}catch(error){if(isNodeError(error)&&error.code==="ENOENT")return void 0;throw error}let parsed;try{parsed=JSON.parse(raw)}catch{throw new Error(`Malformed JSON in ${filePath} \u2014 fix or delete the file; refusing to treat it as empty.`)}return parseSessionAgentsFile(parsed,sessionId,filePath)}__name(readFileUnlocked,"readFileUnlocked");async function readSessionAgents(projectRoot,sessionId){return await readFileUnlocked(projectRoot,sessionId)??emptySessionAgentsFile(sessionId)}__name(readSessionAgents,"readSessionAgents");async function updateSessionAgents(projectRoot,sessionId,mutate){const filePath=getSessionAgentsFilePath(projectRoot,sessionId);return withAgentStoreTransaction(projectRoot,async()=>{const current=await readFileUnlocked(projectRoot,sessionId)??emptySessionAgentsFile(sessionId);const mutated=mutate(current)??current;const next={schemaVersion:SESSION_AGENTS_SCHEMA_VERSION,sessionId,bindings:mutated.bindings,runs:trimTerminalRuns(mutated.runs),...mutated.chainTokens?{chainTokens:mutated.chainTokens}:{},...mutated.squads&&Object.keys(mutated.squads).length>0?{squads:mutated.squads}:{}};parseSessionAgentsFile(next,sessionId,filePath);await fs.mkdir(getSessionAgentsDir(projectRoot),{recursive:true,mode:STORE_DIR_MODE});await atomicWriteJSON(filePath,next,STORE_FILE_OPTIONS);return next})}__name(updateSessionAgents,"updateSessionAgents");async function writeSessionAgents(projectRoot,file){return updateSessionAgents(projectRoot,file.sessionId,()=>({...file,bindings:structuredClone(file.bindings),runs:structuredClone(file.runs),...file.chainTokens?{chainTokens:file.chainTokens}:{},...file.squads?{squads:structuredClone(file.squads)}:{}}))}__name(writeSessionAgents,"writeSessionAgents");async function listSessionAgentsSessionIds(projectRoot){let names;try{names=await fs.readdir(getSessionAgentsDir(projectRoot))}catch(error){if(isNodeError(error)&&error.code==="ENOENT")return[];throw error}return names.filter(name=>name.endsWith(".json")).map(name=>name.slice(0,-".json".length)).filter(isValidSessionAgentsSessionId)}__name(listSessionAgentsSessionIds,"listSessionAgentsSessionIds");async function findSessionAgentBinding(projectRoot,nativeSessionId,agentId){if(!nativeSessionId||!agentId)return void 0;const ids=(await listSessionAgentsSessionIds(projectRoot)).slice(0,MAX_BINDING_SCAN_FILES);for(const chatSessionId of ids){let file;try{file=await readFileUnlocked(projectRoot,chatSessionId)}catch{continue}if(!file)continue;const binding=file.bindings[agentId];if(binding?.nativeSessionId!==nativeSessionId)continue;const run=file.runs.find(candidate=>candidate.agentId===agentId&&EXECUTING_RUN_STATUSES.has(candidate.status)&&candidate.lease===void 0);if(!run)continue;return{chatSessionId,agentId,runId:run.id,status:run.status,...binding.remotePersona?{remotePersona:{...binding.remotePersona}}:{}}}return void 0}__name(findSessionAgentBinding,"findSessionAgentBinding");function canReuseNativeSession(binding,runtimeId,program){return(binding.runtimeId===void 0||binding.runtimeId===runtimeId)&&(binding.program===void 0||binding.program===program)}__name(canReuseNativeSession,"canReuseNativeSession");init_esbuild_shims();var MAX_EXTERNAL_RECORD_KEY_LENGTH=256;var MAX_EXTERNAL_RECORD_TEXT_LENGTH=65536;var MAX_EXTERNAL_RECORD_DISPLAY_TEXT_LENGTH=MAX_AGENT_MESSAGE_DISPLAY_TEXT_CHARS;var MAX_EXTERNAL_RECORD_STEPS=MAX_AGENT_MESSAGE_STEPS;var MAX_EXTERNAL_RECORD_MENTION_IDS=32;var MAX_EXTERNAL_RECORD_ID_LENGTH=256;var MAX_EXTERNAL_RECORD_STEP_TITLE_LENGTH=1024;var STEP_STATUSES=new Set(["running","completed","failed"]);var TERMINAL_STATUSES=new Set(["completed","failed","cancelled","offline"]);function isObject(value){return typeof value==="object"&&value!==null&&!Array.isArray(value)}__name(isObject,"isObject");function isBoundedString(value,maxLength){return typeof value==="string"&&value.length<=maxLength}__name(isBoundedString,"isBoundedString");function isIdList(value){return Array.isArray(value)&&value.length<=MAX_EXTERNAL_RECORD_MENTION_IDS&&value.every(id=>isBoundedString(id,MAX_EXTERNAL_RECORD_ID_LENGTH))}__name(isIdList,"isIdList");function isSteps(value){return Array.isArray(value)&&value.length<=MAX_EXTERNAL_RECORD_STEPS&&value.every(step=>isObject(step)&&isBoundedString(step["id"],MAX_EXTERNAL_RECORD_ID_LENGTH)&&typeof step["title"]==="string"&&step["title"].length<=MAX_EXTERNAL_RECORD_STEP_TITLE_LENGTH&&typeof step["status"]==="string"&&STEP_STATUSES.has(step["status"]))}__name(isSteps,"isSteps");function isAuthor(value){return isObject(value)&&typeof value["agentId"]==="string"&&value["agentId"].length>0&&typeof value["name"]==="string"&&value["name"].length>0}__name(isAuthor,"isAuthor");function parseSessionExternalRecordParams(params){const{kind,recordKey,modelText,payload}=params;if(kind!=="agent_mention"&&kind!=="agent_message"){return"Invalid external record kind"}if(typeof recordKey!=="string"||recordKey.length===0||recordKey.length>MAX_EXTERNAL_RECORD_KEY_LENGTH){return"Invalid or missing external record recordKey"}if(typeof modelText!=="string"||modelText.length===0||modelText.length>MAX_EXTERNAL_RECORD_TEXT_LENGTH){return"Invalid or missing external record modelText"}if(!isObject(payload)||typeof payload["displayText"]!=="string"||payload["displayText"].length>(kind==="agent_message"?MAX_EXTERNAL_RECORD_DISPLAY_TEXT_LENGTH:MAX_EXTERNAL_RECORD_TEXT_LENGTH)){return"Invalid or missing external record payload.displayText"}if(kind==="agent_message"){if(!isAuthor(payload["author"])){return"Invalid agent_message payload.author"}if(typeof payload["runId"]!=="string"||payload["runId"].length===0){return"Invalid agent_message payload.runId"}if(typeof payload["status"]!=="string"||!TERMINAL_STATUSES.has(payload["status"])){return"Invalid agent_message payload.status"}if(payload["steps"]!==void 0&&!isSteps(payload["steps"])){return"Invalid or oversized agent_message payload.steps"}return{kind,recordKey,modelText,payload}}if(!isIdList(payload["mentionedAgentIds"])){return"Invalid or oversized agent_mention payload.mentionedAgentIds"}if(payload["mentionedSquadIds"]!==void 0&&!isIdList(payload["mentionedSquadIds"])){return"Invalid or oversized agent_mention payload.mentionedSquadIds"}if(payload["author"]!==void 0&&!isAuthor(payload["author"])){return"Invalid agent_mention payload.author"}return{kind,recordKey,modelText,payload}}__name(parseSessionExternalRecordParams,"parseSessionExternalRecordParams");export{isValidSessionAgentsSessionId,isTerminalSessionAgentRunStatus,trimTerminalRuns,readSessionAgents,updateSessionAgents,writeSessionAgents,listSessionAgentsSessionIds,findSessionAgentBinding,canReuseNativeSession,MAX_EXTERNAL_RECORD_TEXT_LENGTH,MAX_EXTERNAL_RECORD_MENTION_IDS,MAX_EXTERNAL_RECORD_ID_LENGTH,MAX_EXTERNAL_RECORD_STEP_TITLE_LENGTH,parseSessionExternalRecordParams};
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2026 Qwen Team
@@ -1,10 +1,10 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{appEvents}from"./chunk-YL3N2UGG.js";import{loadUndici}from"./chunk-XKSB7VTV.js";import{CUSTOM_SANDBOX_IMAGE_ENV_VAR,HOST_UPDATE_RELAUNCH_ENV_VAR,SKIP_UPDATE_CHECK_ENV_VAR,requestUpdateOnExit}from"./chunk-HVS6V2UZ.js";import{IdeClient}from"./chunk-LIIMQ4DI.js";import{getAllProviderBaseUrls}from"./chunk-OVPEAKOQ.js";import{detectRuntime,getOrCreateSharedDispatcher,preloadRuntimeFetchModule,redactProxyCredentials}from"./chunk-ZZZAYAJW.js";import{initializeTelemetry}from"./chunk-XHV5HLJS.js";import{recordStartupEvent}from"./chunk-H4XFFVZ2.js";import{createDebugLogger}from"./chunk-JAUJI56S.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__name}from"./chunk-KBWJGX7I.js";init_esbuild_shims();init_esbuild_shims();var debugLogger=createDebugLogger("PRECONNECT");var preconnectFired=false;var preconnectInFlight;var DEFAULT_BASE_URLS={openai:"https://api.openai.com","qwen-oauth":"https://coding.dashscope.aliyuncs.com",anthropic:"https://api.anthropic.com",dashscope:"https://dashscope.aliyuncs.com"};var ALL_DEFAULT_URLS=[...Object.values(DEFAULT_BASE_URLS),...getAllProviderBaseUrls()];function shouldSkipPreconnect(){if(process.env["NODE_EXTRA_CA_CERTS"]){debugLogger.debug("Skipping preconnect: custom CA certificate configured");return true}return false}__name(shouldSkipPreconnect,"shouldSkipPreconnect");function isInSandboxMode(){return process.env["SANDBOX"]!==void 0}__name(isInSandboxMode,"isInSandboxMode");function isDefaultBaseUrl(baseUrl){const normalizedInput=baseUrl.toLowerCase().replace(/^https?:\/\//,"").replace(/\/+$/,"");return ALL_DEFAULT_URLS.some(defaultUrl=>{const normalizedDefault=defaultUrl.toLowerCase().replace(/^https?:\/\//,"").replace(/\/+$/,"");return normalizedInput===normalizedDefault||normalizedInput.startsWith(normalizedDefault+"/")})}__name(isDefaultBaseUrl,"isDefaultBaseUrl");function getPreconnectTargetUrl(authType,resolvedBaseUrl){if(resolvedBaseUrl&&/^https?:\/\//i.test(resolvedBaseUrl)){if(isDefaultBaseUrl(resolvedBaseUrl)){return resolvedBaseUrl}debugLogger.debug("Skipping preconnect: resolved baseUrl is not a default URL");return void 0}if(authType&&DEFAULT_BASE_URLS[authType]){return DEFAULT_BASE_URLS[authType]}return void 0}__name(getPreconnectTargetUrl,"getPreconnectTargetUrl");function preconnectApi(authType,options={}){if(preconnectFired){return}if(process.env["QWEN_CODE_DISABLE_PRECONNECT"]==="1"){debugLogger.debug("Preconnect disabled by environment variable");preconnectFired=true;return}if(isInSandboxMode()){debugLogger.debug("Skipping preconnect: sandbox mode detected");preconnectFired=true;return}if(shouldSkipPreconnect()){preconnectFired=true;return}if(detectRuntime()!=="node"){debugLogger.debug("Skipping preconnect: unsupported runtime");preconnectFired=true;return}if(!options.proxy){debugLogger.debug("Skipping preconnect dispatcher: no proxy configured");return}const proxy=options.proxy;const targetUrl=getPreconnectTargetUrl(authType,options.resolvedBaseUrl);if(!targetUrl){debugLogger.debug("No target URL for preconnect");return}preconnectFired=true;debugLogger.debug(`Preconnecting to: ${targetUrl}`);preconnectInFlight=(async()=>{await preloadRuntimeFetchModule();const dispatcher=getOrCreateSharedDispatcher(proxy);const{fetch:undiciFetch}=await loadUndici();await undiciFetch(targetUrl,{method:"HEAD",signal:AbortSignal.timeout(5e3),headers:{"User-Agent":"QwenCode-Preconnect/1.0"},dispatcher});debugLogger.debug("Preconnect completed")})().catch(error=>{const redactedError=redactProxyCredentials(String(error));debugLogger.debug(`Preconnect failed (ignored): ${redactedError}`)})}__name(preconnectApi,"preconnectApi");var debugLogger2=createDebugLogger("STARTUP_PREFETCH");var DEFERRED_IDE_CONNECT_TIMEOUT_MS=15e3;var earlyStarted=new WeakSet;var postRenderStarted=new WeakSet;function withTimeout(promise,name,timeoutMs,onTimeout=()=>{}){let timeoutId;let timedOut=false;const runTimeoutCleanup=__name(()=>{void Promise.resolve().then(onTimeout).catch(err=>{debugLogger2.debug(`${name} timeout cleanup failed:`,err)})},"runTimeoutCleanup");const timeout=new Promise((_,reject)=>{timeoutId=setTimeout(()=>{timedOut=true;runTimeoutCleanup();reject(new Error(`${name} timed out after ${timeoutMs}ms`))},timeoutMs);timeoutId.unref?.()});void promise.then(()=>{if(timedOut){runTimeoutCleanup()}},err=>{if(timedOut){debugLogger2.debug(`${name} underlying error after timeout:`,err)}});return Promise.race([promise,timeout]).finally(()=>{if(timeoutId){clearTimeout(timeoutId)}})}__name(withTimeout,"withTimeout");function runDeferredTask(name,task){recordStartupEvent("startup_prefetch_started",{name});void Promise.resolve().then(task).then(()=>{recordStartupEvent("startup_prefetch_completed",{name})}).catch(err=>{recordStartupEvent("startup_prefetch_failed",{name});debugLogger2.warn(`${name} failed:`,err)})}__name(runDeferredTask,"runDeferredTask");async function disconnectIdeAfterDeferredTimeout(){const ideClient=await IdeClient.getInstance();await ideClient.disconnect()}__name(disconnectIdeAfterDeferredTimeout,"disconnectIdeAfterDeferredTimeout");function startEarlyStartupPrefetches(config){if(earlyStarted.has(config))return;earlyStarted.add(config);try{const modelsConfig=config.getModelsConfig();const authType=modelsConfig.getCurrentAuthType();const resolvedBaseUrl=modelsConfig.getGenerationConfig().baseUrl;const proxy=config.getProxy();preconnectApi(authType,{resolvedBaseUrl,proxy})}catch(error){debugLogger2.debug(`Preconnect skipped due to error getting authType: ${error}`)}}__name(startEarlyStartupPrefetches,"startEarlyStartupPrefetches");var UPDATE_CHECK_DELAY_MS=3e3;function startPostRenderPrefetches(config,settings,options={}){if(postRenderStarted.has(config))return;postRenderStarted.add(config);if(settings.merged.general?.enableAutoUpdate!==false&&process.env[SKIP_UPDATE_CHECK_ENV_VAR]!=="true"&&!process.env[CUSTOM_SANDBOX_IMAGE_ENV_VAR]){runDeferredTask("update_check",async()=>{await new Promise(resolve=>{setTimeout(resolve,UPDATE_CHECK_DELAY_MS).unref?.()});const[{checkForUpdatesDetailed,describeUpdateCheckFailure},{handleAutoUpdate},{getInstallationInfo},{updateEventEmitter},{t}]=await Promise.all([import("./updateCheck-YDLTQQRU.js"),import("./handleAutoUpdate-44BTG5L5.js"),import("./installationInfo-4XJMJJYU.js"),import("./updateEventEmitter-HCGBOCP2.js"),import("./i18n-FTHZAHCT.js")]);const updateCheckSkippedMessage=__name(error=>t("Update check skipped ({{reason}}) \u2014 run /update to retry.",{reason:describeUpdateCheckFailure(error)}),"updateCheckSkippedMessage");try{const result=await checkForUpdatesDetailed();if(result.status==="update"){const projectRoot=config.getProjectRoot();const hostUpdateRelaunch=process.env[HOST_UPDATE_RELAUNCH_ENV_VAR];if(hostUpdateRelaunch==="true"){updateEventEmitter.emit("update-info",{message:`${result.info.message}
3
+ import{appEvents}from"./chunk-5X7S4AE6.js";import{loadUndici}from"./chunk-XKSB7VTV.js";import{CUSTOM_SANDBOX_IMAGE_ENV_VAR,HOST_UPDATE_RELAUNCH_ENV_VAR,SKIP_UPDATE_CHECK_ENV_VAR,requestUpdateOnExit}from"./chunk-WA2LKUVP.js";import{IdeClient}from"./chunk-LZNBHBAJ.js";import{getAllProviderBaseUrls}from"./chunk-BDQOLT37.js";import{detectRuntime,getOrCreateSharedDispatcher,preloadRuntimeFetchModule,redactProxyCredentials}from"./chunk-ZZZAYAJW.js";import{initializeTelemetry}from"./chunk-XHV5HLJS.js";import{recordStartupEvent}from"./chunk-H4XFFVZ2.js";import{createDebugLogger}from"./chunk-JAUJI56S.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__name}from"./chunk-KBWJGX7I.js";init_esbuild_shims();init_esbuild_shims();var debugLogger=createDebugLogger("PRECONNECT");var preconnectFired=false;var preconnectInFlight;var DEFAULT_BASE_URLS={openai:"https://api.openai.com","qwen-oauth":"https://coding.dashscope.aliyuncs.com",anthropic:"https://api.anthropic.com",dashscope:"https://dashscope.aliyuncs.com"};var ALL_DEFAULT_URLS=[...Object.values(DEFAULT_BASE_URLS),...getAllProviderBaseUrls()];function shouldSkipPreconnect(){if(process.env["NODE_EXTRA_CA_CERTS"]){debugLogger.debug("Skipping preconnect: custom CA certificate configured");return true}return false}__name(shouldSkipPreconnect,"shouldSkipPreconnect");function isInSandboxMode(){return process.env["SANDBOX"]!==void 0}__name(isInSandboxMode,"isInSandboxMode");function isDefaultBaseUrl(baseUrl){const normalizedInput=baseUrl.toLowerCase().replace(/^https?:\/\//,"").replace(/\/+$/,"");return ALL_DEFAULT_URLS.some(defaultUrl=>{const normalizedDefault=defaultUrl.toLowerCase().replace(/^https?:\/\//,"").replace(/\/+$/,"");return normalizedInput===normalizedDefault||normalizedInput.startsWith(normalizedDefault+"/")})}__name(isDefaultBaseUrl,"isDefaultBaseUrl");function getPreconnectTargetUrl(authType,resolvedBaseUrl){if(resolvedBaseUrl&&/^https?:\/\//i.test(resolvedBaseUrl)){if(isDefaultBaseUrl(resolvedBaseUrl)){return resolvedBaseUrl}debugLogger.debug("Skipping preconnect: resolved baseUrl is not a default URL");return void 0}if(authType&&DEFAULT_BASE_URLS[authType]){return DEFAULT_BASE_URLS[authType]}return void 0}__name(getPreconnectTargetUrl,"getPreconnectTargetUrl");function preconnectApi(authType,options={}){if(preconnectFired){return}if(process.env["QWEN_CODE_DISABLE_PRECONNECT"]==="1"){debugLogger.debug("Preconnect disabled by environment variable");preconnectFired=true;return}if(isInSandboxMode()){debugLogger.debug("Skipping preconnect: sandbox mode detected");preconnectFired=true;return}if(shouldSkipPreconnect()){preconnectFired=true;return}if(detectRuntime()!=="node"){debugLogger.debug("Skipping preconnect: unsupported runtime");preconnectFired=true;return}if(!options.proxy){debugLogger.debug("Skipping preconnect dispatcher: no proxy configured");return}const proxy=options.proxy;const targetUrl=getPreconnectTargetUrl(authType,options.resolvedBaseUrl);if(!targetUrl){debugLogger.debug("No target URL for preconnect");return}preconnectFired=true;debugLogger.debug(`Preconnecting to: ${targetUrl}`);preconnectInFlight=(async()=>{await preloadRuntimeFetchModule();const dispatcher=getOrCreateSharedDispatcher(proxy);const{fetch:undiciFetch}=await loadUndici();await undiciFetch(targetUrl,{method:"HEAD",signal:AbortSignal.timeout(5e3),headers:{"User-Agent":"QwenCode-Preconnect/1.0"},dispatcher});debugLogger.debug("Preconnect completed")})().catch(error=>{const redactedError=redactProxyCredentials(String(error));debugLogger.debug(`Preconnect failed (ignored): ${redactedError}`)})}__name(preconnectApi,"preconnectApi");var debugLogger2=createDebugLogger("STARTUP_PREFETCH");var DEFERRED_IDE_CONNECT_TIMEOUT_MS=15e3;var earlyStarted=new WeakSet;var postRenderStarted=new WeakSet;function withTimeout(promise,name,timeoutMs,onTimeout=()=>{}){let timeoutId;let timedOut=false;const runTimeoutCleanup=__name(()=>{void Promise.resolve().then(onTimeout).catch(err=>{debugLogger2.debug(`${name} timeout cleanup failed:`,err)})},"runTimeoutCleanup");const timeout=new Promise((_,reject)=>{timeoutId=setTimeout(()=>{timedOut=true;runTimeoutCleanup();reject(new Error(`${name} timed out after ${timeoutMs}ms`))},timeoutMs);timeoutId.unref?.()});void promise.then(()=>{if(timedOut){runTimeoutCleanup()}},err=>{if(timedOut){debugLogger2.debug(`${name} underlying error after timeout:`,err)}});return Promise.race([promise,timeout]).finally(()=>{if(timeoutId){clearTimeout(timeoutId)}})}__name(withTimeout,"withTimeout");function runDeferredTask(name,task){recordStartupEvent("startup_prefetch_started",{name});void Promise.resolve().then(task).then(()=>{recordStartupEvent("startup_prefetch_completed",{name})}).catch(err=>{recordStartupEvent("startup_prefetch_failed",{name});debugLogger2.warn(`${name} failed:`,err)})}__name(runDeferredTask,"runDeferredTask");async function disconnectIdeAfterDeferredTimeout(){const ideClient=await IdeClient.getInstance();await ideClient.disconnect()}__name(disconnectIdeAfterDeferredTimeout,"disconnectIdeAfterDeferredTimeout");function startEarlyStartupPrefetches(config){if(earlyStarted.has(config))return;earlyStarted.add(config);try{const modelsConfig=config.getModelsConfig();const authType=modelsConfig.getCurrentAuthType();const resolvedBaseUrl=modelsConfig.getGenerationConfig().baseUrl;const proxy=config.getProxy();preconnectApi(authType,{resolvedBaseUrl,proxy})}catch(error){debugLogger2.debug(`Preconnect skipped due to error getting authType: ${error}`)}}__name(startEarlyStartupPrefetches,"startEarlyStartupPrefetches");var UPDATE_CHECK_DELAY_MS=3e3;function startPostRenderPrefetches(config,settings,options={}){if(postRenderStarted.has(config))return;postRenderStarted.add(config);if(settings.merged.general?.enableAutoUpdate!==false&&process.env[SKIP_UPDATE_CHECK_ENV_VAR]!=="true"&&!process.env[CUSTOM_SANDBOX_IMAGE_ENV_VAR]){runDeferredTask("update_check",async()=>{await new Promise(resolve=>{setTimeout(resolve,UPDATE_CHECK_DELAY_MS).unref?.()});const[{checkForUpdatesDetailed,describeUpdateCheckFailure},{handleAutoUpdate},{getInstallationInfo},{updateEventEmitter},{t}]=await Promise.all([import("./updateCheck-VRFPSX4G.js"),import("./handleAutoUpdate-U4LVTHGU.js"),import("./installationInfo-4AOEOUI6.js"),import("./updateEventEmitter-HCGBOCP2.js"),import("./i18n-XOKNDFYP.js")]);const updateCheckSkippedMessage=__name(error=>t("Update check skipped ({{reason}}) \u2014 run /update to retry.",{reason:describeUpdateCheckFailure(error)}),"updateCheckSkippedMessage");try{const result=await checkForUpdatesDetailed();if(result.status==="update"){const projectRoot=config.getProjectRoot();const hostUpdateRelaunch=process.env[HOST_UPDATE_RELAUNCH_ENV_VAR];if(hostUpdateRelaunch==="true"){updateEventEmitter.emit("update-info",{message:`${result.info.message}
4
4
  ${t("Run /update to install the update on the host.")}`});return}if(hostUpdateRelaunch==="false"){updateEventEmitter.emit("update-info",{message:`${result.info.message}
5
5
  ${t("Update Qwen Code on the host, then restart the sandbox.")}`});return}const installationInfo=getInstallationInfo(projectRoot,true);if(installationInfo.packageManager==="npm"){void handleAutoUpdate(result.info,settings,projectRoot);return}if(installationInfo.updateCommand||installationInfo.isStandalone&&installationInfo.standaloneDir){if(requestUpdateOnExit()){updateEventEmitter.emit("update-info",{message:`${result.info.message}
6
6
  ${t("The update will be installed after you exit this session.")}`})}else{updateEventEmitter.emit("update-info",{message:`${result.info.message}
7
- ${t("Run /update to install the update.")}`})}}else{void handleAutoUpdate(result.info,settings,projectRoot)}}else if(result.status==="error"){updateEventEmitter.emit("update-failed",{message:updateCheckSkippedMessage(result.error),severity:"warning"})}}catch(error){updateEventEmitter.emit("update-failed",{message:updateCheckSkippedMessage(error),severity:"warning"});throw error}})}if(options.connectIde&&config.getIdeMode()){runDeferredTask("ide_connect",async()=>{appEvents.emit("startup-ide-connection-status-changed",{state:"connecting"});try{const{connectIdeForStartup}=await import("./initializer-MSGKXC75.js");await withTimeout(connectIdeForStartup(config),"ide_connect",DEFERRED_IDE_CONNECT_TIMEOUT_MS,disconnectIdeAfterDeferredTimeout);appEvents.emit("startup-ide-connection-status-changed",{state:"connected"})}catch(err){appEvents.emit("startup-ide-connection-status-changed",{state:"failed",message:err instanceof Error?err.message:String(err)});throw err}})}if(options.initializeTelemetry){runDeferredTask("telemetry_init",()=>initializeTelemetry(config))}if(config.isInteractive()&&settings.merged.general?.batchAutoCollect!==false){runDeferredTask("batch_auto_collect",async()=>{const[{startBatchAutoCollect},{resolveEndpoint},{updateEventEmitter}]=await Promise.all([import("./batch-auto-collect-NM3QHAM7.js"),import("./batch-JQZ3TOHA.js"),import("./updateEventEmitter-HCGBOCP2.js")]);startBatchAutoCollect({projectRoot:config.getWorkingDir(),notify:__name(message=>updateEventEmitter.emit("update-info",{message}),"notify"),resolveEndpoint:__name(()=>resolveEndpoint(process.env,{settings:settings.merged,warn:__name(message=>debugLogger2.debug(message),"warn")}),"resolveEndpoint"),log:__name(message=>debugLogger2.debug(message),"log")})})}if(config.isInteractive()){runDeferredTask("background_housekeeping",async()=>{const{startBackgroundHousekeeping}=await import("./scheduler-HLMS5LR5.js");startBackgroundHousekeeping(config,settings)})}}__name(startPostRenderPrefetches,"startPostRenderPrefetches");export{startEarlyStartupPrefetches,startPostRenderPrefetches};
7
+ ${t("Run /update to install the update.")}`})}}else{void handleAutoUpdate(result.info,settings,projectRoot)}}else if(result.status==="error"){updateEventEmitter.emit("update-failed",{message:updateCheckSkippedMessage(result.error),severity:"warning"})}}catch(error){updateEventEmitter.emit("update-failed",{message:updateCheckSkippedMessage(error),severity:"warning"});throw error}})}if(options.connectIde&&config.getIdeMode()){runDeferredTask("ide_connect",async()=>{appEvents.emit("startup-ide-connection-status-changed",{state:"connecting"});try{const{connectIdeForStartup}=await import("./initializer-XBR5J4CY.js");await withTimeout(connectIdeForStartup(config),"ide_connect",DEFERRED_IDE_CONNECT_TIMEOUT_MS,disconnectIdeAfterDeferredTimeout);appEvents.emit("startup-ide-connection-status-changed",{state:"connected"})}catch(err){appEvents.emit("startup-ide-connection-status-changed",{state:"failed",message:err instanceof Error?err.message:String(err)});throw err}})}if(options.initializeTelemetry){runDeferredTask("telemetry_init",()=>initializeTelemetry(config))}if(config.isInteractive()&&settings.merged.general?.batchAutoCollect!==false){runDeferredTask("batch_auto_collect",async()=>{const[{startBatchAutoCollect},{resolveEndpoint},{updateEventEmitter}]=await Promise.all([import("./batch-auto-collect-NM3QHAM7.js"),import("./batch-MBEWETXN.js"),import("./updateEventEmitter-HCGBOCP2.js")]);startBatchAutoCollect({projectRoot:config.getWorkingDir(),notify:__name(message=>updateEventEmitter.emit("update-info",{message}),"notify"),resolveEndpoint:__name(()=>resolveEndpoint(process.env,{settings:settings.merged,warn:__name(message=>debugLogger2.debug(message),"warn")}),"resolveEndpoint"),log:__name(message=>debugLogger2.debug(message),"log")})})}if(config.isInteractive()){runDeferredTask("background_housekeeping",async()=>{const{startBackgroundHousekeeping}=await import("./scheduler-SE3IWIWA.js");startBackgroundHousekeeping(config,settings)})}}__name(startPostRenderPrefetches,"startPostRenderPrefetches");export{startEarlyStartupPrefetches,startPostRenderPrefetches};
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2026 Qwen Team