@qwen-code/qwen-code 0.19.5 → 0.19.6-nightly.20260705.015ee4248

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 (264) hide show
  1. package/bundled/dataviz/SKILL.md +50 -0
  2. package/bundled/dataviz/references/anti-patterns.md +12 -0
  3. package/bundled/dataviz/references/choosing-a-form.md +16 -0
  4. package/bundled/dataviz/references/palette.md +57 -0
  5. package/bundled/dataviz/scripts/validate_palette.js +328 -0
  6. package/bundled/loop/SKILL.md +1 -1
  7. package/bundled/qc-helper/docs/configuration/settings.md +14 -8
  8. package/bundled/qc-helper/docs/features/headless.md +2 -2
  9. package/bundled/qc-helper/docs/features/scheduled-tasks.md +4 -2
  10. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +1 -1
  11. package/bundled/review/DESIGN.md +23 -0
  12. package/bundled/review/SKILL.md +65 -8
  13. package/chunks/{MaxSizedBox-5JV77KRA.js → MaxSizedBox-PRXTXIGC.js} +31 -30
  14. package/chunks/{StandaloneSessionPicker-MGUGB6PH.js → StandaloneSessionPicker-PV7BSC5D.js} +42 -41
  15. package/chunks/{acpAgent-4F36XM3X.js → acpAgent-F34HNAM3.js} +939 -424
  16. package/chunks/{agent-IWBUZI6A.js → agent-XSQDKLST.js} +26 -25
  17. package/chunks/{agent-headless-JUTICAYO.js → agent-headless-B63XCKWX.js} +26 -25
  18. package/chunks/{anthropicContentGenerator-WL3LJOUB.js → anthropicContentGenerator-INXXI4PW.js} +7 -7
  19. package/chunks/{artifact-tool-W76WC2JX.js → artifact-tool-H2TNPNP5.js} +16 -3
  20. package/chunks/{askUserQuestion-J3P6TH3V.js → askUserQuestion-MKL5ZTMC.js} +2 -2
  21. package/chunks/{bridge-DHZHQ4UV.js → bridge-NCZDJBRF.js} +34 -32
  22. package/chunks/{channel-worker-supervisor-EVPAYNZ5.js → channel-worker-supervisor-JUYQ5Z4R.js} +5 -5
  23. package/chunks/{chunk-AVQDCKNF.js → chunk-22MNNNXE.js} +4 -0
  24. package/chunks/chunk-3RW4AZJV.js +5063 -0
  25. package/chunks/chunk-3VJ7MT3N.js +111 -0
  26. package/chunks/{chunk-JKGCBO3O.js → chunk-3VRMGS3A.js} +4 -4
  27. package/chunks/{chunk-TN6RT6EJ.js → chunk-3WOJO5EJ.js} +16 -4
  28. package/chunks/{chunk-G7OQ3RFJ.js → chunk-42XGFRJS.js} +3 -3
  29. package/chunks/{chunk-MOUXUCXQ.js → chunk-4KJ2BPIT.js} +1 -1
  30. package/chunks/{chunk-PPFWEV7G.js → chunk-4RQIB5UZ.js} +62 -62
  31. package/chunks/{chunk-JJ6B3ZD3.js → chunk-544UZQBD.js} +3 -3
  32. package/chunks/{chunk-B236XPGF.js → chunk-5UDYETKK.js} +1 -1
  33. package/chunks/{chunk-7DMQRPC7.js → chunk-6BEOH4KK.js} +1 -1
  34. package/chunks/{chunk-CXBG27SF.js → chunk-6IAWPIQ6.js} +3 -2
  35. package/chunks/{chunk-MDBNFHIO.js → chunk-6MDY7FX3.js} +5 -5
  36. package/chunks/{chunk-RM3PGSGL.js → chunk-6SHO7WFF.js} +15 -2
  37. package/chunks/{chunk-YCU7QV7Q.js → chunk-73WGF3NW.js} +34 -1
  38. package/chunks/{chunk-T42ACHFI.js → chunk-7LTB54MK.js} +1 -1
  39. package/chunks/{chunk-SJVPSHXU.js → chunk-7U6J224Z.js} +132 -25
  40. package/chunks/{chunk-CSPSJU5R.js → chunk-7WLJPMWU.js} +17 -17
  41. package/chunks/{chunk-R6RI2HIC.js → chunk-ACD5DFUY.js} +41 -14
  42. package/chunks/{chunk-EWALXUAD.js → chunk-AGHU5VRK.js} +8 -0
  43. package/chunks/{chunk-GLPV75ES.js → chunk-AHNJGLFV.js} +2 -2
  44. package/chunks/{chunk-DRS2HTNT.js → chunk-AOAFX4PL.js} +5 -5
  45. package/chunks/{chunk-QHYITL6P.js → chunk-CK7IUFOB.js} +63 -22
  46. package/chunks/{chunk-RSBQS6M4.js → chunk-CODWJXQA.js} +1 -1
  47. package/chunks/{chunk-LWGLBVWA.js → chunk-CSOTA7KX.js} +1 -1
  48. package/chunks/{chunk-UJT42DB6.js → chunk-DFH4T5IQ.js} +6 -6
  49. package/chunks/{chunk-DX3TKXNT.js → chunk-DJACOX4C.js} +2 -2
  50. package/chunks/{chunk-KKQWC6WS.js → chunk-DNV4FSN5.js} +1 -1
  51. package/chunks/{chunk-YPCPZSZB.js → chunk-DT3B47QP.js} +1 -1
  52. package/chunks/{chunk-NIOPRZNN.js → chunk-E7KNELIZ.js} +1 -1
  53. package/chunks/{chunk-DG573EOO.js → chunk-FEJ2FZ3U.js} +1 -1
  54. package/chunks/{chunk-M5ITDKSM.js → chunk-FHGQFG2K.js} +1 -1
  55. package/chunks/{chunk-HISPEX42.js → chunk-FSXFNDTI.js} +7 -7
  56. package/chunks/{chunk-LHMZCIKL.js → chunk-FUW7YGJU.js} +3 -1
  57. package/chunks/{chunk-Y4UQT3PM.js → chunk-FV5SBNNC.js} +1 -1
  58. package/chunks/{chunk-YTFBURQD.js → chunk-GB6HDZIK.js} +10 -2
  59. package/chunks/{chunk-D5KISTLW.js → chunk-H6EMK6QK.js} +1 -1
  60. package/chunks/{chunk-2Z43HUXT.js → chunk-HLKG6CZN.js} +3 -2
  61. package/chunks/{chunk-VXGPYF7U.js → chunk-IFEWJXFS.js} +1 -1
  62. package/chunks/{chunk-TENOUWY2.js → chunk-IJRL2S3D.js} +3 -3
  63. package/chunks/{chunk-OQHLUA2Y.js → chunk-IL6ZEDZ2.js} +4 -4
  64. package/chunks/{chunk-2CAII5HD.js → chunk-J7XUJALJ.js} +1 -1
  65. package/chunks/chunk-JFFOH2XO.js +2472 -0
  66. package/chunks/{chunk-NNEJEBCF.js → chunk-K3FZXSTO.js} +95 -107
  67. package/chunks/{chunk-NDY7OENU.js → chunk-KB4ICCA5.js} +3 -3
  68. package/chunks/{chunk-MNOXKSM2.js → chunk-LFFF2SPV.js} +3 -3
  69. package/chunks/{chunk-J3ERRYYI.js → chunk-LTMDKOZC.js} +2 -2
  70. package/chunks/{chunk-R3UWLLRQ.js → chunk-M7AGQP5D.js} +1 -1
  71. package/chunks/{chunk-CBJE2PLG.js → chunk-MLB5AB2I.js} +4 -4
  72. package/chunks/{chunk-YHTNWGRR.js → chunk-MZ7BABX3.js} +1 -1
  73. package/chunks/{chunk-SJBIFVD2.js → chunk-NFE3DQ4R.js} +7 -3
  74. package/chunks/{chunk-BC4R5C5R.js → chunk-NLD2WKE3.js} +55 -12
  75. package/chunks/{chunk-ALX6BUYW.js → chunk-NUGPZXAZ.js} +35 -1
  76. package/chunks/{chunk-NSSVORTQ.js → chunk-NYKWPUAE.js} +17 -13
  77. package/chunks/{chunk-K4I4STSL.js → chunk-OGEJMKN5.js} +2 -2
  78. package/chunks/{chunk-HTWHAN44.js → chunk-PC4ZXHU2.js} +1 -1
  79. package/chunks/{chunk-2YH27UNF.js → chunk-QLBBV7C6.js} +1 -1
  80. package/chunks/chunk-QT7XKZT7.js +293 -0
  81. package/chunks/{chunk-NPQWQYU6.js → chunk-QYNNN7BK.js} +1 -1
  82. package/chunks/chunk-R4N3OALZ.js +5631 -0
  83. package/chunks/{chunk-G4M7FPNY.js → chunk-RB5GAQR6.js} +2 -2
  84. package/chunks/{chunk-SBMHB6N5.js → chunk-RPHMD5UC.js} +15 -15
  85. package/chunks/{chunk-CHY5C5T4.js → chunk-SJ2CTIYH.js} +185 -88
  86. package/chunks/chunk-SLQXGMYY.js +949 -0
  87. package/chunks/{chunk-BZHLWC6T.js → chunk-SUAKHHK7.js} +2 -2
  88. package/chunks/{chunk-IMAMNLY6.js → chunk-SWV4CVYG.js} +158 -3
  89. package/chunks/{chunk-XKSCTXPK.js → chunk-TDGF35EN.js} +4 -3
  90. package/chunks/{chunk-TOAUDIS7.js → chunk-TLWA7TPR.js} +6 -2
  91. package/chunks/{chunk-WALEWZ44.js → chunk-UVHL5TCO.js} +1 -1
  92. package/chunks/{chunk-ZISMVA6U.js → chunk-VDMM5LVR.js} +1566 -37
  93. package/chunks/{chunk-BPFJQGY7.js → chunk-VEB3NYSO.js} +164 -5
  94. package/chunks/{chunk-L7OJ3ZO3.js → chunk-VZ7HY3YU.js} +1 -1
  95. package/chunks/{chunk-6KPZJJ6U.js → chunk-W4I6PLEG.js} +131 -38
  96. package/chunks/{chunk-QOMAHFYI.js → chunk-W7EEOR7D.js} +3 -3
  97. package/chunks/{chunk-6QVQZAW6.js → chunk-WKP5QZOP.js} +1 -1
  98. package/chunks/{chunk-YXK4GPYO.js → chunk-WMPVYQ4P.js} +30 -1
  99. package/chunks/{chunk-DM4E337C.js → chunk-WNTS5A2R.js} +5 -5
  100. package/chunks/{chunk-6QTCOQX7.js → chunk-WOG7QWIT.js} +3086 -2635
  101. package/chunks/{chunk-UY2TCIZS.js → chunk-X265R5C6.js} +3 -3
  102. package/chunks/{chunk-LKWAVAB5.js → chunk-X2XNQQJI.js} +2 -2
  103. package/chunks/{chunk-MTNTVOJR.js → chunk-X3YGAX7V.js} +6 -3
  104. package/chunks/{chunk-EROWZQN7.js → chunk-XD3OLPII.js} +6 -6
  105. package/chunks/{chunk-RNGAT2Y2.js → chunk-YYL6HROQ.js} +1 -1
  106. package/chunks/{chunk-XKZXGIRM.js → chunk-YZ2LNTHO.js} +2 -2
  107. package/chunks/{chunk-Z7XNVNPM.js → chunk-YZ5ANQMR.js} +3 -3
  108. package/chunks/{chunk-4MCC4XHH.js → chunk-Z7EYROOJ.js} +3568 -5508
  109. package/chunks/{chunk-5B2WNM6V.js → chunk-ZI4MGBB5.js} +1 -1
  110. package/chunks/{chunk-WZ724G6K.js → chunk-ZPGE42V7.js} +6 -6
  111. package/chunks/{computer-use-ON3JQUHW.js → computer-use-5I2UHVNY.js} +26 -25
  112. package/chunks/{contextCommand-OGCG7W6N.js → contextCommand-3NWY7AJG.js} +28 -27
  113. package/chunks/{cron-create-6YTCOX6P.js → cron-create-O6ZHD3JN.js} +22 -7
  114. package/chunks/{cron-delete-E3NIFSUK.js → cron-delete-BFD5B2XX.js} +4 -4
  115. package/chunks/{cron-list-Q64MNQNE.js → cron-list-KI6FV4KN.js} +4 -4
  116. package/chunks/{daemon-EEB2RYOL.js → daemon-DRUMLVFP.js} +140 -0
  117. package/chunks/daemon-status-provider-A2DK3ZTO.js +74 -0
  118. package/chunks/{dist-AP5V4WYU.js → dist-AAO65DPC.js} +2 -2
  119. package/chunks/{dist-X4ZDE726.js → dist-ABQ7VWRR.js} +3 -3
  120. package/chunks/{dist-SNXOUPYS.js → dist-AW5ZYMUI.js} +2 -2
  121. package/chunks/{dist-Z57Q4YF5.js → dist-DN6M6TJ5.js} +525 -95
  122. package/chunks/{dist-IZP2VV4C.js → dist-JPSVN367.js} +2 -2
  123. package/chunks/{earlyInputCapture-DAFHSGVW.js → earlyInputCapture-5TMSSPQ5.js} +27 -26
  124. package/chunks/{edit-3QFNCSZH.js → edit-V4ITLSUD.js} +27 -26
  125. package/chunks/{en-M4EBUBNU.js → en-AXARKOWO.js} +2 -0
  126. package/chunks/{enter-worktree-62EQQMLD.js → enter-worktree-7ULPRMTJ.js} +26 -25
  127. package/chunks/{enterPlanMode-VUQSE4EG.js → enterPlanMode-YSHMLHJZ.js} +26 -25
  128. package/chunks/{errors-PW75PZXE.js → errors-TCUTD7NF.js} +28 -27
  129. package/chunks/{exit-worktree-VVNH7OVY.js → exit-worktree-JZDCKR6A.js} +26 -25
  130. package/chunks/{exitPlanMode-RUYRCYZW.js → exitPlanMode-GOQBN6SG.js} +26 -25
  131. package/chunks/{fast-path-TFRJRTTR.js → fast-path-F2HGAKO2.js} +3 -3
  132. package/chunks/{fast-path-settings-UQLRFDQP.js → fast-path-settings-RCRXH2JG.js} +2 -2
  133. package/chunks/{gemini-XW7ZDUVR.js → gemini-3M7ECKNW.js} +86 -80
  134. package/chunks/{geminiContentGenerator-MZDVHVZH.js → geminiContentGenerator-5EG3QEJM.js} +4 -4
  135. package/chunks/{glob-WAY2PUWA.js → glob-2DBDTLR4.js} +54 -29
  136. package/chunks/{grep-W6CBKSYC.js → grep-R27DLGWT.js} +26 -25
  137. package/chunks/{initializer-HK2XE6P2.js → initializer-OXB6BJZU.js} +32 -31
  138. package/chunks/{keychain-token-storage-GPAKRDKQ.js → keychain-token-storage-UJV5XP4Z.js} +2 -2
  139. package/chunks/{list-RVLIIKKL.js → list-HLCOEOSF.js} +33 -32
  140. package/chunks/{loadedSettingsAdapter-C63OUYZC.js → loadedSettingsAdapter-JHTVH3YO.js} +31 -30
  141. package/chunks/{loop-wakeup-G2EHBRGR.js → loop-wakeup-CUVIY2JY.js} +5 -5
  142. package/chunks/{ls-IDHUVSAG.js → ls-L654WOAT.js} +4 -4
  143. package/chunks/{lsp-FSRYXGFT.js → lsp-M35KE54Y.js} +2 -2
  144. package/chunks/mcp-2JWEFAIN.js +67 -0
  145. package/chunks/{monitor-FOG36ABM.js → monitor-5QKFZFDX.js} +26 -25
  146. package/chunks/nonInteractiveCli-W5W5PIHI.js +112 -0
  147. package/chunks/{notebook-edit-GC6NXRCX.js → notebook-edit-XAFBWORI.js} +27 -26
  148. package/chunks/{openaiContentGenerator-EXR3ZL3Z.js → openaiContentGenerator-NULJROYV.js} +13 -12
  149. package/chunks/{pidfile-FNZM2DDH.js → pidfile-3LT7PZSW.js} +27 -26
  150. package/chunks/{qwenContentGenerator-A7B6J4U7.js → qwenContentGenerator-KLSURVNH.js} +28 -27
  151. package/chunks/{qwenOAuth2-LWLA6MQG.js → qwenOAuth2-ZV7YLMND.js} +5 -5
  152. package/chunks/{read-file-6JL4ULMY.js → read-file-HDAM3RHJ.js} +8 -8
  153. package/chunks/{read-mcp-resource-PIJF24RO.js → read-mcp-resource-CNQHBSJM.js} +2 -2
  154. package/chunks/record-artifact-PP3LKHTS.js +343 -0
  155. package/chunks/{ripGrep-DIUGLJE5.js → ripGrep-W36NLR7M.js} +26 -25
  156. package/chunks/{run-qwen-serve-CME3AKM4.js → run-qwen-serve-IMI2CQB5.js} +72 -28
  157. package/chunks/{scheduler-L7F6GDDT.js → scheduler-I5NKE5UJ.js} +26 -25
  158. package/chunks/{send-message-33PYFMCT.js → send-message-OA6MV4EU.js} +3 -3
  159. package/chunks/{serve-SRCBOJGP.js → serve-JMHMOYBO.js} +33 -32
  160. package/chunks/{server-QSQ45QFR.js → server-QIYIN34N.js} +1358 -492
  161. package/chunks/{session-5DG6NXHZ.js → session-BLL6HB35.js} +68 -65
  162. package/chunks/{settings-3EEQI4MN.js → settings-ABECXCTY.js} +30 -29
  163. package/chunks/{shell-B7FNYF5S.js → shell-A2TQI3U4.js} +26 -25
  164. package/chunks/{skill-AAOGHD5O.js → skill-4GTWZZWR.js} +10 -10
  165. package/chunks/{spawnChannel-3CBN3ZLK.js → spawnChannel-DFUVGP53.js} +30 -29
  166. package/chunks/{src-T5A7P7FS.js → src-ZORBMUM7.js} +77 -43
  167. package/chunks/{startInteractiveUI-2FGEQ6AS.js → startInteractiveUI-FH5MVXUE.js} +449 -175
  168. package/chunks/{syntheticOutput-YOSWIHDJ.js → syntheticOutput-F7LSDCAR.js} +3 -3
  169. package/chunks/{task-create-NHS2NGB3.js → task-create-RPFZNB4B.js} +7 -7
  170. package/chunks/{task-list-5UIB564R.js → task-list-TGGJX7EA.js} +5 -5
  171. package/chunks/{task-stop-HGXZ2VZ3.js → task-stop-W7NGTMYQ.js} +2 -2
  172. package/chunks/{task-update-IYYWUILG.js → task-update-5WUG5MVQ.js} +7 -7
  173. package/chunks/{team-create-KDF6W6PV.js → team-create-F76QOR6H.js} +26 -25
  174. package/chunks/{team-delete-FEKJCU4P.js → team-delete-UHQQ2QQX.js} +5 -5
  175. package/chunks/{team-plan-approval-PSFKQX7M.js → team-plan-approval-OKM7YZC2.js} +26 -25
  176. package/chunks/{theme-manager-5XOA2AO7.js → theme-manager-6R7EVWHW.js} +27 -26
  177. package/chunks/{todoWrite-TKMVZ2HT.js → todoWrite-C4ZAMSR3.js} +4 -4
  178. package/chunks/{tool-search-LFRILZXC.js → tool-search-UWXDKI7D.js} +9 -9
  179. package/chunks/{trustedFolders-7HQY6T6X.js → trustedFolders-DHASVVUP.js} +27 -26
  180. package/chunks/{validateNonInterActiveAuth-UC27B7BA.js → validateNonInterActiveAuth-56J7MOOP.js} +62 -59
  181. package/chunks/version-NE2I4PBN.js +10 -0
  182. package/chunks/{web-fetch-J4PIW36Q.js → web-fetch-UYGMOHW4.js} +5 -5
  183. package/chunks/{workflow-KUTESS6L.js → workflow-HGF3URV3.js} +35 -27
  184. package/chunks/{workspace-providers-status-LJT5AQDS.js → workspace-providers-status-KXB2OZFQ.js} +33 -32
  185. package/chunks/{workspace-service-YOBYVDXH.js → workspace-service-NSTI55BC.js} +39 -38
  186. package/chunks/workspace-skills-status-X5S6JGQZ.js +69 -0
  187. package/chunks/{write-file-FJYBZUHP.js → write-file-HVKT5VTX.js} +27 -26
  188. package/chunks/yargs-B64EYTCF.js +10 -0
  189. package/chunks/{zh-SLZNSSZB.js → zh-RS3HZHFH.js} +2 -0
  190. package/chunks/{zh-TW-P53C2SL5.js → zh-TW-L5GRQ4S4.js} +2 -0
  191. package/cli-entry.js +81 -8
  192. package/cli.js +348 -55
  193. package/locales/en.js +2 -0
  194. package/locales/zh-TW.js +2 -0
  195. package/locales/zh.js +2 -0
  196. package/node_modules/@qwen-code/audio-capture/package.json +1 -1
  197. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
  198. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
  199. package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
  200. package/package.json +3 -3
  201. package/web-shell/assets/{arc-D_rAuMDd.js → arc-Csx4m4N0.js} +1 -1
  202. package/web-shell/assets/{architectureDiagram-3BPJPVTR-DUCzbHVo.js → architectureDiagram-3BPJPVTR-BEa0vCM7.js} +1 -1
  203. package/web-shell/assets/{blockDiagram-GPEHLZMM-BEEBt1LL.js → blockDiagram-GPEHLZMM-BPzbKnn3.js} +1 -1
  204. package/web-shell/assets/{c4Diagram-AAUBKEIU-5ZJ_DeFL.js → c4Diagram-AAUBKEIU-B8YO71yP.js} +1 -1
  205. package/web-shell/assets/channel-QU1XUuVe.js +1 -0
  206. package/web-shell/assets/{chunk-2J33WTMH-Cfw7EiLn.js → chunk-2J33WTMH-32XhwSHt.js} +1 -1
  207. package/web-shell/assets/{chunk-4BX2VUAB-FGuZNCZY.js → chunk-4BX2VUAB-Bmoyo6PS.js} +1 -1
  208. package/web-shell/assets/{chunk-55IACEB6-CaBwYPBF.js → chunk-55IACEB6-TwH6PFhs.js} +1 -1
  209. package/web-shell/assets/{chunk-727SXJPM-BlR04OFz.js → chunk-727SXJPM-RI_IVUtZ.js} +1 -1
  210. package/web-shell/assets/{chunk-AQP2D5EJ-D3_mYJH5.js → chunk-AQP2D5EJ-DH6GIAZD.js} +1 -1
  211. package/web-shell/assets/{chunk-FMBD7UC4-7D4q4SbB.js → chunk-FMBD7UC4-DeD3k3D5.js} +1 -1
  212. package/web-shell/assets/{chunk-ND2GUHAM-BjX_Iwmr.js → chunk-ND2GUHAM-BLPb8nv3.js} +1 -1
  213. package/web-shell/assets/{chunk-QZHKN3VN-C3Hz_ZQh.js → chunk-QZHKN3VN-PZpyglW1.js} +1 -1
  214. package/web-shell/assets/classDiagram-4FO5ZUOK-fv1EWO-L.js +1 -0
  215. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-fv1EWO-L.js +1 -0
  216. package/web-shell/assets/{cose-bilkent-S5V4N54A-Ax4UycaT.js → cose-bilkent-S5V4N54A-Jsd0yKfz.js} +1 -1
  217. package/web-shell/assets/{dagre-BM42HDAG-C6hmPtGt.js → dagre-BM42HDAG-B-zADciZ.js} +1 -1
  218. package/web-shell/assets/{diagram-2AECGRRQ-tXZnxjmw.js → diagram-2AECGRRQ-Cn6GDxoo.js} +1 -1
  219. package/web-shell/assets/{diagram-5GNKFQAL-99dwIzQG.js → diagram-5GNKFQAL-udLgyJxO.js} +1 -1
  220. package/web-shell/assets/{diagram-KO2AKTUF-Bqhn0-2s.js → diagram-KO2AKTUF-EcLpfzy3.js} +1 -1
  221. package/web-shell/assets/{diagram-LMA3HP47-DzThVSvo.js → diagram-LMA3HP47-D-YFbYsJ.js} +1 -1
  222. package/web-shell/assets/{diagram-OG6HWLK6-DPE8vjln.js → diagram-OG6HWLK6-C8oRUATa.js} +1 -1
  223. package/web-shell/assets/{erDiagram-TEJ5UH35-KzUKgQCV.js → erDiagram-TEJ5UH35-DPH5nStc.js} +1 -1
  224. package/web-shell/assets/{flowDiagram-I6XJVG4X-DBN-DXw5.js → flowDiagram-I6XJVG4X-CSOTwkAt.js} +1 -1
  225. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DuBsP9u8.js → ganttDiagram-6RSMTGT7-D0L988t0.js} +1 -1
  226. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BjWHMyKR.js → gitGraphDiagram-PVQCEYII-B9Oo7gxS.js} +1 -1
  227. package/web-shell/assets/index-BYZZL5N7.css +5 -0
  228. package/web-shell/assets/index-C_oTyz0s.js +753 -0
  229. package/web-shell/assets/{infoDiagram-5YYISTIA-BVux0vP6.js → infoDiagram-5YYISTIA-Ddj4YN2P.js} +1 -1
  230. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-2qzw7f--.js → ishikawaDiagram-YF4QCWOH-CBjafcl7.js} +1 -1
  231. package/web-shell/assets/{journeyDiagram-JHISSGLW-Dnl65sxL.js → journeyDiagram-JHISSGLW-Bn3XD99u.js} +1 -1
  232. package/web-shell/assets/{kanban-definition-UN3LZRKU-BElSQYtY.js → kanban-definition-UN3LZRKU-D7PBPJmE.js} +1 -1
  233. package/web-shell/assets/{linear-BjoycSSY.js → linear-Bmfo22rZ.js} +1 -1
  234. package/web-shell/assets/{mermaid.core-xe6bvMRz.js → mermaid.core-xRkAI-EI.js} +5 -5
  235. package/web-shell/assets/{mindmap-definition-RKZ34NQL-D8DQgI4U.js → mindmap-definition-RKZ34NQL-B30zRinm.js} +1 -1
  236. package/web-shell/assets/{pieDiagram-4H26LBE5-Dwh7Gp7c.js → pieDiagram-4H26LBE5-DblnKR9Z.js} +1 -1
  237. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BXKNBln2.js → quadrantDiagram-W4KKPZXB-COkHFKjF.js} +1 -1
  238. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BzaC3cIA.js → requirementDiagram-4Y6WPE33-DDU3MMyn.js} +1 -1
  239. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-DP2t7eZk.js → sankeyDiagram-5OEKKPKP-Dt4lqEYv.js} +1 -1
  240. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-XlFiWEYv.js → sequenceDiagram-3UESZ5HK-BRzby5gN.js} +1 -1
  241. package/web-shell/assets/{stateDiagram-AJRCARHV-CupgUMJO.js → stateDiagram-AJRCARHV-CylzByc3.js} +1 -1
  242. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BKWZIKkM.js +1 -0
  243. package/web-shell/assets/{timeline-definition-PNZ67QCA-DstuGywa.js → timeline-definition-PNZ67QCA-BSzaNx6w.js} +1 -1
  244. package/web-shell/assets/{vennDiagram-CIIHVFJN-CnbNp6zu.js → vennDiagram-CIIHVFJN-BbzeKzCo.js} +1 -1
  245. package/web-shell/assets/{wardley-L42UT6IY-DnvoHq6R.js → wardley-L42UT6IY-BRJwCgE_.js} +1 -1
  246. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-Cz0xHEWB.js → wardleyDiagram-YWT4CUSO-BmAs0mJ-.js} +1 -1
  247. package/web-shell/assets/{xychartDiagram-2RQKCTM6-p36gfo88.js → xychartDiagram-2RQKCTM6-DqywSqVW.js} +1 -1
  248. package/web-shell/index.html +2 -2
  249. package/bundled/loop/SKILL.test.ts +0 -119
  250. package/bundled/loop/autonomous-loop.test.ts +0 -59
  251. package/bundled/loop/loop-task-file.test.ts +0 -1064
  252. package/bundled/loop/loop-tick-resolver.test.ts +0 -906
  253. package/chunks/chunk-EJ7BN3EN.js +0 -11396
  254. package/chunks/chunk-L7QPM2YD.js +0 -481
  255. package/chunks/daemon-status-provider-P72STMLB.js +0 -72
  256. package/chunks/nonInteractiveCli-6BYQSJTB.js +0 -109
  257. package/chunks/workspace-skills-status-ONEPXJV6.js +0 -62
  258. package/web-shell/assets/channel-B5ynH0q8.js +0 -1
  259. package/web-shell/assets/classDiagram-4FO5ZUOK-CK3ibywp.js +0 -1
  260. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CK3ibywp.js +0 -1
  261. package/web-shell/assets/index-9qfvU0_r.css +0 -5
  262. package/web-shell/assets/index-CWzDaQT5.js +0 -717
  263. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-By3E4QwN.js +0 -1
  264. package/chunks/{chunk-UFC57OYT.js → chunk-VRDMOSQS.js} +54 -54
