@qwen-code/qwen-code 0.19.2 → 0.19.3-nightly.20260701.a974594d7

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 (291) hide show
  1. package/bundled/extension-creator/SKILL.md +357 -0
  2. package/bundled/loop/SKILL.md +34 -10
  3. package/bundled/loop/SKILL.test.ts +52 -0
  4. package/bundled/loop/autonomous-loop.test.ts +59 -0
  5. package/bundled/loop/autonomous-loop.ts +102 -0
  6. package/bundled/loop/loop-task-file.test.ts +1064 -0
  7. package/bundled/loop/loop-task-file.ts +404 -0
  8. package/bundled/loop/loop-tick-resolver.test.ts +864 -0
  9. package/bundled/loop/loop-tick-resolver.ts +416 -0
  10. package/bundled/qc-helper/SKILL.md +26 -19
  11. package/bundled/qc-helper/docs/configuration/auth.md +11 -11
  12. package/bundled/qc-helper/docs/configuration/model-providers.md +13 -13
  13. package/bundled/qc-helper/docs/configuration/settings.md +77 -75
  14. package/bundled/qc-helper/docs/features/channels/plugins.md +1 -1
  15. package/bundled/qc-helper/docs/features/commands.md +108 -77
  16. package/bundled/qc-helper/docs/features/hooks.md +6 -1
  17. package/bundled/qc-helper/docs/features/memory.md +53 -1
  18. package/bundled/qc-helper/docs/features/status-line.md +3 -3
  19. package/bundled/qc-helper/docs/ide-integration/ide-integration.md +4 -4
  20. package/bundled/qc-helper/docs/qwen-serve.md +24 -2
  21. package/bundled/qc-helper/docs/support/tos-privacy.md +16 -3
  22. package/bundled/qc-helper/docs/support/troubleshooting.md +6 -0
  23. package/chunks/{MaxSizedBox-7RERNLFK.js → MaxSizedBox-UZHJ73JB.js} +29 -27
  24. package/chunks/{StandaloneSessionPicker-S22XBSN6.js → StandaloneSessionPicker-GGUIZWCE.js} +42 -37
  25. package/chunks/{acpAgent-4MCETHF2.js → acpAgent-QYZFICEZ.js} +1292 -332
  26. package/chunks/{agent-K3ENVYSB.js → agent-2EN7YNSW.js} +24 -23
  27. package/chunks/{agent-headless-HO3V3A3A.js → agent-headless-SLTEZ5LV.js} +24 -23
  28. package/chunks/{anthropicContentGenerator-E3TQ5XJJ.js → anthropicContentGenerator-CA3JTAMO.js} +33 -12
  29. package/chunks/{artifact-tool-QA4KRO3B.js → artifact-tool-RM7WINJO.js} +3 -3
  30. package/chunks/{askUserQuestion-HMWXW6VN.js → askUserQuestion-J3P6QAJ7.js} +2 -2
  31. package/chunks/{bridge-4LV2HBH2.js → bridge-HZVAUTMX.js} +29 -28
  32. package/chunks/{ca-7WC7ELX6.js → ca-RYOETBUW.js} +10 -9
  33. package/chunks/{chunk-JXQ23SNT.js → chunk-2JKEQWDZ.js} +623 -78
  34. package/chunks/chunk-32MCHZQC.js +73 -0
  35. package/chunks/{chunk-PXFFKNCO.js → chunk-35FH347N.js} +5308 -2500
  36. package/chunks/{chunk-5JZLXFPD.js → chunk-3O2BJMFW.js} +11 -11
  37. package/chunks/{chunk-2JD55C6G.js → chunk-3TK7FSCP.js} +2 -2
  38. package/chunks/{chunk-USGMPVOY.js → chunk-4722VFFU.js} +19 -10
  39. package/chunks/chunk-6FIWYVN4.js +4932 -0
  40. package/chunks/{chunk-I2RFAW6Q.js → chunk-7SP275SH.js} +7 -5
  41. package/chunks/{chunk-5R4SBCX6.js → chunk-AIBPG5MB.js} +3 -3
  42. package/chunks/{chunk-C4K3FEQ2.js → chunk-AVQDCKNF.js} +124 -21
  43. package/chunks/{chunk-OTBK43JR.js → chunk-B236XPGF.js} +1 -1
  44. package/chunks/{chunk-WA5OJGFL.js → chunk-B5MPZI4K.js} +458 -125
  45. package/chunks/{chunk-5DWXLGOM.js → chunk-BJBWRCSK.js} +1 -1
  46. package/chunks/{chunk-4W4T77MO.js → chunk-BLAE2TCO.js} +109 -6
  47. package/chunks/chunk-BMFMJINR.js +45 -0
  48. package/chunks/{chunk-T2VDEFUU.js → chunk-BZHLWC6T.js} +2 -2
  49. package/chunks/{chunk-XU5P23GN.js → chunk-CA4ML3VH.js} +3 -3
  50. package/chunks/{chunk-WGAEWQTF.js → chunk-DBR7PF4B.js} +1 -2
  51. package/chunks/{chunk-S566HKUS.js → chunk-DHXWNSJA.js} +15 -1
  52. package/chunks/{chunk-LLFFKXZZ.js → chunk-DJ25MIU2.js} +167 -43
  53. package/chunks/{chunk-KBXLIVWQ.js → chunk-DX3TKXNT.js} +2 -2
  54. package/chunks/{chunk-OIC6S73E.js → chunk-E5I6YSNO.js} +1 -1
  55. package/chunks/{chunk-TXVGVZYR.js → chunk-ESVSWG6Z.js} +3 -3
  56. package/chunks/{chunk-EX4W6ZYG.js → chunk-EUURTJY7.js} +1 -1
  57. package/chunks/{chunk-QBZ22PQX.js → chunk-EWALXUAD.js} +3 -1
  58. package/chunks/{chunk-F6XNTYNE.js → chunk-FQDMX5IL.js} +30 -307
  59. package/chunks/{chunk-3QFE4OTE.js → chunk-FR3II765.js} +4 -4
  60. package/chunks/{chunk-VYFMN7C6.js → chunk-FV4SQ54H.js} +382 -55
  61. package/chunks/{chunk-ZD3NW5KL.js → chunk-FZY7NH37.js} +63 -9
  62. package/chunks/{chunk-CI5O6SQL.js → chunk-G525INVW.js} +4 -4
  63. package/chunks/{chunk-CGOMICBE.js → chunk-GDIG7TMG.js} +34 -1
  64. package/chunks/{chunk-R2BXK7SX.js → chunk-GHOTR7HL.js} +6 -1
  65. package/chunks/{chunk-TZM5JIAX.js → chunk-GZKQ36JS.js} +10 -7
  66. package/chunks/{chunk-BS64PXY3.js → chunk-HIYUAXBG.js} +1 -1
  67. package/chunks/{chunk-TMBPDHXD.js → chunk-HTWHAN44.js} +1 -1
  68. package/chunks/{chunk-EL5IHQON.js → chunk-HUGAEYZR.js} +6 -27
  69. package/chunks/{chunk-2BIF2NVV.js → chunk-HWG4XLD7.js} +2 -2
  70. package/chunks/{chunk-I5T6PIBQ.js → chunk-I4MXURND.js} +1076 -954
  71. package/chunks/{chunk-JTYRZODB.js → chunk-IBEM64M4.js} +39 -11
  72. package/chunks/{chunk-XKBP7M7A.js → chunk-IKO44NAT.js} +149 -31
  73. package/chunks/{chunk-2BAQ3ACS.js → chunk-JERW36RG.js} +404 -4
  74. package/chunks/{chunk-TOEGRAVX.js → chunk-JV7A66DR.js} +28 -16
  75. package/chunks/{chunk-3RJ3ZPPR.js → chunk-KKQWC6WS.js} +7 -7
  76. package/chunks/{chunk-EXMX5YHG.js → chunk-KXVVXAAC.js} +1 -1
  77. package/chunks/{chunk-Z7XXFPGP.js → chunk-LDWTYE33.js} +1 -1
  78. package/chunks/{chunk-X6EDWN44.js → chunk-LWGLBVWA.js} +1 -1
  79. package/chunks/{chunk-NYOHZYHM.js → chunk-LXEW6BHF.js} +45 -3
  80. package/chunks/{chunk-BGUDAULQ.js → chunk-LXGWLOCM.js} +5 -5
  81. package/chunks/{chunk-ZUAXI2OA.js → chunk-M2U5NM24.js} +188 -11366
  82. package/chunks/{chunk-BNXANYLH.js → chunk-MOUXUCXQ.js} +81 -1
  83. package/chunks/{chunk-FPACXT7T.js → chunk-MTJVHQDP.js} +534 -164
  84. package/chunks/{chunk-UAARJR2G.js → chunk-N4V4VBP6.js} +2 -2
  85. package/chunks/chunk-NIOPRZNN.js +27 -0
  86. package/chunks/{chunk-2TJ3YN6Q.js → chunk-NOYV2NXI.js} +517 -490
  87. package/chunks/{chunk-PRYMDRBV.js → chunk-NPQWQYU6.js} +1 -1
  88. package/chunks/{chunk-J6AW7O5D.js → chunk-NVTRORSK.js} +2 -2
  89. package/chunks/{chunk-PF523XJX.js → chunk-OE5J6UA7.js} +1 -1
  90. package/chunks/{chunk-RS4HRC75.js → chunk-OEY3YAL2.js} +99 -8
  91. package/chunks/{chunk-R36VMVEP.js → chunk-PLQTLKMR.js} +5 -5
  92. package/chunks/{chunk-UN3C6GOR.js → chunk-PPFWEV7G.js} +10 -108
  93. package/chunks/chunk-Q3JOGB4U.js +481 -0
  94. package/chunks/{chunk-HG6YKEBI.js → chunk-Q7TDHJ2G.js} +192 -30
  95. package/chunks/{chunk-EW6C27XX.js → chunk-QHHNFG22.js} +9 -3
  96. package/chunks/chunk-QYUE6W3T.js +123 -0
  97. package/chunks/{chunk-GZCJS5WH.js → chunk-SJBIFVD2.js} +2 -2
  98. package/chunks/{chunk-3UALQ56H.js → chunk-T42ACHFI.js} +1 -1
  99. package/chunks/chunk-T44AF4I6.js +690 -0
  100. package/chunks/{chunk-DBZUXSSV.js → chunk-TMILTLP3.js} +6 -6
  101. package/chunks/{chunk-EEEZIVFJ.js → chunk-TOAUDIS7.js} +1 -1
  102. package/chunks/chunk-UAKXW3DN.js +30 -0
  103. package/chunks/{chunk-VQRYPFCV.js → chunk-V5YJAUHW.js} +10 -460
  104. package/chunks/{chunk-D5E5TMYH.js → chunk-VHRREANT.js} +16 -2
  105. package/chunks/{chunk-5RVSM6NW.js → chunk-VN4CKYUW.js} +1 -1
  106. package/chunks/chunk-VXGPYF7U.js +37 -0
  107. package/chunks/{chunk-UAARVVBI.js → chunk-WGY3GIPP.js} +1 -1
  108. package/chunks/{chunk-GYZQA2FO.js → chunk-WJAY4WXR.js} +1 -1
  109. package/chunks/chunk-XKSCTXPK.js +167 -0
  110. package/chunks/chunk-YCEHOJZJ.js +840 -0
  111. package/chunks/{chunk-BG4BIP7F.js → chunk-YCRTJYSQ.js} +4 -2
  112. package/chunks/{chunk-CGEGHF2C.js → chunk-YPCPZSZB.js} +1 -1
  113. package/chunks/chunk-YTFBURQD.js +313 -0
  114. package/chunks/{chunk-HGNSRCRB.js → chunk-YXK4GPYO.js} +1 -1
  115. package/chunks/{chunk-OQHQHJRK.js → chunk-Z34RYLRO.js} +151 -4775
  116. package/chunks/chunk-ZGSV5ORL.js +11273 -0
  117. package/chunks/{computer-use-6BBRNT6S.js → computer-use-FCNWHVPW.js} +103 -49
  118. package/chunks/{contextCommand-UJAJ6N57.js → contextCommand-FVFMZZEU.js} +26 -25
  119. package/chunks/{cron-create-4KQE6YLH.js → cron-create-IY5NMIHQ.js} +4 -4
  120. package/chunks/{cron-delete-THME66UP.js → cron-delete-OLNEQWKO.js} +6 -6
  121. package/chunks/{cron-list-7A54SJ5N.js → cron-list-YAUAUV24.js} +5 -5
  122. package/chunks/{daemon-status-provider-CSL3BUOY.js → daemon-status-provider-42JEXENZ.js} +32 -32
  123. package/chunks/{de-ACHALDED.js → de-HB5NJXGB.js} +10 -9
  124. package/chunks/{dist-BD27IA3L.js → dist-4FCNM6KJ.js} +2 -2
  125. package/chunks/{dist-OD2FY543.js → dist-K4XZILIO.js} +1 -1
  126. package/chunks/{dist-BOOH5JWN.js → dist-SU6L7ZNJ.js} +114 -9
  127. package/chunks/{dist-QHJRBCMP.js → dist-UKPWQJCL.js} +44 -2
  128. package/chunks/{dist-QFFZWACU.js → dist-VD7HXTML.js} +20 -9
  129. package/chunks/{earlyInputCapture-X6KMCSHD.js → earlyInputCapture-FFFEC6P4.js} +25 -24
  130. package/chunks/{edit-7J6WXARF.js → edit-32ILSGZY.js} +72 -30
  131. package/chunks/{en-NCUBOJOY.js → en-U3LWGSFX.js} +19 -9
  132. package/chunks/{enter-worktree-KULCKJPJ.js → enter-worktree-XWZKIN6A.js} +24 -23
  133. package/chunks/{enterPlanMode-H2CIOLMH.js → enterPlanMode-LPFFY7BJ.js} +24 -23
  134. package/chunks/{errors-6G2JYR54.js → errors-UXBPYPI2.js} +26 -25
  135. package/chunks/{exit-worktree-ECBWBVC5.js → exit-worktree-IBS4UIU7.js} +24 -23
  136. package/chunks/{exitPlanMode-DQV56GTW.js → exitPlanMode-JA72YHII.js} +24 -23
  137. package/chunks/{fast-path-35JJFS3C.js → fast-path-7UU67Y2W.js} +30 -13
  138. package/chunks/{fast-path-settings-TSVI53EB.js → fast-path-settings-UQLRFDQP.js} +3 -2
  139. package/chunks/{fr-GVKZ27MF.js → fr-XY3NQFCM.js} +10 -9
  140. package/chunks/{gemini-NDTG7WAX.js → gemini-GMVKJNMX.js} +211 -105
  141. package/chunks/{geminiContentGenerator-XTG6SFLA.js → geminiContentGenerator-7NIFF2L4.js} +4 -4
  142. package/chunks/{glob-SJ2JBZK4.js → glob-4NJCW5HI.js} +24 -23
  143. package/chunks/{grep-BRMWFEWR.js → grep-PAIMLQEL.js} +24 -23
  144. package/chunks/{initializer-P5AXF7PV.js → initializer-R6KU4VYM.js} +31 -28
  145. package/chunks/{ja-FKZ2WZ4D.js → ja-J7YAG7SA.js} +10 -9
  146. package/chunks/{keychain-token-storage-CSYMNRPP.js → keychain-token-storage-GPAKRDKQ.js} +2 -2
  147. package/chunks/{list-6COK34BP.js → list-H7LXAO64.js} +32 -29
  148. package/chunks/{loadedSettingsAdapter-XIUTN245.js → loadedSettingsAdapter-H27JMTLU.js} +30 -27
  149. package/chunks/{loop-wakeup-33GPXJLA.js → loop-wakeup-Y3OIRQFM.js} +7 -7
  150. package/chunks/{ls-BYQY7RVV.js → ls-TVJEYS7O.js} +4 -4
  151. package/chunks/{lsp-X54RO4IV.js → lsp-JZSDVR3F.js} +2 -2
  152. package/chunks/{monitor-DH7KFSJV.js → monitor-JSIHDPXP.js} +24 -23
  153. package/chunks/nonInteractiveCli-Y4CHOETG.js +100 -0
  154. package/chunks/{notebook-edit-D4R4ZLMA.js → notebook-edit-SHRNL2UM.js} +52 -23
  155. package/chunks/{openaiContentGenerator-F74IPQ6E.js → openaiContentGenerator-ORZZ7VFO.js} +13 -12
  156. package/chunks/{pt-SY5NCFGR.js → pt-6RTAA6SS.js} +10 -9
  157. package/chunks/{qwenContentGenerator-ATTK5P4D.js → qwenContentGenerator-H643PL2G.js} +26 -25
  158. package/chunks/{qwenOAuth2-K4AASPCV.js → qwenOAuth2-OI2B7PES.js} +5 -4
  159. package/chunks/{read-file-767G23OY.js → read-file-5PRNPTTY.js} +8 -8
  160. package/chunks/{read-mcp-resource-I5HCZJ6X.js → read-mcp-resource-QTXGKTEV.js} +2 -2
  161. package/chunks/{ripGrep-4OMMGSWX.js → ripGrep-JIKZMABJ.js} +24 -23
  162. package/chunks/{ru-FWNXJG4F.js → ru-AUBGJ2C4.js} +10 -9
  163. package/chunks/{run-qwen-serve-REKSTYRA.js → run-qwen-serve-PQV7QOHZ.js} +284 -52
  164. package/chunks/{scheduler-UNTFDQLG.js → scheduler-OS3R5MGU.js} +24 -23
  165. package/chunks/{send-message-2DAFXEYP.js → send-message-DKGHWSTF.js} +2 -2
  166. package/chunks/{serve-KZ56QB5S.js → serve-LVYZDKCZ.js} +31 -29
  167. package/chunks/{server-BV5TZUMU.js → server-P4YIH35I.js} +11458 -8447
  168. package/chunks/{session-OIBXFSGD.js → session-DE4TZBKH.js} +195 -58
  169. package/chunks/{settings-WJTCBIRA.js → settings-DFTYMJYF.js} +30 -27
  170. package/chunks/{shell-WC52IBHW.js → shell-3GNQLNV7.js} +24 -23
  171. package/chunks/{skill-U7F7JR4M.js → skill-NCNG4KKZ.js} +38 -11
  172. package/chunks/{spawnChannel-EI2E5BCW.js → spawnChannel-DHRIMDVL.js} +26 -25
  173. package/chunks/{src-4F6FBZFI.js → src-PNZYGM3R.js} +104 -28
  174. package/chunks/{startInteractiveUI-SFRVB3CE.js → startInteractiveUI-P6GZBFQW.js} +2817 -2500
  175. package/chunks/{syntheticOutput-PPS3HDVA.js → syntheticOutput-X7L5HWLN.js} +3 -3
  176. package/chunks/{task-create-OUYCA553.js → task-create-AWEUI4GI.js} +6 -6
  177. package/chunks/{task-list-WAX7I2IA.js → task-list-KZ3VJLDU.js} +5 -5
  178. package/chunks/{task-stop-CAIL6FNH.js → task-stop-GUNOZKJ5.js} +2 -2
  179. package/chunks/{task-update-AHEO5OUT.js → task-update-Y56GP6DU.js} +6 -6
  180. package/chunks/{team-create-3WC7CIIW.js → team-create-6JMW3KQK.js} +24 -23
  181. package/chunks/{team-delete-HGHFG23B.js → team-delete-6AFRGDJY.js} +5 -5
  182. package/chunks/{theme-manager-DICFCT3P.js → theme-manager-FEHQO22G.js} +25 -24
  183. package/chunks/{todoWrite-IFBMN3FH.js → todoWrite-JRS6NOEU.js} +4 -4
  184. package/chunks/{tool-search-L5K7HLER.js → tool-search-IXAEKS7J.js} +101 -16
  185. package/chunks/trustedFolders-SJRXNHZE.js +76 -0
  186. package/chunks/types-QX5C3CHJ.js +12 -0
  187. package/chunks/{validateNonInterActiveAuth-GCH4Z6KI.js → validateNonInterActiveAuth-HCH7OBDH.js} +56 -51
  188. package/chunks/{web-fetch-B5IIQ5TT.js → web-fetch-RELNL37A.js} +29 -15
  189. package/chunks/{workflow-OB3AND7I.js → workflow-M2COBI7R.js} +38 -32
  190. package/chunks/{workspace-providers-status-ZIR5EPOO.js → workspace-providers-status-GOCWYDMK.js} +32 -29
  191. package/chunks/workspace-service-34C7SUBU.js +75 -0
  192. package/chunks/{write-file-SEXBNDZM.js → write-file-E52WRXZL.js} +67 -31
  193. package/chunks/{zh-RBEGQVQT.js → zh-F5T4WWZO.js} +19 -9
  194. package/chunks/{zh-TW-QGAVRXT3.js → zh-TW-LKLBTZHE.js} +19 -9
  195. package/cli-entry.js +20 -9
  196. package/cli.js +6 -6
  197. package/locales/ca.js +15 -13
  198. package/locales/de.js +15 -13
  199. package/locales/en.js +31 -13
  200. package/locales/fr.js +16 -14
  201. package/locales/ja.js +15 -14
  202. package/locales/pt.js +15 -13
  203. package/locales/ru.js +15 -13
  204. package/locales/zh-TW.js +28 -12
  205. package/locales/zh.js +28 -12
  206. package/node_modules/@qwen-code/audio-capture/dist/index.d.ts +35 -0
  207. package/node_modules/@qwen-code/audio-capture/dist/index.js +48 -0
  208. package/node_modules/@qwen-code/audio-capture/dist/index.js.map +1 -0
  209. package/node_modules/@qwen-code/audio-capture/dist/platform.d.ts +7 -0
  210. package/node_modules/@qwen-code/audio-capture/dist/platform.js +18 -0
  211. package/node_modules/@qwen-code/audio-capture/dist/platform.js.map +1 -0
  212. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/LICENSE +21 -0
  213. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/README.md +58 -0
  214. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/SECURITY.md +5 -0
  215. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/bin.js +84 -0
  216. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/build-test.js +19 -0
  217. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/index.js +6 -0
  218. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/node-gyp-build.js +207 -0
  219. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/optional.js +7 -0
  220. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/package.json +43 -0
  221. package/node_modules/@qwen-code/audio-capture/package.json +30 -0
  222. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
  223. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
  224. package/node_modules/@qwen-code/audio-capture/prebuilds/linux-arm64/@qwen-code+audio-capture.node +0 -0
  225. package/node_modules/@qwen-code/audio-capture/prebuilds/linux-x64/@qwen-code+audio-capture.node +0 -0
  226. package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
  227. package/package.json +18 -6
  228. package/patches/chrome-devtools-mcp+1.4.0.patch +31 -0
  229. package/postinstall.js +50 -0
  230. package/web-shell/assets/{arc-D_ae_Y9k.js → arc-C2DILvUl.js} +1 -1
  231. package/web-shell/assets/{architectureDiagram-3BPJPVTR-BMLRjppa.js → architectureDiagram-3BPJPVTR-b8gZ2cNw.js} +1 -1
  232. package/web-shell/assets/{blockDiagram-GPEHLZMM-qVDQC8KL.js → blockDiagram-GPEHLZMM-BuRpghMj.js} +1 -1
  233. package/web-shell/assets/{c4Diagram-AAUBKEIU-CxWS6MBd.js → c4Diagram-AAUBKEIU-2ItdhFmE.js} +1 -1
  234. package/web-shell/assets/channel-eRvn2UA3.js +1 -0
  235. package/web-shell/assets/{chunk-2J33WTMH-BtNuY5Yp.js → chunk-2J33WTMH-B1QXa0q3.js} +1 -1
  236. package/web-shell/assets/{chunk-4BX2VUAB-BU-x368d.js → chunk-4BX2VUAB-DXfhKlNq.js} +1 -1
  237. package/web-shell/assets/{chunk-55IACEB6-DRgTLvBu.js → chunk-55IACEB6-ClSNjxLo.js} +1 -1
  238. package/web-shell/assets/{chunk-727SXJPM-D2aElv7q.js → chunk-727SXJPM-Dsh2wisB.js} +1 -1
  239. package/web-shell/assets/{chunk-AQP2D5EJ-BwHCMRQ0.js → chunk-AQP2D5EJ-C1TkY5AR.js} +1 -1
  240. package/web-shell/assets/{chunk-FMBD7UC4-BMyPH-ku.js → chunk-FMBD7UC4-CGtN9XR6.js} +1 -1
  241. package/web-shell/assets/{chunk-ND2GUHAM-BNKTstUf.js → chunk-ND2GUHAM-BHiPi1SS.js} +1 -1
  242. package/web-shell/assets/{chunk-QZHKN3VN-gD3vsFId.js → chunk-QZHKN3VN-CzG3I5o1.js} +1 -1
  243. package/web-shell/assets/classDiagram-4FO5ZUOK-YZNwy1rx.js +1 -0
  244. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-YZNwy1rx.js +1 -0
  245. package/web-shell/assets/{cose-bilkent-S5V4N54A-BG9FAsXE.js → cose-bilkent-S5V4N54A-EgrIoH_K.js} +1 -1
  246. package/web-shell/assets/{dagre-BM42HDAG-Cy1sR7om.js → dagre-BM42HDAG-BUnpdX8S.js} +1 -1
  247. package/web-shell/assets/default-aEtf0G7-.svg +1 -0
  248. package/web-shell/assets/{diagram-2AECGRRQ-Bxi1I_Vu.js → diagram-2AECGRRQ-BlLUCVYu.js} +1 -1
  249. package/web-shell/assets/{diagram-5GNKFQAL-BGCJjO6y.js → diagram-5GNKFQAL-FG-enmjQ.js} +1 -1
  250. package/web-shell/assets/{diagram-KO2AKTUF-CMTeLXp7.js → diagram-KO2AKTUF-BlzmTONk.js} +1 -1
  251. package/web-shell/assets/{diagram-LMA3HP47-BN1wyAGh.js → diagram-LMA3HP47-CoBQ8mIx.js} +1 -1
  252. package/web-shell/assets/{diagram-OG6HWLK6-UYSG_zcp.js → diagram-OG6HWLK6-DvxV6sX8.js} +1 -1
  253. package/web-shell/assets/{erDiagram-TEJ5UH35-DqXL08lw.js → erDiagram-TEJ5UH35-Jq1tpAoj.js} +1 -1
  254. package/web-shell/assets/{flowDiagram-I6XJVG4X-BPJ9SFji.js → flowDiagram-I6XJVG4X-CbtYOry5.js} +1 -1
  255. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BEd9Pnms.js → ganttDiagram-6RSMTGT7-ZEn2VEKR.js} +1 -1
  256. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DrNRH3oi.js → gitGraphDiagram-PVQCEYII-BZh-LkhJ.js} +1 -1
  257. package/web-shell/assets/index-5FhE0ORO.css +5 -0
  258. package/web-shell/assets/index-CDTGmqVm.js +720 -0
  259. package/web-shell/assets/{infoDiagram-5YYISTIA-CFYBrkVI.js → infoDiagram-5YYISTIA-B9HuZygK.js} +1 -1
  260. package/web-shell/assets/insert-DmRbh9Rv.svg +1 -0
  261. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-Dxsddth7.js → ishikawaDiagram-YF4QCWOH-D76cNpYG.js} +1 -1
  262. package/web-shell/assets/{journeyDiagram-JHISSGLW-DxaDK80t.js → journeyDiagram-JHISSGLW-6bGo7P1t.js} +1 -1
  263. package/web-shell/assets/{kanban-definition-UN3LZRKU-Q0jQCOct.js → kanban-definition-UN3LZRKU-DuYyRBvB.js} +1 -1
  264. package/web-shell/assets/{linear-DGGM2kcP.js → linear-CpdSW1BC.js} +1 -1
  265. package/web-shell/assets/{mermaid.core-ByoxnWut.js → mermaid.core-s5xbZMMj.js} +5 -5
  266. package/web-shell/assets/{mindmap-definition-RKZ34NQL-C0ZseHsi.js → mindmap-definition-RKZ34NQL-go01fZ2y.js} +1 -1
  267. package/web-shell/assets/{pieDiagram-4H26LBE5-MQXNhl5A.js → pieDiagram-4H26LBE5-BfuZiEHO.js} +1 -1
  268. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DIR4ee2A.js → quadrantDiagram-W4KKPZXB-DsoINqV6.js} +1 -1
  269. package/web-shell/assets/queue-DWpnpFgW.svg +1 -0
  270. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BTR0UdYQ.js → requirementDiagram-4Y6WPE33-B7FU4LiU.js} +1 -1
  271. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-sfnhMELN.js → sankeyDiagram-5OEKKPKP-BEDjFnGB.js} +1 -1
  272. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DXczHOHH.js → sequenceDiagram-3UESZ5HK-gzmmL5tK.js} +1 -1
  273. package/web-shell/assets/{stateDiagram-AJRCARHV-DdE_KQFH.js → stateDiagram-AJRCARHV-BtHD4IN_.js} +1 -1
  274. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DFy6gLDd.js +1 -0
  275. package/web-shell/assets/{timeline-definition-PNZ67QCA-DIc61uE8.js → timeline-definition-PNZ67QCA-T_8gmMCf.js} +1 -1
  276. package/web-shell/assets/{vennDiagram-CIIHVFJN-BF7ODmxB.js → vennDiagram-CIIHVFJN-DdjuqnjO.js} +1 -1
  277. package/web-shell/assets/{wardley-L42UT6IY-3pc1MEaw.js → wardley-L42UT6IY-Cgtrvb37.js} +1 -1
  278. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-9jnPcZuP.js → wardleyDiagram-YWT4CUSO-BW3f3-yW.js} +1 -1
  279. package/web-shell/assets/{xychartDiagram-2RQKCTM6-DcthaZK6.js → xychartDiagram-2RQKCTM6-BUS9IKkc.js} +1 -1
  280. package/web-shell/index.html +2 -2
  281. package/chunks/chunk-B6HQGTYR.js +0 -410
  282. package/chunks/chunk-RKIZXJMB.js +0 -13
  283. package/chunks/headlessSafetyWarnings-LJ6FJX77.js +0 -57
  284. package/chunks/nonInteractiveCli-7575LBXP.js +0 -91
  285. package/chunks/workspace-service-OM5D4OI2.js +0 -60
  286. package/web-shell/assets/channel-DYPNiTww.js +0 -1
  287. package/web-shell/assets/classDiagram-4FO5ZUOK-p_g25Tni.js +0 -1
  288. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-p_g25Tni.js +0 -1
  289. package/web-shell/assets/index-CpOXWDPh.js +0 -714
  290. package/web-shell/assets/index-oVK7qhre.css +0 -5
  291. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BHUSEndU.js +0 -1
