@qwen-code/qwen-code 0.23.2-preview.0 → 0.23.2
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/qc-helper/docs/configuration/auth.md +1 -1
- package/bundled/qc-helper/docs/configuration/model-providers.md +19 -15
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +1 -1
- package/bundled/qc-helper/docs/features/channels/github.md +1 -9
- package/bundled/qc-helper/docs/features/channels/overview.md +26 -51
- package/bundled/qc-helper/docs/features/channels/qqbot.md +1 -2
- package/bundled/qc-helper/docs/features/commands.md +48 -9
- package/bundled/qc-helper/docs/features/goals.md +2 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +8 -0
- package/bundled/qc-helper/docs/qwen-serve.md +62 -48
- package/chunks/{MaxSizedBox-ZZJT3PJF.js → MaxSizedBox-4C3BKKKY.js} +17 -16
- package/chunks/{StandaloneSessionPicker-DIOSZTMX.js → StandaloneSessionPicker-TXVF65YW.js} +32 -31
- package/chunks/{acpAgent-62JUP5A7.js → acpAgent-H5XBKGB4.js} +301 -166
- package/chunks/{agent-NLPEQQDZ.js → agent-T5LEFJIU.js} +10 -10
- package/chunks/{agent-headless-Y2GR5F2Q.js → agent-headless-VZKSRH36.js} +10 -10
- package/chunks/{anthropicContentGenerator-I7LQZH26.js → anthropicContentGenerator-PRJWWVYJ.js} +2 -2
- package/chunks/{artifact-tool-P52OKKEF.js → artifact-tool-G5LHNECG.js} +1 -1
- package/chunks/{bridge-Q66BD62H.js → bridge-AOX5IY44.js} +18 -17
- package/chunks/{channel-management-service-TRTLQTSV.js → channel-management-service-MWQGHPAS.js} +4 -4
- package/chunks/{channel-settings-store-R5STFWUW.js → channel-settings-store-XZCGDGHW.js} +26 -25
- package/chunks/{channel-worker-group-PIYPVCTF.js → channel-worker-group-SQ5FRWOH.js} +5 -5
- package/chunks/{channel-worker-manager-FQHEDTD2.js → channel-worker-manager-TU4ZNWOE.js} +5 -5
- package/chunks/{channel-worker-supervisor-XJPZZ3VK.js → channel-worker-supervisor-EMITFMCP.js} +4 -4
- package/chunks/{chunk-3SH53ANB.js → chunk-22GORRNY.js} +12 -0
- package/chunks/{chunk-7L35FKPF.js → chunk-2BMXHB6N.js} +2 -2
- package/chunks/chunk-2WC3Y7YY.js +1033 -0
- package/chunks/{chunk-WZ4YULVF.js → chunk-3OAXF3UK.js} +210 -80
- package/chunks/{chunk-W673V2H3.js → chunk-46MMBZHI.js} +3 -3
- package/chunks/{chunk-6GRDHIVI.js → chunk-4I3WFI3U.js} +4 -4
- package/chunks/{chunk-QXXBW2G4.js → chunk-4JNHNVAZ.js} +3 -3
- package/chunks/{chunk-R2266LQ5.js → chunk-4WMGYG3F.js} +2 -2
- package/chunks/{chunk-Y6ZWXM44.js → chunk-5BH2AIEY.js} +1 -1
- package/chunks/{chunk-EA4NFWVG.js → chunk-5OZUKLL7.js} +3 -3
- package/chunks/{chunk-RX3FYFCN.js → chunk-67XTVRVB.js} +1 -1
- package/chunks/{chunk-MA5OUNN6.js → chunk-6G4V7SE4.js} +1 -1
- package/chunks/{chunk-B54PFQS5.js → chunk-7CLLH5TI.js} +1 -1
- package/chunks/{chunk-7GZCCHJL.js → chunk-7LTCFO6T.js} +3 -3
- package/chunks/{chunk-33MLFMCL.js → chunk-7NDZKE2M.js} +2 -2
- package/chunks/{chunk-5WC2ECUK.js → chunk-7PD7ZMX5.js} +17 -4
- package/chunks/{chunk-ZUNWKOAP.js → chunk-7SVM3RP2.js} +4 -24
- package/chunks/{chunk-5GD7LYOH.js → chunk-A7EFXK7P.js} +1 -1
- package/chunks/{chunk-RDV4NLI3.js → chunk-AO2VMS72.js} +2 -2
- package/chunks/{chunk-XAXTQURR.js → chunk-APXIW2TF.js} +3 -3
- package/chunks/{chunk-3BTHHXXE.js → chunk-AUTUFD5X.js} +1 -1
- package/chunks/{chunk-VH764G6B.js → chunk-B25JYXZE.js} +2 -2
- package/chunks/{chunk-MMMA36MN.js → chunk-BK7D2JR6.js} +3 -3
- package/chunks/{chunk-RPFJJ33Z.js → chunk-CALTQWTZ.js} +1 -1
- package/chunks/{chunk-EUXF6URV.js → chunk-CCBTNJB4.js} +16 -18
- package/chunks/{chunk-BF3RUIVP.js → chunk-CH2YDT6X.js} +36 -38
- package/chunks/{chunk-L6ZME3W7.js → chunk-CMWU6P4D.js} +1 -1
- package/chunks/{chunk-QJAFSFYA.js → chunk-CWVZBIZJ.js} +1 -1
- package/chunks/{chunk-JDPBJIKI.js → chunk-DAI65CMX.js} +1 -1
- package/chunks/{chunk-GM44O6F7.js → chunk-DARWOZY6.js} +1 -1
- package/chunks/{chunk-J4ECGDA3.js → chunk-ELD3OBPU.js} +3 -3
- package/chunks/{chunk-ZELCTN6Y.js → chunk-F23YN37B.js} +10 -0
- package/chunks/{chunk-OIPUQE3S.js → chunk-F2NYVASI.js} +14 -1
- package/chunks/{chunk-ODBNTMZW.js → chunk-FAJPLSYF.js} +36 -29
- package/chunks/{chunk-GXIHBIHC.js → chunk-FGHPZGOP.js} +29 -24
- package/chunks/{chunk-TK4XHPKW.js → chunk-G37O7YO6.js} +2 -2
- package/chunks/{chunk-4JKLPTV6.js → chunk-G3ZUMSFS.js} +12 -5
- package/chunks/{chunk-743XE7N7.js → chunk-G5VOXCRX.js} +1 -1
- package/chunks/{chunk-BL6B2QS2.js → chunk-GOEVQADN.js} +618 -1122
- package/chunks/{chunk-XI7RST4D.js → chunk-GOKAOSCN.js} +1 -1
- package/chunks/{chunk-FDOGGKAA.js → chunk-GSFV5RQW.js} +2 -0
- package/chunks/{chunk-43CI6YWJ.js → chunk-HJ5UJQQL.js} +1384 -1245
- package/chunks/{chunk-LUVXLLMS.js → chunk-IR6JKBAP.js} +1 -1
- package/chunks/{chunk-CPJRFFPH.js → chunk-IRGDIDGJ.js} +558 -158
- package/chunks/{chunk-DCPRCDSR.js → chunk-IWABUX6T.js} +1 -1
- package/chunks/{chunk-DTB5BXRG.js → chunk-JO77FGNZ.js} +16 -15
- package/chunks/{chunk-45ROPFQY.js → chunk-JYGIJA4W.js} +1 -1
- package/chunks/{chunk-M6YLOETP.js → chunk-KCF2436G.js} +1 -1
- package/chunks/{chunk-CABDNUJ4.js → chunk-KEPC5BOL.js} +5 -5
- package/chunks/{chunk-RN6V5HKE.js → chunk-KFECPHLV.js} +3 -3
- package/chunks/{chunk-WIRYFL2L.js → chunk-LEAOJ43M.js} +17 -15
- package/chunks/{chunk-IUJLW6ZI.js → chunk-LUNC5KCL.js} +3 -3
- package/chunks/{chunk-WZS3X663.js → chunk-LWX4WDFF.js} +2 -5
- package/chunks/{chunk-ISPBBKJN.js → chunk-MV5DTLJV.js} +7 -2
- package/chunks/chunk-NFXXBWSE.js +463 -0
- package/chunks/{chunk-PQSCGZT2.js → chunk-NPKCVSXX.js} +26 -2
- package/chunks/{chunk-7RXOEUFF.js → chunk-NX7ZTXFF.js} +1 -1
- package/chunks/{chunk-G5QLLD53.js → chunk-OXR34GCD.js} +14 -2
- package/chunks/{chunk-VHPG7BH6.js → chunk-PDN7FJZV.js} +1 -1
- package/chunks/{chunk-UHUT4IDM.js → chunk-PFKGV6PO.js} +9 -9
- package/chunks/{chunk-NFIDVZND.js → chunk-QB3KS3N3.js} +2 -21
- package/chunks/{chunk-QLM7D7W3.js → chunk-QFJZAY7W.js} +7 -7
- package/chunks/{chunk-NVS4Z6GT.js → chunk-QHLHE2OT.js} +1 -1
- package/chunks/{chunk-B44JBZBB.js → chunk-QQK4L3UU.js} +1 -1
- package/chunks/{chunk-63ACHB2H.js → chunk-QTB4VP4K.js} +50 -18
- package/chunks/{chunk-4BLTSTF6.js → chunk-R3JIDRUL.js} +4 -4
- package/chunks/{chunk-VEQBVJYH.js → chunk-R457KFV7.js} +3 -3
- package/chunks/{chunk-CG2PDIGD.js → chunk-RM244SCQ.js} +1 -1
- package/chunks/{chunk-W7PXLIZJ.js → chunk-RNAJVXUG.js} +5 -5
- package/chunks/{chunk-VF6D6EGV.js → chunk-S5QR6CB5.js} +52 -6
- package/chunks/{chunk-IRKQ4YYX.js → chunk-SVWWF5TZ.js} +29 -1
- package/chunks/{chunk-5HBA2Z7V.js → chunk-TGNNLRC3.js} +2 -3
- package/chunks/{chunk-ORREXWOM.js → chunk-TODNHE76.js} +3 -3
- package/chunks/{chunk-W3ONSAYO.js → chunk-TOOOLHVS.js} +2 -2
- package/chunks/{chunk-EHTKOO6W.js → chunk-TRQNRP2H.js} +2 -2
- package/chunks/{chunk-PQWM4SX2.js → chunk-U6REWGVR.js} +2 -2
- package/chunks/{chunk-UXDVUFKU.js → chunk-ULZECEIP.js} +2 -2
- package/chunks/{chunk-6YEOCHSE.js → chunk-VBLAI2HA.js} +101 -0
- package/chunks/{chunk-M73KHGNR.js → chunk-VJJXG73H.js} +404 -226
- package/chunks/{chunk-Q2F43WTJ.js → chunk-WBU2PIZ5.js} +23 -6
- package/chunks/{chunk-UULHYZ4W.js → chunk-WDN64MVT.js} +74 -15
- package/chunks/{chunk-XVTCSVBK.js → chunk-WDVV3LRM.js} +193 -169
- package/chunks/{chunk-LBKYQ33T.js → chunk-WK7P62DV.js} +16 -10
- package/chunks/{chunk-ULY4ISY2.js → chunk-WXD7INFV.js} +19 -4
- package/chunks/{chunk-ZIPYCXQP.js → chunk-WXPPUPHM.js} +1 -1
- package/chunks/{chunk-5Z4FCEPY.js → chunk-X7LFJF5D.js} +600 -46
- package/chunks/{chunk-YHDGABDC.js → chunk-XKBFYTCD.js} +1 -1
- package/chunks/{chunk-MWEF5MUK.js → chunk-XSOXPG2L.js} +8 -8
- package/chunks/{chunk-5VZFJTL2.js → chunk-YLOHCA6I.js} +2 -2
- package/chunks/{chunk-LN3WBOKU.js → chunk-YQGW3M6Z.js} +2 -2
- package/chunks/{chunk-2OR32P5M.js → chunk-ZN5TKAVR.js} +125 -10
- package/chunks/{chunk-XBLG564H.js → chunk-ZP5XDLSA.js} +10 -10
- package/chunks/{config-utils-37FHWPTP.js → config-utils-GPLIABL2.js} +21 -20
- package/chunks/{contextCommand-R4JUBV5N.js → contextCommand-NCUQUDBY.js} +18 -17
- package/chunks/{core-runtime-6U4OXU5C.js → core-runtime-WKYKWVYU.js} +23 -21
- package/chunks/{create-sub-session-LLUYAGZN.js → create-sub-session-PPLXB3JJ.js} +17 -16
- package/chunks/{daemon-UI6SQSBV.js → daemon-2CKIAO3I.js} +2 -2
- package/chunks/{daemon-git-worktree-guard-O2UTNFJC.js → daemon-git-worktree-guard-73ZWOLKL.js} +17 -16
- package/chunks/{daemon-status-provider-7GMAKSTX.js → daemon-status-provider-OK7VONJG.js} +22 -21
- package/chunks/{daemon-trust-policy-VNP76VMO.js → daemon-trust-policy-CAUCREG2.js} +22 -21
- package/chunks/{daemon-trust-policy-monitor-TD5O3BZA.js → daemon-trust-policy-monitor-3Y36OOEQ.js} +22 -21
- package/chunks/{deferred-core-runtime-NJM63YJS.js → deferred-core-runtime-Q7WFWYD3.js} +17 -16
- package/chunks/{dist-STAGIFNB.js → dist-6YDUH3BB.js} +388 -102
- package/chunks/{dist-XJ25G6OH.js → dist-BNQVF565.js} +2 -8
- package/chunks/{dist-NQ2636VT.js → dist-F34J4FZX.js} +1 -1
- package/chunks/{dist-OR2ZQTXZ.js → dist-F6JLAJLE.js} +1 -1
- package/chunks/{dist-WZTUKIDR.js → dist-NP7QKLVG.js} +2 -2
- package/chunks/{dist-M4CBX53H.js → dist-UFTFGI6I.js} +1 -1
- package/chunks/{dist-5I4HLUTO.js → dist-XLV33CLY.js} +1 -2
- package/chunks/{dist-24TCWK5H.js → dist-Y5KC3IHW.js} +1 -2
- package/chunks/{dist-FDISN4AK.js → dist-ZDNJK74R.js} +3 -7
- package/chunks/{edit-GL7OA6RV.js → edit-YJD6IETK.js} +10 -10
- package/chunks/{enterPlanMode-VC4BCSZE.js → enterPlanMode-EFPVTWIH.js} +10 -10
- package/chunks/{environment-BI6IBAZJ.js → environment-HP3AXFTB.js} +19 -18
- package/chunks/{errors-D6G2ZM2R.js → errors-22ON46G7.js} +19 -18
- package/chunks/{exitPlanMode-DX446CA6.js → exitPlanMode-MOQUNCBH.js} +10 -10
- package/chunks/{fast-path-MAYDLJIP.js → fast-path-2X7BPMXX.js} +3 -3
- package/chunks/{glob-TVKRFY36.js → glob-Y7ACIB3P.js} +10 -10
- package/chunks/{goal-tools-CA6YANRN.js → goal-tools-DABMICUC.js} +10 -10
- package/chunks/{handleAutoUpdate-AW4ZAHON.js → handleAutoUpdate-MCAMHYDI.js} +19 -18
- package/chunks/{i18n-IH5CRAY7.js → i18n-C3GDCALP.js} +17 -16
- package/chunks/{initializer-UBR37ZNM.js → initializer-4URDQL2G.js} +22 -21
- package/chunks/{installationInfo-Y52756EC.js → installationInfo-LBOL6SBV.js} +17 -16
- package/chunks/{list-7V5JDZPO.js → list-JOGBAC2R.js} +25 -24
- package/chunks/{list-agents-I5TRH3J7.js → list-agents-2CXPGJUE.js} +3 -3
- package/chunks/{llm-QDB6JVF5.js → llm-2KPNSAVY.js} +65 -59
- package/chunks/{llm-content-generator-EO6MZCEO.js → llm-content-generator-GR3FOHLB.js} +2 -2
- package/chunks/{loadedSettingsAdapter-I3YQKMC4.js → loadedSettingsAdapter-DVKROEJD.js} +22 -21
- package/chunks/{loggingContentGenerator-MNXYUGDG.js → loggingContentGenerator-P4K6K5W4.js} +12 -12
- package/chunks/{managed-npm-update-EA3EXPTO.js → managed-npm-update-VWBKHNIN.js} +17 -16
- package/chunks/{mcp-QTAJ544Y.js → mcp-6YYNSYLK.js} +22 -21
- package/chunks/{monitor-6FQKQOTP.js → monitor-A255TNZR.js} +10 -10
- package/chunks/{nonInteractiveCli-MRCTZL5X.js → nonInteractiveCli-LXGIKQAT.js} +55 -54
- package/chunks/{notebook-edit-BQQCKI7K.js → notebook-edit-5UYHS2DM.js} +10 -10
- package/chunks/{open-with-auth-D6JD6LDS.js → open-with-auth-6MVIHMXB.js} +1 -1
- package/chunks/{openaiContentGenerator-TTSKXNVH.js → openaiContentGenerator-A6MAMEO5.js} +7 -7
- package/chunks/{pidfile-KPIS6RIT.js → pidfile-B7DZC4TP.js} +20 -17
- package/chunks/{processUtils-ZCASPKK4.js → processUtils-BPZ2MCZS.js} +2 -2
- package/chunks/{prompt-terminal-ledger-D6HM6TV7.js → prompt-terminal-ledger-FYYTAOXS.js} +18 -17
- package/chunks/{qwenContentGenerator-GGZEFLBD.js → qwenContentGenerator-4IOJFD4S.js} +13 -13
- package/chunks/{read-file-VE5GDFLP.js → read-file-A4H4O3VQ.js} +2 -2
- package/chunks/{resumeHistoryUtils-HSSGMYDC.js → resumeHistoryUtils-YQQ43E4N.js} +19 -18
- package/chunks/{ripGrep-SEJE7AA6.js → ripGrep-W32NWFTA.js} +3 -3
- package/chunks/{run-qwen-serve-OJYVH7N6.js → run-qwen-serve-WBSWWIRV.js} +216 -64
- package/chunks/{runtime-KGMQQFJD.js → runtime-VRVBX2E5.js} +29 -26
- package/chunks/{scheduled-tasks-7H5HWHYD.js → scheduled-tasks-D65KJDA3.js} +20 -19
- package/chunks/{scheduler-BE42AKDG.js → scheduler-M2YPN7Z7.js} +19 -18
- package/chunks/{send-message-AWKUDJBH.js → send-message-76BKWKFZ.js} +3 -3
- package/chunks/{serve-KZVKYMSL.js → serve-BE3H2P6P.js} +22 -21
- package/chunks/{server-PJRALPJQ.js → server-FLY5JERG.js} +84 -148
- package/chunks/{session-IHITXU2S.js → session-JVN62R5K.js} +85 -57
- package/chunks/{session-attachments-root-GQ2TUI3Y.js → session-attachments-root-7ACGLHXA.js} +17 -16
- package/chunks/{session-pr-refresh-H43LULTE.js → session-pr-refresh-TQS57SDK.js} +19 -18
- package/chunks/{settings-RKEQQDFC.js → settings-D44YMZFT.js} +21 -20
- package/chunks/{shell-6PJ444U5.js → shell-3VE6I4V5.js} +10 -10
- package/chunks/{skill-Q3UP7B5V.js → skill-FHEGRRZU.js} +2 -2
- package/chunks/{skill-settings-LZR5YRRW.js → skill-settings-VHEJMBFL.js} +21 -20
- package/chunks/{spawnChannel-WM3DT2BF.js → spawnChannel-T6MX2ZDN.js} +17 -16
- package/chunks/{standalone-update-E5474IBI.js → standalone-update-QUGHFMCS.js} +18 -17
- package/chunks/{start-opentui-ui-WLWZNQ2I.js → start-opentui-ui-IHIIZ2LE.js} +438 -203
- package/chunks/{startInteractiveUI-FBQSGWGO.js → startInteractiveUI-LR7K2ARZ.js} +1171 -1234
- package/chunks/{task-create-PMAFST2T.js → task-create-MWXJFRRM.js} +3 -3
- package/chunks/{task-list-R2HSY2NC.js → task-list-EYO3FE57.js} +2 -2
- package/chunks/{task-update-JYC57USF.js → task-update-2JJJRHMT.js} +3 -3
- package/chunks/{team-create-VIGUFUT4.js → team-create-GY3VFY47.js} +10 -10
- package/chunks/{team-delete-CBHVBTPB.js → team-delete-IQZ6XGFI.js} +2 -2
- package/chunks/{team-plan-approval-HQVZA3MD.js → team-plan-approval-BQPGZOT5.js} +10 -10
- package/chunks/{terminal-image-renderer-LUKNCOVM.js → terminal-image-renderer-YNYW5CQG.js} +17 -16
- package/chunks/{theme-manager-LOENKYLY.js → theme-manager-U6CIK3GM.js} +17 -16
- package/chunks/{tool-search-ZIFAQCE2.js → tool-search-XI3QWD5I.js} +2 -2
- package/chunks/{total-session-admission-FUUJH3QH.js → total-session-admission-3SNSJJ32.js} +18 -17
- package/chunks/{trustedFolders-C76KYROP.js → trustedFolders-OVAQKNV5.js} +18 -17
- package/chunks/{update-relaunch-4G2SRXKX.js → update-relaunch-XV5O74E3.js} +5 -5
- package/chunks/{updateCheck-EIZIO7HI.js → updateCheck-CHUYWD6L.js} +17 -16
- package/chunks/{useAutoAcceptIndicator-EAA6KSY4.js → useAutoAcceptIndicator-VKSVIXZC.js} +23 -22
- package/chunks/{validateNonInterActiveAuth-BRX22QCN.js → validateNonInterActiveAuth-ZNUTD3E5.js} +53 -52
- package/chunks/{version-E56RU7PR.js → version-EK7VAGSI.js} +3 -1
- package/chunks/{web-fetch-AAUCD7RM.js → web-fetch-24KZO763.js} +2 -2
- package/chunks/{web-search-HFUQF44Q.js → web-search-CRNXKZ2X.js} +184 -7
- package/chunks/{web-shell-static-POZHGGXE.js → web-shell-static-BFDESDD4.js} +5 -4
- package/chunks/{workflow-3MABM53N.js → workflow-HD5NYMW5.js} +201 -65
- package/chunks/{workspace-providers-status-2FRLBZ5I.js → workspace-providers-status-MAM42IZS.js} +24 -23
- package/chunks/{workspace-registration-store-YL7HLYYI.js → workspace-registration-store-HKLJEDQX.js} +1 -2
- package/chunks/{workspace-registry-BNRP2ELW.js → workspace-registry-7RDDOBLN.js} +18 -17
- package/chunks/{workspace-runtime-coordinator-WKGF7VHS.js → workspace-runtime-coordinator-LEPDPXJO.js} +18 -17
- package/chunks/{workspace-service-4MYO72MM.js → workspace-service-5IFDCNN3.js} +23 -22
- package/chunks/{workspace-skills-status-SU66TJLZ.js → workspace-skills-status-FJ3HNH4H.js} +22 -21
- package/chunks/{workspace-trust-reconciler-D5QT7WQB.js → workspace-trust-reconciler-PQFHIWLR.js} +23 -22
- package/chunks/{write-file-NVPQE2AZ.js → write-file-ERG67ZFX.js} +11 -11
- package/chunks/{zoom-image-RJHC66WG.js → zoom-image-WQYEC3SR.js} +2 -2
- package/cli.js +12 -12
- package/export-transcript-document.js +82 -82
- package/package.json +4 -4
- package/web-shell/assets/{abnfDiagram-VCTEODGH-DHc6plZn.js → abnfDiagram-VCTEODGH-BRLgQbnT.js} +1 -1
- package/web-shell/assets/{arc-BQ9m8TDV.js → arc-qAF9_XsR.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-D5ap3oVB.js → architectureDiagram-5GKGNRK7-BorUttEz.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-BIbnyNph.js → blockDiagram-NRAW4CY4-Bj0qZVxu.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BRsdx_iG.js → c4Diagram-UCG6FXSJ-BTqJis32.js} +1 -1
- package/web-shell/assets/channel-COIuCrVH.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-3lf1fNlx.js → chunk-2Q5K7J3B-RrQ5X8m-.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-DP8VNRc4.js → chunk-5VM5RSS4-uUjDl8wO.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-DrohDmZ6.js → chunk-F27PBJKO-C3JhpyzI.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-UZ2QhSx6.js → chunk-G27WJ6UU-C8ZNFs7F.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-BIMHVcZK.js → chunk-JWPE2WC7-DNpXtEOs.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-izRxdSDd.js → chunk-LCL6LL3I-DagA2ZLw.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-CXADD4PP.js → chunk-POPQ4Y6H-R23uH7Xm.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-B96d8Y_1.js → chunk-SVP7TREG-Qz9RN_BR.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-CF2sVQpv.js → chunk-XXDRQBXY-jYb1_hni.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DoX6OYqu.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DoX6OYqu.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-CT6tXVAS.js → cose-bilkent-JH36ORCC-Cv2OunpE.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-X1NS4vtV.js → cynefin-OW5HDTMX-LH42KFJx.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-DNsKNOT4.js → cynefinDiagram-5FMLGOSQ-Dha4_OoR.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-9-AHKqsb.js → dagre-3AP2YEHR-Br5lnUKD.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-Bjgms7j6.js → diagram-S7CK7UJ4-dpKq2bBX.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-h6bCprbE.js → diagram-UQ7AKVKN-BAgHWpXr.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-4SbQXVLt.js → diagram-VSXAHHWV-GRRzpyE2.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-B5gPCzzB.js → diagram-VX7I27RA-BNFiaYpG.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-DFJXIA3A.js → diagram-Z3DM3KII-BisZzB_h.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-FwyaU7VY.js → ebnfDiagram-PWID7BFC-B1xbwycf.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-8vJQh2te.js → erDiagram-SSCWMZ5O-CQMzbGE5.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-BzA_1gMN.js → flowDiagram-A5DVABFB-CZ_Zondl.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-Co-ABbVX.js → ganttDiagram-EL5Y4UJY-BTh2ShxS.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-DW_FcyrX.js → gitGraphDiagram-WWUBYQGX-oHOB-Uxt.js} +1 -1
- package/web-shell/assets/{index-Bu-rZoJ-.js → index-CI1ysIEv.js} +478 -474
- package/web-shell/assets/index-CpxXGH-8.css +36 -0
- package/web-shell/assets/{index-BbMXfhNG.js → index-DWoFMu5x.js} +1 -1
- package/web-shell/assets/{infoDiagram-RXCK75RN-BEgfhUFN.js → infoDiagram-RXCK75RN-C0QpudbG.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-DCsMxQmc.js → ishikawaDiagram-5VMMS53U-a6B741uT.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-DyIEYoHz.js → journeyDiagram-EYS64GPL-Dbht9ICp.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-CkxjqCNr.js → kanban-definition-3QL26DDD-D4OFR8-h.js} +1 -1
- package/web-shell/assets/{layout-BEWc0Al9.js → layout-Dvdh5jRH.js} +1 -1
- package/web-shell/assets/{linear-CNuNxirL.js → linear-Dvc6KIW2.js} +1 -1
- package/web-shell/assets/{mermaid.core-DZBre674.js → mermaid.core-CB36RfIb.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-CpafFz_F.js → mindmap-definition-FBJOCRG2-Fmqo1CjP.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-DfZqk_dq.js → pegDiagram-XKGWAZYB-CCxYBoA4.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-S0UWXlgC.js → pieDiagram-E7YTZNPT-BVHKQFzt.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-dd37_Ohj.js → quadrantDiagram-AXDQQJYC-l95IznwR.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-CH8NJZ7u.js → railroadDiagram-O6MQD6OU-BlLdRdXp.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-CFdqWYih.js → requirementDiagram-EFPCY7ZU-BkDLBR5w.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CsddcEGD.js → sankeyDiagram-P5KCCOFB-jAIqRp65.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BZ270mGw.js → sequenceDiagram-WJ2MYXX4-f-soZYPr.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-CGaS4DBV.js → sizeCapture-X5ZJPWSS-BzOuAfB2.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-COpIzMu6.js → stateDiagram-HBIQ2CUA-BPLSs12r.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-IRul-LaT.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-CMF889m3.js → swimlanes-XN3QIQJK-D-9E_RIR.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-D6lgKepA.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-BelnxYz5.js → timeline-definition-24CTP7MA-CT56K-gV.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-CU-NRqIB.js → vennDiagram-4TSXK5OY-B-vi4IyO.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-CDNKqWh-.js → wardleyDiagram-VM6X3IG4-C9O7Ju98.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-CLqguL5D.js → xychartDiagram-S5SC5T6Z-6d8w3jg2.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-X35VIWWJ.js +0 -276
- package/web-shell/assets/channel-uMMdTrYk.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DcY-26Ig.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DcY-26Ig.js +0 -1
- package/web-shell/assets/index-CsPwZ1ut.css +0 -36
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-D6qEVAji.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-mem5Jj4m.js +0 -8
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
isSameProcess,
|
|
5
|
+
readLocalBootId,
|
|
6
|
+
readPidNamespaceId,
|
|
7
|
+
readProcStartToken
|
|
8
|
+
} from "./chunk-CH2YDT6X.js";
|
|
9
|
+
import {
|
|
10
|
+
require_proper_lockfile
|
|
11
|
+
} from "./chunk-MLXTMF7H.js";
|
|
12
|
+
import {
|
|
13
|
+
Storage
|
|
14
|
+
} from "./chunk-ZAFYHRVY.js";
|
|
15
|
+
import {
|
|
16
|
+
init_esbuild_shims
|
|
17
|
+
} from "./chunk-5O2XNYP6.js";
|
|
18
|
+
import {
|
|
19
|
+
__name,
|
|
20
|
+
__toESM
|
|
21
|
+
} from "./chunk-J2S4EL5Y.js";
|
|
22
|
+
|
|
23
|
+
// packages/cli/src/commands/channel/pidfile.ts
|
|
24
|
+
init_esbuild_shims();
|
|
25
|
+
import {
|
|
26
|
+
existsSync,
|
|
27
|
+
readFileSync,
|
|
28
|
+
writeFileSync,
|
|
29
|
+
mkdirSync,
|
|
30
|
+
unlinkSync,
|
|
31
|
+
openSync,
|
|
32
|
+
closeSync,
|
|
33
|
+
constants,
|
|
34
|
+
ftruncateSync,
|
|
35
|
+
writeSync
|
|
36
|
+
} from "node:fs";
|
|
37
|
+
import * as path2 from "node:path";
|
|
38
|
+
|
|
39
|
+
// packages/cli/src/commands/channel/pidfile-lock.ts
|
|
40
|
+
init_esbuild_shims();
|
|
41
|
+
var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
|
|
42
|
+
import fs from "node:fs";
|
|
43
|
+
import path from "node:path";
|
|
44
|
+
var RETRY_DELAYS_MS = [10, 20, 30, 40, 50];
|
|
45
|
+
var STALE_LOCK_MS = 1e4;
|
|
46
|
+
var sleepState = new Int32Array(new SharedArrayBuffer(4));
|
|
47
|
+
function sleepSync(ms) {
|
|
48
|
+
Atomics.wait(sleepState, 0, 0, ms);
|
|
49
|
+
}
|
|
50
|
+
__name(sleepSync, "sleepSync");
|
|
51
|
+
function withChannelPidfileLock(filePath, operation) {
|
|
52
|
+
const dir = path.dirname(filePath);
|
|
53
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
54
|
+
let release;
|
|
55
|
+
for (let attempt = 0; ; attempt += 1) {
|
|
56
|
+
try {
|
|
57
|
+
release = import_proper_lockfile.default.lockSync(filePath, {
|
|
58
|
+
realpath: false,
|
|
59
|
+
stale: STALE_LOCK_MS
|
|
60
|
+
});
|
|
61
|
+
break;
|
|
62
|
+
} catch (error) {
|
|
63
|
+
const lockError = error;
|
|
64
|
+
if (lockError.code !== "ELOCKED") {
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
if (attempt >= RETRY_DELAYS_MS.length) {
|
|
68
|
+
throw Object.assign(
|
|
69
|
+
new Error(
|
|
70
|
+
`Channel pidfile lock ${filePath}.lock is held; an abandoned lock recovers automatically after ${STALE_LOCK_MS / 1e3} seconds.`,
|
|
71
|
+
{ cause: error }
|
|
72
|
+
),
|
|
73
|
+
{ code: "ELOCKED" }
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
sleepSync(RETRY_DELAYS_MS[attempt]);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
try {
|
|
80
|
+
return operation();
|
|
81
|
+
} finally {
|
|
82
|
+
release();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
__name(withChannelPidfileLock, "withChannelPidfileLock");
|
|
86
|
+
|
|
87
|
+
// packages/cli/src/commands/channel/pidfile.ts
|
|
88
|
+
function pidFilePath() {
|
|
89
|
+
return path2.join(Storage.getGlobalQwenDir(), "channels", "service.pid");
|
|
90
|
+
}
|
|
91
|
+
__name(pidFilePath, "pidFilePath");
|
|
92
|
+
function isValidPid(pid) {
|
|
93
|
+
return typeof pid === "number" && Number.isSafeInteger(pid) && pid > 0;
|
|
94
|
+
}
|
|
95
|
+
__name(isValidPid, "isValidPid");
|
|
96
|
+
function parseServiceInfo(value) {
|
|
97
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
const info = value;
|
|
101
|
+
const owner = info.owner ?? "channel";
|
|
102
|
+
if (owner !== "channel" && owner !== "serve") return null;
|
|
103
|
+
if (!isValidPid(info.pid) || typeof info.startedAt !== "string" || Number.isNaN(Date.parse(info.startedAt)) || !Array.isArray(info.channels) || !info.channels.every((channel) => typeof channel === "string")) {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
if (info.servePid !== void 0 && !isValidPid(info.servePid)) return null;
|
|
107
|
+
if (info.workerPid !== void 0 && !isValidPid(info.workerPid)) return null;
|
|
108
|
+
if (info.procStart !== void 0 && info.procStart !== null && typeof info.procStart !== "string") {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
if (info.pidNs !== void 0 && info.pidNs !== null && typeof info.pidNs !== "number") {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
const workers = parseServiceInfoWorkers(info.workers);
|
|
115
|
+
if (workers === null) return null;
|
|
116
|
+
return {
|
|
117
|
+
owner,
|
|
118
|
+
pid: info.pid,
|
|
119
|
+
...info.procStart !== void 0 ? { procStart: info.procStart } : {},
|
|
120
|
+
...info.pidNs !== void 0 ? { pidNs: info.pidNs } : {},
|
|
121
|
+
startedAt: info.startedAt,
|
|
122
|
+
channels: info.channels,
|
|
123
|
+
...info.servePid !== void 0 ? { servePid: info.servePid } : {},
|
|
124
|
+
...info.workerPid !== void 0 ? { workerPid: info.workerPid } : {},
|
|
125
|
+
...workers !== void 0 ? { workers } : {}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
__name(parseServiceInfo, "parseServiceInfo");
|
|
129
|
+
function parseServiceInfoWorkers(value) {
|
|
130
|
+
if (value === void 0) return void 0;
|
|
131
|
+
if (!Array.isArray(value)) return null;
|
|
132
|
+
const workers = [];
|
|
133
|
+
for (const raw of value) {
|
|
134
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
const worker = raw;
|
|
138
|
+
if (!Array.isArray(worker.channels) || !worker.channels.every((channel) => typeof channel === "string")) {
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
if (worker.workspaceId !== void 0 && typeof worker.workspaceId !== "string") {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
if (worker.workspaceCwd !== void 0 && typeof worker.workspaceCwd !== "string") {
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
if (worker.workerPid !== void 0 && !isValidPid(worker.workerPid)) {
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
workers.push({
|
|
151
|
+
channels: worker.channels,
|
|
152
|
+
...worker.workspaceId !== void 0 ? { workspaceId: worker.workspaceId } : {},
|
|
153
|
+
...worker.workspaceCwd !== void 0 ? { workspaceCwd: worker.workspaceCwd } : {},
|
|
154
|
+
...worker.workerPid !== void 0 ? { workerPid: worker.workerPid } : {}
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
return workers;
|
|
158
|
+
}
|
|
159
|
+
__name(parseServiceInfoWorkers, "parseServiceInfoWorkers");
|
|
160
|
+
function unlinkPidFile(filePath) {
|
|
161
|
+
try {
|
|
162
|
+
unlinkSync(filePath);
|
|
163
|
+
return true;
|
|
164
|
+
} catch {
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
__name(unlinkPidFile, "unlinkPidFile");
|
|
169
|
+
function bootIdOf(procStart) {
|
|
170
|
+
if (procStart == null) return null;
|
|
171
|
+
const separator = procStart.indexOf(":");
|
|
172
|
+
return separator === -1 ? null : procStart.slice(0, separator);
|
|
173
|
+
}
|
|
174
|
+
__name(bootIdOf, "bootIdOf");
|
|
175
|
+
function isLocalIdentity(info) {
|
|
176
|
+
if (info.pidNs !== void 0 && info.pidNs !== readPidNamespaceId()) {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
const recordBootId = bootIdOf(info.procStart);
|
|
180
|
+
return recordBootId === null || recordBootId === readLocalBootId();
|
|
181
|
+
}
|
|
182
|
+
__name(isLocalIdentity, "isLocalIdentity");
|
|
183
|
+
function isOwnServeReservation(info, servePid) {
|
|
184
|
+
return info !== null && info.owner === "serve" && info.pid === servePid && info.servePid === servePid && isLocalIdentity(info);
|
|
185
|
+
}
|
|
186
|
+
__name(isOwnServeReservation, "isOwnServeReservation");
|
|
187
|
+
function withPidFileLock(operation) {
|
|
188
|
+
const filePath = pidFilePath();
|
|
189
|
+
return withChannelPidfileLock(filePath, () => operation(filePath));
|
|
190
|
+
}
|
|
191
|
+
__name(withPidFileLock, "withPidFileLock");
|
|
192
|
+
function readServiceInfo() {
|
|
193
|
+
const filePath = pidFilePath();
|
|
194
|
+
if (!existsSync(filePath)) return null;
|
|
195
|
+
try {
|
|
196
|
+
return withChannelPidfileLock(
|
|
197
|
+
filePath,
|
|
198
|
+
() => readServiceInfoRecord(filePath, true)
|
|
199
|
+
);
|
|
200
|
+
} catch {
|
|
201
|
+
return readServiceInfoRecord(filePath, false);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
__name(readServiceInfo, "readServiceInfo");
|
|
205
|
+
function readServiceInfoRecord(filePath, sweep) {
|
|
206
|
+
if (!existsSync(filePath)) return null;
|
|
207
|
+
let raw;
|
|
208
|
+
try {
|
|
209
|
+
raw = readFileSync(filePath, "utf-8");
|
|
210
|
+
} catch {
|
|
211
|
+
return null;
|
|
212
|
+
}
|
|
213
|
+
let parsed;
|
|
214
|
+
try {
|
|
215
|
+
parsed = JSON.parse(raw);
|
|
216
|
+
} catch {
|
|
217
|
+
if (sweep) unlinkPidFile(filePath);
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
const info = parseServiceInfo(parsed);
|
|
221
|
+
if (!info) {
|
|
222
|
+
if (sweep) unlinkPidFile(filePath);
|
|
223
|
+
return null;
|
|
224
|
+
}
|
|
225
|
+
if (!isLocalIdentity(info)) {
|
|
226
|
+
return null;
|
|
227
|
+
}
|
|
228
|
+
if (!isSameProcess(info.pid, info.procStart)) {
|
|
229
|
+
if (sweep) unlinkPidFile(filePath);
|
|
230
|
+
return null;
|
|
231
|
+
}
|
|
232
|
+
return info;
|
|
233
|
+
}
|
|
234
|
+
__name(readServiceInfoRecord, "readServiceInfoRecord");
|
|
235
|
+
function writeInfo(info, flag = "w") {
|
|
236
|
+
const filePath = pidFilePath();
|
|
237
|
+
const dir = path2.dirname(filePath);
|
|
238
|
+
if (!existsSync(dir)) {
|
|
239
|
+
mkdirSync(dir, { recursive: true });
|
|
240
|
+
}
|
|
241
|
+
writeFileSync(filePath, JSON.stringify(info, null, 2), {
|
|
242
|
+
encoding: "utf-8",
|
|
243
|
+
flag
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
__name(writeInfo, "writeInfo");
|
|
247
|
+
function fileExistsError(message) {
|
|
248
|
+
const err = new Error(message);
|
|
249
|
+
err.code = "EEXIST";
|
|
250
|
+
return err;
|
|
251
|
+
}
|
|
252
|
+
__name(fileExistsError, "fileExistsError");
|
|
253
|
+
function writeInfoExclusive(info) {
|
|
254
|
+
const filePath = pidFilePath();
|
|
255
|
+
try {
|
|
256
|
+
writeInfo(info, "wx");
|
|
257
|
+
} catch (err) {
|
|
258
|
+
if (err.code !== "EEXIST") throw err;
|
|
259
|
+
let existing = null;
|
|
260
|
+
try {
|
|
261
|
+
existing = parseServiceInfo(JSON.parse(readFileSync(filePath, "utf-8")));
|
|
262
|
+
} catch {
|
|
263
|
+
throw err;
|
|
264
|
+
}
|
|
265
|
+
if (existing && !isLocalIdentity(existing)) {
|
|
266
|
+
const conflict = new Error(
|
|
267
|
+
`Channel service pidfile ${filePath} holds a record this machine cannot verify, written before a reboot or by another machine or PID namespace sharing this home. Confirm no channel service is running, then delete that file to start again.`
|
|
268
|
+
);
|
|
269
|
+
conflict.code = "channel_service_conflict";
|
|
270
|
+
throw conflict;
|
|
271
|
+
}
|
|
272
|
+
if (existing && isSameProcess(existing.pid, existing.procStart)) {
|
|
273
|
+
throw err;
|
|
274
|
+
}
|
|
275
|
+
unlinkPidFile(filePath);
|
|
276
|
+
writeInfo(info, "wx");
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
__name(writeInfoExclusive, "writeInfoExclusive");
|
|
280
|
+
function readPidfileProcessToken(pid) {
|
|
281
|
+
let procStart = readProcStartToken(pid);
|
|
282
|
+
if (process.platform !== "linux" || procStart !== null) return procStart;
|
|
283
|
+
procStart = readProcStartToken(pid);
|
|
284
|
+
if (procStart !== null) return procStart;
|
|
285
|
+
throw new Error(
|
|
286
|
+
`Unable to read the process start token for PID ${pid}; refusing to write an impersonable Channel pidfile.`
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
__name(readPidfileProcessToken, "readPidfileProcessToken");
|
|
290
|
+
function readPidfileNamespaceId() {
|
|
291
|
+
let pidNs = readPidNamespaceId();
|
|
292
|
+
if (process.platform !== "linux" || pidNs !== null) return pidNs;
|
|
293
|
+
pidNs = readPidNamespaceId();
|
|
294
|
+
if (pidNs !== null) return pidNs;
|
|
295
|
+
throw new Error(
|
|
296
|
+
"Unable to read the PID namespace id; refusing to write an unreclaimable Channel pidfile."
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
__name(readPidfileNamespaceId, "readPidfileNamespaceId");
|
|
300
|
+
function writeServiceInfo(channels) {
|
|
301
|
+
const info = {
|
|
302
|
+
owner: "channel",
|
|
303
|
+
pid: process.pid,
|
|
304
|
+
procStart: readPidfileProcessToken(process.pid),
|
|
305
|
+
pidNs: readPidfileNamespaceId(),
|
|
306
|
+
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
307
|
+
channels
|
|
308
|
+
};
|
|
309
|
+
withPidFileLock(() => writeInfoExclusive(info));
|
|
310
|
+
}
|
|
311
|
+
__name(writeServiceInfo, "writeServiceInfo");
|
|
312
|
+
function writeServeServiceInfo({
|
|
313
|
+
channels,
|
|
314
|
+
servePid = process.pid,
|
|
315
|
+
workerPid,
|
|
316
|
+
workers
|
|
317
|
+
}) {
|
|
318
|
+
const buildInfo = /* @__PURE__ */ __name((startedAt, procStart) => ({
|
|
319
|
+
owner: "serve",
|
|
320
|
+
pid: servePid,
|
|
321
|
+
procStart,
|
|
322
|
+
pidNs: readPidfileNamespaceId(),
|
|
323
|
+
startedAt,
|
|
324
|
+
channels,
|
|
325
|
+
servePid,
|
|
326
|
+
...workerPid !== void 0 ? { workerPid } : {},
|
|
327
|
+
...workers !== void 0 ? { workers } : {}
|
|
328
|
+
}), "buildInfo");
|
|
329
|
+
withPidFileLock((filePath) => {
|
|
330
|
+
let fd;
|
|
331
|
+
try {
|
|
332
|
+
fd = openSync(filePath, constants.O_RDWR | constants.O_NOFOLLOW);
|
|
333
|
+
} catch (err) {
|
|
334
|
+
if (err.code === "ENOENT") {
|
|
335
|
+
writeInfo(
|
|
336
|
+
buildInfo(
|
|
337
|
+
(/* @__PURE__ */ new Date()).toISOString(),
|
|
338
|
+
readPidfileProcessToken(servePid)
|
|
339
|
+
),
|
|
340
|
+
"wx"
|
|
341
|
+
);
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
throw err;
|
|
345
|
+
}
|
|
346
|
+
try {
|
|
347
|
+
let existing = null;
|
|
348
|
+
try {
|
|
349
|
+
existing = parseServiceInfo(JSON.parse(readFileSync(fd, "utf-8")));
|
|
350
|
+
} catch {
|
|
351
|
+
}
|
|
352
|
+
if (!isOwnServeReservation(existing, servePid)) {
|
|
353
|
+
throw fileExistsError(
|
|
354
|
+
"Channel service pidfile is owned by another process."
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
const info = buildInfo(
|
|
358
|
+
existing.startedAt,
|
|
359
|
+
existing.procStart ?? readPidfileProcessToken(servePid)
|
|
360
|
+
);
|
|
361
|
+
ftruncateSync(fd, 0);
|
|
362
|
+
writeSync(fd, JSON.stringify(info, null, 2), 0, "utf-8");
|
|
363
|
+
} finally {
|
|
364
|
+
closeSync(fd);
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
__name(writeServeServiceInfo, "writeServeServiceInfo");
|
|
369
|
+
function reserveServeServiceInfo({
|
|
370
|
+
channels,
|
|
371
|
+
servePid = process.pid
|
|
372
|
+
}) {
|
|
373
|
+
const info = {
|
|
374
|
+
owner: "serve",
|
|
375
|
+
pid: servePid,
|
|
376
|
+
procStart: readPidfileProcessToken(servePid),
|
|
377
|
+
pidNs: readPidfileNamespaceId(),
|
|
378
|
+
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
379
|
+
channels,
|
|
380
|
+
servePid
|
|
381
|
+
};
|
|
382
|
+
withPidFileLock(() => writeInfoExclusive(info));
|
|
383
|
+
}
|
|
384
|
+
__name(reserveServeServiceInfo, "reserveServeServiceInfo");
|
|
385
|
+
function removeServiceInfo(expected) {
|
|
386
|
+
try {
|
|
387
|
+
withPidFileLock((filePath) => {
|
|
388
|
+
if (!expected) {
|
|
389
|
+
if (existsSync(filePath)) unlinkPidFile(filePath);
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
try {
|
|
393
|
+
const current = parseServiceInfo(
|
|
394
|
+
JSON.parse(readFileSync(filePath, "utf-8"))
|
|
395
|
+
);
|
|
396
|
+
if (current?.owner === expected.owner && current.pid === expected.pid && current.procStart === expected.procStart && current.startedAt === expected.startedAt) {
|
|
397
|
+
unlinkPidFile(filePath);
|
|
398
|
+
}
|
|
399
|
+
} catch {
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
} catch {
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
__name(removeServiceInfo, "removeServiceInfo");
|
|
406
|
+
function removeServeServiceInfo(servePid = process.pid) {
|
|
407
|
+
try {
|
|
408
|
+
return withPidFileLock((filePath) => {
|
|
409
|
+
if (!existsSync(filePath)) return false;
|
|
410
|
+
let parsed;
|
|
411
|
+
try {
|
|
412
|
+
parsed = JSON.parse(readFileSync(filePath, "utf-8"));
|
|
413
|
+
} catch {
|
|
414
|
+
return false;
|
|
415
|
+
}
|
|
416
|
+
if (!isOwnServeReservation(parseServiceInfo(parsed), servePid)) {
|
|
417
|
+
return false;
|
|
418
|
+
}
|
|
419
|
+
return unlinkPidFile(filePath);
|
|
420
|
+
});
|
|
421
|
+
} catch {
|
|
422
|
+
return false;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
__name(removeServeServiceInfo, "removeServeServiceInfo");
|
|
426
|
+
function signalService(pid, signal = "SIGTERM", procStart) {
|
|
427
|
+
if (!isValidPid(pid)) {
|
|
428
|
+
return "refused";
|
|
429
|
+
}
|
|
430
|
+
if (procStart != null) {
|
|
431
|
+
const current = readProcStartToken(pid) ?? readProcStartToken(pid);
|
|
432
|
+
if (current !== procStart) return "refused";
|
|
433
|
+
}
|
|
434
|
+
try {
|
|
435
|
+
process.kill(pid, signal);
|
|
436
|
+
return "sent";
|
|
437
|
+
} catch (err) {
|
|
438
|
+
return err.code === "EPERM" ? "not-permitted" : "refused";
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
__name(signalService, "signalService");
|
|
442
|
+
async function waitForExit(pid, timeoutMs = 5e3, pollMs = 200, procStart) {
|
|
443
|
+
const isOriginalProcessAlive = /* @__PURE__ */ __name(() => isSameProcess(pid, procStart), "isOriginalProcessAlive");
|
|
444
|
+
const start = Date.now();
|
|
445
|
+
while (Date.now() - start < timeoutMs) {
|
|
446
|
+
if (!isOriginalProcessAlive()) return true;
|
|
447
|
+
await new Promise((r) => setTimeout(r, pollMs));
|
|
448
|
+
}
|
|
449
|
+
return !isOriginalProcessAlive();
|
|
450
|
+
}
|
|
451
|
+
__name(waitForExit, "waitForExit");
|
|
452
|
+
|
|
453
|
+
export {
|
|
454
|
+
pidFilePath,
|
|
455
|
+
readServiceInfo,
|
|
456
|
+
writeServiceInfo,
|
|
457
|
+
writeServeServiceInfo,
|
|
458
|
+
reserveServeServiceInfo,
|
|
459
|
+
removeServiceInfo,
|
|
460
|
+
removeServeServiceInfo,
|
|
461
|
+
signalService,
|
|
462
|
+
waitForExit
|
|
463
|
+
};
|
|
@@ -244,6 +244,19 @@ function convertLlmToolParametersToOpenAI(parameters) {
|
|
|
244
244
|
}
|
|
245
245
|
__name(convertLlmToolParametersToOpenAI, "convertLlmToolParametersToOpenAI");
|
|
246
246
|
var grammarSchemaValidationCache = /* @__PURE__ */ new WeakMap();
|
|
247
|
+
var PARAMETERLESS_SCHEMA_KEYS = /* @__PURE__ */ new Set([
|
|
248
|
+
"$comment",
|
|
249
|
+
"$schema",
|
|
250
|
+
"additionalProperties",
|
|
251
|
+
"deprecated",
|
|
252
|
+
"description",
|
|
253
|
+
"examples",
|
|
254
|
+
"properties",
|
|
255
|
+
"readOnly",
|
|
256
|
+
"title",
|
|
257
|
+
"type",
|
|
258
|
+
"writeOnly"
|
|
259
|
+
]);
|
|
247
260
|
function isStrictlyValidSchema(schema) {
|
|
248
261
|
const cached = grammarSchemaValidationCache.get(schema);
|
|
249
262
|
if (cached !== void 0) {
|
|
@@ -278,13 +291,24 @@ async function convertLlmToolsToOpenAI(llmTools, schemaCompliance = "auto") {
|
|
|
278
291
|
);
|
|
279
292
|
}
|
|
280
293
|
if (parameters) {
|
|
281
|
-
const sourceSchema = func.parametersJsonSchema;
|
|
282
|
-
const canValidateLocally =
|
|
294
|
+
const sourceSchema = typeof func.parametersJsonSchema === "object" && func.parametersJsonSchema !== null && !Array.isArray(func.parametersJsonSchema) ? func.parametersJsonSchema : void 0;
|
|
295
|
+
const canValidateLocally = sourceSchema !== void 0 && !("$id" in sourceSchema) && isStrictlyValidSchema(sourceSchema);
|
|
296
|
+
const sourceProperties = sourceSchema?.["properties"];
|
|
297
|
+
const sourceAdditionalProperties = sourceSchema?.["additionalProperties"];
|
|
298
|
+
const hasEmptyProperties = typeof sourceProperties === "object" && sourceProperties !== null && !Array.isArray(sourceProperties) && Object.keys(sourceProperties).length === 0;
|
|
299
|
+
const declaresEmptyArgumentList = sourceSchema !== void 0 && (hasEmptyProperties && (sourceAdditionalProperties === false || sourceAdditionalProperties === void 0) || sourceProperties === void 0 && sourceAdditionalProperties === false) && Object.keys(sourceSchema).every(
|
|
300
|
+
(key) => PARAMETERLESS_SCHEMA_KEYS.has(key)
|
|
301
|
+
);
|
|
283
302
|
parameters = convertSchema(parameters, schemaCompliance);
|
|
284
303
|
parameters = relaxSchemaForFunctionCalling(
|
|
285
304
|
parameters,
|
|
286
305
|
canValidateLocally
|
|
287
306
|
);
|
|
307
|
+
if (canValidateLocally && declaresEmptyArgumentList && parameters["type"] === "object" && Object.keys(parameters).every(
|
|
308
|
+
(key) => PARAMETERLESS_SCHEMA_KEYS.has(key)
|
|
309
|
+
)) {
|
|
310
|
+
parameters = void 0;
|
|
311
|
+
}
|
|
288
312
|
}
|
|
289
313
|
openAITools.push({
|
|
290
314
|
type: "function",
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
isActiveWorkflowStatus,
|
|
5
5
|
isTerminalWorkflowStatus,
|
|
6
6
|
isWorkflowRunPersistenceActive
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HJ5UJQQL.js";
|
|
8
8
|
import {
|
|
9
9
|
atomicWriteFile
|
|
10
10
|
} from "./chunk-XFFRI3WM.js";
|
|
@@ -881,6 +881,17 @@ function createWorkflowSandbox(opts) {
|
|
|
881
881
|
isAbort = false;
|
|
882
882
|
}
|
|
883
883
|
if (isAbort || __b.isRunAborted()) vmErr.__wfAbort = true;
|
|
884
|
+
var isRunFailure = false;
|
|
885
|
+
try {
|
|
886
|
+
isRunFailure = !!(hostErr && (
|
|
887
|
+
hostErr.__wfRunFailure === true ||
|
|
888
|
+
hostErr.name === 'WorkflowBudgetExceededError' ||
|
|
889
|
+
hostErr.name === 'WorkflowAgentCapExceededError'
|
|
890
|
+
));
|
|
891
|
+
} catch (e) {
|
|
892
|
+
isRunFailure = false;
|
|
893
|
+
}
|
|
894
|
+
if (isRunFailure) vmErr.__wfRunFailure = true;
|
|
884
895
|
vmErr.__wfDispatchFailed = true;
|
|
885
896
|
return vmErr;
|
|
886
897
|
}
|
|
@@ -1873,6 +1884,7 @@ function toSnapshot(task) {
|
|
|
1873
1884
|
})),
|
|
1874
1885
|
agentsDispatched: task.agentsDispatched,
|
|
1875
1886
|
agentsCompleted: task.agentsCompleted,
|
|
1887
|
+
agentsRespawned: task.agentsRespawned ?? 0,
|
|
1876
1888
|
tokensSpent: task.tokensSpent,
|
|
1877
1889
|
tokenBudgetTotal: task.tokenBudgetTotal,
|
|
1878
1890
|
perPhaseTokens: Array.from(task.perPhaseTokens.entries()),
|
|
@@ -2050,7 +2062,7 @@ function isWorkflowSnapshot(value) {
|
|
|
2050
2062
|
const dispatches = value["dispatches"];
|
|
2051
2063
|
const events = value["events"];
|
|
2052
2064
|
const perPhaseTokens = value["perPhaseTokens"];
|
|
2053
|
-
return typeof value["runId"] === "string" && value["runId"].length > 0 && isOptionalString(value["toolUseId"]) && isOptionalString(value["description"]) && isOptionalString(value["workflowName"]) && isOptionalString(value["sourceRunId"]) && (value["startMode"] === void 0 || value["startMode"] === "retry" || value["startMode"] === "rerun") && isWorkflowMeta(value["meta"]) && (status === "completed" || status === "failed" || status === "cancelled") && typeof value["script"] === "string" && isOptionalString(value["scriptPath"]) && isStringArray(value["phases"]) && (phaseVisits === void 0 || Array.isArray(phaseVisits) && phaseVisits.every(isWorkflowPhaseVisit)) && (dispatches === void 0 || Array.isArray(dispatches) && dispatches.every(isWorkflowDispatch)) && (events === void 0 || Array.isArray(events) && events.every(isWorkflowEvent)) && isFiniteNumber(value["agentsDispatched"]) && isFiniteNumber(value["agentsCompleted"]) && isFiniteNumber(value["tokensSpent"]) && (value["tokenBudgetTotal"] === null || isFiniteNumber(value["tokenBudgetTotal"])) && Array.isArray(perPhaseTokens) && perPhaseTokens.every(
|
|
2065
|
+
return typeof value["runId"] === "string" && value["runId"].length > 0 && isOptionalString(value["toolUseId"]) && isOptionalString(value["description"]) && isOptionalString(value["workflowName"]) && isOptionalString(value["sourceRunId"]) && (value["startMode"] === void 0 || value["startMode"] === "retry" || value["startMode"] === "rerun") && isWorkflowMeta(value["meta"]) && (status === "completed" || status === "failed" || status === "cancelled") && typeof value["script"] === "string" && isOptionalString(value["scriptPath"]) && isStringArray(value["phases"]) && (phaseVisits === void 0 || Array.isArray(phaseVisits) && phaseVisits.every(isWorkflowPhaseVisit)) && (dispatches === void 0 || Array.isArray(dispatches) && dispatches.every(isWorkflowDispatch)) && (events === void 0 || Array.isArray(events) && events.every(isWorkflowEvent)) && isFiniteNumber(value["agentsDispatched"]) && isFiniteNumber(value["agentsCompleted"]) && (value["agentsRespawned"] === void 0 || isFiniteNumber(value["agentsRespawned"])) && isFiniteNumber(value["tokensSpent"]) && (value["tokenBudgetTotal"] === null || isFiniteNumber(value["tokenBudgetTotal"])) && Array.isArray(perPhaseTokens) && perPhaseTokens.every(
|
|
2054
2066
|
(entry) => Array.isArray(entry) && entry.length === 2 && (entry[0] === null || typeof entry[0] === "string") && isFiniteNumber(entry[1])
|
|
2055
2067
|
) && isStringArray(value["recentLogs"]) && isFiniteNumber(value["startTime"]) && (value["endTime"] === void 0 || isFiniteNumber(value["endTime"])) && isOptionalString(value["error"]);
|
|
2056
2068
|
}
|
|
@@ -255,15 +255,15 @@ function ensureBuiltins() {
|
|
|
255
255
|
if (!builtinsPromise) {
|
|
256
256
|
builtinsPromise = (async () => {
|
|
257
257
|
const labelled = [
|
|
258
|
-
{ name: "telegram", promise: import("./dist-
|
|
259
|
-
{ name: "weixin", promise: import("./dist-
|
|
260
|
-
{ name: "dingtalk", promise: import("./dist-
|
|
261
|
-
{ name: "dws", promise: import("./dist-
|
|
262
|
-
{ name: "wecom", promise: import("./dist-
|
|
263
|
-
{ name: "feishu", promise: import("./dist-
|
|
264
|
-
{ name: "qqbot", promise: import("./dist-
|
|
265
|
-
{ name: "github", promise: import("./dist-
|
|
266
|
-
{ name: "gitlab", promise: import("./dist-
|
|
258
|
+
{ name: "telegram", promise: import("./dist-F6JLAJLE.js") },
|
|
259
|
+
{ name: "weixin", promise: import("./dist-NP7QKLVG.js") },
|
|
260
|
+
{ name: "dingtalk", promise: import("./dist-6YDUH3BB.js") },
|
|
261
|
+
{ name: "dws", promise: import("./dist-Y5KC3IHW.js") },
|
|
262
|
+
{ name: "wecom", promise: import("./dist-F34J4FZX.js") },
|
|
263
|
+
{ name: "feishu", promise: import("./dist-ZDNJK74R.js") },
|
|
264
|
+
{ name: "qqbot", promise: import("./dist-BNQVF565.js") },
|
|
265
|
+
{ name: "github", promise: import("./dist-XLV33CLY.js") },
|
|
266
|
+
{ name: "gitlab", promise: import("./dist-UFTFGI6I.js") }
|
|
267
267
|
];
|
|
268
268
|
const results = await Promise.allSettled(labelled.map((l) => l.promise));
|
|
269
269
|
for (let i = 0; i < results.length; i++) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
|
+
isDocumentNavigation,
|
|
4
5
|
require_express
|
|
5
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SVWWF5TZ.js";
|
|
6
7
|
import {
|
|
7
8
|
isLoopbackAddress
|
|
8
9
|
} from "./chunk-DMEUXLSS.js";
|
|
@@ -92,24 +93,6 @@ function buildWebShellCsp(frameAncestors = [], frameSrcOrigins = loopbackSandbox
|
|
|
92
93
|
}
|
|
93
94
|
__name(buildWebShellCsp, "buildWebShellCsp");
|
|
94
95
|
var WEB_SHELL_CSP = buildWebShellCsp();
|
|
95
|
-
function isDocumentNavigation(req) {
|
|
96
|
-
const fetchMode = req.headers["sec-fetch-mode"];
|
|
97
|
-
const fetchDest = req.headers["sec-fetch-dest"];
|
|
98
|
-
const accept = req.headers.accept ?? "";
|
|
99
|
-
return fetchMode === "navigate" || fetchDest === "document" || accept.trim().toLowerCase().startsWith("text/html");
|
|
100
|
-
}
|
|
101
|
-
__name(isDocumentNavigation, "isDocumentNavigation");
|
|
102
|
-
var SESSION_DEEP_LINK_PATH = /^\/session\/[^/]+\/?$/u;
|
|
103
|
-
function isPreAuthWebShellRequest(req) {
|
|
104
|
-
if (req.method !== "GET" && req.method !== "HEAD") return false;
|
|
105
|
-
const reqPath = req.path.toLowerCase();
|
|
106
|
-
if (reqPath === "/" || // Express non-strict routing compiles `/` to `/^(?:\/)(?:\/$)?$/i`, so
|
|
107
|
-
// a raw `//` also matches `app.get('/')` pre-auth (but `///` does not).
|
|
108
|
-
reqPath === "//" || reqPath === "/assets" || reqPath.startsWith("/assets/") || reqPath === "/mcp-app-sandbox")
|
|
109
|
-
return true;
|
|
110
|
-
return SESSION_DEEP_LINK_PATH.test(reqPath) && isDocumentNavigation(req);
|
|
111
|
-
}
|
|
112
|
-
__name(isPreAuthWebShellRequest, "isPreAuthWebShellRequest");
|
|
113
96
|
function createSendIndex(webShellDir, frameAncestors = []) {
|
|
114
97
|
const indexPath = path.join(webShellDir, "index.html");
|
|
115
98
|
return (req, res) => {
|
|
@@ -193,8 +176,6 @@ export {
|
|
|
193
176
|
buildWebShellPermissionsPolicy,
|
|
194
177
|
buildWebShellCsp,
|
|
195
178
|
WEB_SHELL_CSP,
|
|
196
|
-
isDocumentNavigation,
|
|
197
|
-
isPreAuthWebShellRequest,
|
|
198
179
|
mountWebShellAssets,
|
|
199
180
|
mountWebShellSpaFallback
|
|
200
181
|
};
|