@@ -55,6 +55,30 @@ var EventBus = class {
55
55
  get subscriberCount() {
56
56
  return this.subs.size;
57
57
  }
58
+ seedReplayEvents(inputs) {
59
+ if (this.closed) return [];
60
+ if (inputs.length === 0) return [];
61
+ const events = [];
62
+ for (const input of inputs) {
63
+ const existingMeta = input._meta;
64
+ const event = {
65
+ id: this.nextId++,
66
+ v: EVENT_SCHEMA_VERSION,
67
+ ...input,
68
+ _meta: {
69
+ ...existingMeta ?? {},
70
+ serverTimestamp: getServerTimestamp(existingMeta)
71
+ }
72
+ };
73
+ events.push(event);
74
+ try {
75
+ this.compactionEngine?.ingest(event);
76
+ } catch {
77
+ }
78
+ }
79
+ this.ring.length = 0;
80
+ return events;
81
+ }
58
82
  /**
59
83
  * Publish an event to the bus. Returns the constructed `BridgeEvent`
60
84
  * (with `id` + `v` assigned) on success, or `undefined` when the
@@ -174,7 +198,17 @@ var EventBus = class {
174
198
  });
175
199
  } else {
176
200
  const earliestInRing = this.ring[0]?.id;
177
- if (earliestInRing !== void 0 && earliestInRing > opts.lastEventId + 1) {
201
+ if (earliestInRing === void 0 && opts.lastEventId < this.nextId - 1) {
202
+ queue.forcePush({
203
+ v: EVENT_SCHEMA_VERSION,
204
+ type: "state_resync_required",
205
+ data: {
206
+ reason: "seeded_replay_not_in_ring",
207
+ lastDeliveredId: opts.lastEventId,
208
+ earliestAvailableId: this.nextId
209
+ }
210
+ });
211
+ } else if (earliestInRing !== void 0 && earliestInRing > opts.lastEventId + 1) {
178
212
  queue.forcePush({
179
213
  v: EVENT_SCHEMA_VERSION,
180
214
  type: "state_resync_required",
@@ -6,26 +6,26 @@ import {
6
6
  parseAcpBaseModelId,
7
7
  resolveCliGenerationConfig,
8
8
  sanitizeProviderBaseUrl
9
- } from "./chunk-K4I4STSL.js";
10
- import {
11
- STATUS_SCHEMA_VERSION
12
- } from "./chunk-LHMZCIKL.js";
9
+ } from "./chunk-OGEJMKN5.js";
13
10
  import {
14
11
  loadSettings
15
- } from "./chunk-BC4R5C5R.js";
12
+ } from "./chunk-NLD2WKE3.js";
13
+ import {
14
+ STATUS_SCHEMA_VERSION
15
+ } from "./chunk-FUW7YGJU.js";
16
16
  import {
17
17
  ModelsConfig,
18
18
  resolveProviderProtocol
19
- } from "./chunk-6QTCOQX7.js";
19
+ } from "./chunk-WOG7QWIT.js";
20
20
  import {
21
21
  APPROVAL_MODES
22
- } from "./chunk-BPFJQGY7.js";
22
+ } from "./chunk-VEB3NYSO.js";
23
23
  import {
24
24
  tokenLimit
25
- } from "./chunk-YTFBURQD.js";
25
+ } from "./chunk-GB6HDZIK.js";
26
26
  import {
27
27
  createDebugLogger
28
- } from "./chunk-AVQDCKNF.js";
28
+ } from "./chunk-22MNNNXE.js";
29
29
  import {
30
30
  init_esbuild_shims
31
31
  } from "./chunk-A4BMJM77.js";
@@ -72,6 +72,7 @@ function buildWorkspaceProvidersStatus(workspaceCwd, acpChannelLive, options) {
72
72
  const currentAcpModelId = hasCurrentModel && currentAuth ? formatAcpModelId(currentModelId, currentAuth) : currentModelId || void 0;
73
73
  const currentBaseUrl = resolvedCliConfig.sources["baseUrl"] ? resolvedCliConfig.baseUrl || void 0 : void 0;
74
74
  const fastModelId = typeof settings.fastModel === "string" && settings.fastModel.length > 0 ? settings.fastModel : void 0;
75
+ const visionModelId = typeof settings.visionModel === "string" && settings.visionModel.length > 0 ? settings.visionModel : void 0;
75
76
  const approvalMode = resolveApprovalMode(settings);
76
77
  const providers = /* @__PURE__ */ new Map();
77
78
  const explicitModelBaseUrls = buildExplicitModelBaseUrls(
@@ -120,7 +121,8 @@ function buildWorkspaceProvidersStatus(workspaceCwd, acpChannelLive, options) {
120
121
  currentAuth,
121
122
  currentAcpModelId,
122
123
  currentBaseUrl,
123
- fastModelId
124
+ fastModelId,
125
+ visionModelId
124
126
  );
125
127
  return {
126
128
  v: STATUS_SCHEMA_VERSION,
@@ -274,13 +276,15 @@ function hasCredentialPrefix(segment, markerLength, at) {
274
276
  return !/[/?#\s'"`<>]/.test(username);
275
277
  }
276
278
  __name(hasCredentialPrefix, "hasCredentialPrefix");
277
- function buildCurrent(authType, modelId, baseUrl, fastModelId) {
278
- if (!authType && !modelId && !baseUrl && !fastModelId) return void 0;
279
+ function buildCurrent(authType, modelId, baseUrl, fastModelId, visionModelId) {
280
+ if (!authType && !modelId && !baseUrl && !fastModelId && !visionModelId)
281
+ return void 0;
279
282
  return {
280
283
  ...authType ? { authType: String(authType) } : {},
281
284
  ...modelId ? { modelId } : {},
282
285
  ...baseUrl ? { baseUrl: sanitizeProviderBaseUrl(baseUrl) } : {},
283
- ...fastModelId ? { fastModelId } : {}
286
+ ...fastModelId ? { fastModelId } : {},
287
+ ...visionModelId ? { visionModelId } : {}
284
288
  };
285
289
  }
286
290
  __name(buildCurrent, "buildCurrent");
@@ -4,14 +4,14 @@ import {
4
4
  resolveModelConfig,
5
5
  resolveProviderProtocol,
6
6
  stripRuntimeSnapshotPrefix
7
- } from "./chunk-6QTCOQX7.js";
7
+ } from "./chunk-WOG7QWIT.js";
8
8
  import {
9
9
  external_exports
10
10
  } from "./chunk-K5PGHDBN.js";
11
11
  import {
12
12
  AuthType,
13
13
  MODEL_GENERATION_CONFIG_FIELDS
14
- } from "./chunk-CHY5C5T4.js";
14
+ } from "./chunk-SJ2CTIYH.js";
15
15
  import {
16
16
  REASONING_EFFORT_TIERS,
17
17
  normalizeReasoningEffort
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-TLRYABYP.js";
7
7
  import {
8
8
  createDebugLogger
9
- } from "./chunk-AVQDCKNF.js";
9
+ } from "./chunk-22MNNNXE.js";
10
10
  import {
11
11
  init_esbuild_shims
12
12
  } from "./chunk-A4BMJM77.js";
@@ -60,7 +60,7 @@ async function runExitCleanup(options = {}) {
60
60
  }
61
61
  __name(runExitCleanup, "runExitCleanup");
62
62
  async function cleanupCheckpoints() {
63
- const { Storage } = await import("./src-T5A7P7FS.js");
63
+ const { Storage } = await import("./src-ZORBMUM7.js");
64
64
  const storage = new Storage(process.cwd());
65
65
  const tempDir = storage.getProjectTempDir();
66
66
  const checkpointsDir = join(tempDir, "checkpoints");
@@ -0,0 +1,293 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ getErrorStatus
5
+ } from "./chunk-22MNNNXE.js";
6
+ import {
7
+ init_esbuild_shims
8
+ } from "./chunk-A4BMJM77.js";
9
+ import {
10
+ __name
11
+ } from "./chunk-J2S4EL5Y.js";
12
+
13
+ // packages/core/src/utils/quotaErrorDetection.ts
14
+ init_esbuild_shims();
15
+ function isApiError(error) {
16
+ return typeof error === "object" && error !== null && "error" in error && typeof error.error === "object" && error.error !== null && "message" in error.error;
17
+ }
18
+ __name(isApiError, "isApiError");
19
+ function isStructuredError(error) {
20
+ return typeof error === "object" && error !== null && "message" in error && typeof error.message === "string";
21
+ }
22
+ __name(isStructuredError, "isStructuredError");
23
+ function isProQuotaExceededError(error) {
24
+ const checkMessage = /* @__PURE__ */ __name((message) => message.includes("Quota exceeded for quota metric 'Gemini") && message.includes("Pro Requests'"), "checkMessage");
25
+ if (typeof error === "string") {
26
+ return checkMessage(error);
27
+ }
28
+ if (isStructuredError(error)) {
29
+ return checkMessage(error.message);
30
+ }
31
+ if (isApiError(error)) {
32
+ return checkMessage(error.error.message);
33
+ }
34
+ if (error && typeof error === "object" && "response" in error) {
35
+ const gaxiosError = error;
36
+ if (gaxiosError.response && gaxiosError.response.data) {
37
+ if (typeof gaxiosError.response.data === "string") {
38
+ return checkMessage(gaxiosError.response.data);
39
+ }
40
+ if (typeof gaxiosError.response.data === "object" && gaxiosError.response.data !== null && "error" in gaxiosError.response.data) {
41
+ const errorData = gaxiosError.response.data;
42
+ return checkMessage(errorData.error?.message || "");
43
+ }
44
+ }
45
+ }
46
+ return false;
47
+ }
48
+ __name(isProQuotaExceededError, "isProQuotaExceededError");
49
+ function isGenericQuotaExceededError(error) {
50
+ if (typeof error === "string") {
51
+ return error.includes("Quota exceeded for quota metric");
52
+ }
53
+ if (isStructuredError(error)) {
54
+ return error.message.includes("Quota exceeded for quota metric");
55
+ }
56
+ if (isApiError(error)) {
57
+ return error.error.message.includes("Quota exceeded for quota metric");
58
+ }
59
+ return false;
60
+ }
61
+ __name(isGenericQuotaExceededError, "isGenericQuotaExceededError");
62
+ function isQwenQuotaExceededError(error) {
63
+ if (typeof error !== "object" || error === null) {
64
+ return false;
65
+ }
66
+ const { status, code, message } = error;
67
+ return status === 429 && code === "insufficient_quota" && typeof message === "string" && message.toLowerCase().includes("free allocated quota exceeded");
68
+ }
69
+ __name(isQwenQuotaExceededError, "isQwenQuotaExceededError");
70
+
71
+ // packages/core/src/utils/rateLimit.ts
72
+ init_esbuild_shims();
73
+
74
+ // packages/core/src/utils/retryPolicy.ts
75
+ init_esbuild_shims();
76
+ var MAX_TIMEOUT_MS = 2147483647;
77
+ function getRetryDelayMs(options) {
78
+ const normalizedAttempt = Math.max(1, options.attempt);
79
+ const delayCeilingMs = Math.min(options.maxDelayMs, MAX_TIMEOUT_MS);
80
+ const exponent = Math.min(normalizedAttempt - 1, 31);
81
+ const cappedExponentialDelayMs = Math.min(
82
+ options.initialDelayMs * Math.pow(2, exponent),
83
+ delayCeilingMs
84
+ );
85
+ const retryAfterMode = options.retryAfterMode ?? "ignore";
86
+ const retryAfterMs = retryAfterMode === "ignore" ? null : getRetryAfterDelayMs(options.error);
87
+ if (retryAfterMs !== null && retryAfterMs > 0) {
88
+ const retryAfterCapMs = Math.min(
89
+ options.retryAfterMaxDelayMs ?? options.maxDelayMs,
90
+ MAX_TIMEOUT_MS
91
+ );
92
+ const cappedRetryAfterMs = Math.min(retryAfterMs, retryAfterCapMs);
93
+ return Math.max(cappedExponentialDelayMs, cappedRetryAfterMs);
94
+ }
95
+ const jitterRatio = options.jitterRatio ?? 0;
96
+ if (jitterRatio <= 0) return cappedExponentialDelayMs;
97
+ const random = options.random ?? Math.random;
98
+ const jitter = cappedExponentialDelayMs * jitterRatio * (random() * 2 - 1);
99
+ return Math.min(
100
+ Math.max(0, cappedExponentialDelayMs + jitter),
101
+ delayCeilingMs
102
+ );
103
+ }
104
+ __name(getRetryDelayMs, "getRetryDelayMs");
105
+ function getRetryAfterDelayMs(error) {
106
+ const value = getHeaderValue(error, "retry-after") ?? getResponseHeaderValue(error, "retry-after");
107
+ if (value === null) return null;
108
+ const trimmed = value.trim();
109
+ if (/^\d+(\.\d+)?$/.test(trimmed)) {
110
+ const seconds = Number(trimmed);
111
+ if (Number.isFinite(seconds) && seconds >= 0) {
112
+ return Math.min(seconds * 1e3, MAX_TIMEOUT_MS);
113
+ }
114
+ }
115
+ const retryAtMs = Date.parse(trimmed);
116
+ if (!Number.isFinite(retryAtMs)) return null;
117
+ const delayMs = retryAtMs - Date.now();
118
+ return delayMs > 0 ? Math.min(delayMs, MAX_TIMEOUT_MS) : 0;
119
+ }
120
+ __name(getRetryAfterDelayMs, "getRetryAfterDelayMs");
121
+ function getHeaderValue(error, headerName) {
122
+ if (!hasHeaders(error)) return null;
123
+ const { headers } = error;
124
+ if (typeof headers.get === "function") {
125
+ const value = headers.get(headerName);
126
+ return typeof value === "string" ? value : null;
127
+ }
128
+ if (typeof headers !== "object" || headers === null) return null;
129
+ const lowerHeaderName = headerName.toLowerCase();
130
+ for (const [key, value] of Object.entries(headers)) {
131
+ if (key.toLowerCase() !== lowerHeaderName) continue;
132
+ return typeof value === "string" ? value : null;
133
+ }
134
+ return null;
135
+ }
136
+ __name(getHeaderValue, "getHeaderValue");
137
+ function getResponseHeaderValue(error, headerName) {
138
+ if (!hasResponseHeaders(error)) return null;
139
+ return getHeaderValue(error.response, headerName);
140
+ }
141
+ __name(getResponseHeaderValue, "getResponseHeaderValue");
142
+ function hasHeaders(error) {
143
+ return typeof error === "object" && error !== null && "headers" in error && error.headers != null;
144
+ }
145
+ __name(hasHeaders, "hasHeaders");
146
+ function hasResponseHeaders(error) {
147
+ return typeof error === "object" && error !== null && "response" in error && typeof error.response === "object" && error.response !== null && "headers" in error.response && error.response.headers != null;
148
+ }
149
+ __name(hasResponseHeaders, "hasResponseHeaders");
150
+
151
+ // packages/core/src/utils/rateLimit.ts
152
+ var RATE_LIMIT_ERROR_CODES = /* @__PURE__ */ new Set([429, 503, 1302, 1305]);
153
+ function isRateLimitError(error, extraCodes) {
154
+ const code = getErrorCode(error);
155
+ if (code === null) return false;
156
+ if (RATE_LIMIT_ERROR_CODES.has(code)) return true;
157
+ if (extraCodes && extraCodes.includes(code)) return true;
158
+ return false;
159
+ }
160
+ __name(isRateLimitError, "isRateLimitError");
161
+ function getRateLimitErrorDetails(error) {
162
+ const statusCode = getErrorStatus(error);
163
+ const payload = getProviderErrorPayload(error);
164
+ const message = getRawErrorMessage(error);
165
+ const transport = message?.includes("event:error") || message?.includes("HTTP_STATUS/") ? "sse" : statusCode !== void 0 ? "http" : "unknown";
166
+ return {
167
+ ...statusCode !== void 0 ? { statusCode } : {},
168
+ ...payload?.code !== void 0 ? { providerCode: String(payload.code) } : {},
169
+ ...payload?.message !== void 0 ? { providerMessage: payload.message } : {},
170
+ ...payload?.requestId !== void 0 ? { requestId: payload.requestId } : {},
171
+ transport
172
+ };
173
+ }
174
+ __name(getRateLimitErrorDetails, "getRateLimitErrorDetails");
175
+ function getRateLimitRetryDelayMs(attempt, options) {
176
+ return getRetryDelayMs({
177
+ attempt,
178
+ initialDelayMs: options.initialDelayMs,
179
+ maxDelayMs: options.maxDelayMs,
180
+ retryAfterMode: "minimum",
181
+ retryAfterMaxDelayMs: options.maxDelayMs,
182
+ error: options.error
183
+ });
184
+ }
185
+ __name(getRateLimitRetryDelayMs, "getRateLimitRetryDelayMs");
186
+ function getErrorCode(error) {
187
+ if (isApiError(error)) {
188
+ const n = Number(error.error.code);
189
+ if (Number.isFinite(n) && n > 0) return n;
190
+ }
191
+ const msg = error instanceof Error ? error.message : typeof error === "string" ? error : null;
192
+ if (msg) {
193
+ const i = msg.indexOf("{");
194
+ if (i !== -1) {
195
+ try {
196
+ const p = JSON.parse(msg.substring(i));
197
+ if (isApiError(p)) {
198
+ const n = Number(p.error.code);
199
+ if (Number.isFinite(n) && n > 0) return n;
200
+ }
201
+ } catch {
202
+ }
203
+ }
204
+ }
205
+ if (isStructuredError(error) && typeof error.status === "number") {
206
+ return error.status;
207
+ }
208
+ if (error instanceof Error && "status" in error) {
209
+ const s = error.status;
210
+ if (typeof s === "number") return s;
211
+ }
212
+ return getErrorStatus(error) ?? null;
213
+ }
214
+ __name(getErrorCode, "getErrorCode");
215
+ function getProviderErrorPayload(error) {
216
+ for (const payload of getJsonPayloads(error)) {
217
+ if (typeof payload !== "object" || payload === null) continue;
218
+ const direct = payload;
219
+ const nestedError = payload.error;
220
+ const nested = typeof nestedError === "object" && nestedError !== null ? nestedError : void 0;
221
+ const source = nested ?? direct;
222
+ const code = typeof source.code === "string" || typeof source.code === "number" ? source.code : void 0;
223
+ const message = typeof source.message === "string" ? source.message : void 0;
224
+ const requestId = typeof source.request_id === "string" ? source.request_id : typeof source.requestId === "string" ? source.requestId : typeof direct.request_id === "string" ? direct.request_id : typeof direct.requestId === "string" ? direct.requestId : void 0;
225
+ if (code !== void 0 || message !== void 0 || requestId !== void 0) {
226
+ return { code, message, requestId };
227
+ }
228
+ }
229
+ if (isApiError(error)) {
230
+ return {
231
+ code: error.error.code,
232
+ message: error.error.message
233
+ };
234
+ }
235
+ return null;
236
+ }
237
+ __name(getProviderErrorPayload, "getProviderErrorPayload");
238
+ function getJsonPayloads(error) {
239
+ const message = getRawErrorMessage(error);
240
+ if (!message) return [];
241
+ const payloads = [];
242
+ for (const line of message.split(/\r?\n/)) {
243
+ if (!line.startsWith("data:")) continue;
244
+ const data = line.slice("data:".length).trim();
245
+ if (!data || data === "[DONE]") continue;
246
+ try {
247
+ payloads.push(JSON.parse(data));
248
+ } catch {
249
+ }
250
+ }
251
+ if (payloads.length > 0) return payloads;
252
+ const jsonStart = message.indexOf("{");
253
+ const jsonEnd = message.lastIndexOf("}");
254
+ if (jsonStart !== -1 && jsonEnd > jsonStart) {
255
+ try {
256
+ payloads.push(
257
+ JSON.parse(message.slice(jsonStart, jsonEnd + 1))
258
+ );
259
+ } catch {
260
+ }
261
+ }
262
+ return payloads;
263
+ }
264
+ __name(getJsonPayloads, "getJsonPayloads");
265
+ function getRawErrorMessage(error) {
266
+ if (error instanceof Error) return error.message;
267
+ if (typeof error === "string") return error;
268
+ return null;
269
+ }
270
+ __name(getRawErrorMessage, "getRawErrorMessage");
271
+
272
+ export {
273
+ isApiError,
274
+ isStructuredError,
275
+ isProQuotaExceededError,
276
+ isGenericQuotaExceededError,
277
+ isQwenQuotaExceededError,
278
+ getRetryDelayMs,
279
+ getRetryAfterDelayMs,
280
+ isRateLimitError,
281
+ getRateLimitErrorDetails,
282
+ getRateLimitRetryDelayMs
283
+ };
284
+ /**
285
+ * @license
286
+ * Copyright 2025 Google LLC
287
+ * SPDX-License-Identifier: Apache-2.0
288
+ */
289
+ /**
290
+ * @license
291
+ * Copyright 2026 Google LLC
292
+ * SPDX-License-Identifier: Apache-2.0
293
+ */
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-AVQDCKNF.js";
5
+ } from "./chunk-22MNNNXE.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";