@qwen-code/qwen-code 0.21.7 → 0.21.8
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/README.md +2 -0
- package/bundled/qc-helper/docs/configuration/settings.md +43 -30
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +40 -2
- package/bundled/qc-helper/docs/features/channels/feishu.md +13 -2
- package/bundled/qc-helper/docs/features/channels/github.md +13 -11
- package/bundled/qc-helper/docs/features/channels/gitlab.md +13 -11
- package/bundled/qc-helper/docs/features/channels/overview.md +49 -31
- package/bundled/qc-helper/docs/features/channels/plugins.md +2 -2
- package/bundled/qc-helper/docs/features/channels/qqbot.md +4 -2
- package/bundled/qc-helper/docs/features/channels/telegram.md +4 -2
- package/bundled/qc-helper/docs/features/channels/wecom.md +1 -1
- package/bundled/qc-helper/docs/features/code-review.md +4 -0
- package/bundled/qc-helper/docs/features/commands.md +1 -1
- package/bundled/qc-helper/docs/features/hooks.md +52 -0
- package/bundled/qc-helper/docs/integration-jetbrains.md +1 -0
- package/bundled/qc-helper/docs/qwen-serve.md +4 -1
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +50 -36
- package/bundled/review/SKILL.md +28 -5
- package/chunks/{MaxSizedBox-ANWZBPTS.js → MaxSizedBox-7PM6BGJ5.js} +26 -22
- package/chunks/{StandaloneSessionPicker-XKS3VU3A.js → StandaloneSessionPicker-3UQHM7GV.js} +44 -40
- package/chunks/{acp-startup-profiler-ORIQ2CCQ.js → acp-startup-profiler-B5BYAMYQ.js} +2 -2
- package/chunks/{acpAgent-KUAZ3GCZ.js → acpAgent-5UWLFV6V.js} +534 -262
- package/chunks/{agent-T6PTGX5R.js → agent-624T2BLO.js} +26 -22
- package/chunks/{agent-headless-PR7YCB7S.js → agent-headless-2EE5J2KX.js} +26 -22
- package/chunks/{artifact-tool-U4VOZIK5.js → artifact-tool-N652YE4L.js} +1 -1
- package/chunks/{askUserQuestion-XOBQLPFA.js → askUserQuestion-ONW74PKJ.js} +1 -1
- package/chunks/{bridge-NU6YEEHK.js → bridge-JENKGFFP.js} +29 -25
- package/chunks/{ca-NYKNH222.js → ca-ZLKAB4K3.js} +6 -0
- package/chunks/{channel-management-service-FSQ7SHYI.js → channel-management-service-DDWUPHMU.js} +19 -10
- package/chunks/{channel-settings-store-35VQVUVV.js → channel-settings-store-SA6JZSPH.js} +34 -30
- package/chunks/{channel-worker-group-JWQK224X.js → channel-worker-group-E67EN3RV.js} +5 -5
- package/chunks/{channel-worker-manager-77E3OXRQ.js → channel-worker-manager-SW4C45CF.js} +5 -5
- package/chunks/{channel-worker-supervisor-62YWUGP2.js → channel-worker-supervisor-5SRD24FG.js} +3 -3
- package/chunks/{chunk-CJXIIILK.js → chunk-2FRY5CRX.js} +1 -1
- package/chunks/{chunk-ZJ3VGYHK.js → chunk-2ILAOM2I.js} +34 -17
- package/chunks/{chunk-6XJMFJ4D.js → chunk-2M4K4KYS.js} +177 -120
- package/chunks/{chunk-CNIID3TV.js → chunk-2UUMVNYT.js} +1 -1
- package/chunks/{chunk-22NBYCPD.js → chunk-3P2LV43B.js} +1 -1
- package/chunks/{chunk-2U3WZGZG.js → chunk-3PY4LPJF.js} +19 -131
- package/chunks/{chunk-SPMY6CX6.js → chunk-3SE7J4DR.js} +3 -3
- package/chunks/{chunk-6UWFTUQL.js → chunk-3WNQOYHQ.js} +66 -22
- package/chunks/{chunk-KXSDEOFU.js → chunk-4ALIARFY.js} +1 -1
- package/chunks/{chunk-D3UEZIQH.js → chunk-4DU3NCHG.js} +48 -55
- package/chunks/{chunk-BGG4MBYD.js → chunk-4PYCZH2V.js} +4 -187
- package/chunks/{chunk-H2UQ2M5Z.js → chunk-4WU6NY7F.js} +96 -22
- package/chunks/{chunk-TLV2IMHR.js → chunk-5ZGR6RKJ.js} +3 -3
- package/chunks/{chunk-3K7FH2KQ.js → chunk-67N6HB5H.js} +1310 -171
- package/chunks/{chunk-EORNAQDT.js → chunk-6TR7CFXH.js} +1 -1
- package/chunks/{chunk-NG2R4N5O.js → chunk-6ZRFAKXK.js} +1 -1
- package/chunks/{chunk-P2AJ7FTI.js → chunk-757GB46F.js} +1 -1
- package/chunks/{chunk-72LNFGUY.js → chunk-77QVBFCU.js} +3 -3
- package/chunks/{chunk-OH2VKQXH.js → chunk-7DVT4LVV.js} +37 -30
- package/chunks/{chunk-KKJJB5X6.js → chunk-7VUERJHS.js} +1503 -815
- package/chunks/{chunk-VOARQPTA.js → chunk-B52AWKBB.js} +65 -21
- package/chunks/{chunk-Y4EWSQF7.js → chunk-BF224XHL.js} +2 -2
- package/chunks/{chunk-PJOBIWUG.js → chunk-BF52U4XJ.js} +1 -1
- package/chunks/{chunk-55LYDVPU.js → chunk-C5VWPTGT.js} +1 -1
- package/chunks/{chunk-W7U4ESW2.js → chunk-CG3WBKJK.js} +1 -1
- package/chunks/chunk-COBO5EBO.js +135 -0
- package/chunks/chunk-CPG6P4GG.js +82 -0
- package/chunks/{chunk-DIEFUBV6.js → chunk-DIWZNWZT.js} +205 -35
- package/chunks/{chunk-AE77C5ZU.js → chunk-DQSDACD2.js} +1 -1
- package/chunks/{chunk-P3LEG54R.js → chunk-DX5W5AON.js} +2 -2
- package/chunks/{chunk-EUQTXRKZ.js → chunk-E4ZBKMSF.js} +5 -5
- package/chunks/{chunk-FPM27XN4.js → chunk-EIVICVHM.js} +4 -4
- package/chunks/{chunk-YHEEE624.js → chunk-EN2TKTFH.js} +1 -1
- package/chunks/chunk-F6WFNA7U.js +22 -0
- package/chunks/{chunk-FZBZSYKU.js → chunk-FN6YXJOP.js} +1 -1
- package/chunks/{chunk-KR4ZSC7K.js → chunk-FWBXMANW.js} +3 -3
- package/chunks/{chunk-LA7YLSR6.js → chunk-FYAXKJK7.js} +327 -67
- package/chunks/{chunk-CSZEXZBE.js → chunk-GBDINRIL.js} +3 -3
- package/chunks/{chunk-SCI7K3GM.js → chunk-GOEVOFQI.js} +19 -10
- package/chunks/{chunk-LEMXGVEP.js → chunk-GQCEQPYQ.js} +3 -3
- package/chunks/{chunk-Y7E5LNLO.js → chunk-GXSNGY5M.js} +1027 -876
- package/chunks/{chunk-6XU3PH66.js → chunk-HA3SAB64.js} +22 -69
- package/chunks/{chunk-Y4NGLFGJ.js → chunk-HUWENAHO.js} +1 -1
- package/chunks/{chunk-3ULCB3NE.js → chunk-HV76SFIA.js} +1 -1
- package/chunks/{chunk-CB2464BK.js → chunk-HWX5HPUG.js} +14 -4
- package/chunks/{chunk-LZC3B5N2.js → chunk-IA7TGCN2.js} +2 -2
- package/chunks/{chunk-RERATVSK.js → chunk-IBYULW65.js} +6 -6
- package/chunks/{chunk-HYRDKNUY.js → chunk-IUQ52YJK.js} +1 -1
- package/chunks/{chunk-TDXGKHDN.js → chunk-IYES5WOT.js} +2 -2
- package/chunks/{chunk-RGSBTHSU.js → chunk-KAQCJO6Y.js} +131 -4
- package/chunks/{chunk-VWOVHOTT.js → chunk-KJZ26VBX.js} +1 -1
- package/chunks/{chunk-6GONZVLS.js → chunk-KKDVZLGL.js} +1 -1
- package/chunks/{chunk-MKVZE4ZJ.js → chunk-KTJFU7RT.js} +3 -2
- package/chunks/{chunk-R574ATRM.js → chunk-M2PNLYGY.js} +41 -0
- package/chunks/{chunk-6EOI4HOK.js → chunk-M3STHEMM.js} +12 -17
- package/chunks/chunk-NGYI5EF5.js +244 -0
- package/chunks/{chunk-ALGGS7UH.js → chunk-NPQ5ZKRP.js} +82 -1
- package/chunks/{chunk-HQB2KUAN.js → chunk-NPUXXRJI.js} +1 -1
- package/chunks/{chunk-QETYKPMG.js → chunk-NVRDQFCX.js} +1 -1
- package/chunks/{chunk-PQBHU2IA.js → chunk-OHKJVAKG.js} +10 -10
- package/chunks/{chunk-CYR3HI5X.js → chunk-OQTXYMKW.js} +2 -2
- package/chunks/{chunk-DBOFL3LQ.js → chunk-PG62DFWD.js} +10 -10
- package/chunks/{chunk-2VSTGY6M.js → chunk-PJRW65JO.js} +1 -1
- package/chunks/{chunk-33ACCIIY.js → chunk-PLFATELK.js} +1 -1
- package/chunks/{chunk-IC4Z6LX6.js → chunk-PYQADEFD.js} +5 -0
- package/chunks/{chunk-MAJS7AT4.js → chunk-QGHSP65Z.js} +2 -2
- package/chunks/{chunk-OHJLEW5J.js → chunk-QQWD7LZV.js} +4 -4
- package/chunks/{chunk-ZXU5UHMI.js → chunk-QXVSWG66.js} +2 -2
- package/chunks/{chunk-E33LOKRA.js → chunk-RPWVIXDB.js} +18 -1
- package/chunks/{chunk-TYKC75AX.js → chunk-S3Y3GBFD.js} +1 -1
- package/chunks/{chunk-7UFKAV7Y.js → chunk-S6HYI3MF.js} +2 -2
- package/chunks/chunk-SAH4BD2J.js +92 -0
- package/chunks/{chunk-OMKQH5C5.js → chunk-SNRT2TJJ.js} +6 -23
- package/chunks/chunk-SR7RZ4MS.js +202 -0
- package/chunks/{chunk-CXE7E23H.js → chunk-TE3ZAJE7.js} +45 -17
- package/chunks/{chunk-S7CV4KO6.js → chunk-TKSZJ5BV.js} +3 -3
- package/chunks/{chunk-3NB7TSE2.js → chunk-U5SLIG7E.js} +1 -1
- package/chunks/chunk-UA5H3DS2.js +203 -0
- package/chunks/{chunk-24ER7UV4.js → chunk-UFALT4LK.js} +1 -1
- package/chunks/{chunk-YJQCUTT2.js → chunk-VWMUDKLC.js} +3 -3
- package/chunks/{chunk-RMH5OWLD.js → chunk-VXZ5HAOV.js} +1 -1
- package/chunks/{chunk-BVWVWGLE.js → chunk-WAUGQKUU.js} +4 -64
- package/chunks/{chunk-SHZYHGQH.js → chunk-WG6542MA.js} +1 -1
- package/chunks/{chunk-5KH532V7.js → chunk-WV5J6Q6N.js} +1 -1
- package/chunks/{chunk-RNVQB725.js → chunk-XHD7CRP2.js} +2 -2
- package/chunks/{chunk-W4B7UBUS.js → chunk-XZKQT2B2.js} +5 -5
- package/chunks/{chunk-6HVUFDS2.js → chunk-Y4TETC74.js} +22 -13
- package/chunks/{chunk-RZHU3ILK.js → chunk-YEF7XEO2.js} +4 -4
- package/chunks/{chunk-RUL4S3K3.js → chunk-YHJFF7KH.js} +146 -45
- package/chunks/{chunk-23RZCH76.js → chunk-YOM7DEGB.js} +3 -3
- package/chunks/{chunk-OFI7IGST.js → chunk-ZCLLJARV.js} +9 -9
- package/chunks/{chunk-GSS34377.js → chunk-ZHA242R4.js} +2 -2
- package/chunks/{chunk-TRLYP7OF.js → chunk-ZPLALRXZ.js} +17 -9
- package/chunks/{chunk-WUC6ZFXO.js → chunk-ZWBUH5UP.js} +1 -1
- package/chunks/{computer-use-KEAPATUY.js → computer-use-ESQYJ3JY.js} +26 -22
- package/chunks/{config-utils-K7SCOWHD.js → config-utils-XQHBJP7G.js} +4 -4
- package/chunks/{contextCommand-ZJA6A5K5.js → contextCommand-CX3YF4ZE.js} +28 -24
- package/chunks/{core-runtime-QMJPWHCI.js → core-runtime-DIAU7JMG.js} +30 -26
- package/chunks/{create-sub-session-DJE6XICH.js → create-sub-session-HDPD6HOA.js} +26 -22
- package/chunks/{create-sub-session-E4PBYXV5.js → create-sub-session-QIDZUOPU.js} +1 -1
- package/chunks/{cron-create-GRBWYMIJ.js → cron-create-VONA5JYY.js} +1 -1
- package/chunks/{cron-delete-4CMKBR2M.js → cron-delete-5JXSP2MI.js} +1 -1
- package/chunks/{cron-list-W7K4ASOA.js → cron-list-KE4F2CIR.js} +1 -1
- package/chunks/{daemon-SCTQMM7Z.js → daemon-VZBGJUNL.js} +30 -0
- package/chunks/{daemon-status-provider-FSWDPE2G.js → daemon-status-provider-H6O4UQ4F.js} +33 -29
- package/chunks/{daemon-trust-policy-P5L5VFAY.js → daemon-trust-policy-BNUXG6MT.js} +33 -29
- package/chunks/{daemon-trust-policy-monitor-73JYN6ET.js → daemon-trust-policy-monitor-E4EQ7GF4.js} +33 -29
- package/chunks/{de-VL76CPLV.js → de-LIW4XVLN.js} +5 -0
- package/chunks/{deferred-core-runtime-BWRCCFTE.js → deferred-core-runtime-CBMSHPAU.js} +26 -22
- package/chunks/{display-image-O2XFPQTC.js → display-image-NQRSIBXM.js} +2 -2
- package/chunks/{dist-DPPHJAVL.js → dist-EEEQGCZA.js} +918 -142
- package/chunks/{dist-K4WWQBHS.js → dist-HIACTZEK.js} +55 -15
- package/chunks/{dist-3BMEUGTG.js → dist-IRL7WA5Z.js} +1 -1
- package/chunks/{dist-HVBMEYWK.js → dist-KVISB2O2.js} +1 -1
- package/chunks/{dist-KS4O2NKE.js → dist-MBF3I5MX.js} +14 -8
- package/chunks/{dist-SFQ34F4M.js → dist-MKX5OSFF.js} +5 -4
- package/chunks/{dist-7JGAAQSC.js → dist-RCH3I7SS.js} +2 -2
- package/chunks/{dist-C5U4LJKW.js → dist-TUSWNE2I.js} +5 -4
- package/chunks/{earlyInputCapture-L5ST23A6.js → earlyInputCapture-UIOP7OIN.js} +26 -22
- package/chunks/{edit-LHHRFNFK.js → edit-ITMZYFKA.js} +26 -22
- package/chunks/{en-IRJ2WN5T.js → en-SY5GTIGX.js} +6 -0
- package/chunks/{enter-worktree-6NXCRZPF.js → enter-worktree-S4PL5UV6.js} +26 -22
- package/chunks/{enterPlanMode-ZVQT4U7D.js → enterPlanMode-YV52NNJT.js} +26 -22
- package/chunks/{environment-GJ2HWJOS.js → environment-NGOWPRZV.js} +30 -26
- package/chunks/{errors-6RLH3XXC.js → errors-BU26DTDX.js} +28 -24
- package/chunks/{exit-worktree-I2YLUHHY.js → exit-worktree-XRM6LH5F.js} +26 -22
- package/chunks/{exitPlanMode-7CCWKO7I.js → exitPlanMode-ZLI5F7KR.js} +26 -22
- package/chunks/{fast-path-DVFD4HQD.js → fast-path-UJWORIED.js} +23 -3
- package/chunks/{fast-path-settings-WQJU2LAT.js → fast-path-settings-37WQD5B2.js} +6 -3
- package/chunks/{fr-GK3HQYVB.js → fr-RQFO7U4P.js} +5 -0
- package/chunks/{gemini-7FWGOYD4.js → gemini-ZSKNDUMU.js} +77 -65
- package/chunks/{geminiContentGenerator-V2WVLIXU.js → geminiContentGenerator-YGEXOEKD.js} +1 -1
- package/chunks/{glob-3N6GGI75.js → glob-7KZG44BR.js} +26 -22
- package/chunks/{goal-tools-APOW6UXL.js → goal-tools-PXWN5VK3.js} +4 -2
- package/chunks/{grep-V43ILZVX.js → grep-6ZFC7RJ5.js} +26 -22
- package/chunks/{handleAutoUpdate-A5WFVWIA.js → handleAutoUpdate-KSEL3TQS.js} +30 -26
- package/chunks/{i18n-PLVQ4FBZ.js → i18n-ZIUXBW5V.js} +27 -23
- package/chunks/{image-gen-7C6IK6DC.js → image-gen-AUIZJJNK.js} +7 -5
- package/chunks/{initializer-CVAIKZYL.js → initializer-7AHY3N6Q.js} +33 -29
- package/chunks/{installationInfo-J6QDHNTK.js → installationInfo-VGBXMYLY.js} +27 -23
- package/chunks/{ja-3FA46IKD.js → ja-KOZKHJHZ.js} +5 -0
- package/chunks/{list-ZZ4OUUWV.js → list-PSFKQHLB.js} +36 -32
- package/chunks/{list-agents-KFFIIS2G.js → list-agents-Z4WABFDZ.js} +1 -1
- package/chunks/{loadedSettingsAdapter-QRYRJSWL.js → loadedSettingsAdapter-FTMRCTOF.js} +33 -29
- package/chunks/{loggingContentGenerator-OJCO75HM.js → loggingContentGenerator-MZAN52UV.js} +7 -5
- package/chunks/{loop-wakeup-TLMJPMMP.js → loop-wakeup-UZ5RL5Y2.js} +2 -2
- package/chunks/{ls-UVVE2XGE.js → ls-TVHDGIES.js} +1 -1
- package/chunks/{lsp-QMEA2VLB.js → lsp-CVN6OQPI.js} +1 -1
- package/chunks/{managed-npm-update-PCOSCP2N.js → managed-npm-update-O4NHK45X.js} +27 -23
- package/chunks/{mcp-M3WKKWKY.js → mcp-6CFP2AYQ.js} +33 -29
- package/chunks/{monitor-GN24FH6C.js → monitor-DAKD6OU4.js} +26 -22
- package/chunks/{nonInteractiveCli-KPTU3VSQ.js → nonInteractiveCli-RC7VIUZL.js} +66 -60
- package/chunks/{notebook-edit-4YM65BBO.js → notebook-edit-474DPMRL.js} +34 -22
- package/chunks/{openaiContentGenerator-EDQT6GTV.js → openaiContentGenerator-2NFY2MWO.js} +19 -9
- package/chunks/{pidfile-JOIIRN2C.js → pidfile-KBFVDNQP.js} +26 -22
- package/chunks/{process-registry-2CHQBXH5.js → process-registry-PMJOA5CO.js} +15 -0
- package/chunks/{processUtils-5SV4MX3Q.js → processUtils-6GRYH4Y3.js} +2 -2
- package/chunks/{pt-3AOBKPIJ.js → pt-U6AOCTMF.js} +5 -0
- package/chunks/{qwenContentGenerator-ODRJSUGR.js → qwenContentGenerator-KAHU6IZY.js} +33 -28
- package/chunks/{qwenOAuth2-NESCMZ47.js → qwenOAuth2-RRQTCP4W.js} +7 -5
- package/chunks/{read-file-HPSODLPK.js → read-file-3M6WXDXP.js} +6 -4
- package/chunks/{read-mcp-resource-2TNSJTC3.js → read-mcp-resource-PZ4ZF6YL.js} +1 -1
- package/chunks/{record-artifact-RAON52FC.js → record-artifact-P4HFMS7X.js} +2 -2
- package/chunks/{resumeHistoryUtils-TXCOFFMQ.js → resumeHistoryUtils-D6TAY3HX.js} +30 -26
- package/chunks/{ripGrep-ZKQGTQAO.js → ripGrep-PLPENT3E.js} +26 -22
- package/chunks/{ru-VJRAMC4W.js → ru-CMX4UMYP.js} +5 -0
- package/chunks/{run-qwen-serve-ZPKPKECF.js → run-qwen-serve-ZAFIJKJC.js} +168 -54
- package/chunks/{runtime-2FLNNM36.js → runtime-ZED7CYOZ.js} +38 -34
- package/chunks/{scheduler-365PJHNR.js → scheduler-MD3AL2W5.js} +26 -22
- package/chunks/{send-message-ZM7MRUGP.js → send-message-CAMSLG2L.js} +4 -3
- package/chunks/{serve-QD2RNLKJ.js → serve-E3VUDRZN.js} +33 -29
- package/chunks/{server-XLJVLTYM.js → server-OWMEMAKR.js} +450 -231
- package/chunks/{session-3VTUHH4Q.js → session-HZ57QK7K.js} +158 -97
- package/chunks/{settings-KULVPCQC.js → settings-V7BR3RKP.js} +32 -28
- package/chunks/{shell-3SWW22MH.js → shell-23OMNMW6.js} +26 -22
- package/chunks/{skill-KDHWYS7W.js → skill-6HBDYZRS.js} +7 -5
- package/chunks/{skill-settings-NMY4JEJC.js → skill-settings-HWJLTU7M.js} +32 -28
- package/chunks/{spawnChannel-ZKS4Q5OU.js → spawnChannel-N6KKUW5B.js} +27 -23
- package/chunks/{standalone-update-7CXPGAQ4.js → standalone-update-QGIKHATD.js} +28 -24
- package/chunks/{startInteractiveUI-2QQLEKM6.js → startInteractiveUI-GX2CRL42.js} +365 -155
- package/chunks/{syntheticOutput-ZLCUTKO2.js → syntheticOutput-PEBJQYJV.js} +2 -2
- package/chunks/{task-create-CQP5UEA3.js → task-create-5NWCQSJF.js} +5 -4
- package/chunks/{task-list-XLEZOJXP.js → task-list-53265TRZ.js} +1 -1
- package/chunks/{task-stop-7ZQM5CFF.js → task-stop-FPCOIRYX.js} +1 -1
- package/chunks/{task-update-JA75U2SN.js → task-update-5HN577LS.js} +5 -4
- package/chunks/{team-create-2WTNGAOX.js → team-create-CFFKU7KL.js} +26 -22
- package/chunks/{team-delete-MHY3UZGY.js → team-delete-MMQB4OSC.js} +1 -1
- package/chunks/{team-plan-approval-LZTYLEG4.js → team-plan-approval-6EFOKR6A.js} +26 -22
- package/chunks/{terminal-image-renderer-R5HHAFJN.js → terminal-image-renderer-TLDNACQY.js} +28 -24
- package/chunks/{theme-manager-PAUCSJFF.js → theme-manager-5LJ3H7VO.js} +26 -22
- package/chunks/{todoWrite-UPVOHYGD.js → todoWrite-JGV6VLOX.js} +1 -1
- package/chunks/{tool-search-2BFCGLI6.js → tool-search-UJV3A24H.js} +9 -6
- package/chunks/{total-session-admission-MK4SINFK.js → total-session-admission-D63QYXGO.js} +29 -25
- package/chunks/{trustedFolders-TJ5S26N7.js → trustedFolders-KZCOB53W.js} +30 -24
- package/chunks/{update-relaunch-N7AYLARF.js → update-relaunch-IFILM3SA.js} +5 -5
- package/chunks/{updateCheck-QRZ3DVT5.js → updateCheck-YZ2CRCFC.js} +29 -25
- package/chunks/{useAutoAcceptIndicator-DBJ7Y5AF.js → useAutoAcceptIndicator-AXEVNA3Q.js} +35 -31
- package/chunks/{validateNonInterActiveAuth-6ZQWUDS3.js → validateNonInterActiveAuth-3WTOJFWA.js} +61 -57
- package/chunks/{version-AJQGQWXC.js → version-GXK7OHZY.js} +1 -1
- package/chunks/{web-fetch-QWJYRXFL.js → web-fetch-ILB4GAVR.js} +12 -8
- package/chunks/{web-search-2AOXJGHU.js → web-search-HKRPGPZZ.js} +8 -6
- package/chunks/{workflow-ERH3SJG2.js → workflow-FXIPRQQA.js} +750 -147
- package/chunks/{workspace-providers-status-HZ474RA4.js → workspace-providers-status-NYHC7HSR.js} +35 -31
- package/chunks/{workspace-registration-store-6EUP4JXG.js → workspace-registration-store-AKEB7OMW.js} +1 -1
- package/chunks/{workspace-registry-R4APRRNC.js → workspace-registry-CDAS5TVZ.js} +29 -25
- package/chunks/{workspace-service-HFIFDMU7.js → workspace-service-PAMUKMAV.js} +36 -32
- package/chunks/{workspace-skills-status-HAHEIHGK.js → workspace-skills-status-YQSHCCMS.js} +33 -29
- package/chunks/{workspace-trust-reconciler-65GTAGDK.js → workspace-trust-reconciler-RPTXOIY2.js} +36 -32
- package/chunks/{write-file-B34CDELV.js → write-file-CGS57TS4.js} +26 -22
- package/chunks/{zh-ARWDLDLR.js → zh-AGL2FVBI.js} +6 -0
- package/chunks/{zh-TW-Y4RGI3P7.js → zh-TW-KI66MHQY.js} +6 -0
- package/chunks/{zoom-image-HPRBZHSS.js → zoom-image-E7D72GYV.js} +6 -4
- package/cli.js +13 -13
- package/locales/ca.js +10 -0
- package/locales/de.js +9 -0
- package/locales/en.js +10 -0
- package/locales/fr.js +9 -0
- package/locales/ja.js +9 -0
- package/locales/pt.js +9 -0
- package/locales/ru.js +9 -0
- package/locales/zh-TW.js +10 -0
- package/locales/zh.js +10 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-Ip-FFDJ0.js → arc-DybZaz32.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-CChqgwIb.js → architectureDiagram-3BPJPVTR-jN3qBd19.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-BHN-Tfss.js → blockDiagram-GPEHLZMM-Ct5DZPrj.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-BhyjzDjN.js → c4Diagram-AAUBKEIU-CUAFMlUG.js} +1 -1
- package/web-shell/assets/channel-BMwLrwLW.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-BB9eyHrx.js → chunk-2J33WTMH-CuV8n90B.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BeV7ce_J.js → chunk-4BX2VUAB-BUzl_kls.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DO7kXDiV.js → chunk-55IACEB6-BnDBLX6A.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-B27MPznD.js → chunk-727SXJPM-B83uTOjm.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-DHIjqjD_.js → chunk-AQP2D5EJ-DM3HLgpT.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-DabMqyN2.js → chunk-FMBD7UC4-CSQ5hgyb.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-Dw7Nnnxc.js → chunk-ND2GUHAM-BWOF4SxX.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-DdaZew1Q.js → chunk-QZHKN3VN-BsOH9LMi.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BGDv98jY.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BGDv98jY.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-CgBpCYH5.js → cose-bilkent-S5V4N54A-IENqH2iJ.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-BB4IU8G0.js → dagre-BM42HDAG--dyzDTGo.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-BcUTHU37.js → diagram-2AECGRRQ-BE7Dcqof.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-B6Lyihyv.js → diagram-5GNKFQAL-Cr8-5OTj.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CRIJOjpG.js → diagram-KO2AKTUF-Bzey3uAY.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-DdNiwWWT.js → diagram-LMA3HP47-sErl28Xb.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-Dz4b32Do.js → diagram-OG6HWLK6-Dq30ATIo.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-D-8NGw77.js → erDiagram-TEJ5UH35-BkCoEfVW.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-Dun26LyM.js → flowDiagram-I6XJVG4X-DHwO0rrI.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-F10Hu1Gc.js → ganttDiagram-6RSMTGT7-s7vAPxWq.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Bf8Ez6-D.js → gitGraphDiagram-PVQCEYII-CQxhwPOU.js} +1 -1
- package/web-shell/assets/index-Bckpjr-I.css +5 -0
- package/web-shell/assets/{index-BXqw-nGq.js → index-CF4wApWp.js} +1 -1
- package/web-shell/assets/index-DwEr9HEW.js +1768 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-DVgTMLvj.js → infoDiagram-5YYISTIA-BnFrD0bq.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-uT-KepvK.js → ishikawaDiagram-YF4QCWOH-Bf9zK5NK.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-Vg_XadQf.js → journeyDiagram-JHISSGLW-CyGAhsxi.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Dyv1ESBE.js → kanban-definition-UN3LZRKU-CbsK5akB.js} +1 -1
- package/web-shell/assets/{linear-BMIepYX3.js → linear-cQsF4P8D.js} +1 -1
- package/web-shell/assets/{mermaid.core-zA8pJ9ag.js → mermaid.core-Z4HVqrKY.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BCW_BZ_5.js → mindmap-definition-RKZ34NQL-CYnrBo_f.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-DseNEGp2.js → pieDiagram-4H26LBE5-CBzOfhrs.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-6Z7wr1Fi.js → quadrantDiagram-W4KKPZXB-D4LK1Ebn.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CVOlCRPf.js → requirementDiagram-4Y6WPE33-Bzti2Lcj.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CGhgrUJZ.js → sankeyDiagram-5OEKKPKP-yTBw5Z2s.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-dlqmpLuQ.js → sequenceDiagram-3UESZ5HK-D07UVRiZ.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-B9EW10Xb.js → stateDiagram-AJRCARHV-UE_lHsTn.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DC6xgXjX.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-BBRh0mgZ.js → timeline-definition-PNZ67QCA-DRvYdiTs.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-B8Gs-REP.js → vennDiagram-CIIHVFJN-CQLIXs0u.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-D_y80Ur7.js → wardley-L42UT6IY-JZz_Xqse.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-D-CNfHJ-.js → wardleyDiagram-YWT4CUSO--i7BiJwB.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-DQ5CvELo.js → xychartDiagram-2RQKCTM6-Bkc-bW0S.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-6PEXNQTX.js +0 -68
- package/chunks/chunk-IUFV6FYU.js +0 -81
- package/web-shell/assets/channel-Cu8qd6OB.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BI3KrXhq.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BI3KrXhq.js +0 -1
- package/web-shell/assets/index-QQlUCJGg.css +0 -5
- package/web-shell/assets/index-hcgjV7vS.js +0 -1768
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CJTZJJ5X.js +0 -1
- package/chunks/{anthropicContentGenerator-DTMVEL5M.js → anthropicContentGenerator-SSFE2753.js} +9 -9
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-OCPBI7J5.js";
|
|
18
18
|
import {
|
|
19
19
|
defaultSpawnChannelFactory
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RPWVIXDB.js";
|
|
21
21
|
import {
|
|
22
22
|
BridgeChannelClosedError,
|
|
23
23
|
BridgeTimeoutError,
|
|
@@ -28,6 +28,16 @@ import {
|
|
|
28
28
|
createIdleWorkspaceHooksStatus
|
|
29
29
|
} from "./chunk-NLREQJFK.js";
|
|
30
30
|
import {
|
|
31
|
+
ACTIVE_WORK_CLOSE_IF_UNHELD_PARAM,
|
|
32
|
+
ACTIVE_WORK_CLOSE_TIMEOUT_MS,
|
|
33
|
+
ACTIVE_WORK_HEARTBEAT_INTERVAL_MS,
|
|
34
|
+
ACTIVE_WORK_HEARTBEAT_META_KEY,
|
|
35
|
+
ACTIVE_WORK_HEARTBEAT_VERSION,
|
|
36
|
+
ACTIVE_WORK_HOLD_CATEGORIES,
|
|
37
|
+
ACTIVE_WORK_MAX_SESSION_HOLDS,
|
|
38
|
+
ACTIVE_WORK_MAX_SNAPSHOT_SESSIONS,
|
|
39
|
+
ACTIVE_WORK_NOTIFICATION_METHOD,
|
|
40
|
+
ACTIVE_WORK_STALE_INTERVALS,
|
|
31
41
|
CHANNEL_STARTUP_PROFILE_META_KEY,
|
|
32
42
|
CHANNEL_STARTUP_PROFILE_VERSION,
|
|
33
43
|
DAEMON_CHANNEL_DELIVERY_META_KEY,
|
|
@@ -44,8 +54,9 @@ import {
|
|
|
44
54
|
TODO_STOP_GUARD_CONTINUATION_CLAIM_METHOD,
|
|
45
55
|
TODO_STOP_GUARD_QUEUE_RELEASE_METHOD,
|
|
46
56
|
WORKTREE_MCP_DEFER_META_KEY,
|
|
57
|
+
clampActiveWorkIntervalMs,
|
|
47
58
|
isValidTrustedModelPrompt
|
|
48
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-M2PNLYGY.js";
|
|
49
60
|
import {
|
|
50
61
|
BranchWhilePromptActiveError,
|
|
51
62
|
CancelSentinelCollisionError,
|
|
@@ -100,7 +111,7 @@ import {
|
|
|
100
111
|
metadataBudgetBytes,
|
|
101
112
|
normalizeSnapshotPayload,
|
|
102
113
|
stableSessionArtifactId
|
|
103
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-GXSNGY5M.js";
|
|
104
115
|
import {
|
|
105
116
|
DAEMON_TRACEPARENT_META_KEY,
|
|
106
117
|
DAEMON_TRACESTATE_META_KEY
|
|
@@ -109,7 +120,7 @@ import {
|
|
|
109
120
|
INVOCATION_CONTEXT_META_KEY,
|
|
110
121
|
PRIVATE_ACP_CAPABILITY_ENV,
|
|
111
122
|
PRIVATE_PARENT_CAPABILITY_META_KEY
|
|
112
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-3PY4LPJF.js";
|
|
113
124
|
import {
|
|
114
125
|
init_esbuild_shims
|
|
115
126
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -1580,6 +1591,42 @@ var MultiClientPermissionMediator = class {
|
|
|
1580
1591
|
};
|
|
1581
1592
|
|
|
1582
1593
|
// packages/acp-bridge/src/bridgeClient.ts
|
|
1594
|
+
function parseActiveWorkSnapshot(params) {
|
|
1595
|
+
const seq = params["seq"];
|
|
1596
|
+
const sessions = params["sessions"];
|
|
1597
|
+
if (params["v"] !== ACTIVE_WORK_HEARTBEAT_VERSION || typeof seq !== "number" || !Number.isSafeInteger(seq) || seq <= 0 || !Array.isArray(sessions) || sessions.length > ACTIVE_WORK_MAX_SNAPSHOT_SESSIONS) {
|
|
1598
|
+
return void 0;
|
|
1599
|
+
}
|
|
1600
|
+
const parsed = [];
|
|
1601
|
+
for (const raw of sessions) {
|
|
1602
|
+
if (typeof raw !== "object" || raw === null) return void 0;
|
|
1603
|
+
const entry = raw;
|
|
1604
|
+
const sessionId = entry["sessionId"];
|
|
1605
|
+
const holds = entry["holds"];
|
|
1606
|
+
if (typeof sessionId !== "string" || !Array.isArray(holds) || holds.length > ACTIVE_WORK_MAX_SESSION_HOLDS) {
|
|
1607
|
+
return void 0;
|
|
1608
|
+
}
|
|
1609
|
+
const parsedHolds = [];
|
|
1610
|
+
for (const rawHold of holds) {
|
|
1611
|
+
if (typeof rawHold !== "object" || rawHold === null) return void 0;
|
|
1612
|
+
const hold = rawHold;
|
|
1613
|
+
const category = hold["category"];
|
|
1614
|
+
const id = hold["id"];
|
|
1615
|
+
if (typeof id !== "string" || typeof category !== "string" || !ACTIVE_WORK_HOLD_CATEGORIES.includes(
|
|
1616
|
+
category
|
|
1617
|
+
)) {
|
|
1618
|
+
return void 0;
|
|
1619
|
+
}
|
|
1620
|
+
parsedHolds.push({
|
|
1621
|
+
category,
|
|
1622
|
+
id
|
|
1623
|
+
});
|
|
1624
|
+
}
|
|
1625
|
+
parsed.push({ sessionId, holds: parsedHolds });
|
|
1626
|
+
}
|
|
1627
|
+
return { v: ACTIVE_WORK_HEARTBEAT_VERSION, seq, sessions: parsed };
|
|
1628
|
+
}
|
|
1629
|
+
__name(parseActiveWorkSnapshot, "parseActiveWorkSnapshot");
|
|
1583
1630
|
var PUBLISH_ARTIFACT_TOOL_NAME = "artifact";
|
|
1584
1631
|
var MAX_CHANNEL_DELIVERY_TEXT_CHARS = 1e5;
|
|
1585
1632
|
var MAX_CHANNEL_DELIVERY_FIELD_CHARS = 2048;
|
|
@@ -1840,7 +1887,7 @@ function sliceLineRange(content, startLine, endLine) {
|
|
|
1840
1887
|
}
|
|
1841
1888
|
__name(sliceLineRange, "sliceLineRange");
|
|
1842
1889
|
var BridgeClient = class {
|
|
1843
|
-
constructor(resolveEntry, resolvePendingRestoreEvents, mediator, permissionTimeoutMs, maxPendingPerSession, fileSystem, onModelPromoted, onModePromoted, clientMcpSender, ownsSession = () => true, onTokenUsage, onCreateSubSession, onGenerationEvent, onWorkspaceGenerationEvent, onChannelDelivery, hasSessionSpawnInFlight = () => false, getLiveScreenContextCaptureHandler = () => void 0, getLiveTaskToolRequestHandler = () => void 0, getLiveSpeakToUserHandler = () => void 0, externalToolGuard) {
|
|
1890
|
+
constructor(resolveEntry, resolvePendingRestoreEvents, mediator, permissionTimeoutMs, maxPendingPerSession, fileSystem, onModelPromoted, onModePromoted, clientMcpSender, ownsSession = () => true, onTokenUsage, onCreateSubSession, onGenerationEvent, onWorkspaceGenerationEvent, onChannelDelivery, hasSessionSpawnInFlight = () => false, getLiveScreenContextCaptureHandler = () => void 0, getLiveTaskToolRequestHandler = () => void 0, getLiveSpeakToUserHandler = () => void 0, externalToolGuard, onActiveWork) {
|
|
1844
1891
|
this.resolveEntry = resolveEntry;
|
|
1845
1892
|
this.resolvePendingRestoreEvents = resolvePendingRestoreEvents;
|
|
1846
1893
|
this.mediator = mediator;
|
|
@@ -1861,6 +1908,7 @@ var BridgeClient = class {
|
|
|
1861
1908
|
this.getLiveTaskToolRequestHandler = getLiveTaskToolRequestHandler;
|
|
1862
1909
|
this.getLiveSpeakToUserHandler = getLiveSpeakToUserHandler;
|
|
1863
1910
|
this.externalToolGuard = externalToolGuard;
|
|
1911
|
+
this.onActiveWork = onActiveWork;
|
|
1864
1912
|
}
|
|
1865
1913
|
static {
|
|
1866
1914
|
__name(this, "BridgeClient");
|
|
@@ -2581,6 +2629,19 @@ var BridgeClient = class {
|
|
|
2581
2629
|
* forward-compat.
|
|
2582
2630
|
*/
|
|
2583
2631
|
async extNotification(method, params) {
|
|
2632
|
+
if (method === ACTIVE_WORK_NOTIFICATION_METHOD) {
|
|
2633
|
+
const snapshot = parseActiveWorkSnapshot(params);
|
|
2634
|
+
if (snapshot) {
|
|
2635
|
+
this.onActiveWork?.({
|
|
2636
|
+
v: ACTIVE_WORK_HEARTBEAT_VERSION,
|
|
2637
|
+
seq: snapshot.seq,
|
|
2638
|
+
sessions: snapshot.sessions.filter(
|
|
2639
|
+
(session) => this.ownsSession(session.sessionId)
|
|
2640
|
+
)
|
|
2641
|
+
});
|
|
2642
|
+
}
|
|
2643
|
+
return;
|
|
2644
|
+
}
|
|
2584
2645
|
if (method === "_qwencode/end_turn") {
|
|
2585
2646
|
const sessionId2 = params["sessionId"];
|
|
2586
2647
|
const reason = params["reason"];
|
|
@@ -6094,6 +6155,7 @@ function createAcpSessionBridge(opts) {
|
|
|
6094
6155
|
let liveTaskToolRequestHandler;
|
|
6095
6156
|
let liveSpeakToUserHandler;
|
|
6096
6157
|
const defaultSessionScope = opts.sessionScope ?? "single";
|
|
6158
|
+
const delegateReadTextFileToClient = opts.delegateReadTextFileToClient ?? true;
|
|
6097
6159
|
let maxSessions;
|
|
6098
6160
|
if (opts.maxSessions === void 0) {
|
|
6099
6161
|
maxSessions = DEFAULT_MAX_SESSIONS;
|
|
@@ -6206,6 +6268,149 @@ function createAcpSessionBridge(opts) {
|
|
|
6206
6268
|
lastActivityTimestamp = Date.now();
|
|
6207
6269
|
}
|
|
6208
6270
|
__name(touchActivity, "touchActivity");
|
|
6271
|
+
function entryHasLocalWork(entry) {
|
|
6272
|
+
return entry.pendingPromptCount > 0 || entry.pendingAgentNotificationCount > 0;
|
|
6273
|
+
}
|
|
6274
|
+
__name(entryHasLocalWork, "entryHasLocalWork");
|
|
6275
|
+
function childHoldsAreFresh(entry, capability) {
|
|
6276
|
+
if (entry.childHoldsAt === null) return false;
|
|
6277
|
+
return Date.now() - entry.childHoldsAt <= capability.intervalMs * ACTIVE_WORK_STALE_INTERVALS;
|
|
6278
|
+
}
|
|
6279
|
+
__name(childHoldsAreFresh, "childHoldsAreFresh");
|
|
6280
|
+
function childReportsHeldWork(entry) {
|
|
6281
|
+
const owner = channelInfoForEntry(entry);
|
|
6282
|
+
if (!owner?.activeWork) return false;
|
|
6283
|
+
if (!childHoldsAreFresh(entry, owner.activeWork)) return false;
|
|
6284
|
+
return entry.childHolds !== null && entry.childHolds.size > 0;
|
|
6285
|
+
}
|
|
6286
|
+
__name(childReportsHeldWork, "childReportsHeldWork");
|
|
6287
|
+
function childWorkIsUnknown(entry) {
|
|
6288
|
+
const owner = channelInfoForEntry(entry);
|
|
6289
|
+
if (!owner?.activeWork) return false;
|
|
6290
|
+
return !childHoldsAreFresh(entry, owner.activeWork);
|
|
6291
|
+
}
|
|
6292
|
+
__name(childWorkIsUnknown, "childWorkIsUnknown");
|
|
6293
|
+
function entryHasActiveWork(entry) {
|
|
6294
|
+
return entryHasLocalWork(entry) || childReportsHeldWork(entry) || childWorkIsUnknown(entry);
|
|
6295
|
+
}
|
|
6296
|
+
__name(entryHasActiveWork, "entryHasActiveWork");
|
|
6297
|
+
function entryIsAutoCloseCandidate(entry) {
|
|
6298
|
+
if (byId.get(entry.sessionId) !== entry) return false;
|
|
6299
|
+
if (isClosingOrAuthorizingClose(entry)) return false;
|
|
6300
|
+
if (entry.events.subscriberCount > 0) return false;
|
|
6301
|
+
if (entryHasLocalWork(entry)) return false;
|
|
6302
|
+
const owner = channelInfoForEntry(entry);
|
|
6303
|
+
if (owner?.pendingRestoreIds.has(entry.sessionId)) return false;
|
|
6304
|
+
return !childReportsHeldWork(entry);
|
|
6305
|
+
}
|
|
6306
|
+
__name(entryIsAutoCloseCandidate, "entryIsAutoCloseCandidate");
|
|
6307
|
+
function isClosingOrAuthorizingClose(entry) {
|
|
6308
|
+
return entry.closing || entry.activeWorkCloseInFlight;
|
|
6309
|
+
}
|
|
6310
|
+
__name(isClosingOrAuthorizingClose, "isClosingOrAuthorizingClose");
|
|
6311
|
+
async function maybeCloseIdleSession(entry, reason) {
|
|
6312
|
+
if (!entryIsAutoCloseCandidate(entry)) return;
|
|
6313
|
+
if (entry.spawnOwnerWantedKill && entry.attachCount === 0) {
|
|
6314
|
+
await bridgeApi.killSession(entry.sessionId).catch(() => {
|
|
6315
|
+
});
|
|
6316
|
+
return;
|
|
6317
|
+
}
|
|
6318
|
+
if (entry.clientIds.size > 0) return;
|
|
6319
|
+
await closeIfChildUnheld(entry, {
|
|
6320
|
+
trigger: reason,
|
|
6321
|
+
closeReason: "last_client_detached"
|
|
6322
|
+
});
|
|
6323
|
+
}
|
|
6324
|
+
__name(maybeCloseIdleSession, "maybeCloseIdleSession");
|
|
6325
|
+
async function closeIfChildUnheld(entry, opts2) {
|
|
6326
|
+
entry.activeWorkCloseInFlight = true;
|
|
6327
|
+
try {
|
|
6328
|
+
if (!await confirmChildUnheld(entry)) return;
|
|
6329
|
+
if (byId.get(entry.sessionId) !== entry) return;
|
|
6330
|
+
await closeSessionImpl(entry.sessionId, void 0, {
|
|
6331
|
+
reason: opts2.closeReason
|
|
6332
|
+
}).catch((err) => {
|
|
6333
|
+
writeStderrLine(
|
|
6334
|
+
`qwen serve: deferred close (${opts2.trigger}) failed for ${JSON.stringify(entry.sessionId)}: ${err instanceof Error ? err.stack ?? err.message : String(err)}`
|
|
6335
|
+
);
|
|
6336
|
+
});
|
|
6337
|
+
} finally {
|
|
6338
|
+
entry.activeWorkCloseInFlight = false;
|
|
6339
|
+
}
|
|
6340
|
+
}
|
|
6341
|
+
__name(closeIfChildUnheld, "closeIfChildUnheld");
|
|
6342
|
+
async function confirmChildUnheld(entry) {
|
|
6343
|
+
const info = channelInfoForEntry(entry);
|
|
6344
|
+
if (!info?.activeWork) return true;
|
|
6345
|
+
if (info.isDying) return false;
|
|
6346
|
+
try {
|
|
6347
|
+
const response = await withTimeout(
|
|
6348
|
+
entry.connection.extMethod(SERVE_CONTROL_EXT_METHODS.sessionClose, {
|
|
6349
|
+
sessionId: entry.sessionId,
|
|
6350
|
+
[ACTIVE_WORK_CLOSE_IF_UNHELD_PARAM]: true
|
|
6351
|
+
}),
|
|
6352
|
+
ACTIVE_WORK_CLOSE_TIMEOUT_MS,
|
|
6353
|
+
SERVE_CONTROL_EXT_METHODS.sessionClose
|
|
6354
|
+
);
|
|
6355
|
+
if (response["closed"] === true) {
|
|
6356
|
+
return true;
|
|
6357
|
+
}
|
|
6358
|
+
const holds = response["holds"];
|
|
6359
|
+
if (Array.isArray(holds)) {
|
|
6360
|
+
const adopted = /* @__PURE__ */ new Map();
|
|
6361
|
+
for (const hold of holds) {
|
|
6362
|
+
if (typeof hold !== "object" || hold === null) continue;
|
|
6363
|
+
const record = hold;
|
|
6364
|
+
const id = record["id"];
|
|
6365
|
+
const category = record["category"];
|
|
6366
|
+
if (typeof id === "string" && typeof category === "string" && ACTIVE_WORK_HOLD_CATEGORIES.includes(
|
|
6367
|
+
category
|
|
6368
|
+
)) {
|
|
6369
|
+
adopted.set(id, category);
|
|
6370
|
+
}
|
|
6371
|
+
}
|
|
6372
|
+
entry.childHolds = adopted;
|
|
6373
|
+
entry.childHoldsAt = Date.now();
|
|
6374
|
+
}
|
|
6375
|
+
return false;
|
|
6376
|
+
} catch (err) {
|
|
6377
|
+
writeStderrLine(
|
|
6378
|
+
`qwen serve: close-if-unheld for session ${JSON.stringify(entry.sessionId)} did not resolve (${err instanceof Error ? err.message : String(err)}); leaving it in place for the next snapshot to settle`
|
|
6379
|
+
);
|
|
6380
|
+
return false;
|
|
6381
|
+
}
|
|
6382
|
+
}
|
|
6383
|
+
__name(confirmChildUnheld, "confirmChildUnheld");
|
|
6384
|
+
function applyActiveWorkSnapshot(info, snapshot) {
|
|
6385
|
+
if (!info.activeWork || info.isDying) return;
|
|
6386
|
+
if (snapshot.seq <= info.activeWork.seq) return;
|
|
6387
|
+
info.activeWork.seq = snapshot.seq;
|
|
6388
|
+
const now = Date.now();
|
|
6389
|
+
const reported = /* @__PURE__ */ new Map();
|
|
6390
|
+
for (const session of snapshot.sessions) {
|
|
6391
|
+
const holds = /* @__PURE__ */ new Map();
|
|
6392
|
+
for (const hold of session.holds) holds.set(hold.id, hold.category);
|
|
6393
|
+
reported.set(session.sessionId, holds);
|
|
6394
|
+
}
|
|
6395
|
+
for (const sessionId of Array.from(info.sessionIds)) {
|
|
6396
|
+
const entry = byId.get(sessionId);
|
|
6397
|
+
if (!entry || entry.channel !== info.channel) continue;
|
|
6398
|
+
const holds = reported.get(sessionId) ?? /* @__PURE__ */ new Map();
|
|
6399
|
+
const previouslyHeld = entry.childHolds ? entry.childHolds.size > 0 : void 0;
|
|
6400
|
+
entry.childHolds = holds;
|
|
6401
|
+
entry.childHoldsAt = now;
|
|
6402
|
+
if (previouslyHeld !== void 0 && previouslyHeld !== holds.size > 0) {
|
|
6403
|
+
touchActivity();
|
|
6404
|
+
}
|
|
6405
|
+
if (holds.size === 0) {
|
|
6406
|
+
void maybeCloseIdleSession(
|
|
6407
|
+
entry,
|
|
6408
|
+
reported.has(sessionId) ? "child_idle" : "child_dropped"
|
|
6409
|
+
);
|
|
6410
|
+
}
|
|
6411
|
+
}
|
|
6412
|
+
}
|
|
6413
|
+
__name(applyActiveWorkSnapshot, "applyActiveWorkSnapshot");
|
|
6209
6414
|
function settleActivePromptState(entry, promptId) {
|
|
6210
6415
|
if (entry.activePromptId !== promptId) return;
|
|
6211
6416
|
delete entry.activePromptId;
|
|
@@ -6334,21 +6539,17 @@ function createAcpSessionBridge(opts) {
|
|
|
6334
6539
|
if (shuttingDown) return;
|
|
6335
6540
|
const now = Date.now();
|
|
6336
6541
|
for (const [id, entry] of byId) {
|
|
6337
|
-
if (entry
|
|
6338
|
-
if (entry.events.subscriberCount > 0) continue;
|
|
6542
|
+
if (!entryIsAutoCloseCandidate(entry)) continue;
|
|
6339
6543
|
const lastActive = entry.sessionLastSeenAt ?? Date.parse(entry.createdAt);
|
|
6340
6544
|
const idle = now - lastActive;
|
|
6341
6545
|
if (idle < sessionIdleTimeoutMs) continue;
|
|
6342
6546
|
writeStderrLine(
|
|
6343
6547
|
`qwen serve: reaping idle session ${JSON.stringify(id)} (idle for ${Math.round(idle / 1e3)}s, threshold ${Math.round(sessionIdleTimeoutMs / 1e3)}s)`
|
|
6344
6548
|
);
|
|
6345
|
-
void
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
);
|
|
6350
|
-
}
|
|
6351
|
-
);
|
|
6549
|
+
void closeIfChildUnheld(entry, {
|
|
6550
|
+
trigger: "idle_timeout",
|
|
6551
|
+
closeReason: "idle_timeout"
|
|
6552
|
+
});
|
|
6352
6553
|
}
|
|
6353
6554
|
}, sessionReapIntervalMs);
|
|
6354
6555
|
sessionReaper.unref();
|
|
@@ -6522,18 +6723,7 @@ function createAcpSessionBridge(opts) {
|
|
|
6522
6723
|
entry.attachCount - (released + (attachCountDelta - 1))
|
|
6523
6724
|
);
|
|
6524
6725
|
unregisterClient(entry, clientId);
|
|
6525
|
-
|
|
6526
|
-
await bridgeApi.killSession(entry.sessionId).catch(() => {
|
|
6527
|
-
});
|
|
6528
|
-
} else if (entry.clientIds.size === 0 && entry.events.subscriberCount === 0 && entry.pendingPromptCount === 0) {
|
|
6529
|
-
await closeSessionImpl(entry.sessionId, void 0, {
|
|
6530
|
-
reason: "last_client_detached"
|
|
6531
|
-
}).catch((err) => {
|
|
6532
|
-
writeStderrLine(
|
|
6533
|
-
`qwen serve: close-on-attach-rollback failed for ${JSON.stringify(entry.sessionId)}: ${err instanceof Error ? err.stack ?? err.message : String(err)}`
|
|
6534
|
-
);
|
|
6535
|
-
});
|
|
6536
|
-
}
|
|
6726
|
+
await maybeCloseIdleSession(entry, "attach_rollback");
|
|
6537
6727
|
}, "rollbackAttachRegistration");
|
|
6538
6728
|
const resolveTrustedClientId = /* @__PURE__ */ __name((entry, clientId) => {
|
|
6539
6729
|
if (clientId === void 0) return void 0;
|
|
@@ -6562,6 +6752,7 @@ function createAcpSessionBridge(opts) {
|
|
|
6562
6752
|
})
|
|
6563
6753
|
);
|
|
6564
6754
|
const sessionIds = /* @__PURE__ */ new Set();
|
|
6755
|
+
const infoRef = {};
|
|
6565
6756
|
let client;
|
|
6566
6757
|
let connection;
|
|
6567
6758
|
try {
|
|
@@ -6663,7 +6854,12 @@ function createAcpSessionBridge(opts) {
|
|
|
6663
6854
|
() => liveScreenContextCaptureHandler,
|
|
6664
6855
|
() => liveTaskToolRequestHandler,
|
|
6665
6856
|
() => liveSpeakToUserHandler,
|
|
6666
|
-
opts.externalToolGuard
|
|
6857
|
+
opts.externalToolGuard,
|
|
6858
|
+
(snapshot) => {
|
|
6859
|
+
const currentInfo = infoRef.current;
|
|
6860
|
+
if (!currentInfo) return;
|
|
6861
|
+
applyActiveWorkSnapshot(currentInfo, snapshot);
|
|
6862
|
+
}
|
|
6667
6863
|
);
|
|
6668
6864
|
connection = new ClientSideConnection(() => client, channel.stream);
|
|
6669
6865
|
} catch (error) {
|
|
@@ -6701,6 +6897,7 @@ function createAcpSessionBridge(opts) {
|
|
|
6701
6897
|
isDying: false,
|
|
6702
6898
|
handshakeComplete: false
|
|
6703
6899
|
};
|
|
6900
|
+
infoRef.current = info;
|
|
6704
6901
|
aliveChannels.add(info);
|
|
6705
6902
|
if (aliveChannels.size > 2) {
|
|
6706
6903
|
writeStderrLine(
|
|
@@ -6788,13 +6985,20 @@ function createAcpSessionBridge(opts) {
|
|
|
6788
6985
|
connection.initialize({
|
|
6789
6986
|
protocolVersion: PROTOCOL_VERSION,
|
|
6790
6987
|
_meta: {
|
|
6988
|
+
[ACTIVE_WORK_HEARTBEAT_META_KEY]: {
|
|
6989
|
+
v: ACTIVE_WORK_HEARTBEAT_VERSION,
|
|
6990
|
+
intervalMs: ACTIVE_WORK_HEARTBEAT_INTERVAL_MS
|
|
6991
|
+
},
|
|
6791
6992
|
[CHANNEL_STARTUP_PROFILE_META_KEY]: {
|
|
6792
6993
|
v: CHANNEL_STARTUP_PROFILE_VERSION
|
|
6793
6994
|
},
|
|
6794
6995
|
[PRIVATE_PARENT_CAPABILITY_META_KEY]: privateParentCapability
|
|
6795
6996
|
},
|
|
6796
6997
|
clientCapabilities: {
|
|
6797
|
-
fs: {
|
|
6998
|
+
fs: {
|
|
6999
|
+
readTextFile: delegateReadTextFileToClient,
|
|
7000
|
+
writeTextFile: true
|
|
7001
|
+
}
|
|
6798
7002
|
},
|
|
6799
7003
|
clientInfo: { name: "qwen-serve-bridge", version: "0" }
|
|
6800
7004
|
}),
|
|
@@ -6809,6 +7013,19 @@ function createAcpSessionBridge(opts) {
|
|
|
6809
7013
|
);
|
|
6810
7014
|
}
|
|
6811
7015
|
}
|
|
7016
|
+
const activeWorkCapability = isRecord3(response._meta) ? response._meta[ACTIVE_WORK_HEARTBEAT_META_KEY] : void 0;
|
|
7017
|
+
if (isRecord3(activeWorkCapability) && activeWorkCapability["v"] === ACTIVE_WORK_HEARTBEAT_VERSION) {
|
|
7018
|
+
const advertised = activeWorkCapability["categories"];
|
|
7019
|
+
info.activeWork = {
|
|
7020
|
+
intervalMs: clampActiveWorkIntervalMs(
|
|
7021
|
+
activeWorkCapability["intervalMs"]
|
|
7022
|
+
),
|
|
7023
|
+
categories: Array.isArray(advertised) ? ACTIVE_WORK_HOLD_CATEGORIES.filter(
|
|
7024
|
+
(category) => advertised.includes(category)
|
|
7025
|
+
) : [],
|
|
7026
|
+
seq: 0
|
|
7027
|
+
};
|
|
7028
|
+
}
|
|
6812
7029
|
try {
|
|
6813
7030
|
const attributes = getChannelStartupProfileAttributes(
|
|
6814
7031
|
response,
|
|
@@ -7457,12 +7674,17 @@ function createAcpSessionBridge(opts) {
|
|
|
7457
7674
|
const getChildResourceSnapshot = /* @__PURE__ */ __name(() => {
|
|
7458
7675
|
const info = liveChannelInfo();
|
|
7459
7676
|
if (!info || info.childResourceAt === void 0) return void 0;
|
|
7460
|
-
|
|
7677
|
+
const ageMs = Date.now() - info.childResourceAt;
|
|
7678
|
+
if (ageMs > STALE_CHILD_RESOURCE_MS) {
|
|
7461
7679
|
return void 0;
|
|
7462
7680
|
}
|
|
7463
7681
|
return {
|
|
7464
7682
|
rssBytes: info.childRssBytes ?? 0,
|
|
7465
|
-
cpuPercent: info.childCpuPercent ?? 0
|
|
7683
|
+
cpuPercent: info.childCpuPercent ?? 0,
|
|
7684
|
+
// Bounded by the guard above, so a caller summing several children's
|
|
7685
|
+
// readings can say how far apart they were taken. Without it a sum of
|
|
7686
|
+
// readings up to `STALE_CHILD_RESOURCE_MS` apart looks instantaneous.
|
|
7687
|
+
ageMs
|
|
7466
7688
|
};
|
|
7467
7689
|
}, "getChildResourceSnapshot");
|
|
7468
7690
|
const requestSessionStatus = /* @__PURE__ */ __name(async (sessionId, method, params = {}, timeoutMs = initTimeoutMs) => {
|
|
@@ -7688,6 +7910,7 @@ function createAcpSessionBridge(opts) {
|
|
|
7688
7910
|
cwdChangeQueue: Promise.resolve(),
|
|
7689
7911
|
promptQueue: Promise.resolve(),
|
|
7690
7912
|
pendingPromptCount: 0,
|
|
7913
|
+
pendingAgentNotificationCount: 0,
|
|
7691
7914
|
pendingPromptList: [],
|
|
7692
7915
|
midTurnMessageQueue: [],
|
|
7693
7916
|
modelChangeQueue: Promise.resolve(),
|
|
@@ -7702,6 +7925,9 @@ function createAcpSessionBridge(opts) {
|
|
|
7702
7925
|
attachRefs: /* @__PURE__ */ new Map(),
|
|
7703
7926
|
spawnOwnerWantedKill: false,
|
|
7704
7927
|
promptActive: false,
|
|
7928
|
+
childHolds: null,
|
|
7929
|
+
childHoldsAt: null,
|
|
7930
|
+
activeWorkCloseInFlight: false,
|
|
7705
7931
|
retryAllowed: false
|
|
7706
7932
|
};
|
|
7707
7933
|
ci.sessionIds.add(entry.sessionId);
|
|
@@ -8012,7 +8238,7 @@ function createAcpSessionBridge(opts) {
|
|
|
8012
8238
|
const hideInheritedHistory = action === "load" && req.hideInheritedHistory === true;
|
|
8013
8239
|
const existing = byId.get(req.sessionId);
|
|
8014
8240
|
if (existing) {
|
|
8015
|
-
if (existing
|
|
8241
|
+
if (isClosingOrAuthorizingClose(existing)) {
|
|
8016
8242
|
throw new SessionNotFoundError(
|
|
8017
8243
|
req.sessionId,
|
|
8018
8244
|
"The session is closing; retry after close completes"
|
|
@@ -8020,7 +8246,7 @@ function createAcpSessionBridge(opts) {
|
|
|
8020
8246
|
}
|
|
8021
8247
|
const replayFields = action === "load" && req.historyPageSize !== void 0 ? await refreshedReplayFieldsFor(existing, req.historyPageSize) : replayFieldsFor(existing, action);
|
|
8022
8248
|
const historyAnchorRecordId = action === "load" ? await resolveHistoryAnchorRecordId(existing, replayFields) : void 0;
|
|
8023
|
-
if (byId.get(req.sessionId) !== existing || existing
|
|
8249
|
+
if (byId.get(req.sessionId) !== existing || isClosingOrAuthorizingClose(existing)) {
|
|
8024
8250
|
throw new SessionNotFoundError(req.sessionId);
|
|
8025
8251
|
}
|
|
8026
8252
|
existing.attachCount++;
|
|
@@ -8207,6 +8433,12 @@ function createAcpSessionBridge(opts) {
|
|
|
8207
8433
|
const racedEntry = byId.get(req.sessionId);
|
|
8208
8434
|
if (racedEntry) {
|
|
8209
8435
|
restoreEvents.close();
|
|
8436
|
+
if (isClosingOrAuthorizingClose(racedEntry)) {
|
|
8437
|
+
throw new SessionNotFoundError(
|
|
8438
|
+
req.sessionId,
|
|
8439
|
+
"The session is closing; retry after close completes"
|
|
8440
|
+
);
|
|
8441
|
+
}
|
|
8210
8442
|
racedEntry.attachCount += 1 + coalesceState.count;
|
|
8211
8443
|
const clientId2 = registerClient(racedEntry, req.clientId);
|
|
8212
8444
|
recordAttachRef(racedEntry, clientId2);
|
|
@@ -8528,6 +8760,44 @@ function createAcpSessionBridge(opts) {
|
|
|
8528
8760
|
get activePromptCount() {
|
|
8529
8761
|
return activePromptCounter;
|
|
8530
8762
|
},
|
|
8763
|
+
get activeWork() {
|
|
8764
|
+
for (const entry of byId.values()) {
|
|
8765
|
+
if (entryHasActiveWork(entry)) return true;
|
|
8766
|
+
}
|
|
8767
|
+
return false;
|
|
8768
|
+
},
|
|
8769
|
+
/**
|
|
8770
|
+
* Raw coverage counts rather than a pre-collapsed grade.
|
|
8771
|
+
*
|
|
8772
|
+
* The grade has to be computed over the whole daemon, not per runtime and
|
|
8773
|
+
* then combined: a runtime with zero Sessions is vacuously `full`, and
|
|
8774
|
+
* folding that in as evidence made a deployment whose only real Sessions
|
|
8775
|
+
* were unreported aggregate to `partial`. Counts compose; grades do not.
|
|
8776
|
+
*/
|
|
8777
|
+
get activeWorkCoverage() {
|
|
8778
|
+
let covered = 0;
|
|
8779
|
+
let onNegotiatedChannel = 0;
|
|
8780
|
+
let total = 0;
|
|
8781
|
+
let oldestCoveredReportAt = null;
|
|
8782
|
+
for (const entry of byId.values()) {
|
|
8783
|
+
total++;
|
|
8784
|
+
const owner = channelInfoForEntry(entry);
|
|
8785
|
+
const capability = owner?.activeWork;
|
|
8786
|
+
if (!capability) continue;
|
|
8787
|
+
onNegotiatedChannel++;
|
|
8788
|
+
if (ACTIVE_WORK_HOLD_CATEGORIES.some(
|
|
8789
|
+
(category) => !capability.categories.includes(category)
|
|
8790
|
+
)) {
|
|
8791
|
+
continue;
|
|
8792
|
+
}
|
|
8793
|
+
if (!childHoldsAreFresh(entry, capability)) continue;
|
|
8794
|
+
covered++;
|
|
8795
|
+
if (entry.childHoldsAt !== null && (oldestCoveredReportAt === null || entry.childHoldsAt < oldestCoveredReportAt)) {
|
|
8796
|
+
oldestCoveredReportAt = entry.childHoldsAt;
|
|
8797
|
+
}
|
|
8798
|
+
}
|
|
8799
|
+
return { total, covered, onNegotiatedChannel, oldestCoveredReportAt };
|
|
8800
|
+
},
|
|
8531
8801
|
get lastActivityAt() {
|
|
8532
8802
|
return lastActivityTimestamp;
|
|
8533
8803
|
},
|
|
@@ -8570,7 +8840,7 @@ function createAcpSessionBridge(opts) {
|
|
|
8570
8840
|
if (effectiveScope === "single") {
|
|
8571
8841
|
const existing = defaultEntry;
|
|
8572
8842
|
if (existing) {
|
|
8573
|
-
if (existing
|
|
8843
|
+
if (isClosingOrAuthorizingClose(existing)) {
|
|
8574
8844
|
throw new SessionNotFoundError(
|
|
8575
8845
|
existing.sessionId,
|
|
8576
8846
|
"The session is closing; retry after close completes"
|
|
@@ -8690,7 +8960,7 @@ function createAcpSessionBridge(opts) {
|
|
|
8690
8960
|
const queuedAt = Date.now();
|
|
8691
8961
|
const entry = byId.get(sessionId);
|
|
8692
8962
|
if (!entry) return Promise.reject(new SessionNotFoundError(sessionId));
|
|
8693
|
-
if (entry
|
|
8963
|
+
if (isClosingOrAuthorizingClose(entry)) {
|
|
8694
8964
|
return Promise.reject(
|
|
8695
8965
|
new SessionNotFoundError(
|
|
8696
8966
|
sessionId,
|
|
@@ -9067,15 +9337,7 @@ function createAcpSessionBridge(opts) {
|
|
|
9067
9337
|
);
|
|
9068
9338
|
entry.midTurnMessageQueue.length = 0;
|
|
9069
9339
|
}
|
|
9070
|
-
|
|
9071
|
-
void closeSessionImpl(sessionId, void 0, {
|
|
9072
|
-
reason: "last_client_detached"
|
|
9073
|
-
}).catch((err) => {
|
|
9074
|
-
writeStderrLine(
|
|
9075
|
-
`qwen serve: deferred close-on-prompt-complete failed for ${JSON.stringify(sessionId)}: ${err instanceof Error ? err.stack ?? err.message : String(err)}`
|
|
9076
|
-
);
|
|
9077
|
-
});
|
|
9078
|
-
}
|
|
9340
|
+
void maybeCloseIdleSession(entry, "prompt_settled");
|
|
9079
9341
|
}).catch(() => {
|
|
9080
9342
|
});
|
|
9081
9343
|
return result;
|
|
@@ -10396,18 +10658,27 @@ function createAcpSessionBridge(opts) {
|
|
|
10396
10658
|
if (!entry) throw new SessionNotFoundError(sessionId);
|
|
10397
10659
|
const info = channelInfoForEntry(entry);
|
|
10398
10660
|
if (!info || info.isDying) throw new SessionNotFoundError(sessionId);
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10661
|
+
entry.pendingAgentNotificationCount++;
|
|
10662
|
+
try {
|
|
10663
|
+
const response = await Promise.race([
|
|
10664
|
+
withTimeout(
|
|
10665
|
+
entry.connection.extMethod(
|
|
10666
|
+
SERVE_CONTROL_EXT_METHODS.sessionBackgroundNotification,
|
|
10667
|
+
{ sessionId, ...notification }
|
|
10668
|
+
),
|
|
10669
|
+
initTimeoutMs,
|
|
10670
|
+
SERVE_CONTROL_EXT_METHODS.sessionBackgroundNotification
|
|
10404
10671
|
),
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10672
|
+
getTransportClosedReject(entry)
|
|
10673
|
+
]);
|
|
10674
|
+
return { sessionId, accepted: response["accepted"] === true };
|
|
10675
|
+
} finally {
|
|
10676
|
+
entry.pendingAgentNotificationCount = Math.max(
|
|
10677
|
+
0,
|
|
10678
|
+
entry.pendingAgentNotificationCount - 1
|
|
10679
|
+
);
|
|
10680
|
+
void maybeCloseIdleSession(entry, "agent_notification_settled");
|
|
10681
|
+
}
|
|
10411
10682
|
},
|
|
10412
10683
|
async generateSessionBtw(sessionId, question, signal, _context) {
|
|
10413
10684
|
const entry = byId.get(sessionId);
|
|
@@ -10648,7 +10919,7 @@ function createAcpSessionBridge(opts) {
|
|
|
10648
10919
|
async rewindSession(sessionId, req, context) {
|
|
10649
10920
|
const entry = byId.get(sessionId);
|
|
10650
10921
|
if (!entry) throw new SessionNotFoundError(sessionId);
|
|
10651
|
-
if (entry
|
|
10922
|
+
if (isClosingOrAuthorizingClose(entry)) {
|
|
10652
10923
|
throw new SessionNotFoundError(sessionId, "The session is closing");
|
|
10653
10924
|
}
|
|
10654
10925
|
const info = channelInfoForEntry(entry);
|
|
@@ -11138,18 +11409,7 @@ function createAcpSessionBridge(opts) {
|
|
|
11138
11409
|
if (entry.attachCount > 0) entry.attachCount--;
|
|
11139
11410
|
}
|
|
11140
11411
|
unregisterClient(entry, clientId);
|
|
11141
|
-
|
|
11142
|
-
await this.killSession(sessionId).catch(() => {
|
|
11143
|
-
});
|
|
11144
|
-
} else if (entry.clientIds.size === 0 && entry.events.subscriberCount === 0 && entry.pendingPromptCount === 0) {
|
|
11145
|
-
await closeSessionImpl(sessionId, void 0, {
|
|
11146
|
-
reason: "last_client_detached"
|
|
11147
|
-
}).catch((err) => {
|
|
11148
|
-
writeStderrLine(
|
|
11149
|
-
`qwen serve: close-on-last-detach failed for ${JSON.stringify(sessionId)}: ${err instanceof Error ? err.stack ?? err.message : String(err)}`
|
|
11150
|
-
);
|
|
11151
|
-
});
|
|
11152
|
-
}
|
|
11412
|
+
await maybeCloseIdleSession(entry, "last_client_detached");
|
|
11153
11413
|
},
|
|
11154
11414
|
killAllSync() {
|
|
11155
11415
|
shuttingDown = true;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import {
|
|
4
4
|
resolveModelConfig,
|
|
5
5
|
resolveProviderProtocol
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GXSNGY5M.js";
|
|
7
7
|
import {
|
|
8
8
|
external_exports
|
|
9
9
|
} from "./chunk-H6XPXXMH.js";
|
|
10
10
|
import {
|
|
11
11
|
stripRuntimeSnapshotPrefix
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VXZ5HAOV.js";
|
|
13
13
|
import {
|
|
14
14
|
REASONING_EFFORT_TIERS,
|
|
15
15
|
normalizeReasoningEffort
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
AuthType,
|
|
19
19
|
MODEL_GENERATION_CONFIG_FIELDS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-M3STHEMM.js";
|
|
21
21
|
import {
|
|
22
22
|
init_esbuild_shims
|
|
23
23
|
} from "./chunk-5O2XNYP6.js";
|