@qwen-code/qwen-code 0.19.2-preview.0 → 0.19.3
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 +12 -7
- package/bundled/loop/SKILL.test.ts +32 -0
- package/bundled/qc-helper/SKILL.md +14 -14
- 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 +60 -60
- package/bundled/qc-helper/docs/features/commands.md +108 -77
- 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/chunks/{MaxSizedBox-ZGJWTRFD.js → MaxSizedBox-QNF3EIGU.js} +29 -30
- package/chunks/{StandaloneSessionPicker-BUCTAFOX.js → StandaloneSessionPicker-Z52JTYST.js} +42 -40
- package/chunks/{acpAgent-JO2ITCNM.js → acpAgent-7RZUOWOM.js} +406 -118
- package/chunks/{agent-MY66OFO7.js → agent-4FG7WTHJ.js} +24 -26
- package/chunks/{agent-headless-SRMNGWN5.js → agent-headless-RQ5BTX3G.js} +24 -26
- package/chunks/{anthropicContentGenerator-E3TQ5XJJ.js → anthropicContentGenerator-PFITVL7Y.js} +31 -13
- 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-GZCNYBHI.js → bridge-JL2PMCIW.js} +29 -32
- package/chunks/{ca-7WC7ELX6.js → ca-IUFWESZL.js} +1 -0
- package/chunks/{chunk-3UALQ56H.js → chunk-3227DZO4.js} +1 -1
- package/chunks/{chunk-2TLWKT22.js → chunk-3TV3HUWZ.js} +16 -7
- package/chunks/{chunk-WQ523TWK.js → chunk-4LUZAKMK.js} +45 -3
- package/chunks/{chunk-KDRNHNFO.js → chunk-4QK3O43S.js} +6 -27
- package/chunks/chunk-5GOVVXEV.js +73 -0
- package/chunks/{chunk-C4YPMKVC.js → chunk-6V4NZFUS.js} +5 -5
- package/chunks/{chunk-QCE46JPS.js → chunk-ADCIHOQZ.js} +138 -28
- 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-BTLJ2MF5.js +690 -0
- package/chunks/{chunk-OIC6S73E.js → chunk-BUUQ5HPX.js} +1 -1
- package/chunks/{chunk-2BIF2NVV.js → chunk-BVSVIN45.js} +2 -2
- package/chunks/{chunk-JXQ23SNT.js → chunk-BW4KCQFD.js} +54 -2
- package/chunks/{chunk-TOEGRAVX.js → chunk-BX5YO7UW.js} +17 -5
- package/chunks/{chunk-3GOWF4JW.js → chunk-BXSHL2SF.js} +1 -1
- package/chunks/{chunk-UN3C6GOR.js → chunk-CF6BB3LT.js} +0 -107
- package/chunks/{chunk-Z7XXFPGP.js → chunk-CKQA6AWF.js} +1 -1
- package/chunks/{chunk-S3QKD3KC.js → chunk-CNLEDYE3.js} +7 -5
- package/chunks/{chunk-PRYMDRBV.js → chunk-DDMOU62Q.js} +1 -1
- package/chunks/chunk-EDMZZFDU.js +11213 -0
- package/chunks/{chunk-IRJWHZWU.js → chunk-EJYJYJZ2.js} +70 -3
- package/chunks/{chunk-Z3GEHYNS.js → chunk-F3ZYSEY6.js} +151 -4775
- package/chunks/chunk-FKAVULLM.js +4909 -0
- package/chunks/{chunk-QEFO4ZHF.js → chunk-FNJ7BDPH.js} +6 -6
- package/chunks/{chunk-ZMYGPJZ2.js → chunk-FXKVLFFY.js} +1 -1
- package/chunks/{chunk-NISEO774.js → chunk-GGBIN5K7.js} +1 -1
- package/chunks/{chunk-MLZC2B46.js → chunk-GT2FGICD.js} +1 -1
- package/chunks/{chunk-6RSJXDOE.js → chunk-HPZTOP4I.js} +75 -23
- package/chunks/{chunk-OTBK43JR.js → chunk-HYCC3XM3.js} +1 -1
- package/chunks/{chunk-MAJFZ73U.js → chunk-HZT4UCFB.js} +4 -4
- package/chunks/{chunk-VGU3SDPN.js → chunk-I2LYBGNI.js} +1 -1
- package/chunks/{chunk-TMBPDHXD.js → chunk-I4H7PRWQ.js} +1 -1
- package/chunks/{chunk-LUNAHBBC.js → chunk-J33ZR6OJ.js} +404 -4
- package/chunks/{chunk-MB7CQE2R.js → chunk-J7FA27RO.js} +109 -6
- package/chunks/{chunk-S566HKUS.js → chunk-JE5FVRPC.js} +38 -7
- package/chunks/{chunk-HKGTXQ2Q.js → chunk-JJXWTVSK.js} +1 -1
- package/chunks/{chunk-EEEZIVFJ.js → chunk-JOLIREYR.js} +1 -1
- package/chunks/{chunk-CGONIGON.js → chunk-JVHEVCAU.js} +5 -5
- package/chunks/chunk-K5XU6E4T.js +167 -0
- package/chunks/{chunk-EW6C27XX.js → chunk-KMGMKW5Q.js} +1 -1
- package/chunks/{chunk-B734I4XN.js → chunk-L7OKCI7T.js} +4 -2
- package/chunks/{chunk-3PPKH5TY.js → chunk-M2U5NM24.js} +188 -11366
- package/chunks/{chunk-PCTRA6JV.js → chunk-MNF6S5PR.js} +4 -4
- package/chunks/{chunk-FPACXT7T.js → chunk-N4EJFBN5.js} +421 -163
- 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-Q47HB5BI.js → chunk-O75BHFQW.js} +10 -460
- package/chunks/{chunk-EPHYP7YA.js → chunk-ODLIHNOY.js} +1 -2
- package/chunks/{chunk-R44WETZC.js → chunk-PDE7CSDS.js} +2 -2
- package/chunks/{chunk-C7WPMYY6.js → chunk-PR32FRT6.js} +3 -3
- package/chunks/{chunk-7ACQGQWS.js → chunk-QE6KJYLT.js} +56 -29
- package/chunks/{chunk-3RJ3ZPPR.js → chunk-QI7GOGJR.js} +7 -7
- package/chunks/{chunk-XU5P23GN.js → chunk-QLDPRILK.js} +3 -3
- package/chunks/{chunk-S77J57YJ.js → chunk-QNKBEJO2.js} +359 -76
- package/chunks/{chunk-3MEMSFD3.js → chunk-QWFNTRH4.js} +1 -1
- package/chunks/chunk-QYUE6W3T.js +123 -0
- package/chunks/{chunk-WEOJMFUO.js → chunk-R5OP2ATH.js} +11 -11
- package/chunks/{chunk-BNXANYLH.js → chunk-RD6YJJJ6.js} +81 -1
- package/chunks/{chunk-3VWNMDXT.js → chunk-RRFZXMYP.js} +380 -400
- package/chunks/{chunk-ZN5T4BHI.js → chunk-RYLJU2DY.js} +1 -1
- package/chunks/{chunk-ZD3NW5KL.js → chunk-S7AKE7HL.js} +3 -3
- package/chunks/{chunk-BG4BIP7F.js → chunk-SBBN4BWR.js} +4 -2
- package/chunks/{chunk-T2VDEFUU.js → chunk-SKQZZVAV.js} +2 -2
- package/chunks/{chunk-EDEHJ6DO.js → chunk-SLNKLLEO.js} +14 -9
- package/chunks/chunk-SMXULRAN.js +37 -0
- package/chunks/{chunk-BUY35XTH.js → chunk-SMYQZVZ3.js} +1 -1
- package/chunks/{chunk-YTHAFW7O.js → chunk-STUWFKGD.js} +1001 -887
- package/chunks/{chunk-SFUYT3EQ.js → chunk-T4T2FNV4.js} +2 -2
- package/chunks/{chunk-F6XNTYNE.js → chunk-U3KSMM7G.js} +8 -4
- package/chunks/chunk-UFLGERMB.js +813 -0
- package/chunks/{chunk-BGUDAULQ.js → chunk-UO5GVXQE.js} +5 -5
- package/chunks/{chunk-C4K3FEQ2.js → chunk-UX4SGCGN.js} +32 -3
- package/chunks/{chunk-TWMKA4OQ.js → chunk-UYT3MWEB.js} +85 -8
- package/chunks/{chunk-5J3QYE2J.js → chunk-VBZ452JT.js} +113 -24
- package/chunks/{chunk-KBXLIVWQ.js → chunk-VVLOGDB6.js} +2 -2
- package/chunks/{chunk-TXVGVZYR.js → chunk-XJYUPHRC.js} +3 -3
- package/chunks/{chunk-2JD55C6G.js → chunk-Y6YMRS3U.js} +2 -2
- package/chunks/{chunk-ACZI6UDO.js → chunk-YAINVQ3Q.js} +2961 -1349
- package/chunks/{chunk-X6EDWN44.js → chunk-ZP6UKOPB.js} +1 -1
- package/chunks/{computer-use-6OUCN274.js → computer-use-JGB36FDW.js} +103 -52
- package/chunks/{contextCommand-M5IKMWCY.js → contextCommand-WYU6OQ2F.js} +26 -28
- 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-HH2EC5FI.js +65 -0
- package/chunks/{de-ACHALDED.js → de-EOW5PVHF.js} +1 -0
- package/chunks/{dist-BOOH5JWN.js → dist-663NZ6MI.js} +1 -1
- package/chunks/{dist-QHJRBCMP.js → dist-J37VXPLD.js} +46 -5
- package/chunks/{dist-OD2FY543.js → dist-LB6OGPVM.js} +1 -1
- package/chunks/{dist-BD27IA3L.js → dist-NHEYYB2B.js} +2 -2
- package/chunks/{dist-QFFZWACU.js → dist-PQPZ5Q4N.js} +1 -1
- package/chunks/{earlyInputCapture-HX4EHHVF.js → earlyInputCapture-44RISVVJ.js} +25 -27
- package/chunks/{edit-AHPBJWZO.js → edit-NN6GM5DT.js} +68 -30
- package/chunks/{en-NCUBOJOY.js → en-HPWEJBTR.js} +8 -0
- package/chunks/{enter-worktree-PB45KTMD.js → enter-worktree-PB3O2C7D.js} +24 -26
- package/chunks/{enterPlanMode-WBJ23SFX.js → enterPlanMode-YQFNNSUA.js} +24 -26
- package/chunks/{errors-OBDZ5XIW.js → errors-LS7XU5DZ.js} +26 -28
- package/chunks/{exit-worktree-VZK27UQY.js → exit-worktree-E2FTNSBK.js} +24 -26
- package/chunks/{exitPlanMode-SVJCUCD2.js → exitPlanMode-GLYK2BUB.js} +24 -26
- package/chunks/{fast-path-LCCPZVEW.js → fast-path-WQ6M7LI7.js} +4 -4
- package/chunks/{fast-path-settings-TSVI53EB.js → fast-path-settings-OAGU3X5H.js} +3 -2
- package/chunks/{fr-GVKZ27MF.js → fr-BN5NKSAC.js} +1 -0
- package/chunks/{gemini-NVIOUXR6.js → gemini-2YFLVA2M.js} +204 -103
- package/chunks/{geminiContentGenerator-35K5AQ5O.js → geminiContentGenerator-XV6SV6CD.js} +4 -4
- package/chunks/{glob-JU4Y7GPG.js → glob-2H6CDDMK.js} +24 -26
- package/chunks/{grep-J4B63YPZ.js → grep-VXIUXM3C.js} +24 -26
- package/chunks/{headlessSafetyWarnings-23EM5RH2.js → headlessSafetyWarnings-TBE35GJ4.js} +24 -26
- package/chunks/initializer-2Y7SLOKV.js +61 -0
- 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-ZAFHZ7OS.js +65 -0
- package/chunks/loadedSettingsAdapter-6KJXD6M3.js +60 -0
- package/chunks/{loop-wakeup-33GPXJLA.js → loop-wakeup-CITGGQHA.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-WU7WVFM2.js → monitor-HKLRS2HQ.js} +24 -26
- package/chunks/nonInteractiveCli-5W4GIZQM.js +96 -0
- package/chunks/{notebook-edit-UGVPLPX4.js → notebook-edit-Y6SKSGTT.js} +52 -26
- package/chunks/{openaiContentGenerator-TI3M5VNP.js → openaiContentGenerator-J7G2FYJT.js} +13 -14
- package/chunks/{pt-SY5NCFGR.js → pt-TNZRNLQB.js} +1 -0
- package/chunks/{qwenContentGenerator-7WDBLJ77.js → qwenContentGenerator-5XIEM5GV.js} +26 -28
- package/chunks/{qwenOAuth2-K4AASPCV.js → qwenOAuth2-AG3PFFLZ.js} +4 -4
- package/chunks/{read-file-Y4NNE7M7.js → read-file-J7D552ZJ.js} +9 -10
- package/chunks/{read-mcp-resource-I5HCZJ6X.js → read-mcp-resource-DQQW7H7T.js} +2 -2
- package/chunks/{ripGrep-I5KP7EQ7.js → ripGrep-IEIFIWP4.js} +24 -26
- package/chunks/{ru-FWNXJG4F.js → ru-NIAUBKCN.js} +1 -0
- package/chunks/{run-qwen-serve-VRHHXLVN.js → run-qwen-serve-SGEEVMXD.js} +149 -41
- package/chunks/{scheduler-MPIZJSXK.js → scheduler-7CQI3S4Q.js} +24 -26
- package/chunks/{send-message-2DAFXEYP.js → send-message-EE4TWKVU.js} +2 -2
- package/chunks/{serve-O2HA5D2Y.js → serve-V6GVZR6U.js} +31 -31
- package/chunks/{server-ZU5GPYYG.js → server-4QMUWXPW.js} +6996 -5864
- package/chunks/{session-TBV6PADC.js → session-NRO7UFOY.js} +62 -57
- package/chunks/{settings-2IYAFT2Z.js → settings-SGWRDQSC.js} +30 -30
- package/chunks/{shell-EZRRV6ET.js → shell-62ANGIHL.js} +24 -26
- package/chunks/{skill-2UPCJCHZ.js → skill-VWAQAWW6.js} +39 -13
- package/chunks/{spawnChannel-2LTBWDWZ.js → spawnChannel-3VHW5EPY.js} +26 -28
- package/chunks/{src-UKQZLQ6R.js → src-KUV5J5Q2.js} +52 -28
- package/chunks/{startInteractiveUI-C3TJCUJP.js → startInteractiveUI-6EYJN3JV.js} +2588 -2371
- 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-3UXTW2MP.js → team-create-LPOGCPM7.js} +24 -26
- package/chunks/{team-delete-HGHFG23B.js → team-delete-LKBYPASD.js} +5 -5
- package/chunks/{theme-manager-3M5P6HST.js → theme-manager-LYLGAERF.js} +25 -27
- package/chunks/{todoWrite-IFBMN3FH.js → todoWrite-OYXKTVYN.js} +4 -4
- package/chunks/{tool-search-BHVIDD3W.js → tool-search-YPUFJ3ZQ.js} +102 -18
- package/chunks/trustedFolders-5B24TMEA.js +73 -0
- package/chunks/types-QX5C3CHJ.js +12 -0
- package/chunks/{validateNonInterActiveAuth-HHD2CROM.js → validateNonInterActiveAuth-BTDTYOVT.js} +57 -54
- package/chunks/{web-fetch-B5IIQ5TT.js → web-fetch-EEB5LZYU.js} +28 -15
- package/chunks/{workflow-PPOHBLSJ.js → workflow-LAWIW5LI.js} +32 -33
- package/chunks/workspace-providers-status-PIAFVYHA.js +62 -0
- package/chunks/workspace-service-YAIOD4HG.js +71 -0
- package/chunks/{write-file-44GS2JVH.js → write-file-PCV226DJ.js} +63 -30
- 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 +6 -3
- package/web-shell/assets/{arc-D_ae_Y9k.js → arc-DA7r8Ueo.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-BMLRjppa.js → architectureDiagram-3BPJPVTR-ZDUxPtZ2.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-qVDQC8KL.js → blockDiagram-GPEHLZMM-vrtOf1kJ.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-CxWS6MBd.js → c4Diagram-AAUBKEIU-BHFjzIi4.js} +1 -1
- package/web-shell/assets/channel-iRo68q4Q.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-BtNuY5Yp.js → chunk-2J33WTMH-mdeQVz59.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BU-x368d.js → chunk-4BX2VUAB-BkKMlwBX.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DRgTLvBu.js → chunk-55IACEB6-B7bnXNfu.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-D2aElv7q.js → chunk-727SXJPM-DGz8Mm6i.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-BwHCMRQ0.js → chunk-AQP2D5EJ-BQAydUNk.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-BMyPH-ku.js → chunk-FMBD7UC4-GHr2LN_p.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-BNKTstUf.js → chunk-ND2GUHAM-7R91lnUx.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-gD3vsFId.js → chunk-QZHKN3VN-aTJD3lSQ.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-iHF24a8X.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-iHF24a8X.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BG9FAsXE.js → cose-bilkent-S5V4N54A-BTf8t1RL.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-Cy1sR7om.js → dagre-BM42HDAG-_sgp3WuA.js} +1 -1
- package/web-shell/assets/default-aEtf0G7-.svg +1 -0
- package/web-shell/assets/{diagram-2AECGRRQ-Bxi1I_Vu.js → diagram-2AECGRRQ-CROtRy1w.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-BGCJjO6y.js → diagram-5GNKFQAL-BqGRzwSc.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CMTeLXp7.js → diagram-KO2AKTUF-CMrcEtA7.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BN1wyAGh.js → diagram-LMA3HP47-BRydGNW5.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-UYSG_zcp.js → diagram-OG6HWLK6-D0ilgNjV.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-DqXL08lw.js → erDiagram-TEJ5UH35-2lnQeJUM.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BPJ9SFji.js → flowDiagram-I6XJVG4X-C_ZMdQiC.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BEd9Pnms.js → ganttDiagram-6RSMTGT7-Dw9V_Ny0.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DrNRH3oi.js → gitGraphDiagram-PVQCEYII-HDXI-F1B.js} +1 -1
- package/web-shell/assets/index-CHmzAWys.css +5 -0
- package/web-shell/assets/index-w6GTOHh1.js +713 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CFYBrkVI.js → infoDiagram-5YYISTIA-CuB8Ebua.js} +1 -1
- package/web-shell/assets/insert-DmRbh9Rv.svg +1 -0
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-Dxsddth7.js → ishikawaDiagram-YF4QCWOH-D_tyhVwh.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-DxaDK80t.js → journeyDiagram-JHISSGLW-CgCwJQNU.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Q0jQCOct.js → kanban-definition-UN3LZRKU-PZUtcbPx.js} +1 -1
- package/web-shell/assets/{linear-DGGM2kcP.js → linear-CZqRdJIU.js} +1 -1
- package/web-shell/assets/{mermaid.core-ByoxnWut.js → mermaid.core-CPW_4UEF.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-C0ZseHsi.js → mindmap-definition-RKZ34NQL-D_Y75ID7.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-MQXNhl5A.js → pieDiagram-4H26LBE5-Q4dTyLeF.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DIR4ee2A.js → quadrantDiagram-W4KKPZXB-ckw329Ft.js} +1 -1
- package/web-shell/assets/queue-DWpnpFgW.svg +1 -0
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-BTR0UdYQ.js → requirementDiagram-4Y6WPE33-DbVDm4It.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-sfnhMELN.js → sankeyDiagram-5OEKKPKP-CHuZ_ecH.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DXczHOHH.js → sequenceDiagram-3UESZ5HK-DU2YSpq-.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-DdE_KQFH.js → stateDiagram-AJRCARHV-CA9PEBUo.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-t1LRI0oY.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-DIc61uE8.js → timeline-definition-PNZ67QCA-Bhlo4WVc.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BF7ODmxB.js → vennDiagram-CIIHVFJN-6xtPLsyl.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-3pc1MEaw.js → wardley-L42UT6IY-3eozmXPf.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-9jnPcZuP.js → wardleyDiagram-YWT4CUSO-BOn6hKss.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-DcthaZK6.js → xychartDiagram-2RQKCTM6-BsP4-I_y.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-5P5XGNYH.js +0 -93
- package/chunks/chunk-CL7QBVGW.js +0 -410
- package/chunks/chunk-SEZC2725.js +0 -36
- package/chunks/chunk-SYCJMSIJ.js +0 -82
- package/chunks/daemon-status-provider-TME7FJJD.js +0 -68
- package/chunks/initializer-GVY6XSFS.js +0 -61
- package/chunks/list-ZSIVGCZJ.js +0 -65
- package/chunks/loadedSettingsAdapter-KCX2EYFY.js +0 -60
- package/chunks/nonInteractiveCli-HNXJ6X6Z.js +0 -91
- package/chunks/workspace-providers-status-NAQJK6DP.js +0 -62
- package/chunks/workspace-service-YREVMAQD.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
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
require_undici
|
|
5
|
+
} from "./chunk-M2U5NM24.js";
|
|
6
|
+
import {
|
|
7
|
+
writeStderrLine
|
|
8
|
+
} from "./chunk-Y6Z2O3WR.js";
|
|
9
|
+
import {
|
|
10
|
+
createDebugLogger
|
|
11
|
+
} from "./chunk-UX4SGCGN.js";
|
|
12
|
+
import {
|
|
13
|
+
init_esbuild_shims
|
|
14
|
+
} from "./chunk-A4BMJM77.js";
|
|
15
|
+
import {
|
|
16
|
+
__name,
|
|
17
|
+
__toESM
|
|
18
|
+
} from "./chunk-J2S4EL5Y.js";
|
|
19
|
+
|
|
20
|
+
// packages/cli/src/services/setup-github.ts
|
|
21
|
+
init_esbuild_shims();
|
|
22
|
+
var import_undici2 = __toESM(require_undici(), 1);
|
|
23
|
+
import { promises as fsp } from "node:fs";
|
|
24
|
+
import * as path from "node:path";
|
|
25
|
+
|
|
26
|
+
// packages/cli/src/utils/gitUtils.ts
|
|
27
|
+
init_esbuild_shims();
|
|
28
|
+
var import_undici = __toESM(require_undici(), 1);
|
|
29
|
+
import * as childProcess from "node:child_process";
|
|
30
|
+
var debugLogger = createDebugLogger("GIT");
|
|
31
|
+
async function runGit(args, opts = {}) {
|
|
32
|
+
return await new Promise((resolve2, reject) => {
|
|
33
|
+
childProcess.execFile(
|
|
34
|
+
"git",
|
|
35
|
+
args,
|
|
36
|
+
{
|
|
37
|
+
encoding: "utf-8",
|
|
38
|
+
...opts.cwd ? { cwd: opts.cwd } : {}
|
|
39
|
+
},
|
|
40
|
+
(err, stdout) => {
|
|
41
|
+
if (err) {
|
|
42
|
+
reject(err);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
resolve2(String(stdout ?? "").trim());
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
__name(runGit, "runGit");
|
|
51
|
+
var isGitHubRepositoryAsync = /* @__PURE__ */ __name(async (opts = {}) => {
|
|
52
|
+
try {
|
|
53
|
+
const remotes = await runGit(["remote", "-v"], opts);
|
|
54
|
+
return remotes.split("\n").some((line) => {
|
|
55
|
+
const remoteUrl = line.trim().split(/\s+/)[1];
|
|
56
|
+
return remoteUrl ? isGitHubRemoteUrl(remoteUrl) : false;
|
|
57
|
+
});
|
|
58
|
+
} catch (_error) {
|
|
59
|
+
debugLogger.debug(`Failed to get git remote:`, _error);
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
}, "isGitHubRepositoryAsync");
|
|
63
|
+
function isGitHubRemoteUrl(remoteUrl) {
|
|
64
|
+
if (remoteUrl.startsWith("git@github.com:")) {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
if (remoteUrl.startsWith("git@")) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
try {
|
|
71
|
+
return new URL(remoteUrl).hostname === "github.com";
|
|
72
|
+
} catch {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
__name(isGitHubRemoteUrl, "isGitHubRemoteUrl");
|
|
77
|
+
var getGitRepoRootAsync = /* @__PURE__ */ __name(async (opts = {}) => {
|
|
78
|
+
const gitRepoRoot = await runGit(["rev-parse", "--show-toplevel"], opts);
|
|
79
|
+
if (!gitRepoRoot) {
|
|
80
|
+
throw new Error(`Git repo returned empty value`);
|
|
81
|
+
}
|
|
82
|
+
return gitRepoRoot;
|
|
83
|
+
}, "getGitRepoRootAsync");
|
|
84
|
+
var getLatestGitHubRelease = /* @__PURE__ */ __name(async (proxy) => {
|
|
85
|
+
try {
|
|
86
|
+
const controller = new AbortController();
|
|
87
|
+
const endpoint = `https://api.github.com/repos/QwenLM/qwen-code-action/releases/latest`;
|
|
88
|
+
const response = await fetch(endpoint, {
|
|
89
|
+
method: "GET",
|
|
90
|
+
headers: {
|
|
91
|
+
Accept: "application/vnd.github+json",
|
|
92
|
+
"Content-Type": "application/json",
|
|
93
|
+
"X-GitHub-Api-Version": "2022-11-28"
|
|
94
|
+
},
|
|
95
|
+
dispatcher: proxy ? new import_undici.ProxyAgent(proxy) : void 0,
|
|
96
|
+
signal: AbortSignal.any([AbortSignal.timeout(3e4), controller.signal])
|
|
97
|
+
});
|
|
98
|
+
if (!response.ok) {
|
|
99
|
+
throw new Error(
|
|
100
|
+
`Invalid response code: ${response.status} - ${response.statusText}`
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
const releaseTag = (await response.json()).tag_name;
|
|
104
|
+
if (!releaseTag) {
|
|
105
|
+
throw new Error(`Response did not include tag_name field`);
|
|
106
|
+
}
|
|
107
|
+
return releaseTag;
|
|
108
|
+
} catch (_error) {
|
|
109
|
+
debugLogger.debug(
|
|
110
|
+
`Failed to determine latest qwen-code-action release:`,
|
|
111
|
+
_error
|
|
112
|
+
);
|
|
113
|
+
throw new Error(
|
|
114
|
+
`Unable to determine the latest qwen-code-action release on GitHub.`
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
}, "getLatestGitHubRelease");
|
|
118
|
+
async function getGitHubRepoInfoAsync(opts = {}) {
|
|
119
|
+
return parseGitHubRepoInfo(
|
|
120
|
+
await runGit(["remote", "get-url", "origin"], opts)
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
__name(getGitHubRepoInfoAsync, "getGitHubRepoInfoAsync");
|
|
124
|
+
function parseGitHubRepoInfo(remoteUrl) {
|
|
125
|
+
let urlToParse = remoteUrl;
|
|
126
|
+
if (remoteUrl.startsWith("git@github.com:")) {
|
|
127
|
+
urlToParse = remoteUrl.replace("git@github.com:", "");
|
|
128
|
+
} else if (remoteUrl.startsWith("git@")) {
|
|
129
|
+
throw new Error(
|
|
130
|
+
`Owner & repo could not be extracted from remote URL: ${remoteUrl}`
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
let parsedUrl;
|
|
134
|
+
try {
|
|
135
|
+
parsedUrl = new URL(urlToParse, "https://github.com");
|
|
136
|
+
} catch {
|
|
137
|
+
throw new Error(
|
|
138
|
+
`Owner & repo could not be extracted from remote URL: ${remoteUrl}`
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
if (parsedUrl.hostname !== "github.com") {
|
|
142
|
+
throw new Error(
|
|
143
|
+
`Owner & repo could not be extracted from remote URL: ${remoteUrl}`
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
const parts = parsedUrl.pathname.split("/").filter((part) => part !== "");
|
|
147
|
+
if (parts.length !== 2 || !parts[0] || !parts[1]) {
|
|
148
|
+
throw new Error(
|
|
149
|
+
`Owner & repo could not be extracted from remote URL: ${remoteUrl}`
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
return { owner: parts[0], repo: parts[1].replace(/\.git$/, "") };
|
|
153
|
+
}
|
|
154
|
+
__name(parseGitHubRepoInfo, "parseGitHubRepoInfo");
|
|
155
|
+
|
|
156
|
+
// packages/cli/src/services/setup-github.ts
|
|
157
|
+
var debugLogger2 = createDebugLogger("SETUP_GITHUB");
|
|
158
|
+
var GITHUB_WORKFLOW_PATHS = [
|
|
159
|
+
"qwen-dispatch/qwen-dispatch.yml",
|
|
160
|
+
"qwen-assistant/qwen-invoke.yml",
|
|
161
|
+
"issue-triage/qwen-triage.yml",
|
|
162
|
+
"issue-triage/qwen-scheduled-triage.yml",
|
|
163
|
+
"pr-review/qwen-review.yml"
|
|
164
|
+
];
|
|
165
|
+
var GITIGNORE_ENTRIES = [".qwen/", "gha-creds-*.json"];
|
|
166
|
+
var MAX_WORKFLOW_DOWNLOAD_BYTES = 5 * 1024 * 1024;
|
|
167
|
+
var SetupGithubError = class extends Error {
|
|
168
|
+
static {
|
|
169
|
+
__name(this, "SetupGithubError");
|
|
170
|
+
}
|
|
171
|
+
code;
|
|
172
|
+
status;
|
|
173
|
+
partial;
|
|
174
|
+
partialResult;
|
|
175
|
+
constructor(code, message, status, partialResult) {
|
|
176
|
+
super(message);
|
|
177
|
+
this.name = "SetupGithubError";
|
|
178
|
+
this.code = code;
|
|
179
|
+
this.status = status;
|
|
180
|
+
this.partial = partialResult !== void 0;
|
|
181
|
+
this.partialResult = partialResult;
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
var nodeFileOps = {
|
|
185
|
+
assertCanWrite() {
|
|
186
|
+
},
|
|
187
|
+
async ensureWorkflowDirectory(gitRepoRoot) {
|
|
188
|
+
await fsp.mkdir(path.join(gitRepoRoot, ".github", "workflows"), {
|
|
189
|
+
recursive: true
|
|
190
|
+
});
|
|
191
|
+
},
|
|
192
|
+
async writeTextFile(gitRepoRoot, relativePath, content) {
|
|
193
|
+
const target = path.join(gitRepoRoot, relativePath);
|
|
194
|
+
await fsp.writeFile(target, content, { mode: 420 });
|
|
195
|
+
return { sizeBytes: Buffer.byteLength(content, "utf8") };
|
|
196
|
+
},
|
|
197
|
+
async readTextFile(gitRepoRoot, relativePath) {
|
|
198
|
+
try {
|
|
199
|
+
return await fsp.readFile(path.join(gitRepoRoot, relativePath), "utf8");
|
|
200
|
+
} catch (error) {
|
|
201
|
+
if (error.code === "ENOENT") {
|
|
202
|
+
return void 0;
|
|
203
|
+
}
|
|
204
|
+
throw error;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
async function setupGithub(options = {}) {
|
|
209
|
+
const cwd = options.cwd ?? process.cwd();
|
|
210
|
+
const fileOps = options.fileOps ?? nodeFileOps;
|
|
211
|
+
if (!await isGitHubRepositoryAsync({ cwd })) {
|
|
212
|
+
throw new SetupGithubError(
|
|
213
|
+
"github_repository_not_found",
|
|
214
|
+
"Unable to determine the GitHub repository. /setup-github must be run from a git repository.",
|
|
215
|
+
400
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
let gitRepoRoot;
|
|
219
|
+
try {
|
|
220
|
+
gitRepoRoot = await getGitRepoRootAsync({ cwd });
|
|
221
|
+
} catch (error) {
|
|
222
|
+
debugLogger2.debug("Failed to get git repo root:", error);
|
|
223
|
+
throw new SetupGithubError(
|
|
224
|
+
"github_repository_not_found",
|
|
225
|
+
"Unable to determine the GitHub repository. /setup-github must be run from a git repository.",
|
|
226
|
+
400
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
if (options.workspaceRoot) {
|
|
230
|
+
const [gitRootReal, workspaceReal] = await Promise.all([
|
|
231
|
+
realpathOrResolve(gitRepoRoot),
|
|
232
|
+
realpathOrResolve(options.workspaceRoot)
|
|
233
|
+
]);
|
|
234
|
+
if (gitRootReal !== workspaceReal) {
|
|
235
|
+
throw new SetupGithubError(
|
|
236
|
+
"github_git_root_mismatch",
|
|
237
|
+
"The Git repository root must match the daemon workspace root.",
|
|
238
|
+
400
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
fileOps.assertCanWrite?.();
|
|
243
|
+
let releaseTag;
|
|
244
|
+
try {
|
|
245
|
+
releaseTag = await getLatestGitHubRelease(options.proxy);
|
|
246
|
+
} catch (error) {
|
|
247
|
+
writeStderrLine(
|
|
248
|
+
`qwen setup-github: failed to determine latest qwen-code-action release: ${error instanceof Error ? error.message : String(error)}`
|
|
249
|
+
);
|
|
250
|
+
debugLogger2.debug(
|
|
251
|
+
"Failed to determine latest qwen-code-action release:",
|
|
252
|
+
error
|
|
253
|
+
);
|
|
254
|
+
throw new SetupGithubError(
|
|
255
|
+
"github_release_lookup_failed",
|
|
256
|
+
"Unable to determine the latest qwen-code-action release on GitHub.",
|
|
257
|
+
502
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
const readmeUrl = `https://github.com/QwenLM/qwen-code-action/blob/${releaseTag}/README.md#quick-start`;
|
|
261
|
+
const secretsUrl = await resolveSecretsUrl(cwd);
|
|
262
|
+
const downloads = await downloadWorkflows({
|
|
263
|
+
releaseTag,
|
|
264
|
+
proxy: options.proxy,
|
|
265
|
+
abortSignal: options.abortSignal,
|
|
266
|
+
fetchImpl: options.fetchImpl ?? fetch
|
|
267
|
+
});
|
|
268
|
+
const result = {
|
|
269
|
+
kind: "github_setup",
|
|
270
|
+
workspaceCwd: options.workspaceRoot ?? gitRepoRoot,
|
|
271
|
+
gitRepoRoot,
|
|
272
|
+
releaseTag,
|
|
273
|
+
readmeUrl,
|
|
274
|
+
...secretsUrl ? { secretsUrl } : {},
|
|
275
|
+
workflows: [],
|
|
276
|
+
gitignore: { path: ".gitignore", status: "skipped" },
|
|
277
|
+
warnings: []
|
|
278
|
+
};
|
|
279
|
+
result.gitignore = await updateGitignore(gitRepoRoot, fileOps);
|
|
280
|
+
if (result.gitignore.status === "failed") {
|
|
281
|
+
result.warnings.push("Failed to update .gitignore.");
|
|
282
|
+
}
|
|
283
|
+
try {
|
|
284
|
+
await fileOps.ensureWorkflowDirectory(gitRepoRoot);
|
|
285
|
+
for (const workflow of downloads) {
|
|
286
|
+
const relativePath = path.posix.join(
|
|
287
|
+
".github",
|
|
288
|
+
"workflows",
|
|
289
|
+
path.posix.basename(workflow.sourcePath)
|
|
290
|
+
);
|
|
291
|
+
try {
|
|
292
|
+
const write = await fileOps.writeTextFile(
|
|
293
|
+
gitRepoRoot,
|
|
294
|
+
relativePath,
|
|
295
|
+
workflow.content
|
|
296
|
+
);
|
|
297
|
+
result.workflows.push({
|
|
298
|
+
sourcePath: workflow.sourcePath,
|
|
299
|
+
path: relativePath,
|
|
300
|
+
status: "written",
|
|
301
|
+
sizeBytes: write.sizeBytes
|
|
302
|
+
});
|
|
303
|
+
} catch (error) {
|
|
304
|
+
result.partial = true;
|
|
305
|
+
result.workflows.push({
|
|
306
|
+
sourcePath: workflow.sourcePath,
|
|
307
|
+
path: relativePath,
|
|
308
|
+
status: "failed",
|
|
309
|
+
error: error instanceof Error ? error.message : String(error)
|
|
310
|
+
});
|
|
311
|
+
throw new SetupGithubError(
|
|
312
|
+
"github_workflow_write_failed",
|
|
313
|
+
`Unable to write ${relativePath}.`,
|
|
314
|
+
500,
|
|
315
|
+
result
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
} catch (error) {
|
|
320
|
+
if (error instanceof SetupGithubError) throw error;
|
|
321
|
+
throw new SetupGithubError(
|
|
322
|
+
"github_workflow_write_failed",
|
|
323
|
+
"Unable to create .github/workflows.",
|
|
324
|
+
500,
|
|
325
|
+
result
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
return result;
|
|
329
|
+
}
|
|
330
|
+
__name(setupGithub, "setupGithub");
|
|
331
|
+
async function updateGitignore(gitRepoRoot, fileOps = nodeFileOps) {
|
|
332
|
+
try {
|
|
333
|
+
const existingContent = await fileOps.readTextFile(
|
|
334
|
+
gitRepoRoot,
|
|
335
|
+
".gitignore"
|
|
336
|
+
);
|
|
337
|
+
if (existingContent === void 0) {
|
|
338
|
+
const content = GITIGNORE_ENTRIES.join("\n") + "\n";
|
|
339
|
+
await fileOps.writeTextFile(gitRepoRoot, ".gitignore", content);
|
|
340
|
+
return {
|
|
341
|
+
path: ".gitignore",
|
|
342
|
+
status: "created",
|
|
343
|
+
added: [...GITIGNORE_ENTRIES]
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
const missingEntries = GITIGNORE_ENTRIES.filter(
|
|
347
|
+
(entry) => !existingContent.split(/\r?\n/).some((line) => line.split("#")[0].trim() === entry)
|
|
348
|
+
);
|
|
349
|
+
if (missingEntries.length === 0) {
|
|
350
|
+
return { path: ".gitignore", status: "unchanged" };
|
|
351
|
+
}
|
|
352
|
+
const nextContent = existingContent + "\n" + missingEntries.join("\n") + "\n";
|
|
353
|
+
await fileOps.writeTextFile(gitRepoRoot, ".gitignore", nextContent);
|
|
354
|
+
return {
|
|
355
|
+
path: ".gitignore",
|
|
356
|
+
status: "updated",
|
|
357
|
+
added: missingEntries
|
|
358
|
+
};
|
|
359
|
+
} catch (error) {
|
|
360
|
+
debugLogger2.debug("Failed to update .gitignore:", error);
|
|
361
|
+
return {
|
|
362
|
+
path: ".gitignore",
|
|
363
|
+
status: "failed",
|
|
364
|
+
error: error instanceof Error ? error.message : String(error)
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
__name(updateGitignore, "updateGitignore");
|
|
369
|
+
async function downloadWorkflows(options) {
|
|
370
|
+
const internalAbort = new AbortController();
|
|
371
|
+
try {
|
|
372
|
+
const dispatcher = options.proxy ? new import_undici2.ProxyAgent(options.proxy) : void 0;
|
|
373
|
+
return await Promise.all(
|
|
374
|
+
GITHUB_WORKFLOW_PATHS.map(async (workflow) => {
|
|
375
|
+
const endpoint = `https://raw.githubusercontent.com/QwenLM/qwen-code-action/refs/tags/${options.releaseTag}/examples/workflows/${workflow}`;
|
|
376
|
+
const response = await options.fetchImpl(endpoint, {
|
|
377
|
+
method: "GET",
|
|
378
|
+
dispatcher,
|
|
379
|
+
signal: AbortSignal.any([
|
|
380
|
+
AbortSignal.timeout(3e4),
|
|
381
|
+
internalAbort.signal,
|
|
382
|
+
...options.abortSignal ? [options.abortSignal] : []
|
|
383
|
+
])
|
|
384
|
+
});
|
|
385
|
+
if (!response.ok) {
|
|
386
|
+
throw new Error(
|
|
387
|
+
`Invalid response code downloading ${endpoint}: ${response.status} - ${response.statusText}`
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
return {
|
|
391
|
+
sourcePath: workflow,
|
|
392
|
+
content: await readResponseTextWithLimit(response, workflow)
|
|
393
|
+
};
|
|
394
|
+
})
|
|
395
|
+
);
|
|
396
|
+
} catch (error) {
|
|
397
|
+
internalAbort.abort();
|
|
398
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
399
|
+
debugLogger2.debug("Failed to download qwen-code-action workflows:", error);
|
|
400
|
+
throw new SetupGithubError(
|
|
401
|
+
"github_workflow_download_failed",
|
|
402
|
+
`Unable to download qwen-code-action workflows from GitHub. ${message}`,
|
|
403
|
+
502
|
|
404
|
+
);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
__name(downloadWorkflows, "downloadWorkflows");
|
|
408
|
+
async function readResponseTextWithLimit(response, sourcePath) {
|
|
409
|
+
const contentLength = response.headers.get("content-length");
|
|
410
|
+
if (contentLength !== null) {
|
|
411
|
+
const parsedLength = Number(contentLength);
|
|
412
|
+
if (Number.isFinite(parsedLength) && parsedLength > MAX_WORKFLOW_DOWNLOAD_BYTES) {
|
|
413
|
+
throw new Error(
|
|
414
|
+
`${sourcePath} exceeds download limit of ${MAX_WORKFLOW_DOWNLOAD_BYTES} bytes`
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
if (!response.body) return "";
|
|
419
|
+
const reader = response.body.getReader();
|
|
420
|
+
const chunks = [];
|
|
421
|
+
let totalBytes = 0;
|
|
422
|
+
try {
|
|
423
|
+
while (true) {
|
|
424
|
+
const { done, value } = await reader.read();
|
|
425
|
+
if (done) break;
|
|
426
|
+
if (!value) continue;
|
|
427
|
+
totalBytes += value.byteLength;
|
|
428
|
+
if (totalBytes > MAX_WORKFLOW_DOWNLOAD_BYTES) {
|
|
429
|
+
await reader.cancel().catch(() => {
|
|
430
|
+
});
|
|
431
|
+
throw new Error(
|
|
432
|
+
`${sourcePath} exceeds download limit of ${MAX_WORKFLOW_DOWNLOAD_BYTES} bytes`
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
chunks.push(value);
|
|
436
|
+
}
|
|
437
|
+
} finally {
|
|
438
|
+
reader.releaseLock();
|
|
439
|
+
}
|
|
440
|
+
const body = new Uint8Array(totalBytes);
|
|
441
|
+
let offset = 0;
|
|
442
|
+
for (const chunk of chunks) {
|
|
443
|
+
body.set(chunk, offset);
|
|
444
|
+
offset += chunk.byteLength;
|
|
445
|
+
}
|
|
446
|
+
return new TextDecoder().decode(body);
|
|
447
|
+
}
|
|
448
|
+
__name(readResponseTextWithLimit, "readResponseTextWithLimit");
|
|
449
|
+
async function resolveSecretsUrl(cwd) {
|
|
450
|
+
try {
|
|
451
|
+
const repoInfo = await getGitHubRepoInfoAsync({ cwd });
|
|
452
|
+
return `https://github.com/${repoInfo.owner}/${repoInfo.repo}/settings/secrets/actions`;
|
|
453
|
+
} catch {
|
|
454
|
+
return void 0;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
__name(resolveSecretsUrl, "resolveSecretsUrl");
|
|
458
|
+
async function realpathOrResolve(input) {
|
|
459
|
+
try {
|
|
460
|
+
return await fsp.realpath(input);
|
|
461
|
+
} catch {
|
|
462
|
+
return path.resolve(input);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
__name(realpathOrResolve, "realpathOrResolve");
|
|
466
|
+
|
|
467
|
+
export {
|
|
468
|
+
GITHUB_WORKFLOW_PATHS,
|
|
469
|
+
SetupGithubError,
|
|
470
|
+
setupGithub
|
|
471
|
+
};
|
|
472
|
+
/**
|
|
473
|
+
* @license
|
|
474
|
+
* Copyright 2025 Google LLC
|
|
475
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
476
|
+
*/
|
|
477
|
+
/**
|
|
478
|
+
* @license
|
|
479
|
+
* Copyright 2025 Qwen Team
|
|
480
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
481
|
+
*/
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
} from "./chunk-OMX7CUOE.js";
|
|
6
6
|
import {
|
|
7
7
|
atomicWriteJSON
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3227DZO4.js";
|
|
9
9
|
import {
|
|
10
10
|
Storage,
|
|
11
11
|
getProjectHash
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UX4SGCGN.js";
|
|
13
13
|
import {
|
|
14
14
|
init_esbuild_shims
|
|
15
15
|
} from "./chunk-A4BMJM77.js";
|