@qwen-code/qwen-code 0.19.2 → 0.19.3-nightly.20260630.e00fe6a27
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.
- package/bundled/extension-creator/SKILL.md +357 -0
- package/bundled/loop/SKILL.md +21 -7
- package/bundled/loop/SKILL.test.ts +41 -0
- package/bundled/loop/loop-task-file.test.ts +1064 -0
- package/bundled/loop/loop-task-file.ts +404 -0
- package/bundled/loop/loop-tick-resolver.test.ts +665 -0
- package/bundled/loop/loop-tick-resolver.ts +347 -0
- package/bundled/qc-helper/SKILL.md +26 -19
- package/bundled/qc-helper/docs/configuration/auth.md +11 -11
- package/bundled/qc-helper/docs/configuration/model-providers.md +13 -13
- package/bundled/qc-helper/docs/configuration/settings.md +76 -75
- package/bundled/qc-helper/docs/features/channels/plugins.md +1 -1
- package/bundled/qc-helper/docs/features/commands.md +108 -77
- package/bundled/qc-helper/docs/features/hooks.md +6 -1
- package/bundled/qc-helper/docs/features/memory.md +52 -0
- package/bundled/qc-helper/docs/qwen-serve.md +24 -2
- package/bundled/qc-helper/docs/support/tos-privacy.md +16 -3
- package/bundled/qc-helper/docs/support/troubleshooting.md +6 -0
- package/chunks/{MaxSizedBox-7RERNLFK.js → MaxSizedBox-T5X5MN5Q.js} +29 -27
- package/chunks/{StandaloneSessionPicker-S22XBSN6.js → StandaloneSessionPicker-P3E3WTOQ.js} +42 -37
- package/chunks/{acpAgent-4MCETHF2.js → acpAgent-QEP6DXFW.js} +864 -175
- package/chunks/{agent-K3ENVYSB.js → agent-UDANDUF7.js} +24 -23
- package/chunks/{agent-headless-HO3V3A3A.js → agent-headless-KYVSZHSO.js} +24 -23
- package/chunks/{anthropicContentGenerator-E3TQ5XJJ.js → anthropicContentGenerator-KWSJAQ7B.js} +33 -12
- package/chunks/{artifact-tool-QA4KRO3B.js → artifact-tool-D2X7G3C3.js} +2 -2
- package/chunks/{askUserQuestion-HMWXW6VN.js → askUserQuestion-UGETICJQ.js} +2 -2
- package/chunks/{bridge-4LV2HBH2.js → bridge-X42LXPTA.js} +31 -30
- package/chunks/{ca-7WC7ELX6.js → ca-IUFWESZL.js} +1 -0
- package/chunks/{chunk-JXQ23SNT.js → chunk-2JKEQWDZ.js} +623 -78
- package/chunks/{chunk-2TJ3YN6Q.js → chunk-2RJA6J57.js} +416 -401
- package/chunks/{chunk-3UALQ56H.js → chunk-3227DZO4.js} +1 -1
- package/chunks/{chunk-BGUDAULQ.js → chunk-3CPCDXFR.js} +5 -5
- package/chunks/{chunk-5RVSM6NW.js → chunk-3HUHAQF3.js} +1 -1
- package/chunks/{chunk-D5E5TMYH.js → chunk-3M4W4U5G.js} +16 -2
- package/chunks/{chunk-DBZUXSSV.js → chunk-4X7NIEQJ.js} +3 -3
- package/chunks/chunk-5GOVVXEV.js +73 -0
- package/chunks/{chunk-2BAQ3ACS.js → chunk-5SM4VT6V.js} +405 -5
- package/chunks/{chunk-NYOHZYHM.js → chunk-5XQ4A26L.js} +45 -3
- package/chunks/{chunk-CI5O6SQL.js → chunk-6FKEVYCD.js} +4 -4
- package/chunks/{chunk-ZD3NW5KL.js → chunk-7LM4XHPE.js} +63 -9
- package/chunks/chunk-7UNP2XM7.js +840 -0
- package/chunks/{chunk-OQHQHJRK.js → chunk-ARYCHZ4B.js} +151 -4775
- package/chunks/chunk-BC3C4F3Q.js +40 -0
- package/chunks/{chunk-CGEGHF2C.js → chunk-BKXBARJZ.js} +1 -1
- package/chunks/chunk-BMFMJINR.js +45 -0
- package/chunks/chunk-BOJWHRMX.js +11273 -0
- package/chunks/{chunk-CGOMICBE.js → chunk-BSZEQNUA.js} +34 -1
- package/chunks/{chunk-OIC6S73E.js → chunk-BUUQ5HPX.js} +1 -1
- package/chunks/{chunk-2BIF2NVV.js → chunk-BVSVIN45.js} +2 -2
- package/chunks/{chunk-TOEGRAVX.js → chunk-BX5YO7UW.js} +17 -5
- package/chunks/{chunk-4W4T77MO.js → chunk-BXVWV4GI.js} +109 -6
- package/chunks/{chunk-VQRYPFCV.js → chunk-CYHVPQYT.js} +10 -460
- package/chunks/{chunk-PRYMDRBV.js → chunk-DDMOU62Q.js} +1 -1
- package/chunks/{chunk-S566HKUS.js → chunk-DHXWNSJA.js} +15 -1
- package/chunks/{chunk-F6XNTYNE.js → chunk-E6XQPQXW.js} +30 -307
- package/chunks/{chunk-QBZ22PQX.js → chunk-EWALXUAD.js} +3 -1
- package/chunks/{chunk-EL5IHQON.js → chunk-EWYQFWYF.js} +6 -27
- package/chunks/{chunk-HG6YKEBI.js → chunk-F2DOT6UZ.js} +161 -30
- package/chunks/{chunk-JTYRZODB.js → chunk-FOOIZCWL.js} +16 -7
- package/chunks/{chunk-EX4W6ZYG.js → chunk-G5G4TFZ7.js} +1 -1
- package/chunks/{chunk-EW6C27XX.js → chunk-GEHVIWAT.js} +9 -3
- package/chunks/chunk-HEVBZSXG.js +4923 -0
- package/chunks/chunk-HFQ2XSE7.js +690 -0
- package/chunks/{chunk-PF523XJX.js → chunk-HPGTGMP3.js} +1 -1
- package/chunks/{chunk-OTBK43JR.js → chunk-HYCC3XM3.js} +1 -1
- package/chunks/{chunk-TMBPDHXD.js → chunk-I4H7PRWQ.js} +1 -1
- package/chunks/{chunk-EEEZIVFJ.js → chunk-JOLIREYR.js} +1 -1
- package/chunks/{chunk-TZM5JIAX.js → chunk-JYPQTRA3.js} +10 -7
- package/chunks/chunk-K5XU6E4T.js +167 -0
- package/chunks/{chunk-BS64PXY3.js → chunk-KFVU7ODN.js} +1 -1
- package/chunks/{chunk-3RJ3ZPPR.js → chunk-KKQWC6WS.js} +7 -7
- package/chunks/{chunk-3QFE4OTE.js → chunk-LBW7NW7X.js} +4 -4
- package/chunks/{chunk-Z7XXFPGP.js → chunk-LDWTYE33.js} +1 -1
- package/chunks/{chunk-EXMX5YHG.js → chunk-LP5E4YIH.js} +1 -1
- package/chunks/{chunk-ZUAXI2OA.js → chunk-M2U5NM24.js} +188 -11366
- package/chunks/{chunk-I5T6PIBQ.js → chunk-MBV2CTRL.js} +1010 -925
- package/chunks/{chunk-5JZLXFPD.js → chunk-MTHMXSNT.js} +11 -11
- package/chunks/{chunk-FPACXT7T.js → chunk-MTJVHQDP.js} +534 -164
- package/chunks/chunk-NDOC6M5S.js +481 -0
- package/chunks/{chunk-HGNSRCRB.js → chunk-NL4C3H6C.js} +1 -1
- package/chunks/{chunk-GZCJS5WH.js → chunk-O2VBQ3Y2.js} +2 -2
- package/chunks/{chunk-UN3C6GOR.js → chunk-PPFWEV7G.js} +10 -108
- package/chunks/{chunk-RS4HRC75.js → chunk-QI2CFVRF.js} +85 -8
- package/chunks/{chunk-XU5P23GN.js → chunk-QLDPRILK.js} +3 -3
- package/chunks/chunk-QYUE6W3T.js +123 -0
- package/chunks/{chunk-USGMPVOY.js → chunk-R3LHDWF2.js} +21 -12
- package/chunks/{chunk-BNXANYLH.js → chunk-RD6YJJJ6.js} +81 -1
- package/chunks/{chunk-PXFFKNCO.js → chunk-RIP623NO.js} +4877 -2469
- package/chunks/{chunk-XKBP7M7A.js → chunk-RYBSUGOR.js} +142 -30
- package/chunks/{chunk-BG4BIP7F.js → chunk-SBBN4BWR.js} +4 -2
- package/chunks/{chunk-T2VDEFUU.js → chunk-SKQZZVAV.js} +2 -2
- package/chunks/{chunk-5R4SBCX6.js → chunk-SL5MOGQH.js} +3 -3
- package/chunks/chunk-SMXULRAN.js +37 -0
- package/chunks/{chunk-WA5OJGFL.js → chunk-SS6WJMQK.js} +363 -76
- package/chunks/{chunk-UAARVVBI.js → chunk-TNWFHGN6.js} +1 -1
- package/chunks/{chunk-I2RFAW6Q.js → chunk-TT6Q3EN4.js} +7 -5
- package/chunks/chunk-UAKXW3DN.js +30 -0
- package/chunks/{chunk-C4K3FEQ2.js → chunk-UX4SGCGN.js} +32 -3
- package/chunks/{chunk-J6AW7O5D.js → chunk-WHDQZHRU.js} +2 -2
- package/chunks/{chunk-WGAEWQTF.js → chunk-WN6K47NR.js} +1 -2
- package/chunks/{chunk-UAARJR2G.js → chunk-WQT5SOI6.js} +2 -2
- package/chunks/{chunk-VYFMN7C6.js → chunk-WUMVIRTN.js} +225 -37
- package/chunks/{chunk-R36VMVEP.js → chunk-XJMKOTVV.js} +5 -5
- package/chunks/{chunk-TXVGVZYR.js → chunk-XJYUPHRC.js} +3 -3
- package/chunks/{chunk-2JD55C6G.js → chunk-Y6YMRS3U.js} +2 -2
- package/chunks/{chunk-LLFFKXZZ.js → chunk-YALKC62D.js} +56 -29
- package/chunks/{chunk-GYZQA2FO.js → chunk-YLZJCUH6.js} +1 -1
- package/chunks/chunk-YTFBURQD.js +313 -0
- package/chunks/{chunk-KBXLIVWQ.js → chunk-ZFPRYHWR.js} +2 -2
- package/chunks/{chunk-X6EDWN44.js → chunk-ZP6UKOPB.js} +1 -1
- package/chunks/{computer-use-6BBRNT6S.js → computer-use-LF2S6LUZ.js} +103 -49
- package/chunks/{contextCommand-UJAJ6N57.js → contextCommand-VPX5UG55.js} +26 -25
- package/chunks/{cron-create-4KQE6YLH.js → cron-create-SKEY55RG.js} +4 -4
- package/chunks/{cron-delete-THME66UP.js → cron-delete-I3NAT32Z.js} +6 -6
- package/chunks/{cron-list-7A54SJ5N.js → cron-list-6XRRL6TH.js} +5 -5
- package/chunks/{daemon-status-provider-CSL3BUOY.js → daemon-status-provider-5JAWZS4V.js} +34 -34
- package/chunks/{de-ACHALDED.js → de-EOW5PVHF.js} +1 -0
- package/chunks/{dist-BD27IA3L.js → dist-4FCNM6KJ.js} +2 -2
- package/chunks/{dist-OD2FY543.js → dist-O3H4PABL.js} +2 -2
- package/chunks/{dist-BOOH5JWN.js → dist-SCAAUWPS.js} +18 -4
- package/chunks/{dist-QHJRBCMP.js → dist-UKPWQJCL.js} +44 -2
- package/chunks/{dist-QFFZWACU.js → dist-VD7HXTML.js} +20 -9
- package/chunks/{earlyInputCapture-X6KMCSHD.js → earlyInputCapture-7FRQMU4P.js} +25 -24
- package/chunks/{edit-7J6WXARF.js → edit-REKJDIRL.js} +68 -27
- package/chunks/{en-NCUBOJOY.js → en-HPWEJBTR.js} +8 -0
- package/chunks/{enter-worktree-KULCKJPJ.js → enter-worktree-GBKUDCD3.js} +24 -23
- package/chunks/{enterPlanMode-H2CIOLMH.js → enterPlanMode-WB3Y4FGT.js} +24 -23
- package/chunks/{errors-6G2JYR54.js → errors-2XJDYO3M.js} +26 -25
- package/chunks/{exit-worktree-ECBWBVC5.js → exit-worktree-KKC7O2ZV.js} +24 -23
- package/chunks/{exitPlanMode-DQV56GTW.js → exitPlanMode-7HMS3TF7.js} +24 -23
- package/chunks/{fast-path-35JJFS3C.js → fast-path-XVNIYWGG.js} +4 -4
- package/chunks/{fast-path-settings-TSVI53EB.js → fast-path-settings-UQLRFDQP.js} +3 -2
- package/chunks/{fr-GVKZ27MF.js → fr-BN5NKSAC.js} +1 -0
- package/chunks/{gemini-NDTG7WAX.js → gemini-U5TPU3IQ.js} +210 -104
- package/chunks/{geminiContentGenerator-XTG6SFLA.js → geminiContentGenerator-ZVWRHXOO.js} +4 -4
- package/chunks/{glob-SJ2JBZK4.js → glob-FEJWIH2W.js} +24 -23
- package/chunks/{grep-BRMWFEWR.js → grep-KMP25IIA.js} +24 -23
- package/chunks/{headlessSafetyWarnings-LJ6FJX77.js → headlessSafetyWarnings-5DEDET4M.js} +24 -23
- package/chunks/{initializer-P5AXF7PV.js → initializer-FJTACLOH.js} +31 -28
- package/chunks/{ja-FKZ2WZ4D.js → ja-7DEUB2TS.js} +1 -0
- package/chunks/{keychain-token-storage-CSYMNRPP.js → keychain-token-storage-YLMDLKXT.js} +2 -2
- package/chunks/{list-6COK34BP.js → list-SCQXYJUW.js} +32 -29
- package/chunks/{loadedSettingsAdapter-XIUTN245.js → loadedSettingsAdapter-P6KPNAG7.js} +30 -27
- package/chunks/{loop-wakeup-33GPXJLA.js → loop-wakeup-FYEQEJUA.js} +7 -7
- package/chunks/{ls-BYQY7RVV.js → ls-R5WP4BGZ.js} +4 -4
- package/chunks/{lsp-X54RO4IV.js → lsp-GSICJMMW.js} +2 -2
- package/chunks/{monitor-DH7KFSJV.js → monitor-JU3HHHVY.js} +24 -23
- package/chunks/nonInteractiveCli-IZEKUHU3.js +100 -0
- package/chunks/{notebook-edit-D4R4ZLMA.js → notebook-edit-YHY3Z2QQ.js} +52 -23
- package/chunks/{openaiContentGenerator-F74IPQ6E.js → openaiContentGenerator-4WUVA3Q2.js} +13 -12
- package/chunks/{pt-SY5NCFGR.js → pt-TNZRNLQB.js} +1 -0
- package/chunks/{qwenContentGenerator-ATTK5P4D.js → qwenContentGenerator-MVYYR44B.js} +26 -25
- package/chunks/{qwenOAuth2-K4AASPCV.js → qwenOAuth2-6HNGHALT.js} +5 -4
- package/chunks/{read-file-767G23OY.js → read-file-NABEO2X4.js} +8 -8
- package/chunks/{read-mcp-resource-I5HCZJ6X.js → read-mcp-resource-DQQW7H7T.js} +2 -2
- package/chunks/{ripGrep-4OMMGSWX.js → ripGrep-YXLK6UTX.js} +24 -23
- package/chunks/{ru-FWNXJG4F.js → ru-NIAUBKCN.js} +1 -0
- package/chunks/{run-qwen-serve-REKSTYRA.js → run-qwen-serve-4B5QBMLQ.js} +144 -41
- package/chunks/{scheduler-UNTFDQLG.js → scheduler-XAKIYBDL.js} +24 -23
- package/chunks/{send-message-2DAFXEYP.js → send-message-EE4TWKVU.js} +2 -2
- package/chunks/{serve-KZ56QB5S.js → serve-4RXVLUKD.js} +30 -28
- package/chunks/{server-BV5TZUMU.js → server-7PA5QGIA.js} +11037 -8747
- package/chunks/{session-OIBXFSGD.js → session-WNVWRYAH.js} +194 -57
- package/chunks/{settings-WJTCBIRA.js → settings-YJH32TFF.js} +30 -27
- package/chunks/{shell-WC52IBHW.js → shell-YFLABOS5.js} +24 -23
- package/chunks/{skill-U7F7JR4M.js → skill-N3J7FUAY.js} +38 -11
- package/chunks/{spawnChannel-EI2E5BCW.js → spawnChannel-D6WVMFZJ.js} +26 -25
- package/chunks/{src-4F6FBZFI.js → src-IU5GDBEH.js} +88 -28
- package/chunks/{startInteractiveUI-SFRVB3CE.js → startInteractiveUI-QIPQTRT4.js} +2784 -2474
- package/chunks/{syntheticOutput-PPS3HDVA.js → syntheticOutput-T5YHQ6S2.js} +3 -3
- package/chunks/{task-create-OUYCA553.js → task-create-BLY7RHXX.js} +6 -6
- package/chunks/{task-list-WAX7I2IA.js → task-list-3QUYNVYR.js} +5 -5
- package/chunks/{task-stop-CAIL6FNH.js → task-stop-U4RATK2V.js} +2 -2
- package/chunks/{task-update-AHEO5OUT.js → task-update-U54O7KJX.js} +6 -6
- package/chunks/{team-create-3WC7CIIW.js → team-create-TP4CLLM3.js} +24 -23
- package/chunks/{team-delete-HGHFG23B.js → team-delete-LKBYPASD.js} +5 -5
- package/chunks/{theme-manager-DICFCT3P.js → theme-manager-N2TBIBZT.js} +25 -24
- package/chunks/{todoWrite-IFBMN3FH.js → todoWrite-OYXKTVYN.js} +4 -4
- package/chunks/{tool-search-L5K7HLER.js → tool-search-GBBSICYB.js} +101 -16
- package/chunks/trustedFolders-F7TBU5CD.js +76 -0
- package/chunks/types-QX5C3CHJ.js +12 -0
- package/chunks/{validateNonInterActiveAuth-GCH4Z6KI.js → validateNonInterActiveAuth-EQDQPSMI.js} +55 -50
- package/chunks/{web-fetch-B5IIQ5TT.js → web-fetch-PCVCML2X.js} +29 -15
- package/chunks/{workflow-OB3AND7I.js → workflow-ANJ4FYBK.js} +32 -30
- package/chunks/{workspace-providers-status-ZIR5EPOO.js → workspace-providers-status-462QQKQM.js} +32 -29
- package/chunks/workspace-service-VTG4G6CW.js +75 -0
- package/chunks/{write-file-SEXBNDZM.js → write-file-3P3WMQQW.js} +63 -27
- package/chunks/{zh-RBEGQVQT.js → zh-5EUYXASN.js} +8 -0
- package/chunks/{zh-TW-QGAVRXT3.js → zh-TW-TR3XYGE5.js} +8 -0
- package/cli-entry.js +20 -9
- package/cli.js +6 -6
- package/locales/ca.js +2 -0
- package/locales/de.js +2 -0
- package/locales/en.js +14 -0
- package/locales/fr.js +2 -0
- package/locales/ja.js +1 -0
- package/locales/pt.js +2 -0
- package/locales/ru.js +2 -0
- package/locales/zh-TW.js +12 -0
- package/locales/zh.js +12 -0
- package/node_modules/@qwen-code/audio-capture/dist/index.d.ts +35 -0
- package/node_modules/@qwen-code/audio-capture/dist/index.js +48 -0
- package/node_modules/@qwen-code/audio-capture/dist/index.js.map +1 -0
- package/node_modules/@qwen-code/audio-capture/dist/platform.d.ts +7 -0
- package/node_modules/@qwen-code/audio-capture/dist/platform.js +18 -0
- package/node_modules/@qwen-code/audio-capture/dist/platform.js.map +1 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/LICENSE +21 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/README.md +58 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/SECURITY.md +5 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/bin.js +84 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/build-test.js +19 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/index.js +6 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/node-gyp-build.js +207 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/optional.js +7 -0
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/package.json +43 -0
- package/node_modules/@qwen-code/audio-capture/package.json +30 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/linux-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/linux-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
- package/package.json +18 -6
- package/patches/chrome-devtools-mcp+1.4.0.patch +31 -0
- package/postinstall.js +50 -0
- package/web-shell/assets/{arc-D_ae_Y9k.js → arc-DIemsO_F.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-BMLRjppa.js → architectureDiagram-3BPJPVTR-CTlUvIQv.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-qVDQC8KL.js → blockDiagram-GPEHLZMM-DG0jmIZK.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-CxWS6MBd.js → c4Diagram-AAUBKEIU-WljDBi55.js} +1 -1
- package/web-shell/assets/channel-CbzRbdpA.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-BtNuY5Yp.js → chunk-2J33WTMH-8nc6onr2.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BU-x368d.js → chunk-4BX2VUAB-EopXix8Z.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DRgTLvBu.js → chunk-55IACEB6-BE4Jz3N3.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-D2aElv7q.js → chunk-727SXJPM-C_eErgDN.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-BwHCMRQ0.js → chunk-AQP2D5EJ-DFtVW-Is.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-BMyPH-ku.js → chunk-FMBD7UC4-CJPyxIg9.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-BNKTstUf.js → chunk-ND2GUHAM-Bk-xgj6M.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-gD3vsFId.js → chunk-QZHKN3VN-p3Y4yaFB.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BFdyQ52h.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BFdyQ52h.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BG9FAsXE.js → cose-bilkent-S5V4N54A-BCMO6Js3.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-Cy1sR7om.js → dagre-BM42HDAG-DUMrwASf.js} +1 -1
- package/web-shell/assets/default-aEtf0G7-.svg +1 -0
- package/web-shell/assets/{diagram-2AECGRRQ-Bxi1I_Vu.js → diagram-2AECGRRQ-C5d7qJbL.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-BGCJjO6y.js → diagram-5GNKFQAL-CjLzMhbT.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CMTeLXp7.js → diagram-KO2AKTUF-RCoNWeAm.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BN1wyAGh.js → diagram-LMA3HP47-KThXjaNV.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-UYSG_zcp.js → diagram-OG6HWLK6-DKsC2BWz.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-DqXL08lw.js → erDiagram-TEJ5UH35-DJ2ukmq0.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BPJ9SFji.js → flowDiagram-I6XJVG4X-zzqaARRX.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BEd9Pnms.js → ganttDiagram-6RSMTGT7-kFUg-gqT.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DrNRH3oi.js → gitGraphDiagram-PVQCEYII-C6JnMVzD.js} +1 -1
- package/web-shell/assets/index-B3XUm7dw.js +713 -0
- package/web-shell/assets/index-CHmzAWys.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CFYBrkVI.js → infoDiagram-5YYISTIA-XqPVhp89.js} +1 -1
- package/web-shell/assets/insert-DmRbh9Rv.svg +1 -0
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-Dxsddth7.js → ishikawaDiagram-YF4QCWOH-D2k8sGpf.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-DxaDK80t.js → journeyDiagram-JHISSGLW-CQEST1GE.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Q0jQCOct.js → kanban-definition-UN3LZRKU-DZ7kqVBC.js} +1 -1
- package/web-shell/assets/{linear-DGGM2kcP.js → linear-B6C_6q_E.js} +1 -1
- package/web-shell/assets/{mermaid.core-ByoxnWut.js → mermaid.core-CsyNP1qt.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-C0ZseHsi.js → mindmap-definition-RKZ34NQL-B1VDIzJq.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-MQXNhl5A.js → pieDiagram-4H26LBE5-DN0E7Jwu.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DIR4ee2A.js → quadrantDiagram-W4KKPZXB-UKTQdHKm.js} +1 -1
- package/web-shell/assets/queue-DWpnpFgW.svg +1 -0
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-BTR0UdYQ.js → requirementDiagram-4Y6WPE33-BRGceQvN.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-sfnhMELN.js → sankeyDiagram-5OEKKPKP-2DDyu41v.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DXczHOHH.js → sequenceDiagram-3UESZ5HK-CT5iE8ZU.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-DdE_KQFH.js → stateDiagram-AJRCARHV-CqMQ_s4G.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CamhV5pM.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-DIc61uE8.js → timeline-definition-PNZ67QCA-Di37QSZU.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BF7ODmxB.js → vennDiagram-CIIHVFJN-DCXvpz5S.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-3pc1MEaw.js → wardley-L42UT6IY-CpUCk6OX.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-9jnPcZuP.js → wardleyDiagram-YWT4CUSO-D01pVEBg.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-DcthaZK6.js → xychartDiagram-2RQKCTM6-DOu5JDoz.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-B6HQGTYR.js +0 -410
- package/chunks/chunk-R2BXK7SX.js +0 -13
- package/chunks/chunk-RKIZXJMB.js +0 -13
- package/chunks/nonInteractiveCli-7575LBXP.js +0 -91
- package/chunks/workspace-service-OM5D4OI2.js +0 -60
- package/web-shell/assets/channel-DYPNiTww.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-p_g25Tni.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-p_g25Tni.js +0 -1
- package/web-shell/assets/index-CpOXWDPh.js +0 -714
- package/web-shell/assets/index-oVK7qhre.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BHUSEndU.js +0 -1
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import {
|
|
4
|
-
formatUnsupportedVoiceModelMessage,
|
|
5
|
-
isTranscribableVoiceModel,
|
|
6
|
-
resolveVoiceTransport
|
|
7
|
-
} from "./chunk-NYOHZYHM.js";
|
|
8
3
|
import {
|
|
9
4
|
escapeAnsiCtrlCodes
|
|
10
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BSZEQNUA.js";
|
|
11
6
|
import {
|
|
12
7
|
wrapper_default
|
|
13
8
|
} from "./chunk-H6BD2ELD.js";
|
|
14
9
|
import {
|
|
15
10
|
createDebugLogger
|
|
16
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UX4SGCGN.js";
|
|
17
12
|
import {
|
|
18
13
|
init_esbuild_shims
|
|
19
14
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -21,445 +16,6 @@ import {
|
|
|
21
16
|
__name
|
|
22
17
|
} from "./chunk-J2S4EL5Y.js";
|
|
23
18
|
|
|
24
|
-
// packages/cli/src/ui/voice/voice-transcriber.ts
|
|
25
|
-
init_esbuild_shims();
|
|
26
|
-
import process from "node:process";
|
|
27
|
-
import { lookup as dnsLookup } from "node:dns/promises";
|
|
28
|
-
import { isIP } from "node:net";
|
|
29
|
-
|
|
30
|
-
// packages/cli/src/ui/voice/voice-keyterms.ts
|
|
31
|
-
init_esbuild_shims();
|
|
32
|
-
var GLOBAL_KEYTERMS = [
|
|
33
|
-
"Qwen",
|
|
34
|
-
"MCP",
|
|
35
|
-
"grep",
|
|
36
|
-
"regex",
|
|
37
|
-
"localhost",
|
|
38
|
-
"codebase",
|
|
39
|
-
"TypeScript",
|
|
40
|
-
"JavaScript",
|
|
41
|
-
"JSON",
|
|
42
|
-
"YAML",
|
|
43
|
-
"OAuth",
|
|
44
|
-
"webhook",
|
|
45
|
-
"gRPC",
|
|
46
|
-
"dotfiles",
|
|
47
|
-
"subagent",
|
|
48
|
-
"worktree",
|
|
49
|
-
"stdout",
|
|
50
|
-
"stderr",
|
|
51
|
-
"async",
|
|
52
|
-
"await",
|
|
53
|
-
"API",
|
|
54
|
-
"CLI",
|
|
55
|
-
"npm",
|
|
56
|
-
"pnpm",
|
|
57
|
-
"commit",
|
|
58
|
-
"rebase",
|
|
59
|
-
"refactor",
|
|
60
|
-
"endpoint",
|
|
61
|
-
"middleware",
|
|
62
|
-
"schema",
|
|
63
|
-
"tokenizer"
|
|
64
|
-
];
|
|
65
|
-
function buildVoiceKeyterms() {
|
|
66
|
-
return [...GLOBAL_KEYTERMS];
|
|
67
|
-
}
|
|
68
|
-
__name(buildVoiceKeyterms, "buildVoiceKeyterms");
|
|
69
|
-
|
|
70
|
-
// packages/cli/src/ui/voice/voice-transcriber.ts
|
|
71
|
-
var DEFAULT_OPENAI_API_KEY = "OPENAI_API_KEY";
|
|
72
|
-
var INFERENCE_TIMEOUT_MS = 6e4;
|
|
73
|
-
var MIN_KEYTERM_ECHO_TOKENS = 8;
|
|
74
|
-
var MIN_KEYTERM_SET_ECHO_RATIO = 0.3;
|
|
75
|
-
var debugLogger = createDebugLogger("VOICE_TRANSCRIBER");
|
|
76
|
-
function readVoiceLanguage(settings) {
|
|
77
|
-
const language = settings.merged.general?.voice?.language;
|
|
78
|
-
if (typeof language !== "string") {
|
|
79
|
-
return void 0;
|
|
80
|
-
}
|
|
81
|
-
const trimmed = language.trim();
|
|
82
|
-
return trimmed.length > 0 ? trimmed : void 0;
|
|
83
|
-
}
|
|
84
|
-
__name(readVoiceLanguage, "readVoiceLanguage");
|
|
85
|
-
function trimTrailingSlashes(value) {
|
|
86
|
-
return value.replace(/\/+$/, "");
|
|
87
|
-
}
|
|
88
|
-
__name(trimTrailingSlashes, "trimTrailingSlashes");
|
|
89
|
-
function readSettingsEnv(settings, envKey) {
|
|
90
|
-
const env = settings.merged.env;
|
|
91
|
-
const value = env?.[envKey];
|
|
92
|
-
return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
|
|
93
|
-
}
|
|
94
|
-
__name(readSettingsEnv, "readSettingsEnv");
|
|
95
|
-
function isQwenBaseUrl(baseUrl) {
|
|
96
|
-
try {
|
|
97
|
-
const hostname = new URL(baseUrl).hostname.toLowerCase();
|
|
98
|
-
return hostname === "dashscope.aliyuncs.com" || hostname === "dashscope-intl.aliyuncs.com" || hostname === "dashscope-us.aliyuncs.com" || hostname.endsWith(".dashscope.aliyuncs.com") || hostname.endsWith(".dashscope-intl.aliyuncs.com") || hostname.endsWith(".dashscope-us.aliyuncs.com");
|
|
99
|
-
} catch {
|
|
100
|
-
return false;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
__name(isQwenBaseUrl, "isQwenBaseUrl");
|
|
104
|
-
function normalizeBaseUrl(baseUrl, modelName) {
|
|
105
|
-
let url;
|
|
106
|
-
try {
|
|
107
|
-
url = new URL(baseUrl);
|
|
108
|
-
} catch {
|
|
109
|
-
throw new Error(`Voice model '${modelName}' has an invalid baseUrl.`);
|
|
110
|
-
}
|
|
111
|
-
url.username = "";
|
|
112
|
-
url.password = "";
|
|
113
|
-
return trimTrailingSlashes(url.toString());
|
|
114
|
-
}
|
|
115
|
-
__name(normalizeBaseUrl, "normalizeBaseUrl");
|
|
116
|
-
function normalizeHostname(hostname) {
|
|
117
|
-
return hostname.toLowerCase().replace(/^\[|\]$/g, "");
|
|
118
|
-
}
|
|
119
|
-
__name(normalizeHostname, "normalizeHostname");
|
|
120
|
-
function isLoopbackHost(hostname) {
|
|
121
|
-
const host = normalizeHostname(hostname);
|
|
122
|
-
return host === "localhost" || host === "127.0.0.1" || host === "::1";
|
|
123
|
-
}
|
|
124
|
-
__name(isLoopbackHost, "isLoopbackHost");
|
|
125
|
-
function isPrivateNetworkIp(hostname) {
|
|
126
|
-
const host = normalizeHostname(hostname);
|
|
127
|
-
if (isLoopbackHost(host)) {
|
|
128
|
-
return false;
|
|
129
|
-
}
|
|
130
|
-
const ipv4Mapped = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/);
|
|
131
|
-
if (ipv4Mapped) {
|
|
132
|
-
return isPrivateNetworkIp(ipv4Mapped[1]);
|
|
133
|
-
}
|
|
134
|
-
if (host.startsWith("::ffff:")) {
|
|
135
|
-
return true;
|
|
136
|
-
}
|
|
137
|
-
if (isIP(host) === 4) {
|
|
138
|
-
const [first = 0, second = 0] = host.split(".").map(Number);
|
|
139
|
-
return first === 0 || first === 10 || first === 127 || first === 169 && second === 254 || first === 172 && second >= 16 && second <= 31 || first === 192 && second === 168 || first === 100 && second >= 64 && second <= 127;
|
|
140
|
-
}
|
|
141
|
-
if (isIP(host) === 6) {
|
|
142
|
-
return host === "::" || host.startsWith("fe80:") || host.startsWith("fc") || host.startsWith("fd");
|
|
143
|
-
}
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
__name(isPrivateNetworkIp, "isPrivateNetworkIp");
|
|
147
|
-
async function defaultLookupHost(hostname) {
|
|
148
|
-
return dnsLookup(hostname, { all: true });
|
|
149
|
-
}
|
|
150
|
-
__name(defaultLookupHost, "defaultLookupHost");
|
|
151
|
-
async function assertVoiceBaseUrlNetworkAllowed(voiceConfig, lookupHost) {
|
|
152
|
-
const hostname = new URL(voiceConfig.baseUrl).hostname;
|
|
153
|
-
if (isLoopbackHost(hostname) || isIP(normalizeHostname(hostname)) !== 0) {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
let result;
|
|
157
|
-
try {
|
|
158
|
-
result = await (lookupHost ?? defaultLookupHost)(hostname);
|
|
159
|
-
} catch {
|
|
160
|
-
throw new Error(
|
|
161
|
-
`Voice model '${voiceConfig.model}': DNS lookup failed for ${hostname}. Cannot verify network safety.`
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
|
-
const records = Array.isArray(result) ? result : [result];
|
|
165
|
-
if (records.some((record) => isPrivateNetworkIp(record.address))) {
|
|
166
|
-
throw new Error(
|
|
167
|
-
`Voice model '${voiceConfig.model}' resolved to a private-network address.`
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
__name(assertVoiceBaseUrlNetworkAllowed, "assertVoiceBaseUrlNetworkAllowed");
|
|
172
|
-
function readApiKey(settings, model, baseUrl) {
|
|
173
|
-
if (!model.envKey && !isQwenBaseUrl(baseUrl)) {
|
|
174
|
-
return void 0;
|
|
175
|
-
}
|
|
176
|
-
const envKey = model.envKey ?? DEFAULT_OPENAI_API_KEY;
|
|
177
|
-
const envValue = process.env[envKey];
|
|
178
|
-
if (envValue && envValue.trim().length > 0) {
|
|
179
|
-
return envValue.trim();
|
|
180
|
-
}
|
|
181
|
-
const settingsEnvValue = readSettingsEnv(settings, envKey);
|
|
182
|
-
if (settingsEnvValue) {
|
|
183
|
-
return settingsEnvValue;
|
|
184
|
-
}
|
|
185
|
-
if (!model.envKey && isQwenBaseUrl(baseUrl)) {
|
|
186
|
-
const authApiKey = settings.merged.security?.auth?.apiKey;
|
|
187
|
-
return typeof authApiKey === "string" && authApiKey.trim().length > 0 ? authApiKey.trim() : void 0;
|
|
188
|
-
}
|
|
189
|
-
return void 0;
|
|
190
|
-
}
|
|
191
|
-
__name(readApiKey, "readApiKey");
|
|
192
|
-
function resolveVoiceTranscriptionConfig({
|
|
193
|
-
config,
|
|
194
|
-
settings,
|
|
195
|
-
voiceModel
|
|
196
|
-
}) {
|
|
197
|
-
const matches = config.getAllConfiguredModels().filter((model2) => model2.id === voiceModel);
|
|
198
|
-
if (matches.length === 0) {
|
|
199
|
-
throw new Error(
|
|
200
|
-
`Voice model '${voiceModel}' is not configured. Run /model --voice to choose a configured model.`
|
|
201
|
-
);
|
|
202
|
-
}
|
|
203
|
-
if (matches.length > 1) {
|
|
204
|
-
throw new Error(`Voice model '${voiceModel}' is ambiguous.`);
|
|
205
|
-
}
|
|
206
|
-
const model = matches[0];
|
|
207
|
-
if (!isTranscribableVoiceModel(model)) {
|
|
208
|
-
throw new Error(formatUnsupportedVoiceModelMessage(voiceModel));
|
|
209
|
-
}
|
|
210
|
-
const baseUrl = model.baseUrl?.trim();
|
|
211
|
-
if (!baseUrl) {
|
|
212
|
-
throw new Error(`Voice model '${voiceModel}' does not define a baseUrl.`);
|
|
213
|
-
}
|
|
214
|
-
const normalizedBaseUrl = normalizeBaseUrl(baseUrl, voiceModel);
|
|
215
|
-
const parsedBaseUrl = new URL(normalizedBaseUrl);
|
|
216
|
-
const isLocalhost = isLoopbackHost(parsedBaseUrl.hostname);
|
|
217
|
-
if (parsedBaseUrl.protocol !== "https:" && !isLocalhost) {
|
|
218
|
-
throw new Error(
|
|
219
|
-
`Voice model '${voiceModel}' must use an https baseUrl. Voice audio must not be transmitted in cleartext.`
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
if (isPrivateNetworkIp(parsedBaseUrl.hostname)) {
|
|
223
|
-
throw new Error(
|
|
224
|
-
`Voice model '${voiceModel}' must not use a private-network baseUrl.`
|
|
225
|
-
);
|
|
226
|
-
}
|
|
227
|
-
const apiKey = readApiKey(settings, model, normalizedBaseUrl);
|
|
228
|
-
if (model.envKey && !apiKey) {
|
|
229
|
-
throw new Error(`Voice model '${voiceModel}' requires ${model.envKey}.`);
|
|
230
|
-
}
|
|
231
|
-
return {
|
|
232
|
-
model: voiceModel,
|
|
233
|
-
baseUrl: normalizedBaseUrl,
|
|
234
|
-
...apiKey ? { apiKey } : {}
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
__name(resolveVoiceTranscriptionConfig, "resolveVoiceTranscriptionConfig");
|
|
238
|
-
function isStreamingVoiceModel(model) {
|
|
239
|
-
const transport = resolveVoiceTransport(model);
|
|
240
|
-
return transport === "qwen-asr-realtime" || transport === "dashscope-task-realtime";
|
|
241
|
-
}
|
|
242
|
-
__name(isStreamingVoiceModel, "isStreamingVoiceModel");
|
|
243
|
-
function resolveVoiceStreamConfig(args) {
|
|
244
|
-
const base = resolveVoiceTranscriptionConfig(args);
|
|
245
|
-
const transport = resolveVoiceTransport(base.model);
|
|
246
|
-
if (transport !== "qwen-asr-realtime" && transport !== "dashscope-task-realtime") {
|
|
247
|
-
throw new Error(
|
|
248
|
-
`Voice model '${base.model}' does not support streaming transcription.`
|
|
249
|
-
);
|
|
250
|
-
}
|
|
251
|
-
const language = resolveLanguageCode(readVoiceLanguage(args.settings));
|
|
252
|
-
const keytermsContext = transport === "qwen-asr-realtime" ? buildKeytermsContext() : void 0;
|
|
253
|
-
return {
|
|
254
|
-
transport,
|
|
255
|
-
baseUrl: base.baseUrl,
|
|
256
|
-
model: base.model,
|
|
257
|
-
...base.apiKey ? { apiKey: base.apiKey } : {},
|
|
258
|
-
...language ? { language } : {},
|
|
259
|
-
...keytermsContext ? { keytermsContext } : {}
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
__name(resolveVoiceStreamConfig, "resolveVoiceStreamConfig");
|
|
263
|
-
var LANGUAGE_CODES = {
|
|
264
|
-
english: "en",
|
|
265
|
-
chinese: "zh",
|
|
266
|
-
mandarin: "zh",
|
|
267
|
-
cantonese: "yue",
|
|
268
|
-
japanese: "ja",
|
|
269
|
-
korean: "ko",
|
|
270
|
-
french: "fr",
|
|
271
|
-
german: "de",
|
|
272
|
-
spanish: "es",
|
|
273
|
-
italian: "it",
|
|
274
|
-
portuguese: "pt",
|
|
275
|
-
russian: "ru",
|
|
276
|
-
arabic: "ar"
|
|
277
|
-
};
|
|
278
|
-
function resolveLanguageCode(language) {
|
|
279
|
-
if (!language) {
|
|
280
|
-
return void 0;
|
|
281
|
-
}
|
|
282
|
-
const lower = language.toLowerCase();
|
|
283
|
-
if (LANGUAGE_CODES[lower]) {
|
|
284
|
-
return LANGUAGE_CODES[lower];
|
|
285
|
-
}
|
|
286
|
-
return /^[a-z]{2,3}$/.test(lower) ? lower : void 0;
|
|
287
|
-
}
|
|
288
|
-
__name(resolveLanguageCode, "resolveLanguageCode");
|
|
289
|
-
function buildKeytermsContext() {
|
|
290
|
-
try {
|
|
291
|
-
const keyterms = buildVoiceKeyterms();
|
|
292
|
-
return keyterms.length > 0 ? keyterms.join(" ") : void 0;
|
|
293
|
-
} catch {
|
|
294
|
-
return void 0;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
__name(buildKeytermsContext, "buildKeytermsContext");
|
|
298
|
-
function tokenize(value) {
|
|
299
|
-
return value.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").split(/\s+/).filter(Boolean);
|
|
300
|
-
}
|
|
301
|
-
__name(tokenize, "tokenize");
|
|
302
|
-
function isKeytermEcho(transcript, keytermsContext) {
|
|
303
|
-
if (!keytermsContext) {
|
|
304
|
-
return false;
|
|
305
|
-
}
|
|
306
|
-
const tokens = tokenize(transcript);
|
|
307
|
-
if (tokens.length < 4) {
|
|
308
|
-
return false;
|
|
309
|
-
}
|
|
310
|
-
const keyset = new Set(tokenize(keytermsContext));
|
|
311
|
-
const overlap = tokens.filter((t) => keyset.has(t)).length;
|
|
312
|
-
const transcriptRatio = overlap / tokens.length;
|
|
313
|
-
const keytermRatio = overlap / keyset.size;
|
|
314
|
-
const isEcho = overlap >= MIN_KEYTERM_ECHO_TOKENS && transcriptRatio >= 0.9 && keytermRatio >= MIN_KEYTERM_SET_ECHO_RATIO;
|
|
315
|
-
if (isEcho) {
|
|
316
|
-
debugLogger.debug(
|
|
317
|
-
`[voice] dropped likely keyterm echo: transcriptRatio=${transcriptRatio.toFixed(2)} keytermRatio=${keytermRatio.toFixed(2)} text="${transcript}"`
|
|
318
|
-
);
|
|
319
|
-
}
|
|
320
|
-
return isEcho;
|
|
321
|
-
}
|
|
322
|
-
__name(isKeytermEcho, "isKeytermEcho");
|
|
323
|
-
var MAX_AUDIO_BYTES = 10 * 1024 * 1024;
|
|
324
|
-
function escapeRegExp(value) {
|
|
325
|
-
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
326
|
-
}
|
|
327
|
-
__name(escapeRegExp, "escapeRegExp");
|
|
328
|
-
function sanitizeResponseDetails(raw, apiKey) {
|
|
329
|
-
let redacted = raw.replace(/Bearer\s+\S+/gi, "Bearer [REDACTED]");
|
|
330
|
-
if (apiKey) {
|
|
331
|
-
redacted = redacted.replace(
|
|
332
|
-
new RegExp(escapeRegExp(apiKey), "g"),
|
|
333
|
-
"[REDACTED]"
|
|
334
|
-
);
|
|
335
|
-
}
|
|
336
|
-
return redacted.length > 200 ? `${redacted.slice(0, 200)}...` : redacted;
|
|
337
|
-
}
|
|
338
|
-
__name(sanitizeResponseDetails, "sanitizeResponseDetails");
|
|
339
|
-
function inputAudioFormat(mimeType) {
|
|
340
|
-
return mimeType.split(";", 1)[0]?.replace(/^audio\//, "") || "wav";
|
|
341
|
-
}
|
|
342
|
-
__name(inputAudioFormat, "inputAudioFormat");
|
|
343
|
-
async function transcribeViaQwenAsr(audio, voiceConfig, options, fetchFn) {
|
|
344
|
-
if (audio.data.byteLength > MAX_AUDIO_BYTES) {
|
|
345
|
-
throw new Error(
|
|
346
|
-
"Recording is too long for transcription (max ~5 minutes / 10 MB). Try a shorter dictation."
|
|
347
|
-
);
|
|
348
|
-
}
|
|
349
|
-
const dataUrl = `data:${audio.mimeType};base64,${Buffer.from(audio.data).toString("base64")}`;
|
|
350
|
-
const messages = [];
|
|
351
|
-
if (options.keytermsContext) {
|
|
352
|
-
messages.push({
|
|
353
|
-
role: "system",
|
|
354
|
-
content: [{ type: "text", text: options.keytermsContext }]
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
messages.push({
|
|
358
|
-
role: "user",
|
|
359
|
-
content: [
|
|
360
|
-
{
|
|
361
|
-
type: "input_audio",
|
|
362
|
-
input_audio: {
|
|
363
|
-
data: dataUrl,
|
|
364
|
-
format: inputAudioFormat(audio.mimeType)
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
]
|
|
368
|
-
});
|
|
369
|
-
const asrOptions = { enable_itn: true };
|
|
370
|
-
if (options.language) {
|
|
371
|
-
asrOptions["language"] = options.language;
|
|
372
|
-
}
|
|
373
|
-
const headers = {
|
|
374
|
-
"Content-Type": "application/json"
|
|
375
|
-
};
|
|
376
|
-
if (voiceConfig.apiKey) {
|
|
377
|
-
headers["Authorization"] = `Bearer ${voiceConfig.apiKey}`;
|
|
378
|
-
}
|
|
379
|
-
let response;
|
|
380
|
-
try {
|
|
381
|
-
response = await fetchFn(
|
|
382
|
-
`${trimTrailingSlashes(voiceConfig.baseUrl)}/chat/completions`,
|
|
383
|
-
{
|
|
384
|
-
method: "POST",
|
|
385
|
-
headers,
|
|
386
|
-
body: JSON.stringify({
|
|
387
|
-
model: voiceConfig.model,
|
|
388
|
-
messages,
|
|
389
|
-
asr_options: asrOptions
|
|
390
|
-
}),
|
|
391
|
-
signal: AbortSignal.timeout(INFERENCE_TIMEOUT_MS)
|
|
392
|
-
}
|
|
393
|
-
);
|
|
394
|
-
} catch (error) {
|
|
395
|
-
if (error instanceof DOMException && error.name === "TimeoutError") {
|
|
396
|
-
throw new Error(
|
|
397
|
-
`Voice transcription timed out after ${INFERENCE_TIMEOUT_MS / 1e3}s. Check ASR service health and retry.`
|
|
398
|
-
);
|
|
399
|
-
}
|
|
400
|
-
throw error;
|
|
401
|
-
}
|
|
402
|
-
if (!response.ok) {
|
|
403
|
-
let details = "";
|
|
404
|
-
try {
|
|
405
|
-
details = sanitizeResponseDetails(
|
|
406
|
-
await response.text(),
|
|
407
|
-
voiceConfig.apiKey
|
|
408
|
-
);
|
|
409
|
-
} catch {
|
|
410
|
-
details = "";
|
|
411
|
-
}
|
|
412
|
-
if (/model_not_supported|unsupported model/i.test(details)) {
|
|
413
|
-
throw new Error(
|
|
414
|
-
"This voice model cannot be used for batch transcription. Use qwen3-asr-flash for batch or choose a realtime voice model such as qwen3-asr-flash-realtime / fun-asr-realtime / paraformer-realtime-v2."
|
|
415
|
-
);
|
|
416
|
-
}
|
|
417
|
-
const suffix = details ? `: ${details}` : "";
|
|
418
|
-
throw new Error(
|
|
419
|
-
`Voice transcription request failed (${response.status} ${response.statusText})${suffix}`
|
|
420
|
-
);
|
|
421
|
-
}
|
|
422
|
-
const json = await response.json();
|
|
423
|
-
const content = json.choices?.[0]?.message?.content;
|
|
424
|
-
if (typeof content !== "string") {
|
|
425
|
-
throw new Error("Voice transcription response did not include text.");
|
|
426
|
-
}
|
|
427
|
-
const text = content.trim();
|
|
428
|
-
if (isKeytermEcho(text, options.keytermsContext)) {
|
|
429
|
-
return "";
|
|
430
|
-
}
|
|
431
|
-
return text;
|
|
432
|
-
}
|
|
433
|
-
__name(transcribeViaQwenAsr, "transcribeViaQwenAsr");
|
|
434
|
-
async function transcribeVoiceAudio(audio, args) {
|
|
435
|
-
const voiceConfig = resolveVoiceTranscriptionConfig(args);
|
|
436
|
-
await assertVoiceBaseUrlNetworkAllowed(voiceConfig, args.lookupHost);
|
|
437
|
-
const fetchFn = args.fetchFn ?? fetch;
|
|
438
|
-
const language = resolveLanguageCode(readVoiceLanguage(args.settings));
|
|
439
|
-
const keytermsContext = buildKeytermsContext();
|
|
440
|
-
const transport = resolveVoiceTransport(voiceConfig.model);
|
|
441
|
-
switch (transport) {
|
|
442
|
-
case "qwen-asr-chat":
|
|
443
|
-
return transcribeViaQwenAsr(
|
|
444
|
-
audio,
|
|
445
|
-
voiceConfig,
|
|
446
|
-
{ language, keytermsContext },
|
|
447
|
-
fetchFn
|
|
448
|
-
);
|
|
449
|
-
case "qwen-asr-realtime":
|
|
450
|
-
case "dashscope-task-realtime":
|
|
451
|
-
throw new Error(
|
|
452
|
-
`Voice model '${voiceConfig.model}' requires streaming transcription.`
|
|
453
|
-
);
|
|
454
|
-
case "unsupported":
|
|
455
|
-
default:
|
|
456
|
-
throw new Error(
|
|
457
|
-
`Voice model '${voiceConfig.model}' is not a supported transcription model.`
|
|
458
|
-
);
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
__name(transcribeVoiceAudio, "transcribeVoiceAudio");
|
|
462
|
-
|
|
463
19
|
// packages/cli/src/ui/voice/voice-stream-session.ts
|
|
464
20
|
init_esbuild_shims();
|
|
465
21
|
import { randomUUID } from "node:crypto";
|
|
@@ -467,7 +23,7 @@ var CONNECT_TIMEOUT_MS = 8e3;
|
|
|
467
23
|
var FINISH_TIMEOUT_MS = 6e4;
|
|
468
24
|
var MAX_BUFFERED_AUDIO_BYTES = 1024 * 1024;
|
|
469
25
|
var MAX_SERVER_ERROR_MESSAGE_LENGTH = 200;
|
|
470
|
-
var
|
|
26
|
+
var debugLogger = createDebugLogger("VOICE_STREAM_SESSION");
|
|
471
27
|
function deriveWebSocketBase(baseUrl) {
|
|
472
28
|
const url = new URL(baseUrl);
|
|
473
29
|
const wsScheme = url.protocol === "https:" ? "wss:" : "ws:";
|
|
@@ -575,7 +131,7 @@ function openVoiceStream(config, callbacks = {}, deps = {}) {
|
|
|
575
131
|
try {
|
|
576
132
|
msg = JSON.parse(String(data));
|
|
577
133
|
} catch (error) {
|
|
578
|
-
|
|
134
|
+
debugLogger.warn("[voice] failed to parse stream message:", error);
|
|
579
135
|
return;
|
|
580
136
|
}
|
|
581
137
|
const event = msg.header?.event;
|
|
@@ -589,7 +145,7 @@ function openVoiceStream(config, callbacks = {}, deps = {}) {
|
|
|
589
145
|
ws.send(pcm);
|
|
590
146
|
} else if (pcm.length > 0 && !backpressureWarned) {
|
|
591
147
|
backpressureWarned = true;
|
|
592
|
-
|
|
148
|
+
debugLogger.warn(
|
|
593
149
|
"[voice] dropping DashScope audio due to socket backpressure"
|
|
594
150
|
);
|
|
595
151
|
}
|
|
@@ -711,7 +267,7 @@ var CONNECT_TIMEOUT_MS2 = 8e3;
|
|
|
711
267
|
var FINISH_TIMEOUT_MS2 = 6e4;
|
|
712
268
|
var MAX_BUFFERED_AUDIO_BYTES2 = 1024 * 1024;
|
|
713
269
|
var MAX_SERVER_ERROR_MESSAGE_LENGTH2 = 200;
|
|
714
|
-
var
|
|
270
|
+
var debugLogger2 = createDebugLogger("VOICE_QWEN_REALTIME");
|
|
715
271
|
function deriveQwenRealtimeUrl(baseUrl, model) {
|
|
716
272
|
return `${deriveWebSocketBase(baseUrl)}/api-ws/v1/realtime?model=${encodeURIComponent(model)}`;
|
|
717
273
|
}
|
|
@@ -821,7 +377,7 @@ function openQwenAsrRealtimeStream(config, callbacks = {}, deps = {}) {
|
|
|
821
377
|
try {
|
|
822
378
|
msg = JSON.parse(String(data));
|
|
823
379
|
} catch (error) {
|
|
824
|
-
|
|
380
|
+
debugLogger2.warn(
|
|
825
381
|
"[voice] failed to parse Qwen ASR realtime message:",
|
|
826
382
|
error
|
|
827
383
|
);
|
|
@@ -841,7 +397,7 @@ function openQwenAsrRealtimeStream(config, callbacks = {}, deps = {}) {
|
|
|
841
397
|
if ((ws.bufferedAmount ?? 0) > MAX_BUFFERED_AUDIO_BYTES2) {
|
|
842
398
|
if (!backpressureWarned) {
|
|
843
399
|
backpressureWarned = true;
|
|
844
|
-
|
|
400
|
+
debugLogger2.warn(
|
|
845
401
|
"[voice] dropping Qwen ASR realtime audio due to socket backpressure."
|
|
846
402
|
);
|
|
847
403
|
}
|
|
@@ -966,7 +522,7 @@ __name(openQwenAsrRealtimeStream, "openQwenAsrRealtimeStream");
|
|
|
966
522
|
// packages/cli/src/ui/voice/voice-stream-retry.ts
|
|
967
523
|
init_esbuild_shims();
|
|
968
524
|
var RETRY_DELAY_MS = 200;
|
|
969
|
-
var
|
|
525
|
+
var debugLogger3 = createDebugLogger("VOICE_STREAM");
|
|
970
526
|
function delay(ms) {
|
|
971
527
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
972
528
|
}
|
|
@@ -988,7 +544,7 @@ async function openVoiceStreamWithRetry(open) {
|
|
|
988
544
|
if (!isRetryable(error)) {
|
|
989
545
|
throw error;
|
|
990
546
|
}
|
|
991
|
-
|
|
547
|
+
debugLogger3.debug("[voice] stream open failed, retrying:", error);
|
|
992
548
|
await delay(RETRY_DELAY_MS);
|
|
993
549
|
return open();
|
|
994
550
|
}
|
|
@@ -996,12 +552,6 @@ async function openVoiceStreamWithRetry(open) {
|
|
|
996
552
|
__name(openVoiceStreamWithRetry, "openVoiceStreamWithRetry");
|
|
997
553
|
|
|
998
554
|
export {
|
|
999
|
-
assertVoiceBaseUrlNetworkAllowed,
|
|
1000
|
-
resolveVoiceTranscriptionConfig,
|
|
1001
|
-
isStreamingVoiceModel,
|
|
1002
|
-
resolveVoiceStreamConfig,
|
|
1003
|
-
isKeytermEcho,
|
|
1004
|
-
transcribeVoiceAudio,
|
|
1005
555
|
openVoiceStream,
|
|
1006
556
|
openQwenAsrRealtimeStream,
|
|
1007
557
|
openVoiceStreamWithRetry
|
|
@@ -331,6 +331,19 @@ var BranchWhilePromptActiveError = class extends Error {
|
|
|
331
331
|
this.sessionId = sessionId;
|
|
332
332
|
}
|
|
333
333
|
};
|
|
334
|
+
var CdWhilePromptActiveError = class extends Error {
|
|
335
|
+
static {
|
|
336
|
+
__name(this, "CdWhilePromptActiveError");
|
|
337
|
+
}
|
|
338
|
+
sessionId;
|
|
339
|
+
constructor(sessionId) {
|
|
340
|
+
super(
|
|
341
|
+
`Cannot change directory for session ${sessionId}: a prompt is currently active`
|
|
342
|
+
);
|
|
343
|
+
this.name = "CdWhilePromptActiveError";
|
|
344
|
+
this.sessionId = sessionId;
|
|
345
|
+
}
|
|
346
|
+
};
|
|
334
347
|
|
|
335
348
|
export {
|
|
336
349
|
NOT_CURRENTLY_GENERATING_CANCEL_MESSAGE,
|
|
@@ -357,7 +370,8 @@ export {
|
|
|
357
370
|
McpServerRestartFailedError,
|
|
358
371
|
SessionBusyError,
|
|
359
372
|
InvalidRewindTargetError,
|
|
360
|
-
BranchWhilePromptActiveError
|
|
373
|
+
BranchWhilePromptActiveError,
|
|
374
|
+
CdWhilePromptActiveError
|
|
361
375
|
};
|
|
362
376
|
/**
|
|
363
377
|
* @license
|