@qwen-code/qwen-code 0.22.3 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (497) hide show
  1. package/README.md +30 -0
  2. package/bundled/computer-use/SKILL.md +116 -180
  3. package/bundled/goal-draft/SKILL.md +5 -1
  4. package/bundled/qc-helper/docs/common-workflow.md +32 -0
  5. package/bundled/qc-helper/docs/configuration/auth.md +6 -6
  6. package/bundled/qc-helper/docs/configuration/model-providers.md +8 -2
  7. package/bundled/qc-helper/docs/configuration/settings.md +63 -58
  8. package/bundled/qc-helper/docs/extension/introduction.md +1 -1
  9. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  10. package/bundled/qc-helper/docs/features/approval-mode.md +3 -0
  11. package/bundled/qc-helper/docs/features/auto-mode.md +34 -17
  12. package/bundled/qc-helper/docs/features/channels/dingtalk.md +4 -2
  13. package/bundled/qc-helper/docs/features/channels/dws.md +6 -2
  14. package/bundled/qc-helper/docs/features/channels/overview.md +5 -2
  15. package/bundled/qc-helper/docs/features/code-review.md +2 -2
  16. package/bundled/qc-helper/docs/features/commands.md +79 -1
  17. package/bundled/qc-helper/docs/features/computer-use.md +2 -2
  18. package/bundled/qc-helper/docs/features/goals.md +9 -3
  19. package/bundled/qc-helper/docs/features/headless.md +16 -1
  20. package/bundled/qc-helper/docs/features/hooks.md +8 -3
  21. package/bundled/qc-helper/docs/features/memory.md +1 -0
  22. package/bundled/qc-helper/docs/features/output-styles.md +38 -0
  23. package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +17 -7
  24. package/bundled/qc-helper/docs/qwen-serve.md +74 -55
  25. package/bundled/review/SKILL.md +16 -7
  26. package/bundled/review/references/posting.md +3 -3
  27. package/chunks/MaxSizedBox-B3D7545A.js +111 -0
  28. package/chunks/{StandaloneSessionPicker-2FJAOLGG.js → StandaloneSessionPicker-QUMO4LLQ.js} +88 -86
  29. package/chunks/{acp-startup-profiler-GNYAL6LI.js → acp-startup-profiler-M4X5F3VK.js} +2 -2
  30. package/chunks/{acpAgent-2ZMIJAFV.js → acpAgent-2GTFCIEP.js} +2041 -444
  31. package/chunks/{agent-X5WX3L2I.js → agent-XKF5SZWU.js} +46 -46
  32. package/chunks/agent-headless-OC2IB55D.js +85 -0
  33. package/chunks/{anthropicContentGenerator-YVTB6QX7.js → anthropicContentGenerator-L76MR5OR.js} +53 -20
  34. package/chunks/{artifact-tool-XSMPHZBT.js → artifact-tool-MYCL2QCS.js} +3 -4
  35. package/chunks/{askUserQuestion-4SWJY65V.js → askUserQuestion-THQZMG44.js} +45 -7
  36. package/chunks/bridge-IHSBI2YJ.js +118 -0
  37. package/chunks/{build-INBK7IXX.js → build-63BIOYWK.js} +1 -1
  38. package/chunks/{ca-7HPYOYSZ.js → ca-BNU7YNDE.js} +3 -0
  39. package/chunks/{channel-management-service-HQ6KDS7C.js → channel-management-service-4MTCEGJB.js} +4 -4
  40. package/chunks/channel-settings-store-BVKWAI2T.js +121 -0
  41. package/chunks/{channel-worker-group-6NA6BBZV.js → channel-worker-group-47F4ISUZ.js} +7 -7
  42. package/chunks/{channel-worker-manager-NEZ2J6RK.js → channel-worker-manager-I5Y44GYR.js} +51 -10
  43. package/chunks/{channel-worker-supervisor-FKU7DIHJ.js → channel-worker-supervisor-6VCLUXFE.js} +4 -4
  44. package/chunks/{chunk-PPKZ7JOE.js → chunk-22UH7VTP.js} +1 -1
  45. package/chunks/chunk-24FVUD5P.js +49 -0
  46. package/chunks/{chunk-MZCJWS5Y.js → chunk-2M3EWQNG.js} +20 -0
  47. package/chunks/{chunk-7T52W4SW.js → chunk-32LU3APX.js} +1 -1
  48. package/chunks/{chunk-42IDLQWS.js → chunk-373DQUVA.js} +48 -13
  49. package/chunks/{chunk-MSBO7X2W.js → chunk-37JFWFCD.js} +1 -1
  50. package/chunks/{chunk-3JXM2CVW.js → chunk-3AKCBZVW.js} +3 -3
  51. package/chunks/{chunk-TVC6HQ2U.js → chunk-3JQZVCBI.js} +2 -2
  52. package/chunks/{chunk-2LNNVAUV.js → chunk-3L724BJ5.js} +246 -15
  53. package/chunks/{chunk-E7REAOTN.js → chunk-47ECGEJC.js} +4 -0
  54. package/chunks/{chunk-WNPDGUJO.js → chunk-47RYEQW5.js} +2 -3
  55. package/chunks/{chunk-TZBSGJ6C.js → chunk-4BGDFKQE.js} +7 -7
  56. package/chunks/{chunk-PZ66FRIC.js → chunk-4F7GQGXB.js} +11772 -4773
  57. package/chunks/{chunk-DMLVSW7L.js → chunk-4HVH57J3.js} +713 -9
  58. package/chunks/{chunk-CMHFCLBU.js → chunk-4LIFGNI4.js} +1 -1
  59. package/chunks/{chunk-3SZC4VP4.js → chunk-4M24B5J5.js} +88 -49
  60. package/chunks/{chunk-BOWFGCEU.js → chunk-4PSDSCW3.js} +3 -3
  61. package/chunks/chunk-4UANMABT.js +1026 -0
  62. package/chunks/{chunk-M3QRM3DE.js → chunk-54C6PIGT.js} +5 -5
  63. package/chunks/{chunk-HP5LR5HL.js → chunk-5EIOJGCR.js} +4 -4
  64. package/chunks/{chunk-64REQJJ2.js → chunk-5H5S4UY5.js} +3 -3
  65. package/chunks/chunk-5IENVM7Z.js +35 -0
  66. package/chunks/{chunk-I6LYRJPB.js → chunk-5Q5RC2WE.js} +2 -2
  67. package/chunks/{chunk-WGY3AVGM.js → chunk-5RTTI4GE.js} +79 -5
  68. package/chunks/{chunk-KID24ZFN.js → chunk-64QH2UC6.js} +13 -1
  69. package/chunks/{chunk-MF7HCQWZ.js → chunk-65HWLGA7.js} +3 -3
  70. package/chunks/{chunk-OU5APVWO.js → chunk-6A2D4QSO.js} +13 -7
  71. package/chunks/chunk-6HUXPLB5.js +110 -0
  72. package/chunks/{chunk-VQUGEVGR.js → chunk-7IKXTGZT.js} +1 -1
  73. package/chunks/{chunk-UTLCH2FK.js → chunk-7JMGTOH7.js} +437 -136
  74. package/chunks/{chunk-7LOELM2I.js → chunk-7RB56BRJ.js} +3 -3
  75. package/chunks/{chunk-NIFYWDYN.js → chunk-7TBU7PU2.js} +1 -1
  76. package/chunks/{chunk-V2NDP3I4.js → chunk-7XL4WRXM.js} +2 -2
  77. package/chunks/chunk-ADJD4LZF.js +210 -0
  78. package/chunks/{chunk-T7KMERIX.js → chunk-ADYN7P2Y.js} +2 -2
  79. package/chunks/{chunk-TPI7O7HR.js → chunk-AHYTURFB.js} +1 -1
  80. package/chunks/{chunk-LUEHOUHM.js → chunk-AI35S34R.js} +3 -3
  81. package/chunks/{chunk-CIZCL2MW.js → chunk-ALUYNJPM.js} +1486 -2172
  82. package/chunks/{chunk-ABS25QER.js → chunk-ANVG3BVV.js} +1 -1
  83. package/chunks/{chunk-6ZPDLGHN.js → chunk-AZJLY2XZ.js} +5 -5
  84. package/chunks/{chunk-A3LWD5MK.js → chunk-BA4WJC4L.js} +1 -1
  85. package/chunks/{chunk-W3JH33JE.js → chunk-BFY33IB4.js} +18 -10
  86. package/chunks/{chunk-N4X7G4J2.js → chunk-BHTYRHJF.js} +1 -1
  87. package/chunks/{chunk-TEBDFQBZ.js → chunk-BJXCYUGM.js} +11 -6
  88. package/chunks/{chunk-7VMIMAVB.js → chunk-C2VWOXHS.js} +8 -8
  89. package/chunks/{chunk-XHF7WQ6B.js → chunk-C4TIXFDZ.js} +16 -5
  90. package/chunks/chunk-CHEIIBT3.js +40 -0
  91. package/chunks/chunk-CVX63TFJ.js +348 -0
  92. package/chunks/{chunk-RXFQM6FQ.js → chunk-DMEUXLSS.js} +16 -1
  93. package/chunks/{chunk-EKSCLBBF.js → chunk-DQCKVAF5.js} +23 -5
  94. package/chunks/{chunk-734C6JGI.js → chunk-DSX7KQPM.js} +5195 -666
  95. package/chunks/{chunk-4CMJKUND.js → chunk-DTVQSSNM.js} +67 -2
  96. package/chunks/{chunk-BKWNKLZB.js → chunk-DYTW3QVG.js} +24 -9
  97. package/chunks/{chunk-C2X7KY45.js → chunk-E4JNFXNI.js} +3 -3
  98. package/chunks/{chunk-UHQFIS7N.js → chunk-EAHOJF6V.js} +28 -4
  99. package/chunks/{chunk-YLSQLSH7.js → chunk-EBDGRBZX.js} +24 -16
  100. package/chunks/{chunk-DJBQCO2E.js → chunk-EFTPIZIC.js} +412 -3
  101. package/chunks/{chunk-6DIGWMGT.js → chunk-EIJT2PQ6.js} +2 -2
  102. package/chunks/{chunk-4TT3IVGA.js → chunk-EIY7SUPZ.js} +1 -1
  103. package/chunks/{chunk-XQFT3QUF.js → chunk-ENYUKMFK.js} +1 -1
  104. package/chunks/{chunk-ZWJDJ6RU.js → chunk-EVFDRBUM.js} +157 -153
  105. package/chunks/{chunk-4VPCTGH6.js → chunk-EWRW2WQC.js} +15 -9
  106. package/chunks/{chunk-VBCPNIQD.js → chunk-F33GFWPR.js} +47 -184
  107. package/chunks/{chunk-ERFDKH32.js → chunk-F47DITLZ.js} +19 -8
  108. package/chunks/{chunk-73RM4POK.js → chunk-F7NF2IOE.js} +7 -7
  109. package/chunks/{chunk-EB6QRGHM.js → chunk-FD5SJOWT.js} +10 -7
  110. package/chunks/{chunk-SS5SDCD3.js → chunk-FRICLXCZ.js} +7 -7
  111. package/chunks/{chunk-NU7RKEZR.js → chunk-FUO5V5KI.js} +14 -7
  112. package/chunks/{chunk-G6FECKTJ.js → chunk-G5PBOQWI.js} +9 -6
  113. package/chunks/{chunk-CAJTKR6W.js → chunk-G7HBEEX7.js} +15 -9
  114. package/chunks/{chunk-4QHPPXK2.js → chunk-GB4UKWY5.js} +2 -2
  115. package/chunks/{chunk-QYMAKPY5.js → chunk-GH2S4GD5.js} +350 -12
  116. package/chunks/{chunk-LHBUKJG2.js → chunk-GXUTFQXK.js} +28 -25
  117. package/chunks/{chunk-KJO2LBUK.js → chunk-H43PSPYS.js} +5 -5
  118. package/chunks/{chunk-XSG6G3G6.js → chunk-HJBHMANB.js} +12 -14
  119. package/chunks/chunk-HRPFBHW7.js +336 -0
  120. package/chunks/{chunk-6PJOTWAN.js → chunk-HT5S5TRQ.js} +1 -1
  121. package/chunks/{chunk-HCOBAG2L.js → chunk-HWVUSYSN.js} +3 -8
  122. package/chunks/{chunk-2OUD5T67.js → chunk-I2TMJPCV.js} +213 -185
  123. package/chunks/{chunk-CLWO3B77.js → chunk-I4NRYS6A.js} +11 -11
  124. package/chunks/{chunk-V7EESTJV.js → chunk-I5N4EAS6.js} +1 -1
  125. package/chunks/{chunk-K5KXUXWC.js → chunk-IG4W5SJR.js} +3 -3
  126. package/chunks/{chunk-FROAFEFB.js → chunk-IPATA3T2.js} +3 -3
  127. package/chunks/{chunk-NKLP3DCK.js → chunk-IQAFKVXS.js} +1 -1
  128. package/chunks/{chunk-AYHQZBJ4.js → chunk-IRKQ4YYX.js} +3 -3
  129. package/chunks/{chunk-J3NNHTV6.js → chunk-J5TTWBZK.js} +6 -0
  130. package/chunks/{chunk-QFCDF5PL.js → chunk-JHN7UIDW.js} +1 -1
  131. package/chunks/{chunk-AVNATYLY.js → chunk-JJKNYRFY.js} +1 -1
  132. package/chunks/{chunk-CQH5KTKC.js → chunk-JR42V4UY.js} +1 -1
  133. package/chunks/chunk-JS73NNWF.js +30 -0
  134. package/chunks/{chunk-NV55WWD6.js → chunk-JUARRUMA.js} +802 -2011
  135. package/chunks/chunk-JX6XHPTX.js +26 -0
  136. package/chunks/{chunk-5JTIYALA.js → chunk-JZWOCUZ3.js} +1 -1
  137. package/chunks/{chunk-P2G476QN.js → chunk-KEVYJSI4.js} +13 -13
  138. package/chunks/{chunk-B466ZSHZ.js → chunk-KFN2IZYR.js} +3 -3
  139. package/chunks/{chunk-JWALNCLT.js → chunk-KGV55H53.js} +1 -1
  140. package/chunks/{chunk-23RFD54N.js → chunk-KHP66DFN.js} +1 -1
  141. package/chunks/{chunk-2SXSLSQE.js → chunk-KM3XVTMO.js} +12 -6
  142. package/chunks/{chunk-GPGU4S2N.js → chunk-KMU3ZHH4.js} +3 -3
  143. package/chunks/chunk-KOGW3YWJ.js +2054 -0
  144. package/chunks/{chunk-NMOD2FXQ.js → chunk-L26ONV2Y.js} +8 -8
  145. package/chunks/chunk-L34XSHIZ.js +28 -0
  146. package/chunks/{chunk-SEONHUS3.js → chunk-LAUEEBDL.js} +2 -0
  147. package/chunks/{chunk-3WK3QDNV.js → chunk-LB3WQQJK.js} +2 -2
  148. package/chunks/{chunk-URE3QBBB.js → chunk-LEPCWS5A.js} +3 -3
  149. package/chunks/{chunk-36GSQ3MM.js → chunk-LHBNR6EU.js} +2 -2
  150. package/chunks/{chunk-V4264FEG.js → chunk-LKODFJRD.js} +1 -1
  151. package/chunks/{chunk-PADPMMYM.js → chunk-LOBDDFYK.js} +5 -29
  152. package/chunks/{chunk-BXDAPVQU.js → chunk-LU77UT4D.js} +28 -4
  153. package/chunks/{chunk-RFIDDFAL.js → chunk-M4KFODIP.js} +1 -1
  154. package/chunks/{chunk-CFJY4DGX.js → chunk-M4LBBSVP.js} +4 -2
  155. package/chunks/{chunk-KYWTPLBJ.js → chunk-MOF6VZN2.js} +2 -2
  156. package/chunks/{chunk-DJPASAUV.js → chunk-MP6YZ4RK.js} +4829 -3638
  157. package/chunks/{chunk-T26EAKDL.js → chunk-N2TNM3QB.js} +2 -6
  158. package/chunks/{chunk-2TNL5KPM.js → chunk-N4QWUPDM.js} +7 -0
  159. package/chunks/{chunk-7S226YTK.js → chunk-NFIDVZND.js} +11 -1
  160. package/chunks/{chunk-ZEYFMJQA.js → chunk-NQ4L2CMD.js} +83 -18
  161. package/chunks/{chunk-ZZUKP7HV.js → chunk-NRL5CUZT.js} +1 -1
  162. package/chunks/{chunk-WXEA74YB.js → chunk-NSUKQ4DN.js} +9 -3
  163. package/chunks/chunk-NUHOLAQ6.js +59 -0
  164. package/chunks/{chunk-DJEZ55D4.js → chunk-NVVJTUSL.js} +336 -140
  165. package/chunks/{chunk-3XKLXHGK.js → chunk-NXKOVOM5.js} +9 -9
  166. package/chunks/{chunk-5Q372OFJ.js → chunk-O4KNCAX4.js} +57 -10
  167. package/chunks/{chunk-GOXKNSDZ.js → chunk-O5CD7T4T.js} +40 -9
  168. package/chunks/{chunk-XIQ5HQ2F.js → chunk-OBTWL6ZW.js} +1 -1
  169. package/chunks/{chunk-PDQGMSZK.js → chunk-ODZF64DM.js} +1 -1
  170. package/chunks/{chunk-5MK45KZ3.js → chunk-OHOO527W.js} +1 -1
  171. package/chunks/{chunk-36LGBEM6.js → chunk-OHU2H5CS.js} +1 -1
  172. package/chunks/{chunk-JB4JIVTJ.js → chunk-OKTNXDVO.js} +1 -1
  173. package/chunks/{chunk-CETB5XY4.js → chunk-ORFIYTI2.js} +1 -1
  174. package/chunks/{chunk-7E7UCJHS.js → chunk-OSHQMOBS.js} +18 -17
  175. package/chunks/chunk-OSSTATJF.js +1310 -0
  176. package/chunks/chunk-P6UIF2OW.js +400 -0
  177. package/chunks/{chunk-U54AYGEC.js → chunk-PB7JBAHF.js} +15 -49
  178. package/chunks/{chunk-Y5S7LBOZ.js → chunk-PCRBLMIN.js} +17 -3
  179. package/chunks/{chunk-WAOIHTJS.js → chunk-PDAKFU7M.js} +1 -1
  180. package/chunks/{chunk-YTDVNSUQ.js → chunk-QAK5475D.js} +1 -1
  181. package/chunks/{chunk-ST5MDGH3.js → chunk-QI27MKNQ.js} +27 -19
  182. package/chunks/{chunk-MK2GIB46.js → chunk-QJGYU5PG.js} +1 -1
  183. package/chunks/{chunk-SMPR7SPO.js → chunk-QJNDUTOL.js} +45 -239
  184. package/chunks/{chunk-MQM5PJML.js → chunk-QJVZLILI.js} +1 -1
  185. package/chunks/{chunk-B5PHIJGI.js → chunk-QKDNS6FU.js} +2 -2
  186. package/chunks/{chunk-ZU4UDIWX.js → chunk-QQD2GART.js} +15 -9
  187. package/chunks/{chunk-62GQFYID.js → chunk-RAFQIHN2.js} +3 -3
  188. package/chunks/{chunk-MO3FC2WT.js → chunk-RJUVTJEZ.js} +1 -1
  189. package/chunks/{chunk-M6FOJXW3.js → chunk-RKW36UWC.js} +1 -1
  190. package/chunks/{chunk-GBJBJ4HX.js → chunk-RM4WT2XB.js} +4 -26
  191. package/chunks/{chunk-VGIFXISB.js → chunk-RN3YGDCA.js} +7 -5
  192. package/chunks/{chunk-DYXFD5RO.js → chunk-S2T7H5MI.js} +1 -1
  193. package/chunks/{chunk-FTF2YIZ5.js → chunk-S6H3ELPG.js} +1 -1
  194. package/chunks/{chunk-4NDLQAY2.js → chunk-SI7WDR3U.js} +524 -16
  195. package/chunks/{chunk-2YOHKHYR.js → chunk-SRF4KTAG.js} +6 -6
  196. package/chunks/{chunk-ZZMSC3RG.js → chunk-STCVJXQB.js} +24 -24
  197. package/chunks/{chunk-ST5V3ZOC.js → chunk-SULZPKTA.js} +3 -3
  198. package/chunks/{chunk-6X7EU5TI.js → chunk-SX2QIMJV.js} +9 -7
  199. package/chunks/{chunk-V5J4J5TP.js → chunk-TJYRTS4S.js} +2 -20
  200. package/chunks/{chunk-C3PEFRKD.js → chunk-TMKTOTMQ.js} +5 -5
  201. package/chunks/{chunk-ISKH4QX3.js → chunk-TQHPVKO6.js} +4 -4
  202. package/chunks/{chunk-HVC3PNVC.js → chunk-TSZSGQ3N.js} +1 -1
  203. package/chunks/{chunk-ICURCKIU.js → chunk-U4DJ5XB3.js} +594 -91
  204. package/chunks/{chunk-TTX2JUE6.js → chunk-U6D2PPMN.js} +1 -1
  205. package/chunks/{chunk-GVIVASYK.js → chunk-UAKRDON5.js} +4 -4
  206. package/chunks/{chunk-D5LUXLUH.js → chunk-UJ4DUYIH.js} +18 -4
  207. package/chunks/{chunk-VTHREBQM.js → chunk-UKYXYWI2.js} +2 -2
  208. package/chunks/{chunk-ZYMLPEZQ.js → chunk-UM2FFKXN.js} +3 -3
  209. package/chunks/{chunk-2OBKDPZZ.js → chunk-UPFRILIL.js} +2 -2
  210. package/chunks/{chunk-2HYKTO7V.js → chunk-UUASLXHW.js} +55 -6
  211. package/chunks/chunk-V5U2NZNJ.js +29 -0
  212. package/chunks/{chunk-P5Y23G2L.js → chunk-V7RNNPGC.js} +1 -18
  213. package/chunks/{chunk-Q2MSPKIJ.js → chunk-VBWD6C27.js} +1 -1
  214. package/chunks/chunk-VGHZT6JR.js +51 -0
  215. package/chunks/{chunk-MPNBVAEU.js → chunk-VNAYZAFX.js} +4 -4
  216. package/chunks/chunk-VPSIC437.js +780 -0
  217. package/chunks/{chunk-AIAOIFY4.js → chunk-VWTSRH6C.js} +92 -17
  218. package/chunks/{chunk-4K7KNVWH.js → chunk-VYIUNFEA.js} +3 -3
  219. package/chunks/{chunk-EQSBPBZ3.js → chunk-WP4AX3XD.js} +5 -7
  220. package/chunks/{chunk-BFPESSTR.js → chunk-XEAAO654.js} +1 -1
  221. package/chunks/{chunk-RU7BK6B3.js → chunk-XLXAZLDR.js} +3 -3
  222. package/chunks/{chunk-EFWRMA2I.js → chunk-YPWZTR7F.js} +3 -3
  223. package/chunks/{chunk-XF63PKEN.js → chunk-ZDFQGHZH.js} +1 -1
  224. package/chunks/{chunk-OZ6KS6KW.js → chunk-ZGCKTAL5.js} +6 -1
  225. package/chunks/chunk-ZHO2CW6D.js +205 -0
  226. package/chunks/chunk-ZJ2LM2SI.js +198 -0
  227. package/chunks/{chunk-AYFA7MZV.js → chunk-ZKFTS3OV.js} +6 -6
  228. package/chunks/{chunk-HMJ2P3SV.js → chunk-ZL4HFSL6.js} +91 -29
  229. package/chunks/{chunk-DJECZIJX.js → chunk-ZTPGUFQV.js} +30 -8
  230. package/chunks/{chunk-7EQQR46F.js → chunk-ZVP4PWBU.js} +1 -1
  231. package/chunks/chunk-bdqvmfwv-ZTSOWAFE.js +17446 -0
  232. package/chunks/config-utils-LVSYDLHZ.js +114 -0
  233. package/chunks/contextCommand-TZD7UAJK.js +107 -0
  234. package/chunks/{core-runtime-AXB6SK5D.js → core-runtime-B4UKKIAQ.js} +63 -62
  235. package/chunks/{create-sub-session-23ITIELI.js → create-sub-session-LUPWEUHR.js} +3 -3
  236. package/chunks/{create-sub-session-4QNE64MR.js → create-sub-session-NJ24B4US.js} +94 -66
  237. package/chunks/{cron-create-KJ4IY6PP.js → cron-create-CRSPET3H.js} +4 -4
  238. package/chunks/{cron-delete-MBLQCAYY.js → cron-delete-DB77SZTU.js} +4 -4
  239. package/chunks/{cron-list-DWH2PQ47.js → cron-list-U2JNYWV6.js} +4 -4
  240. package/chunks/{daemon-3GNHB3M2.js → daemon-RKDGBFLK.js} +613 -102
  241. package/chunks/{daemon-git-worktree-guard-IVAJJWYK.js → daemon-git-worktree-guard-O2HPOBAB.js} +62 -61
  242. package/chunks/daemon-status-provider-GRRVCJFW.js +117 -0
  243. package/chunks/daemon-trust-policy-YJL442BK.js +113 -0
  244. package/chunks/{daemon-trust-policy-monitor-KGGROSIV.js → daemon-trust-policy-monitor-JL7F4Y4Q.js} +68 -67
  245. package/chunks/{de-X6HLSIFE.js → de-T4BLOKEC.js} +3 -0
  246. package/chunks/deferred-core-runtime-S32AYVZI.js +115 -0
  247. package/chunks/{devtools-JCG4K2NZ.js → devtools-VDRJYPZF.js} +1 -1
  248. package/chunks/{discovery-X2NV535U.js → discovery-TUM3ZQ6U.js} +2 -2
  249. package/chunks/{display-image-BE7I6ZB6.js → display-image-73C7XNRK.js} +5 -5
  250. package/chunks/{dist-LVZCXVPF.js → dist-62OZ7QXB.js} +44 -26
  251. package/chunks/{dist-GFN5DCBX.js → dist-EDHQIBYD.js} +152 -63
  252. package/chunks/{dist-N6W6E753.js → dist-GT64AAUR.js} +135 -26
  253. package/chunks/{dist-6BPYWHVD.js → dist-JVXT4VUJ.js} +14 -7
  254. package/chunks/{dist-4WXLCBDR.js → dist-L6URO6CK.js} +12 -5
  255. package/chunks/{dist-5VXFRTWU.js → dist-LXFYIJNG.js} +866 -172
  256. package/chunks/{dist-SWQMYP2Q.js → dist-PDGNRVPY.js} +27 -8
  257. package/chunks/{dist-NSV4NBPK.js → dist-QAF5DO3Y.js} +380 -83
  258. package/chunks/{dist-HZNT6GQS.js → dist-ZCJLKQSP.js} +28 -14
  259. package/chunks/earlyInputCapture-BBPCIVZG.js +108 -0
  260. package/chunks/{edit-LEQLAGPZ.js → edit-SUGXY63Y.js} +47 -47
  261. package/chunks/{en-YLXBXM4Z.js → en-2RATMNX7.js} +5 -0
  262. package/chunks/{enter-worktree-35QCAAFP.js → enter-worktree-B6USKSIK.js} +7 -7
  263. package/chunks/{enterPlanMode-ONQN3WHE.js → enterPlanMode-MDX4RVVL.js} +48 -48
  264. package/chunks/{environment-UANTR7A4.js → environment-VN6RXDVN.js} +63 -62
  265. package/chunks/errors-UEY36PIT.js +114 -0
  266. package/chunks/{exit-worktree-XQD6D543.js → exit-worktree-DLQ73SJH.js} +10 -8
  267. package/chunks/exitPlanMode-EPHIEDAA.js +83 -0
  268. package/chunks/{fast-path-WUL7UZ6H.js → fast-path-Y73R42LV.js} +8 -7
  269. package/chunks/{fast-path-settings-XH426LUU.js → fast-path-settings-MFUR3IWK.js} +3 -3
  270. package/chunks/{fr-FTZWF462.js → fr-BGHGYX6A.js} +3 -0
  271. package/chunks/{glob-Y54QUWDY.js → glob-DMGH7EZN.js} +47 -47
  272. package/chunks/goal-tools-3RF3PXCL.js +99 -0
  273. package/chunks/{grep-5GPICQBU.js → grep-AJVLCVXC.js} +9 -7
  274. package/chunks/handleAutoUpdate-HVWQT2AU.js +110 -0
  275. package/chunks/i18n-5OR7NTRZ.js +125 -0
  276. package/chunks/{image-gen-J6FDGUZP.js → image-gen-VOIDOHOB.js} +8 -8
  277. package/chunks/initializer-JE5RQSOE.js +114 -0
  278. package/chunks/installationInfo-KO3CCSCK.js +108 -0
  279. package/chunks/{ja-2GL5FKYJ.js → ja-G3FTD5XE.js} +3 -0
  280. package/chunks/{keychain-token-storage-37XPR34V.js → keychain-token-storage-REZVMJA6.js} +2 -2
  281. package/chunks/list-3IORSFIY.js +117 -0
  282. package/chunks/list-agents-SBMONIUK.js +128 -0
  283. package/chunks/{llm-NSAVK5V3.js → llm-K26SUDVK.js} +223 -140
  284. package/chunks/{llm-content-generator-AY2QKXHE.js → llm-content-generator-TT6EAUD4.js} +11 -12
  285. package/chunks/loadedSettingsAdapter-KLLFZF3M.js +111 -0
  286. package/chunks/{loggingContentGenerator-DSFQHXIF.js → loggingContentGenerator-EYQBA4M4.js} +66 -65
  287. package/chunks/{loop-wakeup-XJFONSQ7.js → loop-wakeup-QA6SHCZT.js} +5 -5
  288. package/chunks/{ls-3VAT2J7A.js → ls-HEJNCEYO.js} +4 -4
  289. package/chunks/{lsp-5W7IRUBH.js → lsp-WOQKNZP6.js} +2 -2
  290. package/chunks/{managed-npm-update-TSWENTK5.js → managed-npm-update-HIJTODQT.js} +61 -60
  291. package/chunks/mcp-A2UEHETW.js +111 -0
  292. package/chunks/{monitor-RW4GWJHB.js → monitor-DKNZQAB2.js} +46 -46
  293. package/chunks/{node-QKLNSZMX.js → node-UETAYMMO.js} +3 -3
  294. package/chunks/nonInteractiveCli-YA47F2F4.js +190 -0
  295. package/chunks/{notebook-edit-CQNYS5OR.js → notebook-edit-MGHTRL2D.js} +47 -47
  296. package/chunks/{open-with-auth-YN3QZHVM.js → open-with-auth-D6JD6LDS.js} +3 -3
  297. package/chunks/{openaiContentGenerator-J6QIF7EX.js → openaiContentGenerator-ZJIEQ3ZJ.js} +26 -28
  298. package/chunks/pidfile-ETHAZNMY.js +112 -0
  299. package/chunks/{processUtils-GPHNANKZ.js → processUtils-UY3SAJJZ.js} +2 -2
  300. package/chunks/prompt-terminal-ledger-GZ747VYE.js +106 -0
  301. package/chunks/{pt-XN2YWJVM.js → pt-D73IFYT7.js} +3 -0
  302. package/chunks/{qwenContentGenerator-WWDXPYQI.js → qwenContentGenerator-VI4KATRY.js} +58 -58
  303. package/chunks/{qwenOAuth2-OF5WRBQT.js → qwenOAuth2-7AOCKSOQ.js} +7 -7
  304. package/chunks/{read-file-FQUQHC6N.js → read-file-P7F4P7LV.js} +11 -13
  305. package/chunks/{read-mcp-resource-XD257PGJ.js → read-mcp-resource-GLAGB6R7.js} +2 -2
  306. package/chunks/{record-artifact-VW23GS4F.js → record-artifact-SWVR7NSU.js} +4 -4
  307. package/chunks/renderer-selection-M4UN63VJ.js +99 -0
  308. package/chunks/{report-findings-AO5VYFLR.js → report-findings-AL5YW3KI.js} +5 -5
  309. package/chunks/{request-shutdown-BCLA3JV2.js → request-shutdown-5YK4IZ54.js} +8 -7
  310. package/chunks/resumeHistoryUtils-DPZKFW24.js +119 -0
  311. package/chunks/ripGrep-C7LJKUPZ.js +37 -0
  312. package/chunks/{ru-OLTMFJEW.js → ru-QMISLKRH.js} +3 -0
  313. package/chunks/{run-qwen-serve-5X6IDZER.js → run-qwen-serve-OGTEEUR2.js} +589 -251
  314. package/chunks/{runtime-HK27GMPF.js → runtime-LNBLEMZS.js} +73 -72
  315. package/chunks/scheduled-tasks-FLDYZQOF.js +128 -0
  316. package/chunks/{scheduler-WD4MHMO5.js → scheduler-73YXGUGW.js} +62 -61
  317. package/chunks/{sdk-exporters-grpc-G5IT4XS4.js → sdk-exporters-grpc-MXTVSE3C.js} +2 -2
  318. package/chunks/{sdk-exporters-http-TTU2CHBU.js → sdk-exporters-http-3JO5TJNU.js} +4 -4
  319. package/chunks/{sdk-impl-UUMVYMAL.js → sdk-impl-HZAUUTHJ.js} +6 -6
  320. package/chunks/{send-message-AJ4OCUBV.js → send-message-JC7NJTY6.js} +166 -35
  321. package/chunks/serve-3UR2H4CV.js +119 -0
  322. package/chunks/{server-GO2N5DH7.js → server-AOYZVVOM.js} +2904 -860
  323. package/chunks/{session-IFNHTUBT.js → session-UAWFNFGI.js} +119 -114
  324. package/chunks/session-attachments-root-ZCGXQQTR.js +104 -0
  325. package/chunks/{session-pr-refresh-I3UBWMVP.js → session-pr-refresh-CT2INROL.js} +157 -88
  326. package/chunks/{settings-L6N54CU6.js → settings-BHRGDASJ.js} +67 -66
  327. package/chunks/{shell-4Y5LLW6N.js → shell-YHOGC7TO.js} +46 -46
  328. package/chunks/{skill-YOWTRAKQ.js → skill-ZGBKNCHQ.js} +131 -97
  329. package/chunks/skill-settings-AKSP665O.js +119 -0
  330. package/chunks/spawnChannel-N25MBB6F.js +112 -0
  331. package/chunks/standalone-update-XGPWJDRN.js +119 -0
  332. package/chunks/start-opentui-ui-FZ4USOU7.js +55342 -0
  333. package/chunks/{startInteractiveUI-XDFSHBZD.js → startInteractiveUI-E2WQJUOA.js} +3509 -4706
  334. package/chunks/{syntheticOutput-ML43GEFN.js → syntheticOutput-HJNZSEHN.js} +3 -3
  335. package/chunks/{task-create-QN4LYRSE.js → task-create-6RSD54S5.js} +12 -12
  336. package/chunks/{task-list-JPLGK45U.js → task-list-IQSACPOM.js} +34 -11
  337. package/chunks/{task-stop-CXEH5L2D.js → task-stop-HE2LRQNW.js} +2 -2
  338. package/chunks/{task-update-IWEOJFV2.js → task-update-XAJ2NYOA.js} +13 -14
  339. package/chunks/{team-create-OOPXCDBA.js → team-create-SOKMYSQU.js} +54 -55
  340. package/chunks/{team-delete-RZVVSGCY.js → team-delete-NGNNKGMG.js} +25 -8
  341. package/chunks/{team-plan-approval-DSX5EWAT.js → team-plan-approval-U7ZWXYAY.js} +46 -46
  342. package/chunks/terminal-image-renderer-KKM4OBLO.js +117 -0
  343. package/chunks/theme-manager-GQHF3A7T.js +103 -0
  344. package/chunks/{todoWrite-WDJNQEMW.js → todoWrite-5UTVUXHA.js} +39 -9
  345. package/chunks/{tool-search-J5Q6U7DN.js → tool-search-IAI2RVWT.js} +21 -19
  346. package/chunks/total-session-admission-G4CGCSTG.js +113 -0
  347. package/chunks/trustedFolders-D2I3FDPB.js +123 -0
  348. package/chunks/{update-relaunch-SIKHLHVR.js → update-relaunch-5RWKZAL3.js} +5 -5
  349. package/chunks/updateCheck-ZXOQDFEI.js +119 -0
  350. package/chunks/useAutoAcceptIndicator-6EK4QGAH.js +121 -0
  351. package/chunks/{validateNonInterActiveAuth-JUDQP6V4.js → validateNonInterActiveAuth-QPFEKATS.js} +113 -109
  352. package/chunks/{version-C63GDDWN.js → version-JKNG7YDH.js} +1 -1
  353. package/chunks/{web-fetch-FOQZMNSC.js → web-fetch-X3AHIIHW.js} +16 -19
  354. package/chunks/{web-search-PUJTBFUC.js → web-search-K2FMOGS5.js} +10 -11
  355. package/chunks/{web-shell-static-HNB4FDOE.js → web-shell-static-POZHGGXE.js} +5 -4
  356. package/chunks/{workflow-Y5IPINVH.js → workflow-TOLPAK5G.js} +213 -119
  357. package/chunks/workspace-providers-status-PCJK3RC7.js +115 -0
  358. package/chunks/{workspace-registration-store-SMJWI2AI.js → workspace-registration-store-KQWVVW4Y.js} +2 -1
  359. package/chunks/workspace-registry-YNIOB6HJ.js +122 -0
  360. package/chunks/workspace-runtime-coordinator-WG2RNEN7.js +123 -0
  361. package/chunks/workspace-service-G4ZNBOFH.js +127 -0
  362. package/chunks/workspace-skills-status-FMTPPMWC.js +114 -0
  363. package/chunks/{workspace-trust-reconciler-PLIDLJZX.js → workspace-trust-reconciler-IBDFQBQS.js} +76 -77
  364. package/chunks/wrapper-JH3IFHT2.js +35 -0
  365. package/chunks/write-file-YTLFY2S5.js +88 -0
  366. package/chunks/{zh-UNY63FR3.js → zh-25DF7OGK.js} +5 -0
  367. package/chunks/{zh-TW-RPTMRTHG.js → zh-TW-5EDMZVGK.js} +5 -0
  368. package/chunks/{zoom-image-LYQD7BQA.js → zoom-image-IFXSN74N.js} +11 -13
  369. package/cli.js +131 -90
  370. package/locales/ca.js +6 -0
  371. package/locales/de.js +6 -0
  372. package/locales/en.js +9 -0
  373. package/locales/fr.js +6 -0
  374. package/locales/ja.js +6 -0
  375. package/locales/pt.js +6 -0
  376. package/locales/ru.js +6 -0
  377. package/locales/zh-TW.js +9 -0
  378. package/locales/zh.js +9 -0
  379. package/package.json +3 -3
  380. package/web-shell/assets/{abnfDiagram-VCTEODGH-TRCMSA_6.js → abnfDiagram-VCTEODGH-Cxf7xE_Z.js} +1 -1
  381. package/web-shell/assets/{arc-D9Uls5b3.js → arc-ESi1eNkE.js} +1 -1
  382. package/web-shell/assets/{architectureDiagram-5GKGNRK7-Bwb8jPXg.js → architectureDiagram-5GKGNRK7-D9l7-bDo.js} +1 -1
  383. package/web-shell/assets/{blockDiagram-NRAW4CY4-DHj71TSX.js → blockDiagram-NRAW4CY4-Bc8DEasw.js} +1 -1
  384. package/web-shell/assets/{c4Diagram-UCG6FXSJ-uKBBdbyr.js → c4Diagram-UCG6FXSJ-Dimb2Hmh.js} +1 -1
  385. package/web-shell/assets/channel-B7ohGDil.js +1 -0
  386. package/web-shell/assets/{chunk-2Q5K7J3B-BZd0Phrl.js → chunk-2Q5K7J3B-jVDmOpAQ.js} +1 -1
  387. package/web-shell/assets/{chunk-5VM5RSS4-7KNeNBqN.js → chunk-5VM5RSS4-DbG_SwdB.js} +1 -1
  388. package/web-shell/assets/{chunk-F27PBJKO-BeboS7Fi.js → chunk-F27PBJKO-QEc4cY1v.js} +1 -1
  389. package/web-shell/assets/{chunk-G27WJ6UU-RV3JONoj.js → chunk-G27WJ6UU-iJ36lQ3X.js} +1 -1
  390. package/web-shell/assets/{chunk-JWPE2WC7-Yw9FCFsP.js → chunk-JWPE2WC7-DuArnVtF.js} +1 -1
  391. package/web-shell/assets/{chunk-LCL6LL3I-GIMnydDe.js → chunk-LCL6LL3I-DxOf1zwL.js} +1 -1
  392. package/web-shell/assets/{chunk-POPQ4Y6H-Cfrux7bL.js → chunk-POPQ4Y6H-lVLu9Ild.js} +1 -1
  393. package/web-shell/assets/{chunk-SVP7TREG-BlvIN0CO.js → chunk-SVP7TREG-C6XYlIer.js} +1 -1
  394. package/web-shell/assets/{chunk-XXDRQBXY-DMs7Rr4t.js → chunk-XXDRQBXY-CiG2j2Ji.js} +1 -1
  395. package/web-shell/assets/classDiagram-DTDB5LWJ-DdFpqpfD.js +1 -0
  396. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DdFpqpfD.js +1 -0
  397. package/web-shell/assets/{cose-bilkent-JH36ORCC-DNGqTNwI.js → cose-bilkent-JH36ORCC-DGVHMMVm.js} +1 -1
  398. package/web-shell/assets/{cynefin-OW5HDTMX-CojMpaoH.js → cynefin-OW5HDTMX-D6cgpCnH.js} +1 -1
  399. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-DF07YXGo.js → cynefinDiagram-5FMLGOSQ-BKv4Z-UX.js} +1 -1
  400. package/web-shell/assets/{dagre-3AP2YEHR-17-4WtCH.js → dagre-3AP2YEHR-B4ABMIG-.js} +1 -1
  401. package/web-shell/assets/{diagram-S7CK7UJ4-G3Wuyz9m.js → diagram-S7CK7UJ4-DgCkp_Lm.js} +1 -1
  402. package/web-shell/assets/{diagram-UQ7AKVKN-nyWIKZ8P.js → diagram-UQ7AKVKN-FG0FNokz.js} +1 -1
  403. package/web-shell/assets/{diagram-VSXAHHWV-tKHhmYSC.js → diagram-VSXAHHWV-JgkP9qg-.js} +1 -1
  404. package/web-shell/assets/{diagram-VX7I27RA-CpDf1hYk.js → diagram-VX7I27RA-ADh2x83l.js} +1 -1
  405. package/web-shell/assets/{diagram-Z3DM3KII-Cah2IFXG.js → diagram-Z3DM3KII-yXqoYF1J.js} +1 -1
  406. package/web-shell/assets/{ebnfDiagram-PWID7BFC-DNaCkgxy.js → ebnfDiagram-PWID7BFC-Duk83Ek_.js} +1 -1
  407. package/web-shell/assets/{erDiagram-SSCWMZ5O-CAdRgcf1.js → erDiagram-SSCWMZ5O-DMdvxySG.js} +1 -1
  408. package/web-shell/assets/{flowDiagram-A5DVABFB-CMUJAShL.js → flowDiagram-A5DVABFB-DHjVgSji.js} +1 -1
  409. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-o-_MUNey.js → ganttDiagram-EL5Y4UJY-DMM9DkCE.js} +1 -1
  410. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-_aG-2Z7O.js → gitGraphDiagram-WWUBYQGX-t_ug9vO8.js} +1 -1
  411. package/web-shell/assets/index-BGZRqbRo.css +36 -0
  412. package/web-shell/assets/index-DRri_6_x.js +2067 -0
  413. package/web-shell/assets/{index-BK_NKxiJ.js → index-zqvnpGHv.js} +1 -1
  414. package/web-shell/assets/{infoDiagram-RXCK75RN-qJPeZbGP.js → infoDiagram-RXCK75RN-eT1fANNm.js} +1 -1
  415. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-7Om4vNo1.js → ishikawaDiagram-5VMMS53U-k3evzZNn.js} +1 -1
  416. package/web-shell/assets/{journeyDiagram-EYS64GPL-BNtXqmBW.js → journeyDiagram-EYS64GPL-CGim3EAi.js} +1 -1
  417. package/web-shell/assets/{kanban-definition-3QL26DDD-COgFec8P.js → kanban-definition-3QL26DDD-WHfJo-22.js} +1 -1
  418. package/web-shell/assets/{layout-B9n81PC9.js → layout-DkqIaFlJ.js} +1 -1
  419. package/web-shell/assets/{linear-Bb6nXZQq.js → linear-Bdkd3mCz.js} +1 -1
  420. package/web-shell/assets/{mermaid.core-Cgrm3JVT.js → mermaid.core-CGw0LkT_.js} +6 -6
  421. package/web-shell/assets/{mindmap-definition-FBJOCRG2-TKwLTjnG.js → mindmap-definition-FBJOCRG2-C9V4rBvo.js} +1 -1
  422. package/web-shell/assets/{pegDiagram-XKGWAZYB-BJPuvlpi.js → pegDiagram-XKGWAZYB-CwoI2T5G.js} +1 -1
  423. package/web-shell/assets/{pieDiagram-E7YTZNPT-D01VkNsW.js → pieDiagram-E7YTZNPT-DaTmBmPG.js} +1 -1
  424. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-C4hHsiv-.js → quadrantDiagram-AXDQQJYC-plh6MyGI.js} +1 -1
  425. package/web-shell/assets/{railroadDiagram-O6MQD6OU-CuEO4xK2.js → railroadDiagram-O6MQD6OU-D_b-S0iK.js} +1 -1
  426. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-D5J_vIo5.js → requirementDiagram-EFPCY7ZU-zUzTN7VE.js} +1 -1
  427. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-DQKY223V.js → sankeyDiagram-P5KCCOFB-m6AhoD0l.js} +1 -1
  428. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-D27YV_cm.js → sequenceDiagram-WJ2MYXX4-Cwhzsine.js} +1 -1
  429. package/web-shell/assets/{sizeCapture-X5ZJPWSS-TJg8UcwV.js → sizeCapture-X5ZJPWSS-CcZuKIae.js} +1 -1
  430. package/web-shell/assets/{stateDiagram-HBIQ2CUA-CmnPzUIx.js → stateDiagram-HBIQ2CUA-CFoiJwD_.js} +1 -1
  431. package/web-shell/assets/stateDiagram-v2-4QOOHH4V--H8HdEmk.js +1 -0
  432. package/web-shell/assets/{swimlanes-XN3QIQJK-ByeP3_Nu.js → swimlanes-XN3QIQJK-CgS9hcaV.js} +1 -1
  433. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-ShE9OIgf.js +8 -0
  434. package/web-shell/assets/{timeline-definition-24CTP7MA-BsFA5juR.js → timeline-definition-24CTP7MA-Dzzc05t9.js} +1 -1
  435. package/web-shell/assets/{vennDiagram-4TSXK5OY-DREP2ECo.js → vennDiagram-4TSXK5OY-DemK0f7Y.js} +1 -1
  436. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-iyd9lKi2.js → wardleyDiagram-VM6X3IG4-CquLxtMr.js} +1 -1
  437. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-CVr1_j9q.js → xychartDiagram-S5SC5T6Z-BTBKTM5g.js} +1 -1
  438. package/web-shell/index.html +196 -2
  439. package/chunks/MaxSizedBox-X42SXBJH.js +0 -110
  440. package/chunks/agent-headless-IZM25LJA.js +0 -85
  441. package/chunks/bridge-ME6QXZNA.js +0 -119
  442. package/chunks/channel-settings-store-PEOI7XCG.js +0 -120
  443. package/chunks/chunk-7J6OTNGO.js +0 -424
  444. package/chunks/chunk-BWORX6FA.js +0 -135
  445. package/chunks/chunk-CPBF7KYF.js +0 -51
  446. package/chunks/chunk-H72BQNM3.js +0 -645
  447. package/chunks/chunk-JHYH6PYQ.js +0 -3096
  448. package/chunks/chunk-SS4MRMKE.js +0 -3525
  449. package/chunks/chunk-T4EFG2P5.js +0 -113
  450. package/chunks/chunk-XZA32HII.js +0 -19
  451. package/chunks/chunk-ZYNTSXWK.js +0 -32
  452. package/chunks/config-utils-R6M3TA34.js +0 -113
  453. package/chunks/contextCommand-ZCAP23J6.js +0 -106
  454. package/chunks/daemon-status-provider-K3SJ5C2U.js +0 -117
  455. package/chunks/daemon-trust-policy-DOR3YG62.js +0 -112
  456. package/chunks/deferred-core-runtime-WOYLUQQ7.js +0 -114
  457. package/chunks/earlyInputCapture-OHBEVO4K.js +0 -107
  458. package/chunks/errors-WAK6KFBC.js +0 -113
  459. package/chunks/exitPlanMode-UEYBG6P5.js +0 -83
  460. package/chunks/goal-tools-PTD3MBA7.js +0 -411
  461. package/chunks/handleAutoUpdate-FP3NWNSG.js +0 -109
  462. package/chunks/i18n-INIU5X7A.js +0 -124
  463. package/chunks/initializer-TYODV6GE.js +0 -113
  464. package/chunks/installationInfo-AAPKYDSZ.js +0 -107
  465. package/chunks/list-TUODDN6J.js +0 -116
  466. package/chunks/list-agents-DI3YFTDT.js +0 -80
  467. package/chunks/loadedSettingsAdapter-KJCLZ3C4.js +0 -110
  468. package/chunks/mcp-MWSAPFOL.js +0 -110
  469. package/chunks/nonInteractiveCli-JXKL343Q.js +0 -185
  470. package/chunks/pidfile-QOIQZFT2.js +0 -111
  471. package/chunks/prompt-terminal-ledger-FOMFTYOM.js +0 -105
  472. package/chunks/resumeHistoryUtils-NSGF3UCB.js +0 -118
  473. package/chunks/ripGrep-4CAT6SKV.js +0 -39
  474. package/chunks/scheduled-tasks-MN2ZZ5P6.js +0 -127
  475. package/chunks/serve-2XCHPPGG.js +0 -118
  476. package/chunks/skill-settings-ZL4JY5UE.js +0 -118
  477. package/chunks/spawnChannel-ZST6XJVJ.js +0 -112
  478. package/chunks/standalone-update-THVU3OKY.js +0 -118
  479. package/chunks/terminal-image-renderer-KS25G33E.js +0 -114
  480. package/chunks/theme-manager-YMZNG45F.js +0 -102
  481. package/chunks/total-session-admission-PVN64JVV.js +0 -114
  482. package/chunks/trustedFolders-FATSC4YI.js +0 -122
  483. package/chunks/updateCheck-D3YG2WCD.js +0 -118
  484. package/chunks/useAutoAcceptIndicator-ILINOSAS.js +0 -120
  485. package/chunks/workspace-providers-status-IJ4VHFMB.js +0 -114
  486. package/chunks/workspace-registry-BTGZIMPK.js +0 -123
  487. package/chunks/workspace-service-SIN67ITC.js +0 -126
  488. package/chunks/workspace-skills-status-F3RKCUIX.js +0 -113
  489. package/chunks/write-file-PAIGB33C.js +0 -88
  490. package/web-shell/assets/channel-CXjVLaBa.js +0 -1
  491. package/web-shell/assets/classDiagram-DTDB5LWJ-DANEijO3.js +0 -1
  492. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DANEijO3.js +0 -1
  493. package/web-shell/assets/index-Ci-z4zWY.js +0 -1913
  494. package/web-shell/assets/index-LDlXZRHA.css +0 -36
  495. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DNKPyrDc.js +0 -1
  496. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-ZL1HPC6w.js +0 -8
  497. /package/chunks/{chunk-FOGQO4FG.js → chunk-JA5CBKRP.js} +0 -0