@@ -2,26 +2,28 @@
2
2
  "use strict";
3
3
  import {
4
4
  handleAtCommand
5
- } from "./chunk-B6HQGTYR.js";
5
+ } from "./chunk-YCEHOJZJ.js";
6
6
  import {
7
7
  JsonOutputAdapter
8
- } from "./chunk-EX4W6ZYG.js";
8
+ } from "./chunk-EUURTJY7.js";
9
9
  import {
10
10
  StreamJsonOutputAdapter
11
- } from "./chunk-J6AW7O5D.js";
11
+ } from "./chunk-NVTRORSK.js";
12
12
  import {
13
+ buildInitialSystemReminders,
13
14
  buildSystemMessage,
14
15
  computeUsageFromMetrics,
15
16
  createAgentToolProgressHandler,
16
17
  createToolProgressHandler,
17
18
  extractPartsFromUserMessage,
18
19
  handleSlashCommand,
20
+ insertAfterFunctionResponses,
19
21
  isSlashCommand,
20
22
  normalizePartList
21
- } from "./chunk-2TJ3YN6Q.js";
23
+ } from "./chunk-NOYV2NXI.js";
22
24
  import {
23
25
  RunBudgetEnforcer
24
- } from "./chunk-ZUAXI2OA.js";
26
+ } from "./chunk-ZGSV5ORL.js";
25
27
  import {
26
28
  AlreadyReportedError,
27
29
  handleBudgetExceededError,
@@ -29,26 +31,37 @@ import {
29
31
  handleError,
30
32
  handleMaxTurnsExceededError,
31
33
  handleToolError
32
- } from "./chunk-5R4SBCX6.js";
34
+ } from "./chunk-AIBPG5MB.js";
33
35
  import {
36
+ isInlineModelOverrideAllowed
37
+ } from "./chunk-OEY3YAL2.js";
38
+ import {
39
+ ORPHAN_TOOL_USE_REPAIR_REASON,
40
+ buildSyntheticToolResponseParts,
34
41
  createDuplicateProviderToolCallResponse,
42
+ detectAutonomousSentinel,
43
+ detectLoopSentinel,
44
+ detectTurnInterruption,
35
45
  executeToolCall,
46
+ findRepeatedDuplicateProviderToolCall,
47
+ isSystemReminderContent,
48
+ markDuplicateProviderToolCallResponseSent,
36
49
  parseAndFormatApiError,
37
50
  promptIdContext,
38
51
  restoreWorktreeContext
39
- } from "./chunk-PXFFKNCO.js";
52
+ } from "./chunk-35FH347N.js";
40
53
  import {
41
54
  isTelemetrySdkInitialized,
42
55
  shutdownTelemetry,
43
56
  uiTelemetryService
44
- } from "./chunk-WA5OJGFL.js";
57
+ } from "./chunk-B5MPZI4K.js";
45
58
  import {
46
59
  ToolNames
47
- } from "./chunk-TOEGRAVX.js";
60
+ } from "./chunk-JV7A66DR.js";
48
61
  import {
49
62
  FatalInputError,
50
63
  createDebugLogger
51
- } from "./chunk-C4K3FEQ2.js";
64
+ } from "./chunk-AVQDCKNF.js";
52
65
  import {
53
66
  init_esbuild_shims
54
67
  } from "./chunk-A4BMJM77.js";