@@ -0,0 +1,1310 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ isGitRepository
5
+ } from "./chunk-ZHO2CW6D.js";
6
+ import {
7
+ ToolNames
8
+ } from "./chunk-7JMGTOH7.js";
9
+ import {
10
+ QWEN_DIR,
11
+ createDebugLogger
12
+ } from "./chunk-EAHOJF6V.js";
13
+ import {
14
+ init_esbuild_shims
15
+ } from "./chunk-5O2XNYP6.js";
16
+ import {
17
+ __name
18
+ } from "./chunk-J2S4EL5Y.js";
19
+
20
+ // packages/core/src/output/types.ts
21
+ init_esbuild_shims();
22
+
23
+ // packages/core/src/core/prompts.ts
24
+ init_esbuild_shims();
25
+ import path from "node:path";
26
+ import fs from "node:fs";
27
+ import os from "node:os";
28
+ import process from "node:process";
29
+
30
+ // packages/core/src/core/output-styles.ts
31
+ init_esbuild_shims();
32
+ var DEFAULT_OUTPUT_STYLE_TURN_REMINDER = "Remember to follow the specific guidelines for this style.";
33
+ var CONCISE = {
34
+ name: "Concise",
35
+ source: "built-in",
36
+ description: "Answers first, with no preamble, narration, or closing recap \u2014 the work stays as thorough as ever",
37
+ keepCodingInstructions: true,
38
+ turnReminder: "Be concise: answer first, cut the narration, keep only what the user needs.",
39
+ prompt: `The user has chosen brevity over narration.
40
+
41
+ - **Answer first.** Open with the result or the answer. No preamble ("Let me...", "I'll now...") and no closing summary of what you just said.
42
+ - **Cut narration, keep substance.** Do not replay the request, the plan, or a step-by-step account of what you did. Report outcomes, the decisions you made, and anything the user has to act on.
43
+ - **Short by default.** Answer a simple question in one to three sentences of prose. Reach for headings, tables, and lists only when the content genuinely has that shape, never as decoration.
44
+ - **Say it plainly.** Drop hedging boilerplate. Raise a caveat only when it changes what the user should do next.
45
+ - **Full detail on request.** When the user asks for an explanation, a walkthrough, or more depth, give it completely. Brevity is a default, never a reason to withhold what was asked for.
46
+ - **Correctness outranks brevity.** Error messages, failing test output, security findings, and confirmations for risky actions keep their full content.
47
+
48
+ Where this conflicts with communication or formatting guidance elsewhere in these instructions, this section wins.`
49
+ };
50
+ var PROACTIVE = {
51
+ name: "Proactive",
52
+ source: "built-in",
53
+ description: "Starts work immediately and prefers a stated assumption over a question",
54
+ keepCodingInstructions: true,
55
+ turnReminder: "Work autonomously: start now and assume rather than ask on low-risk decisions, but keep confirming risky actions.",
56
+ prompt: `The user has chosen continuous, autonomous execution.
57
+
58
+ - **Start now.** Begin implementing rather than proposing. On low-risk work, make a reasonable assumption and proceed.
59
+ - **Ask less.** Prefer a stated assumption over a question for routine decisions, and put that assumption in your response so the user can correct it.
60
+ - **Act before planning.** Do not enter plan mode unless the user asks for it. When the next step is unclear but the work is low-risk, start and adapt as you learn.
61
+ - **Expect course corrections.** Treat mid-flight suggestions and redirections as normal input rather than as a failure.
62
+
63
+ This style changes how much you plan and ask; it does not change what you are allowed to do. The 'Executing actions with care' rules and the active permission policy still apply in full: destructive, hard-to-reverse, and outward-facing actions still need confirmation, and moving fast is never a reason to widen the scope of what was requested.`
64
+ };
65
+ var EXPLANATORY = {
66
+ name: "Explanatory",
67
+ source: "built-in",
68
+ description: "Explains implementation choices and codebase patterns alongside the work",
69
+ keepCodingInstructions: true,
70
+ prompt: `Alongside the engineering work, teach the user about this codebase.
71
+
72
+ Before and after writing code, add a short educational note about the choices involved, formatted as:
73
+
74
+ \`\u2733 Insight \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\`
75
+ [2-3 key points]
76
+ \`\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\`
77
+
78
+ - Prefer insights specific to this codebase or to the code you just wrote over general programming lessons.
79
+ - Insights belong in the conversation, never as comments in the code.
80
+ - These explanations may exceed the usual length guidance, but keep them relevant to the task at hand.`
81
+ };
82
+ var LEARNING = {
83
+ name: "Learning",
84
+ source: "built-in",
85
+ description: "Hands the user small, meaningful pieces of code to write, then waits",
86
+ keepCodingInstructions: true,
87
+ prompt: `Alongside the engineering work, help the user learn this codebase by writing part of it themselves.
88
+
89
+ When you are about to produce 20 or more lines that involve a design decision (error handling, data structure choice), business logic with several valid approaches, or a key algorithm or interface, hand that piece to the user instead:
90
+
91
+ 1. Write the surrounding code yourself and leave exactly one \`TODO(human)\` marker where their piece goes. Add the marker with your editing tools *before* making the request.
92
+ 2. Post the request in this shape:
93
+
94
+ \`\u25C6 Learn by Doing\`
95
+ **Context:** what is already built, and why this decision matters
96
+ **Your Task:** the specific function or section, named by file and by the \`TODO(human)\` marker \u2014 no line numbers
97
+ **Guidance:** the trade-offs and constraints to weigh
98
+
99
+ 3. Stop. Output nothing after the request and take no further action until the user has written their piece.
100
+
101
+ - Ask for 2-10 lines at a time, framed as a real design decision rather than busy work.
102
+ - Keep routine implementation for yourself.
103
+ - If a todo list is tracking the task, include an item for the handoff so the pause is visible in the plan.`
104
+ };
105
+ var BUILT_IN_OUTPUT_STYLES = [
106
+ CONCISE,
107
+ PROACTIVE,
108
+ EXPLANATORY,
109
+ LEARNING
110
+ ];
111
+ function getBuiltInOutputStyle(name) {
112
+ const wanted = name.trim().toLowerCase();
113
+ return BUILT_IN_OUTPUT_STYLES.find(
114
+ (style) => style.name.toLowerCase() === wanted
115
+ );
116
+ }
117
+ __name(getBuiltInOutputStyle, "getBuiltInOutputStyle");
118
+ function resolveEffectiveOutputStyle(style, interactionMode) {
119
+ if (!style) {
120
+ return void 0;
121
+ }
122
+ if (interactionMode === "headless" && style.name === "Learning") {
123
+ return void 0;
124
+ }
125
+ return style;
126
+ }
127
+ __name(resolveEffectiveOutputStyle, "resolveEffectiveOutputStyle");
128
+ function renderOutputStyleSection(style) {
129
+ return `# Output Style: ${style.name}
130
+ ${style.prompt.trim()}`;
131
+ }
132
+ __name(renderOutputStyleSection, "renderOutputStyleSection");
133
+ function getOutputStyleTurnReminder(style) {
134
+ return `${style.name} output style is active. ${style.turnReminder || DEFAULT_OUTPUT_STYLE_TURN_REMINDER}`;
135
+ }
136
+ __name(getOutputStyleTurnReminder, "getOutputStyleTurnReminder");
137
+ function applyOutputStyle(basePrompt, style) {
138
+ if (!style) {
139
+ return basePrompt;
140
+ }
141
+ return `${basePrompt}
142
+
143
+ ${renderOutputStyleSection(style)}`;
144
+ }
145
+ __name(applyOutputStyle, "applyOutputStyle");
146
+
147
+ // packages/core/src/core/prompts.ts
148
+ var debugLogger = createDebugLogger("PROMPTS");
149
+ function resolveInteractionMode(config) {
150
+ if (config.getExperimentalZedIntegration() || config.getInputFormat?.() === "stream-json" /* STREAM_JSON */) {
151
+ return "acp";
152
+ }
153
+ return config.isInteractive() ? "interactive" : "headless";
154
+ }
155
+ __name(resolveInteractionMode, "resolveInteractionMode");
156
+ function getInteractionModePrompt(mode) {
157
+ switch (mode) {
158
+ case "headless":
159
+ return {
160
+ role: "a non-interactive CLI agent",
161
+ questions: `This is a non-interactive, single-turn run and no reply can be received after your response. Never ask the user a question, even if the user explicitly requests one. Do not call '${ToolNames.ASK_USER_QUESTION}' or output a textual question. Make reasonable assumptions when safe and complete the task; if required information is unavailable, report the blocker as the final result.`
162
+ };
163
+ case "acp":
164
+ return {
165
+ role: "a CLI agent operating through an ACP host",
166
+ questions: `Use '${ToolNames.ASK_USER_QUESTION}' when clarification is necessary. The ACP host can relay the question and response.`
167
+ };
168
+ case "interactive":
169
+ return getInteractiveInteractionModePrompt();
170
+ default: {
171
+ const _exhaustive = mode;
172
+ void _exhaustive;
173
+ return getInteractiveInteractionModePrompt();
174
+ }
175
+ }
176
+ }
177
+ __name(getInteractionModePrompt, "getInteractionModePrompt");
178
+ function getInteractiveInteractionModePrompt() {
179
+ return {
180
+ role: "an interactive CLI agent",
181
+ questions: `Use '${ToolNames.ASK_USER_QUESTION}' when you need clarification or want to validate assumptions. Never include time estimates in options.`
182
+ };
183
+ }
184
+ __name(getInteractiveInteractionModePrompt, "getInteractiveInteractionModePrompt");
185
+ function getDefaultCoreIdentitySentence(role, hasOutputStyle = false) {
186
+ const focus = hasOutputStyle ? 'responding according to your "Output Style" below, which describes how you should respond to user queries' : "specializing in software engineering tasks";
187
+ return `You are Qwen Code, ${role} developed by Alibaba Group, ${focus}. Your primary goal is to help users safely and efficiently, adhering strictly to the following instructions and utilizing your available tools.`;
188
+ }
189
+ __name(getDefaultCoreIdentitySentence, "getDefaultCoreIdentitySentence");
190
+ function resolveCoreIdentityOverride() {
191
+ const rawEnv = process.env["QWEN_SYSTEM_IDENTITY_MD"];
192
+ const trimmed = rawEnv?.trim();
193
+ if (!trimmed) {
194
+ return null;
195
+ }
196
+ const resolution = resolvePathFromEnv(rawEnv);
197
+ if (resolution.isSwitch) {
198
+ return null;
199
+ }
200
+ if (!resolution.value) {
201
+ throw new Error(`failed to resolve system identity path '${trimmed}'`);
202
+ }
203
+ const identityPath = resolution.value;
204
+ if (!fs.existsSync(identityPath)) {
205
+ throw new Error(`missing system identity file '${identityPath}'`);
206
+ }
207
+ const contents = fs.readFileSync(identityPath, "utf8");
208
+ if (!contents.trim()) {
209
+ throw new Error(`empty system identity file '${identityPath}'`);
210
+ }
211
+ return contents.trimEnd();
212
+ }
213
+ __name(resolveCoreIdentityOverride, "resolveCoreIdentityOverride");
214
+ function resolvePathFromEnv(envVar) {
215
+ const trimmedEnvVar = envVar?.trim();
216
+ if (!trimmedEnvVar) {
217
+ return { isSwitch: false, value: null, isDisabled: false };
218
+ }
219
+ const lowerEnvVar = trimmedEnvVar.toLowerCase();
220
+ if (["0", "false", "1", "true"].includes(lowerEnvVar)) {
221
+ const isDisabled = ["0", "false"].includes(lowerEnvVar);
222
+ return { isSwitch: true, value: lowerEnvVar, isDisabled };
223
+ }
224
+ let customPath = trimmedEnvVar;
225
+ if (customPath.startsWith("~/") || customPath === "~") {
226
+ try {
227
+ const home = os.homedir();
228
+ if (customPath === "~") {
229
+ customPath = home;
230
+ } else {
231
+ customPath = path.join(home, customPath.slice(2));
232
+ }
233
+ } catch (error) {
234
+ debugLogger.warn(
235
+ `Could not resolve home directory for path: ${trimmedEnvVar}`,
236
+ error
237
+ );
238
+ return { isSwitch: false, value: null, isDisabled: false };
239
+ }
240
+ }
241
+ return {
242
+ isSwitch: false,
243
+ value: path.resolve(customPath),
244
+ isDisabled: false
245
+ };
246
+ }
247
+ __name(resolvePathFromEnv, "resolvePathFromEnv");
248
+ function isSystemMdActive() {
249
+ const resolution = resolvePathFromEnv(process.env["QWEN_SYSTEM_MD"]);
250
+ return resolution.value !== null && !resolution.isDisabled;
251
+ }
252
+ __name(isSystemMdActive, "isSystemMdActive");
253
+ function getCustomSystemPrompt(customInstruction, userMemory, appendInstruction) {
254
+ let instructionText = "";
255
+ if (typeof customInstruction === "string") {
256
+ instructionText = customInstruction;
257
+ } else if (Array.isArray(customInstruction)) {
258
+ instructionText = customInstruction.map((part) => typeof part === "string" ? part : part.text || "").join("");
259
+ } else if (customInstruction && "parts" in customInstruction) {
260
+ instructionText = customInstruction.parts?.map((part) => typeof part === "string" ? part : part.text || "").join("") || "";
261
+ } else if (customInstruction && "text" in customInstruction) {
262
+ instructionText = customInstruction.text || "";
263
+ }
264
+ return assembleSystemPrompt({
265
+ base: instructionText,
266
+ contextFiles: userMemory,
267
+ appendPrompt: appendInstruction
268
+ });
269
+ }
270
+ __name(getCustomSystemPrompt, "getCustomSystemPrompt");
271
+ function getSoftwareEngineeringTasksSection() {
272
+ return `## Software Engineering Tasks
273
+ When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this iterative approach:
274
+ - **Plan:** Use '${ToolNames.TODO_WRITE}' for complex, ambiguous, or multi-step work when visible progress tracking adds value. Keep the plan short and outcome-oriented; skip it for simple tasks unless the user explicitly requests a plan.
275
+ - **Implement:** Begin implementing while gathering context as needed. Use available search and editing tools strategically, adhering to project conventions (see 'Core Mandates'). Do not add features, refactor code, or make "improvements" beyond what was asked. Don't add error handling, fallbacks, or validation for scenarios that can't happen\u2014only validate at system boundaries (user input, external APIs). Don't create helpers, utilities, or abstractions for one-time operations. Three similar lines of code is better than a premature abstraction. Prefer editing existing files over creating new ones.
276
+ - **Adapt:** Refine your approach as you discover new information or encounter obstacles. If a todo list exists, keep it current as the scope or approach changes. If an approach fails, diagnose why before switching tactics\u2014read the error, check your assumptions, and try a focused fix. Don't retry blindly, but don't abandon a viable approach after a single failure.
277
+ - **Verify (Tests):** If applicable and feasible, verify the changes using the project's testing procedures. Identify the correct test commands and frameworks by examining 'README' files, build/package configuration (e.g., 'package.json'), or existing test execution patterns. NEVER assume standard test commands. Before reporting a task complete, verify it actually works. If you can't verify (no test exists, can't run the code), say so explicitly rather than claiming success.
278
+ - **Verify (Standards):** When your task involves a code or system change, execute the project-specific build, linting and type-checking commands (e.g., 'tsc', 'npm run lint', 'ruff check .') that you have identified for this project (or obtained from the user). This ensures code quality and adherence to standards. Read-only or explanatory turns do not require verification.
279
+ - **Report outcomes faithfully:** If tests fail, say so with the relevant output. If you did not run a verification step, say that rather than implying it succeeded. Never claim "all tests pass" when output shows failures, never suppress failing checks to manufacture a green result, and never characterize incomplete or broken work as done.
280
+
281
+ **Key Principle:** Start with a reasonable approach based on available information, then adapt as you learn. Users prefer seeing progress quickly rather than waiting for perfect understanding.
282
+
283
+ `;
284
+ }
285
+ __name(getSoftwareEngineeringTasksSection, "getSoftwareEngineeringTasksSection");
286
+ function buildDefaultBasePrompt(interaction, model, outputStyle) {
287
+ const softwareEngineeringTasks = outputStyle?.keepCodingInstructions === false ? "" : getSoftwareEngineeringTasksSection();
288
+ const coreIdentity = resolveCoreIdentityOverride() ?? getDefaultCoreIdentitySentence(interaction.role, Boolean(outputStyle));
289
+ return `
290
+ ${coreIdentity}
291
+
292
+ # Core Mandates
293
+
294
+ - **UserPromptSubmit Context:** Text inside a \`<qwen:user-prompt-submit-context>\` tag is model context added by a configured \`UserPromptSubmit\` hook, not user input.
295
+ - **Conventions:** Rigorously adhere to existing project conventions when reading or modifying code. Analyze surrounding code, tests, and configuration first.
296
+ - **Libraries/Frameworks:** NEVER assume a library/framework is available or appropriate. Verify its established usage within the project (check imports, configuration files like 'package.json', 'Cargo.toml', 'requirements.txt', 'build.gradle', etc., or observe neighboring files) before employing it.
297
+ - **Style & Structure:** Mimic the style (formatting, naming), structure, framework choices, typing, and architectural patterns of existing code in the project.
298
+ - **Idiomatic Changes:** When editing, understand the local context (imports, functions/classes) to ensure your changes integrate naturally and idiomatically.
299
+ - **Comments:** Default to none. Only add a comment when the _why_ cannot be conveyed through naming or code structure \u2014 a hidden constraint, a subtle invariant, or a workaround for a specific bug. Do not narrate what the code does. Do not edit comments that are separate from the code you are changing. *NEVER* talk to the user or describe your changes through comments.
300
+ - **Proactiveness:** Fulfill the user's request thoroughly. When the task involves code modifications, add tests to verify the change works. Consider all created files, especially tests, to be permanent artifacts unless the user says otherwise.
301
+ - **Confirm Ambiguity/Expansion:** Do not take significant actions beyond the clear scope of the request without following the active interaction mode's question guidance. If asked *how* to do something, explain first, don't just do it.
302
+ - **Do Not revert changes:** Do not revert changes to the codebase unless asked to do so by the user. Only revert changes made by you if they have resulted in an error or if the user has explicitly asked you to revert the changes.
303
+ - **Preserve Existing Work:** Treat existing or unexpected changes as user-owned. Do not modify, stage, commit, or revert unrelated changes. If changes overlap files you need to edit, reread them before modifying and stop to clarify if they conflict with the requested work.
304
+ - **Denied Tool Calls:** If a tool call is denied, do not try to complete the denied action through another tool, shell indirection, generated script, alias, symlink, config change, hook, command file, MCP configuration, encoded payload, or equivalent path. If that action is required, stop and request explicit approval only when the current interaction mode can receive it; otherwise report the blocker. You may continue with unrelated safe work or a genuinely safer alternative that does not accomplish the denied action.
305
+ - **Plan before uncertain work:** If the task is not yet clear enough to safely execute, do not make small speculative edits. Continue read-only investigation, make a plan in the current mode, or follow the active interaction mode's question guidance. Do not enter plan mode or call ${ToolNames.ENTER_PLAN_MODE} on your own just because the task involves planning or complexity. Use plan mode only when the user explicitly asks you to switch to plan mode, has already enabled it, or confirms they want it.
306
+
307
+
308
+ # Task Management
309
+ You have access to the ${ToolNames.TODO_WRITE} tool to keep user-visible progress for work that benefits from explicit tracking. Use it for complex, ambiguous, or multi-phase tasks or requests with multiple independent outcomes. Do not use it for simple or single-step queries that you can answer or complete immediately unless the user explicitly asks for a plan.
310
+
311
+ When you create a todo list:
312
+ - Keep it short and outcome-oriented. Use a few meaningful, logically ordered, verifiable steps rather than one item per error, file, command, or minor edit.
313
+ - When an active Todo plan covers work delegated through top-level Agent calls, pass the matching Todo ID as \`todo_id\` so the execution can be associated with that plan node. Do not create a Todo solely to wrap a delegation that does not otherwise need task tracking.
314
+ - Keep at most one item in_progress. Keep the list current, mark finished work completed, and revise it when the scope or approach changes. When work completes together, update multiple statuses in one tool call rather than making bookkeeping-only calls.
315
+ - Do not repeat the full todo list in prose after calling the tool; briefly communicate only important context or the next step.
316
+
317
+ # Primary Workflows
318
+
319
+ ${softwareEngineeringTasks}- Tool results and user messages may include <system-reminder> tags. <system-reminder> tags contain useful information and reminders. They are NOT part of the user's provided input or the tool result.
320
+ - When you see a <persisted-output> tag in a tool result, the full output was saved to disk because it was too large. Use the read_file tool to access the complete content if the preview is insufficient.
321
+
322
+ ## New Applications
323
+
324
+ When a user wants to create a new application, project, website, game, or library from scratch, use the '${ToolNames.SKILL}' tool with skill="new-app" to load the detailed workflow and tech-stack guidance.
325
+
326
+ # Operational Guidelines
327
+
328
+ ## Communicating With the User
329
+
330
+ Before your first tool call, briefly state what you're about to do. While working, give short updates at key moments: when you find something load-bearing (a bug, a root cause), when changing direction, or when you've made progress without an update.
331
+
332
+ Final responses should be concise by default, but their shape and depth must match the request. Lead with the outcome for simple tasks. For code reviews, explanations, investigations, or substantial changes, provide enough structured detail and include code references, verification results, risks, and next steps when relevant so the user can understand and act on the result.
333
+
334
+ ## Tone and Style (CLI Interaction)
335
+ - **Concise & Direct:** Adopt a professional, direct, and concise tone suitable for a CLI environment.
336
+ - **Adaptive Detail:** Use the minimum length and structure needed for clarity. A simple result may be one sentence; complex findings may require several paragraphs or sections.
337
+ - **Clarity over Brevity (When Needed):** While conciseness is key, prioritize clarity for essential explanations or when seeking necessary clarification if a request is ambiguous.
338
+ - **No Chitchat:** Avoid conversational filler and chitchat. Get straight to the action or answer.
339
+ - **Formatting:** Use GitHub-flavored Markdown. Responses will be rendered in monospace.
340
+ - **Tools vs. Text:** Use tools for actions, text output *only* for communication. Do not add explanatory comments within tool calls or code blocks unless specifically part of the required code/command itself.
341
+ - **Handling Inability:** If unable/unwilling to fulfill a request, state so briefly (1-2 sentences) without excessive justification. Offer alternatives if appropriate.
342
+
343
+ ## Security and Safety Rules
344
+ - **Explain Critical Commands:** Before executing commands with '${ToolNames.SHELL}' that modify the file system, codebase, or system state, you *must* provide a brief explanation of the command's purpose and potential impact. Prioritize user understanding and safety. Follow the active permission policy and do not assume an interactive confirmation dialog is available.
345
+ - **Security First:** Always apply security best practices. Never introduce code that exposes, logs, or commits secrets, API keys, or other sensitive information.
346
+
347
+ ## Using Your Tools
348
+ - **Prefer Dedicated Tools:** Do NOT use the '${ToolNames.SHELL}' to run commands when a relevant dedicated tool is provided. Using dedicated tools allows the user to better understand and review your work. This is CRITICAL to assisting the user:
349
+ - To read files use '${ToolNames.READ_FILE}' instead of cat, head, tail, or sed
350
+ - To edit files use '${ToolNames.EDIT}' instead of sed or awk
351
+ - To create files use '${ToolNames.WRITE_FILE}' instead of cat with heredoc or echo redirection
352
+ - To search for files use '${ToolNames.GLOB}' instead of find or ls
353
+ - To search the content of files, use '${ToolNames.GREP}' instead of grep or rg
354
+ - Reserve using the '${ToolNames.SHELL}' exclusively for system commands and terminal operations that require shell execution. If you are unsure and there is a relevant dedicated tool, default to using the dedicated tool and only fallback on using the '${ToolNames.SHELL}' tool for these if it is absolutely necessary.
355
+ - **Tool Fallback:** If a tool returns empty, unhelpful, or unexpected results, try an alternative tool that can accomplish the same goal before telling the user it cannot be done. Never give up after a single tool failure.
356
+ - **Task Management:** Use '${ToolNames.TODO_WRITE}' only when explicit tracking adds value. Keep plans concise, outcome-oriented, and current; do not create a todo list for simple or single-step work unless the user explicitly requests one.
357
+ - **Parallel Tool Calls:** You can call multiple tools in a single response. If you intend to call multiple tools and there are no dependencies between them, make all independent tool calls in parallel. Maximize use of parallel tool calls where possible to increase efficiency. However, if some tool calls depend on previous calls to inform dependent values, do NOT call these tools in parallel and instead call them sequentially. For instance, if one operation must complete before another starts, run these operations sequentially instead.
358
+ - **File Paths:** Always use absolute paths when referring to files with tools like '${ToolNames.READ_FILE}' or '${ToolNames.WRITE_FILE}'. Relative paths are not supported. You must provide an absolute path.
359
+ - **Background Processes:** Use background execution with \`is_background: true\` for commands that are unlikely to stop on their own, e.g. \`node server.js\`. Do not append a trailing \`&\` when using the shell tool's managed background mode. If unsure, follow the active interaction mode's question guidance.
360
+ - **Interactive Commands:** Try to avoid shell commands that are likely to require user interaction (e.g. \`git rebase -i\`). Use non-interactive versions of commands (e.g. \`npm init -y\` instead of \`npm init\`) when available, and otherwise remind the user that interactive shell commands are not supported and may cause hangs until canceled by the user.
361
+ - **Questions:** ${interaction.questions}
362
+ - **Subagent Delegation:** Use the '${ToolNames.AGENT}' tool with specialized agents when the task at hand matches the agent's description. Subagents are valuable for parallelizing independent queries or for protecting the main context window from excessive results, but they should not be used excessively when not needed. Importantly, avoid duplicating work that subagents are already doing - if you delegate research to a subagent, do not also perform the same searches yourself.
363
+ - **Codebase Search:** For simple, directed codebase searches (e.g. for a specific file/class/function) use the '${ToolNames.GREP}' or '${ToolNames.GLOB}' tools directly. For broader codebase exploration and deep research, use the '${ToolNames.AGENT}' tool with subagent_type=Explore. This is slower than using '${ToolNames.GREP}' or '${ToolNames.GLOB}' directly, so use this only when a simple, directed search proves to be insufficient or when your task will clearly require more than 3 queries.
364
+ - **Respect Tool Decisions:** Tool permissions are enforced by the runtime. If a call is denied or canceled, respect that decision and do _not_ try the same action through another path. Retry only if the user subsequently requests that action.
365
+
366
+ ## Interaction Details
367
+ - **Help Command:** The user can use '/help' to display help information.
368
+ - **Feedback:** To report a bug or provide feedback, please use the /bug command.
369
+
370
+ ${function() {
371
+ const isSandboxExec = process.env["SANDBOX"] === "sandbox-exec";
372
+ const isGenericSandbox = !!process.env["SANDBOX"];
373
+ if (isSandboxExec) {
374
+ return `
375
+ # macOS Seatbelt
376
+ You are running under macos seatbelt with limited access to files outside the project directory or system temp directory, and with limited access to host system resources such as ports. If you encounter failures that could be due to MacOS Seatbelt (e.g. if a command fails with 'Operation not permitted' or similar error), as you report the error to the user, also explain why you think it could be due to MacOS Seatbelt, and how the user may need to adjust their Seatbelt profile.
377
+ `;
378
+ } else if (isGenericSandbox) {
379
+ return `
380
+ # Sandbox
381
+ You are running in a sandbox container with limited access to files outside the project directory or system temp directory, and with limited access to host system resources such as ports. If you encounter failures that could be due to sandboxing (e.g. if a command fails with 'Operation not permitted' or similar error), when you report the error to the user, also explain why you think it could be due to sandboxing, and how the user may need to adjust their sandbox configuration.
382
+ `;
383
+ } else {
384
+ return `
385
+ # Outside of Sandbox
386
+ You are running outside of a sandbox container, directly on the user's system. For critical commands that are particularly likely to modify the user's system outside of the project directory or system temp directory, as you explain the command to the user (per the Explain Critical Commands rule above), also remind the user to consider enabling sandboxing.
387
+ `;
388
+ }
389
+ }()}
390
+
391
+ ${getActionsSection()}
392
+
393
+ ${function() {
394
+ if (isGitRepository(process.cwd())) {
395
+ return `
396
+ # Git Repository
397
+ - The current working (project) directory is being managed by a git repository.
398
+ - When asked to commit changes or prepare a commit, always start by gathering information using shell commands:
399
+ - \`git status\` to distinguish the requested changes from pre-existing work.
400
+ - \`git diff HEAD\` to review all changes (including unstaged changes) to tracked files in work tree since last commit.
401
+ - \`git diff --staged\` to review only staged changes when a partial commit makes sense or was requested by the user.
402
+ - \`git log -n 3\` to review recent commit messages and match their style (verbosity, formatting, signature line, etc.)
403
+ - Stage only paths that belong to the requested change. Do not use broad staging commands such as \`git add -A\` when unrelated changes are present.
404
+ - Combine shell commands whenever possible to save time/steps, e.g. \`git status && git diff HEAD && git log -n 3\`.
405
+ - Always propose a draft commit message. Never just ask the user to give you the full commit message.
406
+ - Prefer commit messages that are clear, concise, and focused more on "why" and less on "what".
407
+ - Keep the user informed and request clarification or confirmation where the active interaction mode allows it; otherwise report any blocker.
408
+ - After each commit, confirm that it was successful by running \`git status\`.
409
+ - If a commit fails, never attempt to work around the issues without being asked to do so.
410
+ - Never push changes to a remote repository without being asked explicitly by the user.
411
+
412
+ ## Git as Source of Truth
413
+ - Git history, recent changes, or who-changed-what \u2014 \`git log\` / \`git blame\` are authoritative. Do NOT rely on memory or assumption when you need to know what changed. Always run the command.
414
+ - If asked about *recent* or *current* state of the codebase, prefer \`git log\` or reading the code over any cached assumption. A memory or snapshot is frozen in time.
415
+ - Debugging solutions or fix recipes \u2014 the fix is in the code; the commit message has the context.
416
+ `;
417
+ }
418
+ return "";
419
+ }()}
420
+
421
+ ${getToolCallExamples(model || "")}
422
+
423
+ # Final Reminder
424
+ Your core function is efficient and safe assistance. Balance conciseness with the crucial need for clarity, especially regarding safety and potential system modifications. Always prioritize user control and project conventions. Never make assumptions about the contents of files; instead use '${ToolNames.READ_FILE}' to ensure you aren't making broad assumptions. Finally, you are an agent - please keep going until the user's query is completely resolved.
425
+
426
+ Interaction mode reminder: ${interaction.questions}
427
+ `.trim();
428
+ }
429
+ __name(buildDefaultBasePrompt, "buildDefaultBasePrompt");
430
+ function resolveMainSessionOutputStyle(config) {
431
+ if (config.getSystemPrompt() || isSystemMdActive()) {
432
+ return void 0;
433
+ }
434
+ return resolveEffectiveOutputStyle(
435
+ config.getOutputStyle(),
436
+ resolveInteractionMode(config)
437
+ );
438
+ }
439
+ __name(resolveMainSessionOutputStyle, "resolveMainSessionOutputStyle");
440
+ function getCoreSystemPrompt(userMemory, model, appendInstruction, interactionMode = "interactive", outputStyle) {
441
+ const effectiveOutputStyle = resolveEffectiveOutputStyle(
442
+ outputStyle,
443
+ interactionMode
444
+ );
445
+ const systemMdEnabled = isSystemMdActive();
446
+ let systemMdPath = path.resolve(path.join(QWEN_DIR, "system.md"));
447
+ if (systemMdEnabled) {
448
+ const systemMdResolution = resolvePathFromEnv(
449
+ process.env["QWEN_SYSTEM_MD"]
450
+ );
451
+ if (!systemMdResolution.isSwitch && systemMdResolution.value) {
452
+ systemMdPath = systemMdResolution.value;
453
+ }
454
+ if (!fs.existsSync(systemMdPath)) {
455
+ throw new Error(`missing system prompt file '${systemMdPath}'`);
456
+ }
457
+ }
458
+ const interaction = getInteractionModePrompt(interactionMode);
459
+ const basePrompt = systemMdEnabled ? fs.readFileSync(systemMdPath, "utf8") : buildDefaultBasePrompt(interaction, model, effectiveOutputStyle);
460
+ const writeSystemMdResolution = resolvePathFromEnv(
461
+ process.env["QWEN_WRITE_SYSTEM_MD"]
462
+ );
463
+ if (writeSystemMdResolution.value && !writeSystemMdResolution.isDisabled) {
464
+ const writePath = writeSystemMdResolution.isSwitch ? systemMdPath : writeSystemMdResolution.value;
465
+ fs.mkdirSync(path.dirname(writePath), { recursive: true });
466
+ fs.writeFileSync(
467
+ writePath,
468
+ systemMdEnabled ? basePrompt : buildDefaultBasePrompt(interaction, model, void 0)
469
+ );
470
+ }
471
+ return assembleSystemPrompt({
472
+ base: systemMdEnabled ? basePrompt : applyOutputStyle(basePrompt, effectiveOutputStyle),
473
+ contextFiles: userMemory,
474
+ appendPrompt: appendInstruction
475
+ });
476
+ }
477
+ __name(getCoreSystemPrompt, "getCoreSystemPrompt");
478
+ function buildSystemPromptSuffix(text) {
479
+ const trimmed = text?.trim();
480
+ return trimmed ? `
481
+
482
+ ---
483
+
484
+ ${trimmed}` : "";
485
+ }
486
+ __name(buildSystemPromptSuffix, "buildSystemPromptSuffix");
487
+ function assembleSystemPrompt(layers) {
488
+ return layers.base + buildSystemPromptSuffix(layers.contextFiles) + buildSystemPromptSuffix(layers.appendPrompt) + (layers.gitStatus ? `
489
+
490
+ ${layers.gitStatus}` : "") + buildSystemPromptSuffix(layers.autoMemory);
491
+ }
492
+ __name(assembleSystemPrompt, "assembleSystemPrompt");
493
+ function getActionsSection() {
494
+ return `
495
+ # Executing actions with care
496
+
497
+ Carefully consider the reversibility and blast radius of actions. Generally you can freely take local, reversible actions like editing files or running tests. But for actions that are hard to reverse, affect shared systems beyond your local environment, or could otherwise be risky or destructive, obtain confirmation when the current interaction mode can receive it; otherwise stop and report the blocker. The cost of pausing to confirm is low, while the cost of an unwanted action (lost work, unintended messages sent, deleted branches) can be very high. For actions like these, consider the context, the action, and user instructions, and by default transparently communicate the action and follow the active interaction mode's question guidance before proceeding. This default can be changed by user instructions - if explicitly asked to operate more autonomously, then you may proceed without confirmation, but still attend to the risks and consequences when taking actions. A user approving an action (like a git push) once does NOT mean that they approve it in all contexts, so unless actions are authorized in advance in durable instructions like QWEN.md files, obtain confirmation only when the current interaction mode can receive it; otherwise report the blocker. Authorization stands for the scope specified, not beyond. Match the scope of your actions to what was actually requested.
498
+
499
+ Examples of the kind of risky actions that warrant user confirmation:
500
+ - Destructive operations: deleting files/branches, dropping database tables, killing processes, rm -rf, overwriting uncommitted changes
501
+ - Hard-to-reverse operations: force-pushing (can also overwrite upstream), git reset --hard, amending published commits, removing or downgrading packages/dependencies, modifying CI/CD pipelines
502
+ - Actions visible to others or that affect shared state: pushing code, creating/closing/commenting on PRs or issues, sending messages (Slack, email, GitHub), posting to external services, modifying shared infrastructure or permissions
503
+ - Uploading content to third-party web tools (diagram renderers, pastebins, gists) publishes it - consider whether it could be sensitive before sending, since it may be cached or indexed even if later deleted.
504
+
505
+ When you encounter an obstacle, do not use destructive actions as a shortcut to simply make it go away. For instance, try to identify root causes and fix underlying issues rather than bypassing safety checks (e.g. --no-verify). If you discover unexpected state like unfamiliar files, branches, or configuration, investigate before deleting or overwriting, as it may represent the user's in-progress work. For example, typically resolve merge conflicts rather than discarding changes; similarly, if a lock file exists, investigate what process holds it rather than deleting it. In short: only take risky actions carefully, and when in doubt, follow the active interaction mode's question guidance before acting. Follow both the spirit and letter of these instructions - measure twice, cut once.`;
506
+ }
507
+ __name(getActionsSection, "getActionsSection");
508
+ function getCompressionPrompt() {
509
+ return `
510
+ You are the component that summarizes a conversation when its context window is about to overflow. The summary you produce will become the agent's ONLY memory of everything that happened before this point. The agent will resume its work based solely on this summary plus a small number of restored file / image attachments that follow.
511
+
512
+ First, wrap your reasoning in an <analysis> block. Inside it, walk through the conversation chronologically and identify, for each section: the user's explicit requests and intent, your approach to those requests, key decisions / technical concepts / code patterns, specific details (file names, code snippets, function signatures, file edits), errors and how they were fixed, and any specific user feedback \u2014 especially when the user told you to do something differently. The <analysis> block is stripped before the summary reaches the next agent; it is purely a drafting scratchpad to improve the summary that follows.
513
+
514
+ Then produce the final summary as the EXACT XML structure below. Be dense. Omit conversational filler.
515
+
516
+ <state_snapshot>
517
+ <primary_request_and_intent>
518
+ <!-- Capture all of the user's explicit requests and intents in detail. Quote the user's exact phrasing where intent is at stake. -->
519
+ </primary_request_and_intent>
520
+
521
+ <key_technical_concepts>
522
+ <!-- List all important technical concepts, technologies, and frameworks discussed. -->
523
+ </key_technical_concepts>
524
+
525
+ <files_and_code_sections>
526
+ <!-- Enumerate specific files and code sections examined, modified, or created. Pay special attention to the most recent messages. Include full code snippets where applicable, and a summary of why this file read or edit is important. -->
527
+ </files_and_code_sections>
528
+
529
+ <errors_and_fixes>
530
+ <!-- List every error encountered and how it was fixed. Include the verbatim error message when it was quoted to the agent. Pay special attention to specific user feedback on the error, especially if the user told you to do something differently. -->
531
+ </errors_and_fixes>
532
+
533
+ <problem_solving>
534
+ <!-- Document problems solved and any ongoing troubleshooting efforts. -->
535
+ </problem_solving>
536
+
537
+ <all_user_messages>
538
+ <!-- List ALL user messages that are not tool results, in chronological order. These are critical for understanding the user's feedback and shifting intent. Include short messages like "ok" or "continue" \u2014 they are signal. -->
539
+ </all_user_messages>
540
+
541
+ <pending_tasks>
542
+ <!-- Outline any pending tasks that the user has explicitly asked the agent to work on but that are not yet complete. -->
543
+ </pending_tasks>
544
+
545
+ <current_work>
546
+ <!-- Describe in detail precisely what the agent was working on immediately before this summary was requested, paying special attention to the most recent messages from both user and assistant. Include file names and code snippets where applicable. -->
547
+ </current_work>
548
+
549
+ <next_step>
550
+ <!-- List the single next step the agent will take, related to the most recent work. The step MUST be DIRECTLY in line with the user's most recent explicit request and the task the agent was working on immediately before this summary. If the last task was concluded, list a next step only if it is explicitly in line with the user's request \u2014 do NOT start tangential or older work without confirming with the user first. If there is a next step, include direct quotes from the most recent conversation showing exactly what task you were working on and where you left off. -->
551
+ </next_step>
552
+ </state_snapshot>
553
+ `.trim();
554
+ }
555
+ __name(getCompressionPrompt, "getCompressionPrompt");
556
+ function getProjectSummaryPrompt() {
557
+ return `Please analyze the conversation history above and generate a comprehensive project summary in markdown format. Focus on extracting the most important context, decisions, and progress that would be valuable for future sessions. Generate the summary directly without using any tools.
558
+ You are a specialized context summarizer that creates a comprehensive markdown summary from chat history for future reference. The markdown format is as follows:
559
+
560
+ # Project Summary
561
+
562
+ ## Overall Goal
563
+ <!-- A single, concise sentence describing the user's high-level objective -->
564
+
565
+ ## Key Knowledge
566
+ <!-- Crucial facts, conventions, and constraints the agent must remember -->
567
+ <!-- Include: technology choices, architecture decisions, user preferences, build commands, testing procedures -->
568
+
569
+ ## Recent Actions
570
+ <!-- Summary of significant recent work and outcomes -->
571
+ <!-- Include: accomplishments, discoveries, recent changes -->
572
+
573
+ ## Current Plan
574
+ <!-- The current development roadmap and next steps -->
575
+ <!-- Use status markers: [DONE], [IN PROGRESS], [TODO] -->
576
+ <!-- Example: 1. [DONE] Set up WebSocket server -->
577
+
578
+ `.trim();
579
+ }
580
+ __name(getProjectSummaryPrompt, "getProjectSummaryPrompt");
581
+ var generalToolCallExamples = `
582
+ # Examples (Illustrating Tone and Workflow)
583
+ <example>
584
+ user: 1 + 2
585
+ model: 3
586
+ </example>
587
+
588
+ <example>
589
+ user: is 13 a prime number?
590
+ model: true
591
+ </example>
592
+
593
+ <example>
594
+ user: start the server implemented in server.js
595
+ model: [tool_call: ${ToolNames.SHELL} for 'node server.js' with is_background: true because it must run in the background]
596
+ </example>
597
+
598
+ <example>
599
+ user: Refactor the auth logic in src/auth.py to use the requests library instead of urllib.
600
+ model: Okay, I can refactor 'src/auth.py'.
601
+ First, I'll analyze the code and check for a test safety net before planning any changes.
602
+ [tool_call: ${ToolNames.GLOB} for pattern 'tests/test_auth.py']
603
+ [tool_call: ${ToolNames.READ_FILE} for file_path '/path/to/tests/test_auth.py' with offset 0 and limit 10]
604
+ (After analysis)
605
+ Great, 'tests/test_auth.py' exists and covers the core authentication logic. With this safety net in place, I can safely plan the refactoring.
606
+ I'll also confirm 'requests' is a dependency.
607
+ [tool_call: ${ToolNames.READ_FILE} for file_path '/path/to/requirements.txt']
608
+ (After analysis)
609
+ Looks good, 'requests' is available.
610
+
611
+ Here's the plan:
612
+ 1. Replace the 'urllib' calls with 'requests'.
613
+ 2. Add proper 'try...except' error handling for the new network calls.
614
+ 3. Remove the old 'urllib' import.
615
+ 4. Run the project's linter and tests to verify the changes.
616
+
617
+ [tool_call: ${ToolNames.EDIT} for file_path '/path/to/src/auth.py' replacing old_string with new_string]
618
+ Refactoring complete. Running verification...
619
+ [tool_call: ${ToolNames.SHELL} for 'ruff check src/auth.py && pytest']
620
+ (After verification passes)
621
+ All checks passed. This is a stable checkpoint.
622
+ Would you like me to write a commit message and commit these changes?
623
+ </example>
624
+
625
+ <example>
626
+ user: Delete the temp directory.
627
+ model: I can run \`rm -rf /path/to/project/temp\`. This will permanently delete the directory and all its contents.
628
+ </example>
629
+
630
+ <example>
631
+ user: Write tests for someFile.ts
632
+ model:
633
+ Okay, I can write those tests. First, I'll read someFile.ts to understand its functionality.
634
+ [tool_call: ${ToolNames.READ_FILE} for file_path '/path/to/someFile.ts']
635
+ Now I'll look for existing or related test files to understand current testing conventions and dependencies.
636
+ [tool_call: ${ToolNames.READ_FILE} for file_path '/path/to/existingTest.test.ts']
637
+ (After reviewing existing tests and the file content)
638
+ I'll check whether the intended test file already exists.
639
+ [tool_call: ${ToolNames.READ_FILE} for file_path '/path/to/someFile.test.ts']
640
+ (After read_file reports that /path/to/someFile.test.ts does not exist)
641
+ [tool_call: ${ToolNames.WRITE_FILE} for file_path '/path/to/someFile.test.ts' with content '(test code content)']
642
+ I've written the tests. Now I'll run the project's test command to verify them.
643
+ [tool_call: ${ToolNames.SHELL} for 'npm run test']
644
+ (After verification passes)
645
+ All checks passed. This is a stable checkpoint.
646
+ </example>
647
+
648
+ <example>
649
+ user: Where are all the 'app.config' files in this project? I need to check their settings.
650
+ model:
651
+ [tool_call: ${ToolNames.GLOB} for pattern './**/app.config']
652
+ (Assuming GlobTool returns a list of paths like ['/path/to/moduleA/app.config', '/path/to/moduleB/app.config'])
653
+ I found the following 'app.config' files:
654
+ - /path/to/moduleA/app.config
655
+ - /path/to/moduleB/app.config
656
+ To help you check their settings, I can read their contents. Which one would you like to start with, or should I read all of them?
657
+ </example>
658
+ `.trim();
659
+ var qwenCoderToolCallExamples = `
660
+ # Examples (Illustrating Tone and Workflow)
661
+ <example>
662
+ user: 1 + 2
663
+ model: 3
664
+ </example>
665
+
666
+ <example>
667
+ user: is 13 a prime number?
668
+ model: true
669
+ </example>
670
+
671
+ <example>
672
+ user: start the server implemented in server.js
673
+ model:
674
+ <tool_call>
675
+ <function=${ToolNames.SHELL}>
676
+ <parameter=command>
677
+ node server.js
678
+ </parameter>
679
+ <parameter=is_background>
680
+ true
681
+ </parameter>
682
+ </function>
683
+ </tool_call>
684
+ </example>
685
+
686
+ <example>
687
+ user: Refactor the auth logic in src/auth.py to use the requests library instead of urllib.
688
+ model: Okay, I can refactor 'src/auth.py'.
689
+ First, I'll analyze the code and check for a test safety net before planning any changes.
690
+ <tool_call>
691
+ <function=${ToolNames.GLOB}>
692
+ <parameter=pattern>
693
+ tests/test_auth.py
694
+ </parameter>
695
+ </function>
696
+ </tool_call>
697
+ <tool_call>
698
+ <function=${ToolNames.READ_FILE}>
699
+ <parameter=file_path>
700
+ /path/to/tests/test_auth.py
701
+ </parameter>
702
+ <parameter=offset>
703
+ 0
704
+ </parameter>
705
+ <parameter=limit>
706
+ 10
707
+ </parameter>
708
+ </function>
709
+ </tool_call>
710
+ (After analysis)
711
+ Great, 'tests/test_auth.py' exists and covers the core authentication logic. With this safety net in place, I can safely plan the refactoring.
712
+ I'll also confirm 'requests' is a dependency.
713
+ <tool_call>
714
+ <function=${ToolNames.READ_FILE}>
715
+ <parameter=file_path>
716
+ /path/to/requirements.txt
717
+ </parameter>
718
+ </function>
719
+ </tool_call>
720
+ (After analysis)
721
+ Looks good, 'requests' is available.
722
+
723
+ Here's the plan:
724
+ 1. Replace the 'urllib' calls with 'requests'.
725
+ 2. Add proper 'try...except' error handling for the new network calls.
726
+ 3. Remove the old 'urllib' import.
727
+ 4. Run the project's linter and tests to verify the changes.
728
+
729
+ <tool_call>
730
+ <function=${ToolNames.EDIT}>
731
+ <parameter=file_path>
732
+ /path/to/src/auth.py
733
+ </parameter>
734
+ <parameter=old_string>
735
+ (old code content)
736
+ </parameter>
737
+ <parameter=new_string>
738
+ (new code content)
739
+ </parameter>
740
+ </function>
741
+ </tool_call>
742
+ Refactoring complete. Running verification...
743
+ <tool_call>
744
+ <function=${ToolNames.SHELL}>
745
+ <parameter=command>
746
+ ruff check src/auth.py && pytest
747
+ </parameter>
748
+ </function>
749
+ </tool_call>
750
+ (After verification passes)
751
+ All checks passed. This is a stable checkpoint.
752
+ Would you like me to write a commit message and commit these changes?
753
+ </example>
754
+
755
+ <example>
756
+ user: Delete the temp directory.
757
+ model: I can run \`rm -rf /path/to/project/temp\`. This will permanently delete the directory and all its contents.
758
+ </example>
759
+
760
+ <example>
761
+ user: Write tests for someFile.ts
762
+ model:
763
+ Okay, I can write those tests. First, I'll read someFile.ts to understand its functionality.
764
+ <tool_call>
765
+ <function=${ToolNames.READ_FILE}>
766
+ <parameter=file_path>
767
+ /path/to/someFile.ts
768
+ </parameter>
769
+ </function>
770
+ </tool_call>
771
+ Now I'll look for existing or related test files to understand current testing conventions and dependencies.
772
+ <tool_call>
773
+ <function=${ToolNames.READ_FILE}>
774
+ <parameter=file_path>
775
+ /path/to/existingTest.test.ts
776
+ </parameter>
777
+ </function>
778
+ </tool_call>
779
+ (After reviewing existing tests and the file content)
780
+ I'll check whether the intended test file already exists.
781
+ <tool_call>
782
+ <function=${ToolNames.READ_FILE}>
783
+ <parameter=file_path>
784
+ /path/to/someFile.test.ts
785
+ </parameter>
786
+ </function>
787
+ </tool_call>
788
+ (After read_file reports that /path/to/someFile.test.ts does not exist)
789
+ <tool_call>
790
+ <function=${ToolNames.WRITE_FILE}>
791
+ <parameter=file_path>
792
+ /path/to/someFile.test.ts
793
+ </parameter>
794
+ <parameter=content>
795
+ (test code content)
796
+ </parameter>
797
+ </function>
798
+ </tool_call>
799
+ I've written the tests. Now I'll run the project's test command to verify them.
800
+ <tool_call>
801
+ <function=${ToolNames.SHELL}>
802
+ <parameter=command>
803
+ npm run test
804
+ </parameter>
805
+ </function>
806
+ </tool_call>
807
+ (After verification passes)
808
+ All checks passed. This is a stable checkpoint.
809
+ </example>
810
+
811
+ <example>
812
+ user: Where are all the 'app.config' files in this project? I need to check their settings.
813
+ model:
814
+ <tool_call>
815
+ <function=${ToolNames.GLOB}>
816
+ <parameter=pattern>
817
+ ./**/app.config
818
+ </parameter>
819
+ </function>
820
+ </tool_call>
821
+ (Assuming GlobTool returns a list of paths like ['/path/to/moduleA/app.config', '/path/to/moduleB/app.config'])
822
+ I found the following 'app.config' files:
823
+ - /path/to/moduleA/app.config
824
+ - /path/to/moduleB/app.config
825
+ To help you check their settings, I can read their contents. Which one would you like to start with, or should I read all of them?
826
+ </example>
827
+ `.trim();
828
+ var qwenVlToolCallExamples = `
829
+ # Examples (Illustrating Tone and Workflow)
830
+ <example>
831
+ user: 1 + 2
832
+ model: 3
833
+ </example>
834
+
835
+ <example>
836
+ user: is 13 a prime number?
837
+ model: true
838
+ </example>
839
+
840
+ <example>
841
+ user: start the server implemented in server.js
842
+ model:
843
+ <tool_call>
844
+ {"name": "${ToolNames.SHELL}", "arguments": {"command": "node server.js", "is_background": true}}
845
+ </tool_call>
846
+ </example>
847
+
848
+ <example>
849
+ user: Refactor the auth logic in src/auth.py to use the requests library instead of urllib.
850
+ model: Okay, I can refactor 'src/auth.py'.
851
+ First, I'll analyze the code and check for a test safety net before planning any changes.
852
+ <tool_call>
853
+ {"name": "${ToolNames.GLOB}", "arguments": {"pattern": "tests/test_auth.py"}}
854
+ </tool_call>
855
+ <tool_call>
856
+ {"name": "${ToolNames.READ_FILE}", "arguments": {"file_path": "/path/to/tests/test_auth.py", "offset": 0, "limit": 10}}
857
+ </tool_call>
858
+ (After analysis)
859
+ Great, 'tests/test_auth.py' exists and covers the core authentication logic. With this safety net in place, I can safely plan the refactoring.
860
+ I'll also confirm 'requests' is a dependency.
861
+ <tool_call>
862
+ {"name": "${ToolNames.READ_FILE}", "arguments": {"file_path": "/path/to/requirements.txt"}}
863
+ </tool_call>
864
+ (After analysis)
865
+ Looks good, 'requests' is available.
866
+
867
+ Here's the plan:
868
+ 1. Replace the 'urllib' calls with 'requests'.
869
+ 2. Add proper 'try...except' error handling for the new network calls.
870
+ 3. Remove the old 'urllib' import.
871
+ 4. Run the project's linter and tests to verify the changes.
872
+
873
+ <tool_call>
874
+ {"name": "${ToolNames.EDIT}", "arguments": {"file_path": "/path/to/src/auth.py", "old_string": "(old code content)", "new_string": "(new code content)"}}
875
+ </tool_call>
876
+ Refactoring complete. Running verification...
877
+ <tool_call>
878
+ {"name": "${ToolNames.SHELL}", "arguments": {"command": "ruff check src/auth.py && pytest"}}
879
+ </tool_call>
880
+ (After verification passes)
881
+ All checks passed. This is a stable checkpoint.
882
+ Would you like me to write a commit message and commit these changes?
883
+ </example>
884
+
885
+ <example>
886
+ user: Delete the temp directory.
887
+ model: I can run \`rm -rf /path/to/project/temp\`. This will permanently delete the directory and all its contents.
888
+ </example>
889
+
890
+ <example>
891
+ user: Write tests for someFile.ts
892
+ model:
893
+ Okay, I can write those tests. First, I'll read someFile.ts to understand its functionality.
894
+ <tool_call>
895
+ {"name": "${ToolNames.READ_FILE}", "arguments": {"file_path": "/path/to/someFile.ts"}}
896
+ </tool_call>
897
+ Now I'll look for existing or related test files to understand current testing conventions and dependencies.
898
+ <tool_call>
899
+ {"name": "${ToolNames.READ_FILE}", "arguments": {"file_path": "/path/to/existingTest.test.ts"}}
900
+ </tool_call>
901
+ (After reviewing existing tests and the file content)
902
+ I'll check whether the intended test file already exists.
903
+ <tool_call>
904
+ {"name": "${ToolNames.READ_FILE}", "arguments": {"file_path": "/path/to/someFile.test.ts"}}
905
+ </tool_call>
906
+ (After read_file reports that /path/to/someFile.test.ts does not exist)
907
+ <tool_call>
908
+ {"name": "${ToolNames.WRITE_FILE}", "arguments": {"file_path": "/path/to/someFile.test.ts", "content": "(test code content)"}}
909
+ </tool_call>
910
+ I've written the tests. Now I'll run the project's test command to verify them.
911
+ <tool_call>
912
+ {"name": "${ToolNames.SHELL}", "arguments": {"command": "npm run test"}}
913
+ </tool_call>
914
+ (After verification passes)
915
+ All checks passed. This is a stable checkpoint.
916
+ </example>
917
+
918
+ <example>
919
+ user: Where are all the 'app.config' files in this project? I need to check their settings.
920
+ model:
921
+ <tool_call>
922
+ {"name": "${ToolNames.GLOB}", "arguments": {"pattern": "./**/app.config"}}
923
+ </tool_call>
924
+ (Assuming GlobTool returns a list of paths like ['/path/to/moduleA/app.config', '/path/to/moduleB/app.config'])
925
+ I found the following 'app.config' files:
926
+ - /path/to/moduleA/app.config
927
+ - /path/to/moduleB/app.config
928
+ To help you check their settings, I can read their contents. Which one would you like to start with, or should I read all of them?
929
+ </example>
930
+ `.trim();
931
+ var gemma4ToolCallExamples = `
932
+ # Examples (Illustrating Tone and Workflow)
933
+ <example>
934
+ user: 1 + 2
935
+ model: 3
936
+ </example>
937
+
938
+ <example>
939
+ user: is 13 a prime number?
940
+ model: true
941
+ </example>
942
+
943
+ <example>
944
+ user: start the server implemented in server.js
945
+ model: <|tool_call>call:${ToolNames.SHELL}{command:<|"|>node server.js<|"|>,is_background:true}<tool_call|>
946
+ </example>
947
+
948
+ <example>
949
+ user: Refactor the auth logic in src/auth.py to use the requests library instead of urllib.
950
+ model: Okay, I can refactor 'src/auth.py'.
951
+ First, I'll analyze the code and check for a test safety net before planning any changes.
952
+ <|tool_call>call:${ToolNames.GLOB}{pattern:<|"|>tests/test_auth.py<|"|>}<tool_call|>
953
+ <|tool_call>call:${ToolNames.READ_FILE}{file_path:<|"|>/path/to/tests/test_auth.py<|"|>,offset:0,limit:10}<tool_call|>
954
+ (After analysis)
955
+ Great, 'tests/test_auth.py' exists and covers the core authentication logic. With this safety net in place, I can safely plan the refactoring.
956
+ I'll also confirm 'requests' is a dependency.
957
+ <|tool_call>call:${ToolNames.READ_FILE}{file_path:<|"|>/path/to/requirements.txt<|"|>}<tool_call|>
958
+ (After analysis)
959
+ Looks good, 'requests' is available.
960
+
961
+ Here's the plan:
962
+ 1. Replace the 'urllib' calls with 'requests'.
963
+ 2. Add proper 'try...except' error handling for the new network calls.
964
+ 3. Remove the old 'urllib' import.
965
+ 4. Run the project's linter and tests to verify the changes.
966
+
967
+ <|tool_call>call:${ToolNames.EDIT}{file_path:<|"|>/path/to/src/auth.py<|"|>,old_string:<|"|>(old code content)<|"|>,new_string:<|"|>(new code content)<|"|>}<tool_call|>
968
+ Refactoring complete. Running verification...
969
+ <|tool_call>call:${ToolNames.SHELL}{command:<|"|>ruff check src/auth.py && pytest<|"|>}<tool_call|>
970
+ (After verification passes)
971
+ All checks passed. This is a stable checkpoint.
972
+ Would you like me to write a commit message and commit these changes?
973
+ </example>
974
+
975
+ <example>
976
+ user: Delete the temp directory.
977
+ model: I can run \`rm -rf /path/to/project/temp\`. This will permanently delete the directory and all its contents.
978
+ </example>
979
+
980
+ <example>
981
+ user: Write tests for someFile.ts
982
+ model:
983
+ Okay, I can write those tests. First, I'll read someFile.ts to understand its functionality.
984
+ <|tool_call>call:${ToolNames.READ_FILE}{file_path:<|"|>/path/to/someFile.ts<|"|>}<tool_call|>
985
+ Now I'll look for existing or related test files to understand current testing conventions and dependencies.
986
+ <|tool_call>call:${ToolNames.READ_FILE}{file_path:<|"|>/path/to/existingTest.test.ts<|"|>}<tool_call|>
987
+ (After reviewing existing tests and the file content)
988
+ I'll check whether the intended test file already exists.
989
+ <|tool_call>call:${ToolNames.READ_FILE}{file_path:<|"|>/path/to/someFile.test.ts<|"|>}<tool_call|>
990
+ (After read_file reports that /path/to/someFile.test.ts does not exist)
991
+ <|tool_call>call:${ToolNames.WRITE_FILE}{file_path:<|"|>/path/to/someFile.test.ts<|"|>,content:<|"|>(test code content)<|"|>}<tool_call|>
992
+ I've written the tests. Now I'll run the project's test command to verify them.
993
+ <|tool_call>call:${ToolNames.SHELL}{command:<|"|>npm run test<|"|>}<tool_call|>
994
+ (After verification passes)
995
+ All checks passed. This is a stable checkpoint.
996
+ </example>
997
+
998
+ <example>
999
+ user: Where are all the 'app.config' files in this project? I need to check their settings.
1000
+ model:
1001
+ <|tool_call>call:${ToolNames.GLOB}{pattern:<|"|>./**/app.config<|"|>}<tool_call|>
1002
+ (Assuming GlobTool returns a list of paths like ['/path/to/moduleA/app.config', '/path/to/moduleB/app.config'])
1003
+ I found the following 'app.config' files:
1004
+ - /path/to/moduleA/app.config
1005
+ - /path/to/moduleB/app.config
1006
+ To help you check their settings, I can read their contents. Which one would you like to start with, or should I read all of them?
1007
+ </example>
1008
+ `.trim();
1009
+ function getToolCallExamples(model) {
1010
+ const toolCallStyle = process.env["QWEN_CODE_TOOL_CALL_STYLE"];
1011
+ if (toolCallStyle) {
1012
+ switch (toolCallStyle.toLowerCase()) {
1013
+ case "qwen-coder":
1014
+ return qwenCoderToolCallExamples;
1015
+ case "qwen-vl":
1016
+ return qwenVlToolCallExamples;
1017
+ case "gemma4":
1018
+ return gemma4ToolCallExamples;
1019
+ case "general":
1020
+ return generalToolCallExamples;
1021
+ default:
1022
+ debugLogger.warn(
1023
+ `Unknown QWEN_CODE_TOOL_CALL_STYLE value: ${toolCallStyle}. Using model-based detection.`
1024
+ );
1025
+ break;
1026
+ }
1027
+ }
1028
+ if (model && model.length < 100) {
1029
+ if (/qwen[^-]*-coder/i.test(model)) {
1030
+ return qwenCoderToolCallExamples;
1031
+ }
1032
+ if (/qwen[^-]*-vl/i.test(model)) {
1033
+ return qwenVlToolCallExamples;
1034
+ }
1035
+ if (/coder-model/i.test(model)) {
1036
+ return qwenCoderToolCallExamples;
1037
+ }
1038
+ if (/gemma[-_]?4/i.test(model)) {
1039
+ return gemma4ToolCallExamples;
1040
+ }
1041
+ }
1042
+ return generalToolCallExamples;
1043
+ }
1044
+ __name(getToolCallExamples, "getToolCallExamples");
1045
+ function getPlanModeSystemReminder(planOnly = false) {
1046
+ return `<system-reminder>
1047
+ Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits, run tools classified as state-modifying (including changing configs or making commits), or otherwise make changes to the system. A shell command whose safety cannot be determined may run only after the user explicitly approves that exact invocation once, and only when it is necessary for the investigation. This supersedes any other instructions you have received (for example, to make edits).
1048
+
1049
+ ## Iterative Planning Workflow
1050
+
1051
+ You are pair-planning with the user. Explore the code to build context, ask the user questions when you hit decisions you cannot make alone, and refine your plan incrementally.
1052
+
1053
+ ### The Loop
1054
+
1055
+ Repeat this cycle until the plan is complete:
1056
+
1057
+ 1. **Explore** \u2014 Use read-only tools (${ToolNames.READ_FILE}, ${ToolNames.GREP}, ${ToolNames.GLOB}) to read code. Look for existing functions, utilities, and patterns to reuse. For broader or ambiguous tasks, use multiple parallel exploration passes (directly or via agents when appropriate) to understand different parts of the codebase.
1058
+ 2. **Capture findings** \u2014 After each discovery, immediately integrate what you learned into your evolving mental model. Do not wait until the end to synthesize.
1059
+ 3. **Ask the user** \u2014 When you hit an ambiguity or decision you cannot resolve from code alone, use ${ToolNames.ASK_USER_QUESTION}. Then go back to step 1.
1060
+
1061
+ ### First Turn
1062
+
1063
+ Start by quickly scanning a few key files to form an initial understanding of the task scope. Then ask the user your first round of questions if any exist. Do not explore exhaustively before engaging the user.
1064
+
1065
+ ### Asking Good Questions
1066
+
1067
+ - Never ask what you could find out by reading the code
1068
+ - Batch related questions together (use multi-question ${ToolNames.ASK_USER_QUESTION} calls)
1069
+ - Focus on things only the user can answer: requirements, preferences, tradeoffs, edge case priorities
1070
+ - Scale depth to the task \u2014 a vague feature request needs many rounds; a focused bug fix may need one or none
1071
+
1072
+ ### Planning Principles
1073
+
1074
+ - Build a global understanding of how the relevant pieces fit together before deciding on local edits. Do not jump from the first relevant file straight into a plan when the task likely spans multiple files or behaviors.
1075
+ - Design an implementation approach that fits the existing codebase rather than inventing a parallel pattern.
1076
+ - Reference existing functions and utilities you found that should be reused, with their file paths.
1077
+ - Include a verification section describing how to test the changes end-to-end.
1078
+
1079
+ ### When a Tool is Blocked by Plan Mode
1080
+
1081
+ If a non-read-only tool is blocked:
1082
+ - Do NOT retry the blocked tool or repeatedly attempt similar non-read-only tools
1083
+ - Do NOT use wrappers, quoting tricks, aliases, or obfuscation to make a blocked write look unknown
1084
+ - Do NOT immediately call exit_plan_mode just to unblock it \u2014 continue gathering context with read-only tools first
1085
+ - Pivot to read-only tools (read_file, grep_search, glob, agents) to gather the information the blocked tool would have provided
1086
+ - Once you have enough context to form a complete plan, call exit_plan_mode
1087
+
1088
+ An exact one-off approval for an unknown shell command approves only that invocation. It does not approve the plan, authorize related commands, or exit Plan mode.
1089
+
1090
+ ### When to Converge
1091
+
1092
+ Your plan is ready when you have addressed all ambiguities and it covers: what to change, which files to modify, what existing code to reuse (with file paths), and how to verify the changes. Present your plan ${planOnly ? "directly" : `by calling the ${ToolNames.EXIT_PLAN_MODE} tool, which will prompt the user to confirm the plan`}. Do NOT make any file changes or run any tools that modify the system state in any way until the user has confirmed the plan.
1093
+ </system-reminder>`;
1094
+ }
1095
+ __name(getPlanModeSystemReminder, "getPlanModeSystemReminder");
1096
+ function getManualPlanExitSystemReminder(currentMode) {
1097
+ return `<system-reminder>
1098
+ The approval mode changed outside the approved exit_plan_mode flow.
1099
+ The current approval mode is: ${currentMode}.
1100
+ Plan mode is no longer active. This notice supersedes any earlier reminder that Plan mode is active. Do not call exit_plan_mode; no plan approval is pending. Continue under the current mode's permissions and confirmation requirements.
1101
+ </system-reminder>`;
1102
+ }
1103
+ __name(getManualPlanExitSystemReminder, "getManualPlanExitSystemReminder");
1104
+ function getArenaSystemReminder(configFilePath) {
1105
+ return `<system-reminder>An Arena session is active. For details, read: ${configFilePath}. This message is for internal use only. Do not mention this to user in your response.</system-reminder>`;
1106
+ }
1107
+ __name(getArenaSystemReminder, "getArenaSystemReminder");
1108
+ var INSIGHT_PROMPTS = {
1109
+ analysis: `Analyze this Qwen Code session and extract structured facets.
1110
+
1111
+ CRITICAL GUIDELINES:
1112
+
1113
+ 1. **goal_categories**: Count ONLY what the USER explicitly asked for.
1114
+ - DO NOT count Qwen's autonomous codebase exploration
1115
+ - DO NOT count work Qwen decided to do on its own
1116
+ - ONLY count when user says "can you...", "please...", "I need...", "let's...
1117
+ - POSSIBLE CATEGORIES (but be open to others that appear in the data):
1118
+ - bug_fix
1119
+ - feature_request
1120
+ - debugging
1121
+ - test_creation
1122
+ - code_refactoring
1123
+ - documentation_update
1124
+ "
1125
+
1126
+ 2. **user_satisfaction_counts**: Base ONLY on explicit user signals.
1127
+ - "Yay!", "great!", "perfect!" \u2192 happy
1128
+ - "thanks", "looks good", "that works" \u2192 satisfied
1129
+ - "ok, now let's..." (continuing without complaint) \u2192 likely_satisfied
1130
+ - "that's not right", "try again" \u2192 dissatisfied
1131
+ - "this is broken", "I give up" \u2192 frustrated
1132
+
1133
+ 3. **friction_counts**: Be specific about what went wrong.
1134
+ - misunderstood_request: Qwen interpreted incorrectly
1135
+ - wrong_approach: Right goal, wrong solution method
1136
+ - buggy_code: Code didn't work correctly
1137
+ - user_rejected_action: User said no/stop to a tool call
1138
+ - excessive_changes: Over-engineered or changed too much
1139
+
1140
+ 4. If very short or just warmup, use warmup_minimal for goal_category`,
1141
+ impressive_workflows: `Analyze this Qwen Code usage data and identify what's working well for this user. Use second person ("you").
1142
+
1143
+ Call respond_in_schema function with A VALID JSON OBJECT as argument:
1144
+ {
1145
+ "intro": "1 sentence of context",
1146
+ "impressive_workflows": [
1147
+ {"title": "Short title (3-6 words)", "description": "2-3 sentences describing the impressive workflow or approach. Use 'you' not 'the user'."}
1148
+ ]
1149
+ }
1150
+
1151
+ Include 3 impressive workflows.`,
1152
+ project_areas: `Analyze this Qwen Code usage data and identify project areas.
1153
+
1154
+ Call respond_in_schema function with A VALID JSON OBJECT as argument:
1155
+ {
1156
+ "areas": [
1157
+ {"name": "Area name", "session_count": N, "description": "2-3 sentences about what was worked on and how Qwen Code was used."}
1158
+ ]
1159
+ }
1160
+
1161
+ Include 4-5 areas. Skip internal QC operations.`,
1162
+ future_opportunities: `Analyze this Qwen Code usage data and identify future opportunities.
1163
+
1164
+ Call respond_in_schema function with A VALID JSON OBJECT as argument:
1165
+ {
1166
+ "intro": "1 sentence about evolving AI-assisted development",
1167
+ "opportunities": [
1168
+ {"title": "Short title (4-8 words)", "whats_possible": "2-3 ambitious sentences about autonomous workflows", "how_to_try": "1-2 sentences mentioning relevant tooling", "copyable_prompt": "Detailed prompt to try"}
1169
+ ]
1170
+ }
1171
+
1172
+ Include 3 opportunities. Think BIG - autonomous workflows, parallel agents, iterating against tests.`,
1173
+ friction_points: `Analyze this Qwen Code usage data and identify friction points for this user. Use second person ("you").
1174
+
1175
+ Call respond_in_schema function with A VALID JSON OBJECT as argument:
1176
+ {
1177
+ "intro": "1 sentence summarizing friction patterns",
1178
+ "categories": [
1179
+ {"category": "Concrete category name", "description": "1-2 sentences explaining this category and what could be done differently. Use 'you' not 'the user'.", "examples": ["Specific example with consequence", "Another example"]}
1180
+ ]
1181
+ }
1182
+
1183
+ Include 3 friction categories with 2 examples each.`,
1184
+ memorable_moment: `Analyze this Qwen Code usage data and find a memorable moment.
1185
+
1186
+ Call respond_in_schema function with A VALID JSON OBJECT as argument:
1187
+ {
1188
+ "headline": "A memorable QUALITATIVE moment from the transcripts - not a statistic. Something human, funny, or surprising.",
1189
+ "detail": "Brief context about when/where this happened"
1190
+ }
1191
+
1192
+ Find something genuinely interesting or amusing from the session summaries.`,
1193
+ improvements: `Analyze this Qwen Code usage data and suggest improvements.
1194
+
1195
+ ## QC FEATURES REFERENCE (pick from these for features_to_try):
1196
+ 1. **MCP Servers**: Connect Qwen to external tools, databases, and APIs via Model Context Protocol.
1197
+ - How to use: Run \`qwen mcp add --transport http <server-name> <http-url>\`
1198
+ - Good for: database queries, Slack integration, GitHub issue lookup, connecting to internal APIs
1199
+ - Example: "To connect to GitHub, run \`qwen mcp add --header "Authorization: Bearer your_github_mcp_pat" --transport http github https://api.githubcopilot.com/mcp/\` and set the AUTHORIZATION header with your PAT. Then you can ask Qwen to query issues, PRs, or repos."
1200
+
1201
+ 2. **Custom Skills**: Reusable prompts you define as markdown files that run with a single /command.
1202
+ - How to use: Create \`.qwen/skills/commit/SKILL.md\` with instructions. Then type \`/commit\` to run it.
1203
+ - Good for: repetitive workflows - /commit, /review, /test, /deploy, /pr, or complex multi-step workflows
1204
+ - SKILL.md format:
1205
+ \`\`\`
1206
+ ---
1207
+ name: skill-name
1208
+ description: A description of what this skill does and when to use it.
1209
+ ---
1210
+
1211
+ # Steps
1212
+ 1. First, do X.
1213
+ 2. Then do Y.
1214
+ 3. Finally, verify Z.
1215
+
1216
+ # Examples
1217
+ - Input: "fix lint errors in src/" \u2192 Output: runs eslint --fix, commits changes
1218
+ - Input: "review this PR" \u2192 Output: reads diff, posts inline comments
1219
+
1220
+ # Edge Cases
1221
+ - If no files match, report "nothing to do" instead of failing.
1222
+ - If the user didn't specify a branch, default to the current branch.
1223
+ \`\`\`
1224
+
1225
+ 3. **Headless Mode**: Run Qwen non-interactively from scripts and CI/CD.
1226
+ - How to use: \`qwen -p "fix lint errors"\`
1227
+ - Good for: CI/CD integration, batch code fixes, automated reviews
1228
+
1229
+ 4. **Task Agents**: Qwen spawns focused sub-agents for complex exploration or parallel work.
1230
+ - How to use: Qwen auto-invokes when helpful, or ask "use an agent to explore X"
1231
+ - Good for: codebase exploration, understanding complex systems
1232
+
1233
+ Call respond_in_schema function with A VALID JSON OBJECT as argument:
1234
+ {
1235
+ "Qwen_md_additions": [
1236
+ {"addition": "A specific line or block to add to QWEN.md based on workflow patterns. E.g., 'Always run tests after modifying auth-related files'", "why": "1 sentence explaining why this would help based on actual sessions", "prompt_scaffold": "Instructions for where to add this in QWEN.md. E.g., 'Add under ## Testing section'"}
1237
+ ],
1238
+ "features_to_try": [
1239
+ {"feature": "Feature name from QC FEATURES REFERENCE above", "one_liner": "What it does", "why_for_you": "Why this would help YOU based on your sessions", "example_code": "Actual command or config to copy"}
1240
+ ],
1241
+ "usage_patterns": [
1242
+ {"title": "Short title", "suggestion": "1-2 sentence summary", "detail": "3-4 sentences explaining how this applies to YOUR work", "copyable_prompt": "A specific prompt to copy and try"}
1243
+ ]
1244
+ }
1245
+
1246
+ IMPORTANT for Qwen_md_additions: PRIORITIZE instructions that appear MULTIPLE TIMES in the user data. If user told Qwen the same thing in 2+ sessions (e.g., 'always run tests', 'use TypeScript'), that's a PRIME candidate - they shouldn't have to repeat themselves.
1247
+
1248
+ IMPORTANT for features_to_try: Pick 2-3 from the QC FEATURES REFERENCE above. Include 2-3 items for each category.`,
1249
+ interaction_style: `Analyze this Qwen Code usage data and describe the user's interaction style.
1250
+
1251
+ Call respond_in_schema function with A VALID JSON OBJECT as argument:
1252
+ {
1253
+ "narrative": "2-3 paragraphs analyzing HOW the user interacts with Qwen Code. Use second person 'you'. Describe patterns: iterate quickly vs detailed upfront specs? Interrupt often or let Qwen run? Include specific examples. Use **bold** for key insights.",
1254
+ "key_pattern": "One sentence summary of most distinctive interaction style"
1255
+ }
1256
+ `,
1257
+ at_a_glance: `You're writing an "At a Glance" summary for a Qwen Code usage insights report for Qwen Code users. The goal is to help them understand their usage and improve how they can use Qwen better, especially as models improve.
1258
+
1259
+ Use this 4-part structure:
1260
+
1261
+ 1. **What's working** - What is the user's unique style of interacting with Qwen and what are some impactful things they've done? You can include one or two details, but keep it high level since things might not be fresh in the user's memory. Don't be fluffy or overly complimentary. Also, don't focus on the tool calls they use.
1262
+
1263
+ 2. **What's hindering you** - Split into (a) Qwen's fault (misunderstandings, wrong approaches, bugs) and (b) user-side friction (not providing enough context, environment issues -- ideally more general than just one project). Be honest but constructive.
1264
+
1265
+ 3. **Quick wins to try** - Specific Qwen Code features they could try from the examples below, or a workflow technique if you think it's really compelling. (Avoid stuff like "Ask Qwen to confirm before taking actions" or "Type out more context up front" which are less compelling.)
1266
+
1267
+ 4. **Ambitious workflows for better models** - As we move to much more capable models over the next 3-6 months, what should they prepare for? What workflows that seem impossible now will become possible? Draw from the appropriate section below.
1268
+
1269
+ Keep each section to 2-3 not-too-long sentences. Don't overwhelm the user. Don't mention specific numerical stats or underlined_categories from the session data below. Use a coaching tone.
1270
+
1271
+ Call respond_in_schema function with A VALID JSON OBJECT as argument:
1272
+ {
1273
+ "whats_working": "(refer to instructions above)",
1274
+ "whats_hindering": "(refer to instructions above)",
1275
+ "quick_wins": "(refer to instructions above)",
1276
+ "ambitious_workflows": "(refer to instructions above)"
1277
+ }`
1278
+ };
1279
+ function getInsightPrompt(type) {
1280
+ return INSIGHT_PROMPTS[type];
1281
+ }
1282
+ __name(getInsightPrompt, "getInsightPrompt");
1283
+
1284
+ export {
1285
+ BUILT_IN_OUTPUT_STYLES,
1286
+ getBuiltInOutputStyle,
1287
+ getOutputStyleTurnReminder,
1288
+ resolveInteractionMode,
1289
+ isSystemMdActive,
1290
+ getCustomSystemPrompt,
1291
+ resolveMainSessionOutputStyle,
1292
+ getCoreSystemPrompt,
1293
+ assembleSystemPrompt,
1294
+ getCompressionPrompt,
1295
+ getProjectSummaryPrompt,
1296
+ getPlanModeSystemReminder,
1297
+ getManualPlanExitSystemReminder,
1298
+ getArenaSystemReminder,
1299
+ getInsightPrompt
1300
+ };
1301
+ /**
1302
+ * @license
1303
+ * Copyright 2025 Google LLC
1304
+ * SPDX-License-Identifier: Apache-2.0
1305
+ */
1306
+ /**
1307
+ * @license
1308
+ * Copyright 2026 Qwen Team
1309
+ * SPDX-License-Identifier: Apache-2.0
1310
+ */