@@ -60,6 +73,10 @@ import {
60
73
  init_esbuild_shims();
61
74
  var debugLogger = createDebugLogger("NON_INTERACTIVE_CLI");
62
75
  var STRUCTURED_SHUTDOWN_HOLDBACK_MS = 500;
76
+ function isHeadlessLoopSentinel(prompt) {
77
+ return detectLoopSentinel(prompt) !== null || detectAutonomousSentinel(prompt) !== null;
78
+ }
79
+ __name(isHeadlessLoopSentinel, "isHeadlessLoopSentinel");
63
80
  var SUPPRESSED_OUTPUT_SUCCESS = "Skipped: this turn's structured_output contract took precedence as the terminal output.";
64
81
  var SUPPRESSED_OUTPUT_RETRY = `${SUPPRESSED_OUTPUT_SUCCESS} Re-issue this call in a separate turn if needed.`;
65
82
  function suppressedOutputBody(structuredCaptured) {
@@ -72,18 +89,35 @@ var LOOP_TYPE_LABELS = {
72
89
  ["repetitive_thoughts" /* REPETITIVE_THOUGHTS */]: "the model repeated the same reasoning thought",
73
90
  ["read_file_loop" /* READ_FILE_LOOP */]: "the model spent too many consecutive calls reading files without making progress",
74
91
  ["action_stagnation" /* ACTION_STAGNATION */]: "the model kept calling the same tool without making progress",
92
+ ["shell_command_stagnation" /* SHELL_COMMAND_STAGNATION */]: "the model repeated similar shell inspection commands without making progress",
75
93
  ["global_tool_call_duplicate" /* GLOBAL_TOOL_CALL_DUPLICATE */]: "the model repeated the same tool call across the turn, even when not back-to-back",
76
94
  ["alternating_tool_call_pattern" /* ALTERNATING_TOOL_CALL_PATTERN */]: "the model alternated between the same two tool calls in a repeating pattern",
77
- ["turn_tool_call_cap" /* TURN_TOOL_CALL_CAP */]: "the model exceeded the maximum number of tool calls allowed in a single turn"
95
+ ["turn_tool_call_cap" /* TURN_TOOL_CALL_CAP */]: "the model exceeded the maximum number of tool calls allowed in a single turn",
96
+ ["invalid_tool_params_stagnation" /* INVALID_TOOL_PARAMS_STAGNATION */]: "the model repeatedly sent invalid tool parameters without correcting them"
78
97
  };
79
98
  function formatLoopDetectedMessage(loopType) {
80
99
  const reason = loopType ? LOOP_TYPE_LABELS[loopType] : void 0;
81
100
  const detail = reason ? ` (${loopType}: ${reason})` : "";
82
- const isAlwaysOn = loopType === "turn_tool_call_cap" /* TURN_TOOL_CALL_CAP */ || loopType === "consecutive_identical_tool_calls" /* CONSECUTIVE_IDENTICAL_TOOL_CALLS */;
101
+ const isAlwaysOn = loopType === "turn_tool_call_cap" /* TURN_TOOL_CALL_CAP */ || loopType === "consecutive_identical_tool_calls" /* CONSECUTIVE_IDENTICAL_TOOL_CALLS */ || loopType === "shell_command_stagnation" /* SHELL_COMMAND_STAGNATION */ || loopType === "global_tool_call_duplicate" /* GLOBAL_TOOL_CALL_DUPLICATE */ || loopType === "invalid_tool_params_stagnation" /* INVALID_TOOL_PARAMS_STAGNATION */;
83
102
  const hint = isAlwaysOn ? " This is an always-on guard and cannot be disabled via `model.skipLoopDetection`." : " Set the `model.skipLoopDetection` setting to true to disable.";
84
103
  return `Loop detection halted the run${detail}.${hint}`;
85
104
  }
86
105
  __name(formatLoopDetectedMessage, "formatLoopDetectedMessage");
106
+ function skipHeadlessLoopSentinel(scheduler, job) {
107
+ if (!isHeadlessLoopSentinel(job.prompt)) {
108
+ return false;
109
+ }
110
+ if (job.recurring && !job.durable) {
111
+ debugLogger.debug(
112
+ "skipHeadlessLoopSentinel: cleaning up recurring session loop.md cron in headless mode",
113
+ { jobId: job.id }
114
+ );
115
+ void scheduler.delete(job.id).catch(() => {
116
+ });
117
+ }
118
+ return true;
119
+ }
120
+ __name(skipHeadlessLoopSentinel, "skipHeadlessLoopSentinel");
87
121
  function emitLoopDetectedMessage(config, loopType) {
88
122
  const message = formatLoopDetectedMessage(loopType);
89
123
  if (config.getOutputFormat() !== "text" /* TEXT */) {
@@ -132,6 +166,10 @@ async function runNonInteractive(config, settings, input, prompt_id, options = {
132
166
  } else {
133
167
  adapter = new JsonOutputAdapter(config);
134
168
  }
169
+ const emitResult = /* @__PURE__ */ __name((result) => {
170
+ adapter.emitResult(result);
171
+ options.onResultEmitted?.();
172
+ }, "emitResult");
135
173
  const sessionId = config.getSessionId();
136
174
  const permissionMode = config.getApprovalMode();
137
175
  let turnCount = 0;
@@ -247,6 +285,7 @@ ${reason}
247
285
  manager.getEventEmitter().on("teammate_approval_request" /* TEAMMATE_APPROVAL_REQUEST */, approvalListener);
248
286
  }
249
287
  }, "onTeamManagerChangeHandler");
288
+ let continueSendType = null;
250
289
  try {
251
290
  process.stdout.on("error", stdoutErrorHandler);
252
291
  process.on("SIGINT", shutdownHandler);
@@ -265,6 +304,50 @@ ${reason}
265
304
  let initialPartList = extractPartsFromUserMessage(
266
305
  options.userMessage
267
306
  );
307
+ let inlineModelOverride;
308
+ if (options.continueInterrupted) {
309
+ const detection = detectTurnInterruption(
310
+ geminiClient.getChat().getHistory()
311
+ );
312
+ debugLogger.info("[runNonInteractive] continueInterrupted detection", {
313
+ kind: detection.kind,
314
+ partsCount: detection.kind === "interrupted_prompt" ? detection.parts.length : 0,
315
+ danglingCallCount: detection.kind === "interrupted_turn" ? detection.danglingCalls.length : 0
316
+ });
317
+ if (detection.kind === "none") {
318
+ await emitNonInteractiveFinalMessage({
319
+ message: "No interrupted turn to continue.",
320
+ isError: false,
321
+ adapter,
322
+ config,
323
+ startTimeMs: startTime
324
+ });
325
+ return 0;
326
+ }
327
+ if (detection.kind === "interrupted_prompt") {
328
+ initialPartList = detection.parts;
329
+ continueSendType = "retry" /* Retry */;
330
+ } else {
331
+ initialPartList = buildSyntheticToolResponseParts(
332
+ detection.danglingCalls,
333
+ ORPHAN_TOOL_USE_REPAIR_REASON
334
+ );
335
+ continueSendType = "toolResult" /* ToolResult */;
336
+ }
337
+ const reminderParts = buildInitialSystemReminders(config);
338
+ if (reminderParts.length > 0 && initialPartList) {
339
+ const continuationParts = normalizePartList(initialPartList);
340
+ const hasSystemReminderPart = continuationParts.some(
341
+ (part) => isSystemReminderContent({ role: "user", parts: [part] })
342
+ );
343
+ if (!hasSystemReminderPart) {
344
+ initialPartList = insertAfterFunctionResponses(
345
+ continuationParts,
346
+ reminderParts
347
+ );
348
+ }
349
+ }
350
+ }
268
351
  if (!initialPartList) {
269
352
  let slashHandled = false;
270
353
  if (isSlashCommand(input)) {
@@ -277,6 +360,19 @@ ${reason}
277
360
  switch (slashCommandResult.type) {
278
361
  case "submit_prompt":
279
362
  initialPartList = slashCommandResult.content;
363
+ if (slashCommandResult.modelOverride !== void 0 && isInlineModelOverrideAllowed(
364
+ config,
365
+ slashCommandResult.modelOverride
366
+ )) {
367
+ inlineModelOverride = slashCommandResult.modelOverride;
368
+ debugLogger.debug(
369
+ `[runNonInteractive] inline model override captured: ${inlineModelOverride}`
370
+ );
371
+ } else if (slashCommandResult.modelOverride !== void 0) {
372
+ debugLogger.warn(
373
+ `[runNonInteractive] ignoring model override '${slashCommandResult.modelOverride}': not a model on the active provider`
374
+ );
375
+ }
280
376
  slashHandled = true;
281
377
  break;
282
378
  case "message": {
@@ -343,13 +439,13 @@ ${text}
343
439
  };
344
440
  return Array.isArray(existing) ? [reminderPart, ...existing] : [reminderPart, existing];
345
441
  }, "withReminder");
346
- const startupNotice = config.consumePendingStartupWorktreeNotice();
442
+ const startupNotice = options.continueInterrupted ? null : config.consumePendingStartupWorktreeNotice();
347
443
  if (startupNotice) {
348
444
  initialPartList = withReminder(initialPartList, startupNotice);
349
445
  adapter.emitSystemMessage("worktree_started", {
350
446
  notice: startupNotice
351
447
  });
352
- } else if (config.getResumedSessionData()) {
448
+ } else if (!options.continueInterrupted && config.getResumedSessionData()) {
353
449
  try {
354
450
  const sessionPath = config.getSessionService().getWorktreeSessionPath(sessionId);
355
451
  const restored = await restoreWorktreeContext(sessionPath);
@@ -434,7 +530,13 @@ ${text}
434
530
  }
435
531
  let isFirstTurn = true;
436
532
  let hasUnsentToolResponse = false;
437
- let modelOverride;
533
+ let modelOverride = inlineModelOverride;
534
+ const inlineModelOverrideActive = inlineModelOverride !== void 0;
535
+ if (inlineModelOverrideActive) {
536
+ debugLogger.debug(
537
+ `[runNonInteractive] inline model override active for turn: ${inlineModelOverride}`
538
+ );
539
+ }
438
540
  let structuredSubmission = void 0;
439
541
  let plainTextPreview = "";
440
542
  const PLAIN_TEXT_PREVIEW_LIMIT = 200;
@@ -451,7 +553,7 @@ ${text}
451
553
  const metrics = uiTelemetryService.getMetrics();
452
554
  const usage = computeUsageFromMetrics(metrics);
453
555
  const stats = outputFormat === "json" /* JSON */ ? uiTelemetryService.getMetrics() : void 0;
454
- adapter.emitResult({
556
+ emitResult({
455
557
  isError: false,
456
558
  durationMs: Date.now() - startTime,
457
559
  apiDurationMs: totalApiDurationMs,
@@ -484,9 +586,11 @@ ${text}
484
586
  return 1;
485
587
  }, "emitLoopDetectedResult");
486
588
  const handledProviderToolCallIds = geminiClient.getHistoryFunctionResponseIds();
589
+ const duplicateProviderToolCallResponseIds = /* @__PURE__ */ new Set();
487
590
  const processToolCallBatch = /* @__PURE__ */ __name(async (batchRequests, setModelOverride) => {
488
591
  const toolResponseParts = [];
489
592
  const structuredOutputActive = config.getJsonSchema() && batchRequests.some((r) => r.name === ToolNames.STRUCTURED_OUTPUT);
593
+ const getProviderResponseId = /* @__PURE__ */ __name((request) => request.providerCallId ?? (structuredOutputActive ? void 0 : request.callId || void 0), "getProviderResponseId");
490
594
  const seenBatchCallIds = /* @__PURE__ */ new Set();
491
595
  const duplicateBatchRequests = [];
492
596
  const uniqueBatchRequests = batchRequests.filter((request) => {
@@ -505,22 +609,43 @@ ${text}
505
609
  }
506
610
  return true;
507
611
  });
612
+ const repeatedDuplicateRequest = findRepeatedDuplicateProviderToolCall(
613
+ [...uniqueBatchRequests, ...duplicateBatchRequests],
614
+ getProviderResponseId,
615
+ handledProviderToolCallIds,
616
+ duplicateProviderToolCallResponseIds
617
+ );
618
+ if (repeatedDuplicateRequest) {
619
+ const providerCallId = repeatedDuplicateRequest.providerCallId ?? repeatedDuplicateRequest.callId;
620
+ debugLogger.debug(
621
+ `[runNonInteractive] Dropping batch after repeated duplicate provider tool-call id: ${providerCallId} (tool: ${repeatedDuplicateRequest.name})`
622
+ );
623
+ return {
624
+ responseParts: [],
625
+ repeatedDuplicateProviderToolCall: true
626
+ };
627
+ }
508
628
  const respondedRequests = /* @__PURE__ */ new Set();
509
629
  const executableBatchRequests = [];
510
630
  const duplicatePendingResponses = [];
511
631
  for (const requestInfo of uniqueBatchRequests) {
512
- if (!requestInfo.providerCallId) {
632
+ const providerCallId = getProviderResponseId(requestInfo);
633
+ if (!providerCallId) {
513
634
  executableBatchRequests.push(requestInfo);
514
635
  continue;
515
636
  }
516
- if (!handledProviderToolCallIds.has(requestInfo.providerCallId)) {
517
- handledProviderToolCallIds.add(requestInfo.providerCallId);
637
+ if (!handledProviderToolCallIds.has(providerCallId)) {
638
+ handledProviderToolCallIds.add(providerCallId);
518
639
  executableBatchRequests.push(requestInfo);
519
640
  continue;
520
641
  }
642
+ markDuplicateProviderToolCallResponseSent(
643
+ providerCallId,
644
+ duplicateProviderToolCallResponseIds
645
+ );
521
646
  const toolResponse = createDuplicateProviderToolCallResponse(requestInfo);
522
647
  debugLogger.debug(
523
- `[runNonInteractive] Suppressing duplicate provider tool-call id: ${requestInfo.providerCallId} (tool: ${requestInfo.name})`
648
+ `[runNonInteractive] Suppressing duplicate provider tool-call id: ${providerCallId} (tool: ${requestInfo.name})`
524
649
  );
525
650
  respondedRequests.add(requestInfo);
526
651
  adapter.emitToolResult(requestInfo, toolResponse);
@@ -615,11 +740,20 @@ ${text}
615
740
  }
616
741
  }
617
742
  for (const requestInfo of duplicateBatchRequests) {
743
+ const providerCallId = getProviderResponseId(requestInfo);
744
+ if (!providerCallId) continue;
745
+ markDuplicateProviderToolCallResponseSent(
746
+ providerCallId,
747
+ duplicateProviderToolCallResponseIds
748
+ );
618
749
  const toolResponse = createDuplicateProviderToolCallResponse(requestInfo);
619
750
  adapter.emitToolResult(requestInfo, toolResponse);
620
751
  toolResponseParts.push(...toolResponse.responseParts);
621
752
  }
622
- return toolResponseParts;
753
+ return {
754
+ responseParts: toolResponseParts,
755
+ repeatedDuplicateProviderToolCall: false
756
+ };
623
757
  }, "processToolCallBatch");
624
758
  while (true) {
625
759
  let isTeammateTurn = false;
@@ -643,7 +777,7 @@ ${text}
643
777
  }
644
778
  let sendType;
645
779
  if (isFirstTurn) {
646
- sendType = options.sendMessageType ?? "userQuery" /* UserQuery */;
780
+ sendType = continueSendType ?? options.sendMessageType ?? "userQuery" /* UserQuery */;
647
781
  } else if (isTeammateTurn) {
648
782
  sendType = "teammate" /* Teammate */;
649
783
  } else {
@@ -703,15 +837,24 @@ ${text}
703
837
  return emitLoopDetectedResult();
704
838
  }
705
839
  if (toolCallRequests.length > 0) {
706
- const toolResponseParts = await processToolCallBatch(
707
- toolCallRequests,
708
- (override) => {
840
+ const {
841
+ responseParts: toolResponseParts,
842
+ repeatedDuplicateProviderToolCall
843
+ } = await processToolCallBatch(toolCallRequests, (override) => {
844
+ if (!inlineModelOverrideActive) {
709
845
  modelOverride = override;
710
846
  }
711
- );
847
+ });
712
848
  if (structuredSubmission !== void 0) {
713
849
  return emitStructuredSuccess();
714
850
  }
851
+ if (repeatedDuplicateProviderToolCall && toolResponseParts.length === 0) {
852
+ loopDetectedMessage = emitLoopDetectedMessage(
853
+ config,
854
+ "global_tool_call_duplicate" /* GLOBAL_TOOL_CALL_DUPLICATE */
855
+ );
856
+ return emitLoopDetectedResult();
857
+ }
715
858
  currentMessages = [{ role: "user", parts: toolResponseParts }];
716
859
  hasUnsentToolResponse = true;
717
860
  } else {
@@ -837,7 +980,10 @@ ${text}
837
980
  return;
838
981
  }
839
982
  if (itemToolCallRequests.length > 0) {
840
- const itemToolResponseParts = await processToolCallBatch(
983
+ const {
984
+ responseParts: itemToolResponseParts,
985
+ repeatedDuplicateProviderToolCall
986
+ } = await processToolCallBatch(
841
987
  itemToolCallRequests,
842
988
  (override) => {
843
989
  itemModelOverride = override;
@@ -846,6 +992,14 @@ ${text}
846
992
  if (structuredSubmission !== void 0) {
847
993
  return;
848
994
  }
995
+ if (repeatedDuplicateProviderToolCall && itemToolResponseParts.length === 0) {
996
+ loopDetectedMessage = emitLoopDetectedMessage(
997
+ config,
998
+ "global_tool_call_duplicate" /* GLOBAL_TOOL_CALL_DUPLICATE */
999
+ );
1000
+ loopDetected = true;
1001
+ return;
1002
+ }
849
1003
  itemMessages = [{ role: "user", parts: itemToolResponseParts }];
850
1004
  } else {
851
1005
  break;
@@ -870,6 +1024,9 @@ ${text}
870
1024
  }, "drainLocalQueue");
871
1025
  const scheduler = !config.isCronEnabled() ? null : config.getCronScheduler();
872
1026
  if (scheduler) {
1027
+ scheduler.setSkipDurableFire(
1028
+ (job) => isHeadlessLoopSentinel(job.prompt)
1029
+ );
873
1030
  await scheduler.enableDurable(config.getSessionId()).catch((err) => {
874
1031
  debugLogger.warn(
875
1032
  `Durable cron init failed \u2014 persistent tasks will not fire in this run: ${err}`
@@ -912,6 +1069,10 @@ ${text}
912
1069
  reject(err);
913
1070
  }, "onDrainError");
914
1071
  scheduler.start((job) => {
1072
+ if (skipHeadlessLoopSentinel(scheduler, job)) {
1073
+ checkCronDone();
1074
+ return;
1075
+ }
915
1076
  const label = job.prompt.slice(0, 40);
916
1077
  localQueue.push({
917
1078
  displayText: `${job.cronExpr === "@wakeup" ? "Loop" : "Cron"}: ${label}`,
@@ -953,7 +1114,7 @@ ${text}
953
1114
  const previewSnippet = plainTextPreview.trim();
954
1115
  const previewSuffix = previewSnippet ? ` Output preview (${plainTextPreview.length}${plainTextPreview.length >= PLAIN_TEXT_PREVIEW_LIMIT ? "+" : ""} chars): ${JSON.stringify(previewSnippet)}.` : "";
955
1116
  const errorMessage = `Model produced plain text instead of calling the structured_output tool as required by --json-schema after ${turnCount} turn(s).` + previewSuffix;
956
- adapter.emitResult({
1117
+ emitResult({
957
1118
  isError: true,
958
1119
  durationMs: Date.now() - startTime,
959
1120
  apiDurationMs: totalApiDurationMs,
@@ -964,7 +1125,7 @@ ${text}
964
1125
  });
965
1126
  return 1;
966
1127
  }
967
- adapter.emitResult({
1128
+ emitResult({
968
1129
  isError: false,
969
1130
  durationMs: Date.now() - startTime,
970
1131
  apiDurationMs: totalApiDurationMs,
@@ -991,7 +1152,7 @@ ${text}
991
1152
  const skipAdapterEmit = outputFormat === "text" /* TEXT */ && isAlreadyReportedError;
992
1153
  if (!skipAdapterEmit) {
993
1154
  try {
994
- adapter.emitResult({
1155
+ emitResult({
995
1156
  isError: true,
996
1157
  durationMs: Date.now() - startTime,
997
1158
  apiDurationMs: totalApiDurationMs,
@@ -1043,6 +1204,7 @@ ${text}
1043
1204
  __name(runNonInteractive, "runNonInteractive");
1044
1205
 
1045
1206
  export {
1207
+ skipHeadlessLoopSentinel,
1046
1208
  runNonInteractive
1047
1209
  };
1048
1210
  /**
@@ -1,9 +1,12 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ import {
4
+ isTlsVerificationDisabled
5
+ } from "./chunk-FQDMX5IL.js";
3
6
  import {
4
7
  getErrorMessage,
5
8
  isNodeError
6
- } from "./chunk-C4K3FEQ2.js";
9
+ } from "./chunk-AVQDCKNF.js";
7
10
  import {
8
11
  init_esbuild_shims
9
12
  } from "./chunk-A4BMJM77.js";
@@ -146,8 +149,11 @@ function formatFetchErrorForUser(error, options = {}) {
146
149
  "Troubleshooting:",
147
150
  ...options.url ? [`- Confirm you can reach ${options.url} from this machine.`] : [],
148
151
  "- If you are behind a proxy, pass `--proxy <url>` (or set `proxy` in settings).",
149
- ...shouldShowTlsHint ? [
150
- "- If your network uses a corporate TLS inspection CA, set `NODE_EXTRA_CA_CERTS` to your CA bundle."
152
+ ...shouldShowTlsHint ? isTlsVerificationDisabled() ? [
153
+ "- TLS verification is already disabled (`--insecure` / `QWEN_TLS_INSECURE`), so this is likely a network or protocol issue rather than a certificate trust problem."
154
+ ] : [
155
+ "- If your network uses a corporate TLS inspection CA, set `NODE_EXTRA_CA_CERTS` to your CA bundle.",
156
+ "- For a trusted self-signed endpoint, pass `--insecure` (or set `QWEN_TLS_INSECURE=1`) to skip certificate verification."
151
157
  ] : []
152
158
  ];
153
159
  return `${fullErrorMessage}${hintLines.join("\n")}`;
@@ -0,0 +1,123 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ init_esbuild_shims
5
+ } from "./chunk-A4BMJM77.js";
6
+ import {
7
+ __commonJS,
8
+ __name
9
+ } from "./chunk-J2S4EL5Y.js";
10
+
11
+ // node_modules/strip-json-comments/index.js
12
+ var require_strip_json_comments = __commonJS({
13
+ "node_modules/strip-json-comments/index.js"(exports, module) {
14
+ "use strict";
15
+ init_esbuild_shims();
16
+ var singleComment = Symbol("singleComment");
17
+ var multiComment = Symbol("multiComment");
18
+ var stripWithoutWhitespace = /* @__PURE__ */ __name(() => "", "stripWithoutWhitespace");
19
+ var stripWithWhitespace = /* @__PURE__ */ __name((string, start, end) => string.slice(start, end).replace(/\S/g, " "), "stripWithWhitespace");
20
+ var isEscaped = /* @__PURE__ */ __name((jsonString, quotePosition) => {
21
+ let index = quotePosition - 1;
22
+ let backslashCount = 0;
23
+ while (jsonString[index] === "\\") {
24
+ index -= 1;
25
+ backslashCount += 1;
26
+ }
27
+ return Boolean(backslashCount % 2);
28
+ }, "isEscaped");
29
+ module.exports = (jsonString, options = {}) => {
30
+ if (typeof jsonString !== "string") {
31
+ throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof jsonString}\``);
32
+ }
33
+ const strip = options.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace;
34
+ let insideString = false;
35
+ let insideComment = false;
36
+ let offset = 0;
37
+ let result = "";
38
+ for (let i = 0; i < jsonString.length; i++) {
39
+ const currentCharacter = jsonString[i];
40
+ const nextCharacter = jsonString[i + 1];
41
+ if (!insideComment && currentCharacter === '"') {
42
+ const escaped = isEscaped(jsonString, i);
43
+ if (!escaped) {
44
+ insideString = !insideString;
45
+ }
46
+ }
47
+ if (insideString) {
48
+ continue;
49
+ }
50
+ if (!insideComment && currentCharacter + nextCharacter === "//") {
51
+ result += jsonString.slice(offset, i);
52
+ offset = i;
53
+ insideComment = singleComment;
54
+ i++;
55
+ } else if (insideComment === singleComment && currentCharacter + nextCharacter === "\r\n") {
56
+ i++;
57
+ insideComment = false;
58
+ result += strip(jsonString, offset, i);
59
+ offset = i;
60
+ continue;
61
+ } else if (insideComment === singleComment && currentCharacter === "\n") {
62
+ insideComment = false;
63
+ result += strip(jsonString, offset, i);
64
+ offset = i;
65
+ } else if (!insideComment && currentCharacter + nextCharacter === "/*") {
66
+ result += jsonString.slice(offset, i);
67
+ offset = i;
68
+ insideComment = multiComment;
69
+ i++;
70
+ continue;
71
+ } else if (insideComment === multiComment && currentCharacter + nextCharacter === "*/") {
72
+ i++;
73
+ insideComment = false;
74
+ result += strip(jsonString, offset, i + 1);
75
+ offset = i + 1;
76
+ continue;
77
+ }
78
+ }
79
+ return result + (insideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset));
80
+ };
81
+ }
82
+ });
83
+
84
+ // packages/cli/src/config/path-comparison.ts
85
+ init_esbuild_shims();
86
+ import * as fs from "node:fs";
87
+ import * as path from "node:path";
88
+ function isWithinRoot(childPath, parentPath) {
89
+ const relativePath = path.relative(parentPath, childPath);
90
+ return relativePath === "" || !relativePath.startsWith(`..${path.sep}`) && relativePath !== ".." && !path.isAbsolute(relativePath);
91
+ }
92
+ __name(isWithinRoot, "isWithinRoot");
93
+ function getPathComparisonVariants(rawPath) {
94
+ const variants = /* @__PURE__ */ new Set([path.normalize(path.resolve(rawPath))]);
95
+ try {
96
+ variants.add(path.normalize(fs.realpathSync(rawPath)));
97
+ } catch {
98
+ }
99
+ return variants;
100
+ }
101
+ __name(getPathComparisonVariants, "getPathComparisonVariants");
102
+ function arePathsEquivalent(left, right) {
103
+ const rightVariants = getPathComparisonVariants(right);
104
+ for (const leftVariant of getPathComparisonVariants(left)) {
105
+ if (rightVariants.has(leftVariant)) {
106
+ return true;
107
+ }
108
+ }
109
+ return false;
110
+ }
111
+ __name(arePathsEquivalent, "arePathsEquivalent");
112
+
113
+ export {
114
+ require_strip_json_comments,
115
+ isWithinRoot,
116
+ getPathComparisonVariants,
117
+ arePathsEquivalent
118
+ };
119
+ /**
120
+ * @license
121
+ * Copyright 2025 Qwen Team
122
+ * SPDX-License-Identifier: Apache-2.0
123
+ */
@@ -5,11 +5,11 @@ import {
5
5
  } from "./chunk-OMX7CUOE.js";
6
6
  import {
7
7
  atomicWriteJSON
8
- } from "./chunk-3UALQ56H.js";
8
+ } from "./chunk-T42ACHFI.js";
9
9
  import {
10
10
  Storage,
11
11
  getProjectHash
12
- } from "./chunk-C4K3FEQ2.js";
12
+ } from "./chunk-AVQDCKNF.js";
13
13
  import {
14
14
  init_esbuild_shims
15
15
  } from "./chunk-A4BMJM77.js";
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  createDebugLogger,
5
5
  isNodeError
6
- } from "./chunk-C4K3FEQ2.js";
6
+ } from "./chunk-AVQDCKNF.js";
7
7
  import {
8
8
  init_esbuild_shims
9
9
  } from "./chunk-A4BMJM77.js";