@qwen-code/qwen-code 0.22.1 → 0.22.2-nightly.20260828.7357136dd1
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/goal-draft/SKILL.md +109 -0
- package/bundled/qc-helper/docs/configuration/settings.md +13 -13
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +34 -3
- package/bundled/qc-helper/docs/features/code-review.md +3 -3
- package/bundled/qc-helper/docs/features/commands.md +2 -1
- package/bundled/qc-helper/docs/features/goals.md +58 -0
- package/bundled/qc-helper/docs/features/headless.md +13 -11
- package/bundled/qc-helper/docs/features/status-line.md +3 -3
- package/bundled/review/SKILL.md +70 -22
- package/bundled/review/references/persistence.md +7 -3
- package/bundled/review/references/posting.md +2 -0
- package/chunks/MaxSizedBox-LMWXCLDV.js +110 -0
- package/chunks/{StandaloneSessionPicker-XF2TVJFK.js → StandaloneSessionPicker-W3F7U3JL.js} +79 -81
- package/chunks/{acpAgent-GY53MJIW.js → acpAgent-EYZ6EEHD.js} +1132 -339
- package/chunks/{agent-7U6CC5KF.js → agent-RBLGBY65.js} +44 -46
- package/chunks/agent-headless-L5T4Y4OZ.js +85 -0
- package/chunks/{anthropicContentGenerator-U76GTVB6.js → anthropicContentGenerator-GMHML35Q.js} +10 -11
- package/chunks/{artifact-tool-XDJCZZCF.js → artifact-tool-XSMPHZBT.js} +11 -3
- package/chunks/{askUserQuestion-ZXXERLEV.js → askUserQuestion-4SWJY65V.js} +2 -2
- package/chunks/bridge-5LR2F2ND.js +119 -0
- package/chunks/{channel-management-service-HXXS3HOZ.js → channel-management-service-KHR3N6CH.js} +6 -6
- package/chunks/channel-settings-store-4FOAZW72.js +120 -0
- package/chunks/{channel-worker-group-EVDC2P4K.js → channel-worker-group-6NA6BBZV.js} +8 -7
- package/chunks/{channel-worker-manager-IJJZHGEI.js → channel-worker-manager-NEZ2J6RK.js} +10 -8
- package/chunks/{channel-worker-supervisor-YSKB5GVB.js → channel-worker-supervisor-FKU7DIHJ.js} +6 -5
- package/chunks/{chunk-7QGEJI7M.js → chunk-23RFD54N.js} +1 -1
- package/chunks/{chunk-LJP2BBMK.js → chunk-2SXSLSQE.js} +4 -4
- package/chunks/chunk-2TNL5KPM.js +49 -0
- package/chunks/chunk-335CJSNF.js +2320 -0
- package/chunks/chunk-36LGBEM6.js +130 -0
- package/chunks/{chunk-ZWKGZB2K.js → chunk-3JXM2CVW.js} +3 -3
- package/chunks/{chunk-ICWGPK23.js → chunk-3K6TUZHS.js} +7 -7
- package/chunks/{chunk-43C2II2G.js → chunk-3OOXT6CR.js} +5 -5
- package/chunks/{chunk-ILPXSKGQ.js → chunk-3WK3QDNV.js} +2 -2
- package/chunks/{chunk-2YDYDDE2.js → chunk-3XOKEVII.js} +3 -3
- package/chunks/chunk-3Y34Q3JV.js +1584 -0
- package/chunks/{chunk-ZLTEQYNC.js → chunk-42IDLQWS.js} +26 -20
- package/chunks/{chunk-5MK32KJV.js → chunk-454XFGH4.js} +3 -3
- package/chunks/chunk-4CMJKUND.js +95 -0
- package/chunks/{chunk-77TOMRBG.js → chunk-4K7KNVWH.js} +3 -3
- package/chunks/{chunk-V3GINY6K.js → chunk-4QHPPXK2.js} +16 -8
- package/chunks/{chunk-UCSV2IZW.js → chunk-62GQFYID.js} +3 -3
- package/chunks/{chunk-SLEWBQWM.js → chunk-6DIGWMGT.js} +2 -2
- package/chunks/{chunk-I6YW3T3W.js → chunk-6JCGO55P.js} +723 -3399
- package/chunks/{chunk-PVBT5QPD.js → chunk-6PJOTWAN.js} +1 -1
- package/chunks/{chunk-5Y2JCJAH.js → chunk-6W2IK5KC.js} +956 -17
- package/chunks/{chunk-A7X32SCT.js → chunk-6ZZBRRKQ.js} +5 -5
- package/chunks/{chunk-ELY4QVIB.js → chunk-7EQQR46F.js} +1 -1
- package/chunks/{chunk-4DCP3362.js → chunk-7GWQW5ID.js} +4 -4
- package/chunks/chunk-7J6OTNGO.js +424 -0
- package/chunks/{chunk-CITGRGCM.js → chunk-7TUBJBBJ.js} +4 -1
- package/chunks/{chunk-L436XFLJ.js → chunk-7VD6IPQM.js} +1 -1
- package/chunks/{chunk-E4I5MVBR.js → chunk-ABS25QER.js} +1 -1
- package/chunks/{chunk-2ZV3CZKI.js → chunk-AJGR6E6Z.js} +49 -32
- package/chunks/{chunk-HJOWQUE2.js → chunk-AU3MMVJF.js} +31 -14
- package/chunks/{chunk-I32QCIK7.js → chunk-AXC26UCQ.js} +1 -1
- package/chunks/{chunk-7AS7QX72.js → chunk-AY3BNYEQ.js} +1 -1
- package/chunks/{chunk-FVDQ5E67.js → chunk-B466ZSHZ.js} +3 -3
- package/chunks/{chunk-OI2DR6QB.js → chunk-B5OUL5EL.js} +2 -2
- package/chunks/{chunk-6US7BF3G.js → chunk-B5PHIJGI.js} +183 -5
- package/chunks/{chunk-5T4LWWNX.js → chunk-B7CDU2SL.js} +2 -2
- package/chunks/{chunk-4TPAG3O7.js → chunk-BFPESSTR.js} +1 -1
- package/chunks/{chunk-WBT3STGU.js → chunk-BKWNKLZB.js} +20 -20
- package/chunks/{chunk-73WFGVIZ.js → chunk-BOWFGCEU.js} +3 -3
- package/chunks/{chunk-EMGAVCBZ.js → chunk-BPAKYXQ3.js} +2 -2
- package/chunks/{chunk-IPQA4SR5.js → chunk-BWORX6FA.js} +1 -1
- package/chunks/{chunk-BKDAF7ES.js → chunk-BXDAPVQU.js} +2 -2
- package/chunks/{chunk-ZEADBZLO.js → chunk-C2X7KY45.js} +3 -3
- package/chunks/{chunk-T2HMXHYA.js → chunk-C3KURPP7.js} +6 -6
- package/chunks/{chunk-JUIJ3FXC.js → chunk-CAJTKR6W.js} +5 -5
- package/chunks/{chunk-2FN2HNTI.js → chunk-CFJY4DGX.js} +2 -2
- package/chunks/{chunk-DP7LABIB.js → chunk-CMHFCLBU.js} +1 -1
- package/chunks/{chunk-LRKMQPMD.js → chunk-CQH5KTKC.js} +1 -1
- package/chunks/{chunk-J7MLXFC5.js → chunk-CRKKHXTI.js} +185 -174
- package/chunks/{chunk-XNXWEGKB.js → chunk-CYAUBK46.js} +3 -3
- package/chunks/{chunk-JECO75XD.js → chunk-D5LUXLUH.js} +2 -2
- package/chunks/{chunk-SRGENTPF.js → chunk-DFDWJE6Z.js} +48 -31
- package/chunks/chunk-DJBQCO2E.js +842 -0
- package/chunks/{chunk-2CRNTW2B.js → chunk-DP4MWIM3.js} +2 -2
- package/chunks/{chunk-EB4VDXNI.js → chunk-DYXFD5RO.js} +182 -3
- package/chunks/{chunk-ODXCSIH5.js → chunk-E3XVSVKK.js} +26 -4
- package/chunks/{chunk-ZKAZP2ZG.js → chunk-EB6QRGHM.js} +3 -3
- package/chunks/{chunk-GNRVKN76.js → chunk-EKNBU2X7.js} +4 -4
- package/chunks/{chunk-3UZCLCXR.js → chunk-EKSCLBBF.js} +3 -3
- package/chunks/{chunk-624NHDGB.js → chunk-ERFDKH32.js} +11 -0
- package/chunks/chunk-EW5VVLJT.js +3525 -0
- package/chunks/{chunk-XYX474JQ.js → chunk-EWIQ3NAE.js} +2522 -2030
- package/chunks/{chunk-O5YGAEQS.js → chunk-FALBWZF4.js} +6 -6
- package/chunks/{chunk-GZJUCMH4.js → chunk-FEHMA4RO.js} +542 -654
- package/chunks/{chunk-2YEZNBSD.js → chunk-FMFBLTLY.js} +320 -86
- package/chunks/{chunk-MZS7GEC7.js → chunk-FTF2YIZ5.js} +1 -1
- package/chunks/{chunk-ZJG323IA.js → chunk-G6FECKTJ.js} +7 -5
- package/chunks/{chunk-6KS24S3X.js → chunk-GGNE3JAW.js} +1 -1
- package/chunks/{chunk-BQBUZDDH.js → chunk-H33EQVMG.js} +4 -4
- package/chunks/chunk-H72BQNM3.js +645 -0
- package/chunks/{chunk-5ZYZPDDF.js → chunk-HGIMWQVT.js} +30 -25
- package/chunks/{chunk-DCSAVGDJ.js → chunk-HOCJDUFY.js} +2 -2
- package/chunks/{chunk-MDZO5V2O.js → chunk-HPXV655A.js} +9 -7
- package/chunks/{chunk-7JPW6IYH.js → chunk-HVC3PNVC.js} +1 -1
- package/chunks/{chunk-2MHGD7EE.js → chunk-HYDJDQGJ.js} +1 -1
- package/chunks/{chunk-BDHLBR46.js → chunk-IB7FQJRY.js} +34 -11
- package/chunks/{chunk-E55H6BZ7.js → chunk-ICURCKIU.js} +1335 -119
- package/chunks/{chunk-PAJGKZAA.js → chunk-ISKH4QX3.js} +14 -12
- package/chunks/{chunk-3B5DCAQU.js → chunk-J6S24ZJE.js} +34 -34
- package/chunks/{chunk-AYVIGUUK.js → chunk-JB4JIVTJ.js} +1 -1
- package/chunks/{chunk-C4WBKZJT.js → chunk-JN4IWWMN.js} +4 -4
- package/chunks/{chunk-6HTMIKXZ.js → chunk-JUUBLSZU.js} +4 -4
- package/chunks/{chunk-T6OODF2U.js → chunk-JWALNCLT.js} +1 -1
- package/chunks/{chunk-SKNVVYIJ.js → chunk-K5KXUXWC.js} +3 -3
- package/chunks/{chunk-IRIX323G.js → chunk-KTJFDCX4.js} +2 -2
- package/chunks/{chunk-FK4H3V6S.js → chunk-LEFCFTEX.js} +6 -6
- package/chunks/{chunk-OQ6LTSX3.js → chunk-LEGTMYAE.js} +1 -1
- package/chunks/{chunk-NY3IJYAV.js → chunk-LLZA2IK3.js} +15 -9
- package/chunks/{chunk-5CI4AXDD.js → chunk-LNETQKBE.js} +4 -4
- package/chunks/{chunk-TOF4UZHH.js → chunk-LUEHOUHM.js} +3 -3
- package/chunks/{chunk-62PXFOK4.js → chunk-LVPZO674.js} +4 -4
- package/chunks/{chunk-EEQYTWGU.js → chunk-M4ORUPYI.js} +5 -5
- package/chunks/{chunk-GNMJNDZE.js → chunk-M6FOJXW3.js} +1 -1
- package/chunks/{chunk-MYLXL7F6.js → chunk-MAYHGRP4.js} +9 -9
- package/chunks/{chunk-K3LPAED5.js → chunk-MQM5PJML.js} +24 -4
- package/chunks/{chunk-SM7ZVKTF.js → chunk-MTJN7FOT.js} +7 -7
- package/chunks/{chunk-BGXZBI5B.js → chunk-N4X7G4J2.js} +2 -1
- package/chunks/{chunk-27ONXAFY.js → chunk-NIFYWDYN.js} +1 -1
- package/chunks/{chunk-IJVDHPKD.js → chunk-NU7RKEZR.js} +2 -2
- package/chunks/{chunk-R2ZJH3FV.js → chunk-NXMBRVMQ.js} +3 -3
- package/chunks/{chunk-JLGFGPZJ.js → chunk-OI4NY7RA.js} +2 -2
- package/chunks/{chunk-RRKNX553.js → chunk-PDQGMSZK.js} +1 -1
- package/chunks/{chunk-GTUKW3I6.js → chunk-PPKZ7JOE.js} +1 -1
- package/chunks/{chunk-SAH4BD2J.js → chunk-PQEISIKS.js} +67 -0
- package/chunks/{chunk-MW5AHWOZ.js → chunk-PWIGAMA4.js} +93 -14
- package/chunks/{chunk-WEGXPP5E.js → chunk-QFCDF5PL.js} +1 -1
- package/chunks/{chunk-EAV3TENS.js → chunk-QPTRRPZU.js} +44 -7
- package/chunks/{chunk-SQPOJ4ZI.js → chunk-RFI4YGMR.js} +21 -266
- package/chunks/{chunk-JVPFTDBK.js → chunk-RFIDDFAL.js} +1 -1
- package/chunks/chunk-RKFGE7JH.js +93 -0
- package/chunks/chunk-RNVFRIOO.js +275 -0
- package/chunks/{chunk-CPPYZHBN.js → chunk-RU7BK6B3.js} +1 -1
- package/chunks/{chunk-OT26ITEY.js → chunk-RVXDXY6I.js} +3 -3
- package/chunks/{chunk-W2WRNJKX.js → chunk-RWZB422L.js} +5 -5
- package/chunks/{chunk-6YAR6ZU3.js → chunk-RYNZQGXN.js} +19 -2
- package/chunks/{chunk-EKP3M4RF.js → chunk-SJ5ERAW3.js} +1 -1
- package/chunks/{chunk-DEYPMJPD.js → chunk-SMPR7SPO.js} +1 -1
- package/chunks/{chunk-3BV7TZNQ.js → chunk-SRZZY4IY.js} +3 -3
- package/chunks/{chunk-7CWEZQ6T.js → chunk-STUJ7IMZ.js} +0 -77
- package/chunks/{chunk-TKO4TLT6.js → chunk-SUX7HDNA.js} +3 -3
- package/chunks/{chunk-76WGY6LW.js → chunk-SVNO44PF.js} +3 -3
- package/chunks/{chunk-UX3IFLJM.js → chunk-SZLBBZH4.js} +150 -23
- package/chunks/{chunk-K63NK3KL.js → chunk-T2NKRHZZ.js} +13 -13
- package/chunks/{chunk-4K7NQDCG.js → chunk-T4EFG2P5.js} +18 -9
- package/chunks/{chunk-2NCVUT3C.js → chunk-TLHUNMO7.js} +4 -4
- package/chunks/{chunk-EC5BONC3.js → chunk-TPI7O7HR.js} +1 -1
- package/chunks/{chunk-ZXDM7DYV.js → chunk-TQHGJYR3.js} +2029 -616
- package/chunks/{chunk-T2CRBIDJ.js → chunk-TTX2JUE6.js} +1 -1
- package/chunks/{chunk-OX44MOAN.js → chunk-TW3E6YNO.js} +3 -3
- package/chunks/chunk-U54AYGEC.js +337 -0
- package/chunks/{chunk-2NNTE2ED.js → chunk-UHQFIS7N.js} +15 -0
- package/chunks/{chunk-KOJ6MHD5.js → chunk-UTLCH2FK.js} +1 -1
- package/chunks/{chunk-KCOXDRQL.js → chunk-UY3PBNY3.js} +17 -29
- package/chunks/{chunk-7DPKPBOQ.js → chunk-V2NDP3I4.js} +2 -2
- package/chunks/{chunk-47SIHHPL.js → chunk-V2QDDC5J.js} +19 -9
- package/chunks/{chunk-BVE5EMIG.js → chunk-V5J4J5TP.js} +2 -2
- package/chunks/{chunk-X2UOOG5V.js → chunk-VQUGEVGR.js} +1 -1
- package/chunks/{chunk-XJS54K4A.js → chunk-VTHREBQM.js} +2 -2
- package/chunks/{chunk-VMDURMFY.js → chunk-W6DUQ5GA.js} +11307 -10424
- package/chunks/{chunk-BX2BZPFJ.js → chunk-WALC5VJH.js} +4 -4
- package/chunks/{chunk-FPH6TXD3.js → chunk-WAOIHTJS.js} +1 -1
- package/chunks/{chunk-LI2HEMKO.js → chunk-WBHKK3CU.js} +4 -4
- package/chunks/{chunk-O3BUXIPM.js → chunk-WXEA74YB.js} +3 -3
- package/chunks/{chunk-NER3H7PI.js → chunk-X3ZRTCJD.js} +1 -1
- package/chunks/{chunk-YRLW2MSX.js → chunk-XBVNNDPK.js} +11 -4
- package/chunks/{chunk-VL4YX3FH.js → chunk-XF63PKEN.js} +1 -1
- package/chunks/{chunk-FN5C6C7G.js → chunk-XLLQJRAH.js} +190 -478
- package/chunks/{chunk-3FSBMAYD.js → chunk-XQFT3QUF.js} +1 -1
- package/chunks/{chunk-FJWICLG7.js → chunk-Y3QL45LS.js} +1 -1
- package/chunks/{chunk-IKN3IUJP.js → chunk-Y4TPOUEV.js} +17 -9
- package/chunks/{chunk-NVK4HJYQ.js → chunk-YRZX2PHA.js} +1 -1
- package/chunks/{chunk-2SERYG4T.js → chunk-YTDVNSUQ.js} +1 -1
- package/chunks/{chunk-KWFP3WV6.js → chunk-YWQ237GX.js} +4 -193
- package/chunks/{chunk-6E4WHQJV.js → chunk-ZTP35P4B.js} +1 -1
- package/chunks/{chunk-E6FGMDFQ.js → chunk-ZU4UDIWX.js} +19 -1
- package/chunks/config-utils-JVGAP34H.js +113 -0
- package/chunks/contextCommand-XDB7OSO7.js +106 -0
- package/chunks/{core-runtime-PKNQ63VL.js → core-runtime-XHYA2RH7.js} +59 -61
- package/chunks/{create-sub-session-RVHSWVAP.js → create-sub-session-23ITIELI.js} +3 -3
- package/chunks/{create-sub-session-PLGPY6TV.js → create-sub-session-MHYCFNCM.js} +163 -84
- package/chunks/{cron-create-IJGVR5R2.js → cron-create-KJ4IY6PP.js} +57 -10
- package/chunks/{cron-delete-4N5BI6GL.js → cron-delete-MBLQCAYY.js} +4 -4
- package/chunks/{cron-list-2CATIPUX.js → cron-list-DWH2PQ47.js} +4 -4
- package/chunks/{daemon-NAYK4XXU.js → daemon-K5XS42ID.js} +516 -3
- package/chunks/{daemon-git-worktree-guard-LDBJXH2U.js → daemon-git-worktree-guard-V3P5XLHB.js} +56 -58
- package/chunks/daemon-status-provider-KKU7ZTLM.js +117 -0
- package/chunks/daemon-trust-policy-TZGK34DW.js +112 -0
- package/chunks/{daemon-trust-policy-monitor-IGEJPHQ4.js → daemon-trust-policy-monitor-F23DD2M4.js} +62 -64
- package/chunks/deferred-core-runtime-LKLGBCGZ.js +114 -0
- package/chunks/{display-image-DR55LL6M.js → display-image-BE7I6ZB6.js} +5 -5
- package/chunks/{dist-DJBNNPLN.js → dist-4WXLCBDR.js} +1 -1
- package/chunks/{dist-TJUDJTCB.js → dist-5VXFRTWU.js} +280 -48
- package/chunks/{dist-6H6RZ5H6.js → dist-6BPYWHVD.js} +89 -65
- package/chunks/{dist-ZBVOXSKF.js → dist-GFN5DCBX.js} +74 -65
- package/chunks/{dist-SATKXKUR.js → dist-HZNT6GQS.js} +1 -1
- package/chunks/{dist-FVJZSIO4.js → dist-LVZCXVPF.js} +72 -20
- package/chunks/{dist-7CKN54NL.js → dist-N6W6E753.js} +71 -64
- package/chunks/{dist-4Q7NTUNB.js → dist-QDLFKWOL.js} +2 -2
- package/chunks/{dist-UQUFZDIY.js → dist-SWQMYP2Q.js} +18 -16
- package/chunks/earlyInputCapture-NERYFYTR.js +107 -0
- package/chunks/{edit-KSPVUEAS.js → edit-ACCATIXB.js} +45 -47
- package/chunks/{en-6MDBWMTG.js → en-YLXBXM4Z.js} +2 -1
- package/chunks/{enter-worktree-UOZ6ZTP7.js → enter-worktree-35QCAAFP.js} +7 -7
- package/chunks/{enterPlanMode-DZTABSKN.js → enterPlanMode-NEN6EPVM.js} +44 -46
- package/chunks/{environment-JXOSW25V.js → environment-CKWHBC5T.js} +58 -60
- package/chunks/errors-XTZPNQ77.js +113 -0
- package/chunks/{exit-worktree-G2QATUCV.js → exit-worktree-XQD6D543.js} +7 -7
- package/chunks/exitPlanMode-CY344X5J.js +83 -0
- package/chunks/{fast-path-EBS7NAVL.js → fast-path-YSOX4PAM.js} +5 -5
- package/chunks/{gemini-JELEKOVS.js → gemini-VQY2YCPH.js} +110 -108
- package/chunks/{geminiContentGenerator-I2CKP7XI.js → geminiContentGenerator-PAPXNIGU.js} +8 -8
- package/chunks/{glob-TDVEVPQZ.js → glob-GVCUSBBF.js} +44 -46
- package/chunks/{goal-tools-CNVXMSZD.js → goal-tools-5STK6OXW.js} +10 -8
- package/chunks/{grep-3NLSS32D.js → grep-5GPICQBU.js} +6 -6
- package/chunks/handleAutoUpdate-ZJPJN42W.js +109 -0
- package/chunks/i18n-BZYKOST7.js +124 -0
- package/chunks/{image-gen-63NN2H5N.js → image-gen-J6FDGUZP.js} +8 -10
- package/chunks/initializer-GO2C5HE3.js +113 -0
- package/chunks/installationInfo-WM2GXQZ6.js +107 -0
- package/chunks/{keychain-token-storage-3MGFRYGM.js → keychain-token-storage-37XPR34V.js} +2 -2
- package/chunks/list-ERDJB7PQ.js +116 -0
- package/chunks/{list-agents-EXRSHIDJ.js → list-agents-DI3YFTDT.js} +2 -2
- package/chunks/loadedSettingsAdapter-7JOCVOKV.js +110 -0
- package/chunks/{loggingContentGenerator-CZWUAHAI.js → loggingContentGenerator-3ONLU3BS.js} +321 -30
- package/chunks/{loop-wakeup-XBPB2BRO.js → loop-wakeup-XJFONSQ7.js} +5 -5
- package/chunks/{ls-WFONAND2.js → ls-3VAT2J7A.js} +4 -4
- package/chunks/{lsp-DUKPDUXN.js → lsp-5W7IRUBH.js} +2 -2
- package/chunks/{managed-npm-update-54W23SP5.js → managed-npm-update-TLRCC2GE.js} +57 -59
- package/chunks/mcp-2LH3QXR2.js +110 -0
- package/chunks/{monitor-A4J5QRGJ.js → monitor-P7LDAL4W.js} +44 -46
- package/chunks/nonInteractiveCli-E5T7PZ27.js +184 -0
- package/chunks/{notebook-edit-4ANFZON5.js → notebook-edit-F7KSG4WQ.js} +45 -47
- package/chunks/{openaiContentGenerator-JCCJJQZC.js → openaiContentGenerator-2EXCZUGN.js} +26 -28
- package/chunks/pidfile-P25DWA5Q.js +111 -0
- package/chunks/process-registry-OAEG6WGC.js +662 -0
- package/chunks/{processUtils-JJAR56SO.js → processUtils-PVDKBL35.js} +2 -2
- package/chunks/prompt-terminal-ledger-AJ7T7OIV.js +105 -0
- package/chunks/{qwenContentGenerator-5JM44ZSA.js → qwenContentGenerator-TBBRLWIT.js} +49 -51
- package/chunks/{qwenOAuth2-JIYAWXTW.js → qwenOAuth2-OF5WRBQT.js} +7 -9
- package/chunks/{read-file-N3E5DY7N.js → read-file-6IIY4RLJ.js} +13 -13
- package/chunks/{read-mcp-resource-7A7NFSFL.js → read-mcp-resource-XD257PGJ.js} +2 -2
- package/chunks/{record-artifact-CPJ4IJSD.js → record-artifact-VW23GS4F.js} +4 -4
- package/chunks/{report-findings-VFM5DENC.js → report-findings-XA3FJG3N.js} +5 -5
- package/chunks/{request-shutdown-AXVOFN5C.js → request-shutdown-BCLA3JV2.js} +7 -7
- package/chunks/resumeHistoryUtils-44IETXDY.js +118 -0
- package/chunks/ripGrep-E7ESZ7SS.js +39 -0
- package/chunks/{run-qwen-serve-IWGPZADI.js → run-qwen-serve-DXBCYW7V.js} +356 -331
- package/chunks/{runtime-I76HPFUE.js → runtime-RUSPD35D.js} +67 -69
- package/chunks/scheduled-tasks-DVRJZO6I.js +127 -0
- package/chunks/{scheduler-M6YL4K4I.js → scheduler-TDRB2NSY.js} +58 -60
- package/chunks/{sdk-exporters-http-XXSKBD2C.js → sdk-exporters-http-TTU2CHBU.js} +2 -2
- package/chunks/{sdk-impl-VPNBLV7I.js → sdk-impl-UUMVYMAL.js} +11 -5
- package/chunks/{send-message-A2GXDX3B.js → send-message-AJ4OCUBV.js} +25 -9
- package/chunks/serve-KITOM7OR.js +118 -0
- package/chunks/{server-TWXRRREO.js → server-THCOMUC2.js} +5476 -4771
- package/chunks/{session-IT5ZXU7A.js → session-XKR5MPXE.js} +105 -106
- package/chunks/session-pr-refresh-KRBH7KDA.js +278 -0
- package/chunks/{settings-IX5HOOCG.js → settings-YXZ4XBKK.js} +61 -63
- package/chunks/{shell-LZ55AAJB.js → shell-5FJ2DZ3W.js} +44 -46
- package/chunks/{skill-WSZ53D2R.js → skill-VMMJZ6CJ.js} +71 -26
- package/chunks/skill-settings-7SG4YA2W.js +118 -0
- package/chunks/spawnChannel-BPMIXRBI.js +112 -0
- package/chunks/standalone-update-QN5HFRIC.js +118 -0
- package/chunks/{startInteractiveUI-O6BI2OSA.js → startInteractiveUI-5A7RQFRP.js} +2902 -2289
- package/chunks/{syntheticOutput-5AJ444QT.js → syntheticOutput-ML43GEFN.js} +3 -3
- package/chunks/{task-create-CDJSOEQD.js → task-create-QN4LYRSE.js} +11 -11
- package/chunks/{task-list-BELMPA75.js → task-list-JPLGK45U.js} +5 -5
- package/chunks/{task-stop-U3S3KZG2.js → task-stop-CXEH5L2D.js} +2 -2
- package/chunks/{task-update-77VCFDDZ.js → task-update-IWEOJFV2.js} +11 -11
- package/chunks/{team-create-UF4TMQEH.js → team-create-HVGVUL2L.js} +44 -46
- package/chunks/{team-delete-YWFXX77L.js → team-delete-RZVVSGCY.js} +5 -5
- package/chunks/{team-plan-approval-U57NSR6C.js → team-plan-approval-S5A5FQWU.js} +44 -46
- package/chunks/terminal-image-renderer-SIVPPXDI.js +114 -0
- package/chunks/theme-manager-TA33UZZX.js +102 -0
- package/chunks/{todoWrite-435EO2CS.js → todoWrite-WDJNQEMW.js} +43 -25
- package/chunks/{tool-search-SV35UV72.js → tool-search-NX7IPDKP.js} +18 -18
- package/chunks/total-session-admission-PWXZBOVX.js +114 -0
- package/chunks/{trustedFolders-YKK67IP3.js → trustedFolders-V6Y4CU3F.js} +57 -59
- package/chunks/{update-relaunch-DX7LVA4P.js → update-relaunch-CGSX3R37.js} +5 -5
- package/chunks/updateCheck-T5O2WGIB.js +118 -0
- package/chunks/useAutoAcceptIndicator-ULBJJWPY.js +120 -0
- package/chunks/{validateNonInterActiveAuth-B26O4YJP.js → validateNonInterActiveAuth-E5S2JSRC.js} +101 -102
- package/chunks/{version-K5D7VJ4B.js → version-LS5JPU36.js} +1 -1
- package/chunks/{web-fetch-VFHZLLNZ.js → web-fetch-RLMFZTS3.js} +16 -18
- package/chunks/{web-search-AQE5A4J5.js → web-search-LMCIC4N5.js} +9 -11
- package/chunks/{workflow-XL6AEUZ7.js → workflow-JBXU3IGA.js} +128 -94
- package/chunks/workspace-providers-status-525ORQBH.js +114 -0
- package/chunks/{workspace-registration-store-I4U3V5LL.js → workspace-registration-store-7Y44R4LV.js} +1 -1
- package/chunks/workspace-registry-HS4RWUSQ.js +123 -0
- package/chunks/workspace-service-7PXDM6EB.js +129 -0
- package/chunks/workspace-skills-status-FMJGC2XI.js +113 -0
- package/chunks/{workspace-trust-reconciler-GJ466KCE.js → workspace-trust-reconciler-3YTWSQBY.js} +70 -70
- package/chunks/write-file-BVQRYQQO.js +88 -0
- package/chunks/{zh-TW-MV4FWFB6.js → zh-TW-RPTMRTHG.js} +2 -1
- package/chunks/{zh-X3WGU6SI.js → zh-UNY63FR3.js} +2 -1
- package/chunks/{zoom-image-NYJPC3NI.js → zoom-image-FGCELNS4.js} +13 -13
- package/cli.js +14 -14
- package/locales/en.js +2 -0
- package/locales/zh-TW.js +2 -0
- package/locales/zh.js +2 -0
- package/package.json +3 -3
- package/web-shell/assets/{abnfDiagram-VCTEODGH-yq7z7Anb.js → abnfDiagram-VCTEODGH-2XZDeWYO.js} +1 -1
- package/web-shell/assets/{arc-CbJO0xnT.js → arc-B6UgMh90.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-CRh89421.js → architectureDiagram-5GKGNRK7-DZgNFeN1.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-C75KAhKv.js → blockDiagram-NRAW4CY4-DQ2wvBFN.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BzlMveFB.js → c4Diagram-UCG6FXSJ-DMmQMrc4.js} +1 -1
- package/web-shell/assets/channel-D_TyfiTx.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-DA8QDX3a.js → chunk-2Q5K7J3B-C8Zh2e9y.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-Bgu7gQ7Y.js → chunk-5VM5RSS4-C3LTenP8.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-BOew7pIK.js → chunk-F27PBJKO-CxABOc8n.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-DHx1I-hO.js → chunk-G27WJ6UU-CD_JxHDC.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-SarFW0WU.js → chunk-JWPE2WC7-BdmZPmce.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-BLzP083Z.js → chunk-LCL6LL3I-80bcHmfK.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-Bmkv_iKm.js → chunk-POPQ4Y6H-CNpLZyQF.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-MPx9r1N2.js → chunk-SVP7TREG-CXlKgMv3.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-Ck-09rKG.js → chunk-XXDRQBXY-CivyYyvL.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-Bw_H3xMd.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-Bw_H3xMd.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-DWm6lfOG.js → cose-bilkent-JH36ORCC-COAjRH3w.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-DcBUyr5R.js → cynefin-OW5HDTMX-DqU1JHO6.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-Df8qmd_p.js → cynefinDiagram-5FMLGOSQ-BCLI1Bvj.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-DDmGspD7.js → dagre-3AP2YEHR-DmAz8nqF.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-BK_qFvbi.js → diagram-S7CK7UJ4-Ck-5QLT5.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-Uw3AP_bi.js → diagram-UQ7AKVKN-C0ljX0mW.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-CJOQKxY7.js → diagram-VSXAHHWV-DPgvT24v.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-DhdvZna5.js → diagram-VX7I27RA-D7hWr1LR.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-edQU0nlP.js → diagram-Z3DM3KII-D59tlOta.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-4kugBEsO.js → ebnfDiagram-PWID7BFC-CY2DDx00.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-BMkFivWO.js → erDiagram-SSCWMZ5O-AR4h8Q8k.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-BM1ea8g-.js → flowDiagram-A5DVABFB-DbF0HqBz.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-CXj_cKRf.js → ganttDiagram-EL5Y4UJY-J52mrIhc.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-D0nEqwqu.js → gitGraphDiagram-WWUBYQGX-CcgMY5EV.js} +1 -1
- package/web-shell/assets/index-BjUg3vPr.css +5 -0
- package/web-shell/assets/index-CFwYYVFU.js +1873 -0
- package/web-shell/assets/{index-B6JN54Pd.js → index-MQs7l15A.js} +1 -1
- package/web-shell/assets/{infoDiagram-RXCK75RN-DF7aGGbQ.js → infoDiagram-RXCK75RN-Buu3ibp2.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-CZYNX1lL.js → ishikawaDiagram-5VMMS53U-CoKQxnF3.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-CvrqMUz1.js → journeyDiagram-EYS64GPL-CxK35mTC.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-BZNJQZBj.js → kanban-definition-3QL26DDD-tk2CHTQ1.js} +1 -1
- package/web-shell/assets/{layout-Bf83x7D6.js → layout-DEpMwb4u.js} +1 -1
- package/web-shell/assets/{linear-Bkc3ES2f.js → linear-DSQsLh53.js} +1 -1
- package/web-shell/assets/{mermaid.core-C6xuovwz.js → mermaid.core-DIZuPBQT.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-DzH6gVRg.js → mindmap-definition-FBJOCRG2-CCAvk8r_.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-DCvLh2fa.js → pegDiagram-XKGWAZYB-CpJ28jxz.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-BtjVlx_6.js → pieDiagram-E7YTZNPT-ziJR2R32.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-IbroqxFe.js → quadrantDiagram-AXDQQJYC-B60zE3Mh.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-BvMykiWW.js → railroadDiagram-O6MQD6OU-M3GqQ_g1.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-D-HHMyrh.js → requirementDiagram-EFPCY7ZU-ntCtYqTk.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-C0XXhB6d.js → sankeyDiagram-P5KCCOFB-AYLoItcZ.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-DseAXj5d.js → sequenceDiagram-WJ2MYXX4-DEWk4Mlj.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-Cek2EweK.js → sizeCapture-X5ZJPWSS-OOWvzPay.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-yLv8wafW.js → stateDiagram-HBIQ2CUA-BcMmvxem.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DRLLqPWO.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-Cwz-opvE.js → swimlanes-XN3QIQJK-DuZTWWvh.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DOfLQQYt.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-BJuFD7OG.js → timeline-definition-24CTP7MA-CjqtZXEd.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-CNAavdoV.js → vennDiagram-4TSXK5OY-knVCVkQ4.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-DaIjAidq.js → wardleyDiagram-VM6X3IG4-yoWhw0a2.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-DkcQXjTy.js → xychartDiagram-S5SC5T6Z-ue14E_gL.js} +1 -1
- package/web-shell/index.html +3 -3
- package/chunks/MaxSizedBox-UUTUE42J.js +0 -112
- package/chunks/agent-headless-32O4L2CT.js +0 -87
- package/chunks/bridge-DFX2FFH4.js +0 -119
- package/chunks/channel-settings-store-ELLH2M4M.js +0 -117
- package/chunks/chunk-I6VVOZDK.js +0 -202
- package/chunks/chunk-JS73NNWF.js +0 -30
- package/chunks/chunk-K2OJUPOE.js +0 -78
- package/chunks/chunk-P3QQPMQA.js +0 -19
- package/chunks/chunk-SDVF6A42.js +0 -945
- package/chunks/chunk-VGHZT6JR.js +0 -51
- package/chunks/config-utils-7M6PCTLT.js +0 -113
- package/chunks/contextCommand-G4QG3TW6.js +0 -108
- package/chunks/daemon-status-provider-F5FEHVVG.js +0 -118
- package/chunks/daemon-trust-policy-C6YTU5CQ.js +0 -114
- package/chunks/deferred-core-runtime-GHT3GDOR.js +0 -116
- package/chunks/earlyInputCapture-HOSJTLWP.js +0 -109
- package/chunks/errors-IOXFDE4J.js +0 -115
- package/chunks/exitPlanMode-PZG4FXRB.js +0 -85
- package/chunks/handleAutoUpdate-AWAGHKOX.js +0 -111
- package/chunks/i18n-CYA25C5F.js +0 -126
- package/chunks/initializer-JD2FLNLO.js +0 -115
- package/chunks/installationInfo-N3DCWVWR.js +0 -109
- package/chunks/list-XDQAUET5.js +0 -118
- package/chunks/loadedSettingsAdapter-IK7H5JRK.js +0 -112
- package/chunks/mcp-2E7ZLMEE.js +0 -112
- package/chunks/nonInteractiveCli-ZNDXB62Y.js +0 -185
- package/chunks/pidfile-DHV2Y7UD.js +0 -113
- package/chunks/process-registry-PMJOA5CO.js +0 -172
- package/chunks/prompt-terminal-ledger-LDZ6QVYA.js +0 -107
- package/chunks/resumeHistoryUtils-YQRITQAG.js +0 -120
- package/chunks/ripGrep-NEIHKBKB.js +0 -39
- package/chunks/serve-XY5S63GN.js +0 -120
- package/chunks/skill-settings-5U7FTJIK.js +0 -120
- package/chunks/spawnChannel-TMC6VXGN.js +0 -113
- package/chunks/standalone-update-CUYGWTR4.js +0 -120
- package/chunks/terminal-image-renderer-DRL3BROJ.js +0 -116
- package/chunks/theme-manager-HHJPUDRN.js +0 -104
- package/chunks/total-session-admission-TQI7TCTL.js +0 -114
- package/chunks/updateCheck-6JRTKTUF.js +0 -120
- package/chunks/useAutoAcceptIndicator-MYXYSKSL.js +0 -122
- package/chunks/workspace-providers-status-H6TG34YV.js +0 -116
- package/chunks/workspace-registry-2PWNIYNI.js +0 -123
- package/chunks/workspace-service-4FGTUJLA.js +0 -131
- package/chunks/workspace-skills-status-7VOLUDT6.js +0 -115
- package/chunks/write-file-PWOYCT2K.js +0 -90
- package/web-shell/assets/channel-B3sGR79J.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-sTGo0K3v.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-sTGo0K3v.js +0 -1
- package/web-shell/assets/index-C-XlQn24.css +0 -5
- package/web-shell/assets/index-DLjXM0dn.js +0 -1860
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DeThXnol.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-GW0R1ZSv.js +0 -8
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
recomputeMcpGating
|
|
5
|
+
} from "./chunk-3OOXT6CR.js";
|
|
3
6
|
import {
|
|
4
7
|
classifyApiError,
|
|
5
8
|
fireSessionDeleteHook
|
|
@@ -14,7 +17,7 @@ import {
|
|
|
14
17
|
normalizePartList,
|
|
15
18
|
parseExtensionRef,
|
|
16
19
|
parseMcpServerRef
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-M4ORUPYI.js";
|
|
18
21
|
import {
|
|
19
22
|
getAvailableCommands,
|
|
20
23
|
getSlashCommandFirstToken,
|
|
@@ -23,14 +26,7 @@ import {
|
|
|
23
26
|
isSlashCommand,
|
|
24
27
|
recordDaemonSessionModel,
|
|
25
28
|
restoreSessionModelThenAuthenticate
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import {
|
|
28
|
-
collectContextData,
|
|
29
|
-
formatContextUsageText
|
|
30
|
-
} from "./chunk-KCOXDRQL.js";
|
|
31
|
-
import {
|
|
32
|
-
recomputeMcpGating
|
|
33
|
-
} from "./chunk-43C2II2G.js";
|
|
29
|
+
} from "./chunk-FMFBLTLY.js";
|
|
34
30
|
import {
|
|
35
31
|
SessionIdConflictError,
|
|
36
32
|
appEvents,
|
|
@@ -38,41 +34,45 @@ import {
|
|
|
38
34
|
cleanupReviewWorktreeLeases,
|
|
39
35
|
loadCliConfig,
|
|
40
36
|
normalizeDisabledToolList
|
|
41
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-TQHGJYR3.js";
|
|
38
|
+
import "./chunk-NYX53SV4.js";
|
|
39
|
+
import {
|
|
40
|
+
collectContextData,
|
|
41
|
+
formatContextUsageText
|
|
42
|
+
} from "./chunk-UY3PBNY3.js";
|
|
42
43
|
import {
|
|
43
44
|
getCommandSubcommandNames
|
|
44
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-ZTP35P4B.js";
|
|
45
46
|
import {
|
|
46
47
|
getEffectiveSupportedModes
|
|
47
|
-
} from "./chunk-
|
|
48
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-RVXDXY6I.js";
|
|
49
|
+
import "./chunk-CFJY4DGX.js";
|
|
49
50
|
import "./chunk-4WGODMVR.js";
|
|
50
51
|
import "./chunk-3SH53ANB.js";
|
|
51
|
-
import "./chunk-NYX53SV4.js";
|
|
52
52
|
import {
|
|
53
53
|
isGoalStatusKind
|
|
54
54
|
} from "./chunk-EKTCKZV5.js";
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-SUX7HDNA.js";
|
|
56
|
+
import "./chunk-YAF2MQZ6.js";
|
|
57
|
+
import "./chunk-QFCDF5PL.js";
|
|
57
58
|
import {
|
|
58
59
|
startNonInteractiveOpenAILogHousekeeping
|
|
59
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-TLHUNMO7.js";
|
|
60
61
|
import "./chunk-KW7NOTN6.js";
|
|
62
|
+
import "./chunk-LVPZO674.js";
|
|
63
|
+
import "./chunk-6H67XLET.js";
|
|
61
64
|
import {
|
|
62
65
|
beginAcpBootstrapConfigProfiling,
|
|
63
66
|
buildAndFreezeAcpStartupProfile,
|
|
64
67
|
endAcpBootstrapConfigProfiling,
|
|
65
68
|
markAcpStartup
|
|
66
69
|
} from "./chunk-5JTIYALA.js";
|
|
67
|
-
import "./chunk-
|
|
68
|
-
import "./chunk-
|
|
69
|
-
import "./chunk-
|
|
70
|
-
import "./chunk-YAF2MQZ6.js";
|
|
70
|
+
import "./chunk-LNETQKBE.js";
|
|
71
|
+
import "./chunk-JN4IWWMN.js";
|
|
72
|
+
import "./chunk-YRZX2PHA.js";
|
|
71
73
|
import {
|
|
72
74
|
computeCpuPercent
|
|
73
75
|
} from "./chunk-LBOVL47Y.js";
|
|
74
|
-
import "./chunk-62PXFOK4.js";
|
|
75
|
-
import "./chunk-6H67XLET.js";
|
|
76
76
|
import {
|
|
77
77
|
GENERATION_MAX_PROMPT_BYTES,
|
|
78
78
|
GENERATION_TIMEOUT_MS,
|
|
@@ -85,9 +85,7 @@ import {
|
|
|
85
85
|
createWorkspaceMemoryExtractionErrorLogger,
|
|
86
86
|
executeGeneration,
|
|
87
87
|
formatWorkspaceMemoryForgetSummary,
|
|
88
|
-
isCompatibleLiveSessionSource,
|
|
89
88
|
isValidServerName,
|
|
90
|
-
normalizeChannelDeliveryText,
|
|
91
89
|
projectAcpToolResultUpdate,
|
|
92
90
|
redactMcpServerSecrets,
|
|
93
91
|
replayTranscriptRecordPage,
|
|
@@ -95,7 +93,7 @@ import {
|
|
|
95
93
|
shouldSuppressRememberErrorDetails,
|
|
96
94
|
workspaceMemoryFailureCode,
|
|
97
95
|
workspaceMemoryFailureDiagnostics
|
|
98
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-YWQ237GX.js";
|
|
99
97
|
import {
|
|
100
98
|
BaseEmitter,
|
|
101
99
|
HistoryReplayer,
|
|
@@ -106,48 +104,57 @@ import {
|
|
|
106
104
|
hasFullSessionContext,
|
|
107
105
|
observeAcpToolResultProjection,
|
|
108
106
|
observeAcpToolResultWire
|
|
109
|
-
} from "./chunk-
|
|
110
|
-
import "./chunk-
|
|
107
|
+
} from "./chunk-AU3MMVJF.js";
|
|
108
|
+
import "./chunk-BFPESSTR.js";
|
|
111
109
|
import "./chunk-E7REAOTN.js";
|
|
112
|
-
import "./chunk-
|
|
110
|
+
import "./chunk-7VD6IPQM.js";
|
|
113
111
|
import "./chunk-2MIN6GRR.js";
|
|
114
112
|
import "./chunk-QHTIBUWB.js";
|
|
115
113
|
import "./chunk-TXASDT2M.js";
|
|
116
114
|
import {
|
|
117
|
-
|
|
118
|
-
} from "./chunk-
|
|
115
|
+
isCompatibleLiveSessionSource
|
|
116
|
+
} from "./chunk-36LGBEM6.js";
|
|
117
|
+
import {
|
|
118
|
+
DAEMON_OWNED_STANDALONE_CREATION_KEY,
|
|
119
|
+
SESSION_SOURCE_META_KEY,
|
|
120
|
+
isReservedStandaloneSessionSourceType,
|
|
121
|
+
parseSessionSource
|
|
122
|
+
} from "./chunk-2TNL5KPM.js";
|
|
123
|
+
import {
|
|
124
|
+
buildToolWriteOriginMeta,
|
|
125
|
+
getConversationDirectoryName,
|
|
126
|
+
isSameConversationPath
|
|
127
|
+
} from "./chunk-U54AYGEC.js";
|
|
128
|
+
import "./chunk-RXFQM6FQ.js";
|
|
129
|
+
import "./chunk-UXEO7E3V.js";
|
|
130
|
+
import {
|
|
131
|
+
normalizeChannelDeliveryText
|
|
132
|
+
} from "./chunk-4CMJKUND.js";
|
|
119
133
|
import {
|
|
120
134
|
normalizeSessionIdForLookup,
|
|
121
135
|
parseCallerSuppliedSessionId
|
|
122
136
|
} from "./chunk-ZEZKIS2K.js";
|
|
123
|
-
import "./chunk-RXFQM6FQ.js";
|
|
124
|
-
import "./chunk-UXEO7E3V.js";
|
|
125
137
|
import {
|
|
126
138
|
PERMISSION_RULE_TYPES,
|
|
127
139
|
PermissionRulesValidationError,
|
|
128
140
|
buildPermissionSettings,
|
|
129
141
|
normalizePermissionRules,
|
|
130
142
|
readPermissionRuleSet
|
|
131
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-AXC26UCQ.js";
|
|
132
144
|
import {
|
|
133
145
|
MAX_AUDIO_BYTES,
|
|
134
146
|
sanitizeVoiceErrorMessage,
|
|
135
147
|
transcribeVoiceAudio
|
|
136
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-SVNO44PF.js";
|
|
137
149
|
import {
|
|
138
150
|
readVoiceModel
|
|
139
|
-
} from "./chunk-
|
|
140
|
-
import "./chunk-
|
|
141
|
-
import "./chunk-
|
|
142
|
-
import "./chunk-
|
|
143
|
-
import "./chunk-
|
|
144
|
-
import {
|
|
145
|
-
SESSION_SOURCE_META_KEY,
|
|
146
|
-
parseSessionSource
|
|
147
|
-
} from "./chunk-I6YW3T3W.js";
|
|
151
|
+
} from "./chunk-HYDJDQGJ.js";
|
|
152
|
+
import "./chunk-YTDVNSUQ.js";
|
|
153
|
+
import "./chunk-7GWQW5ID.js";
|
|
154
|
+
import "./chunk-HOCJDUFY.js";
|
|
155
|
+
import "./chunk-EW5VVLJT.js";
|
|
148
156
|
import "./chunk-7U5G6JXI.js";
|
|
149
157
|
import "./chunk-WCCLLK7X.js";
|
|
150
|
-
import "./chunk-OCPBI7J5.js";
|
|
151
158
|
import {
|
|
152
159
|
REASONING_EFFORT_DEFAULT,
|
|
153
160
|
REASONING_EFFORT_NAMES,
|
|
@@ -155,7 +162,7 @@ import {
|
|
|
155
162
|
buildModelReasoningConfigOption,
|
|
156
163
|
buildModelReasoningConfigPreview,
|
|
157
164
|
getModelConfiguration
|
|
158
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-T4EFG2P5.js";
|
|
159
166
|
import {
|
|
160
167
|
ACP_ROUTE_ID_PREFIX,
|
|
161
168
|
buildAcpModelOptions,
|
|
@@ -164,26 +171,26 @@ import {
|
|
|
164
171
|
parseAcpModelOption,
|
|
165
172
|
resolveAcpModelOption,
|
|
166
173
|
sanitizeProviderBaseUrl
|
|
167
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-EKNBU2X7.js";
|
|
168
175
|
import {
|
|
169
176
|
mapSkillConfigToStatus
|
|
170
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-N4X7G4J2.js";
|
|
171
178
|
import {
|
|
172
179
|
resolveSkillSettings
|
|
173
180
|
} from "./chunk-Z4X5MTRT.js";
|
|
174
|
-
import "./chunk-
|
|
175
|
-
import "./chunk-
|
|
181
|
+
import "./chunk-MTJN7FOT.js";
|
|
182
|
+
import "./chunk-6ZZBRRKQ.js";
|
|
176
183
|
import "./chunk-57OAHC2Y.js";
|
|
177
|
-
import "./chunk-
|
|
178
|
-
import "./chunk-
|
|
179
|
-
import "./chunk-
|
|
184
|
+
import "./chunk-QPTRRPZU.js";
|
|
185
|
+
import "./chunk-Y4TPOUEV.js";
|
|
186
|
+
import "./chunk-HVC3PNVC.js";
|
|
180
187
|
import "./chunk-V6WHFGST.js";
|
|
181
188
|
import {
|
|
182
189
|
createLoadedSettingsAdapter
|
|
183
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-AY3BNYEQ.js";
|
|
184
191
|
import {
|
|
185
192
|
ndJsonStream
|
|
186
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-H72BQNM3.js";
|
|
187
194
|
import {
|
|
188
195
|
ACP_PREFLIGHT_KINDS,
|
|
189
196
|
IDLE_HOOK_EVENTS,
|
|
@@ -191,8 +198,8 @@ import {
|
|
|
191
198
|
SERVE_STATUS_EXT_METHODS,
|
|
192
199
|
STATUS_SCHEMA_VERSION,
|
|
193
200
|
mapDomainErrorToErrorKind
|
|
194
|
-
} from "./chunk-
|
|
195
|
-
import "./chunk-
|
|
201
|
+
} from "./chunk-7TUBJBBJ.js";
|
|
202
|
+
import "./chunk-FTF2YIZ5.js";
|
|
196
203
|
import {
|
|
197
204
|
ACTIVE_WORK_CLOSE_IF_UNHELD_PARAM,
|
|
198
205
|
ACTIVE_WORK_HEARTBEAT_META_KEY,
|
|
@@ -232,15 +239,15 @@ import {
|
|
|
232
239
|
import {
|
|
233
240
|
NOT_CURRENTLY_GENERATING_CANCEL_MESSAGE,
|
|
234
241
|
isNotCurrentlyGeneratingCancelError
|
|
235
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-ERFDKH32.js";
|
|
236
243
|
import "./chunk-6PLDPT2C.js";
|
|
237
244
|
import "./chunk-FYJ7W2PI.js";
|
|
238
|
-
import "./chunk-
|
|
239
|
-
import "./chunk-JVPFTDBK.js";
|
|
245
|
+
import "./chunk-STUJ7IMZ.js";
|
|
240
246
|
import "./chunk-GYTKQYDB.js";
|
|
247
|
+
import "./chunk-RFIDDFAL.js";
|
|
241
248
|
import "./chunk-ALMR3E6Q.js";
|
|
249
|
+
import "./chunk-RKFGE7JH.js";
|
|
242
250
|
import "./chunk-UDG5EZJI.js";
|
|
243
|
-
import "./chunk-M5GB774H.js";
|
|
244
251
|
import {
|
|
245
252
|
EXTERNAL_TOOL_GUARD_READY_META_KEY,
|
|
246
253
|
EXTERNAL_TOOL_GUARD_REQUIRED_VALUE,
|
|
@@ -250,11 +257,12 @@ import {
|
|
|
250
257
|
SHELL_EXECUTING_TOOL_NAMES,
|
|
251
258
|
isValidExternalToolGuardDenialReason
|
|
252
259
|
} from "./chunk-3VUENPWF.js";
|
|
253
|
-
import "./chunk-
|
|
260
|
+
import "./chunk-M5GB774H.js";
|
|
261
|
+
import "./chunk-7EQQR46F.js";
|
|
254
262
|
import {
|
|
255
263
|
ACP_EVENT_LOOP_STALL_RESTART_MS,
|
|
256
264
|
CHANNEL_PROMPT_META_KEY
|
|
257
|
-
} from "./chunk-
|
|
265
|
+
} from "./chunk-ICURCKIU.js";
|
|
258
266
|
import {
|
|
259
267
|
AgentSideConnection,
|
|
260
268
|
PROTOCOL_VERSION,
|
|
@@ -263,7 +271,7 @@ import {
|
|
|
263
271
|
import {
|
|
264
272
|
assembleMcpServers,
|
|
265
273
|
loadMcpApprovals
|
|
266
|
-
} from "./chunk-
|
|
274
|
+
} from "./chunk-PWIGAMA4.js";
|
|
267
275
|
import {
|
|
268
276
|
getOutputLanguageFilePath,
|
|
269
277
|
getPersistScopeForModelSelection,
|
|
@@ -272,9 +280,9 @@ import {
|
|
|
272
280
|
resolveOutputLanguageOrPreserveAuto,
|
|
273
281
|
updateOutputLanguageFile,
|
|
274
282
|
writeOutputLanguageAndRegisterPath
|
|
275
|
-
} from "./chunk-
|
|
283
|
+
} from "./chunk-HPXV655A.js";
|
|
276
284
|
import "./chunk-RKUWKYED.js";
|
|
277
|
-
import "./chunk-
|
|
285
|
+
import "./chunk-IB7FQJRY.js";
|
|
278
286
|
import "./chunk-GOXKNSDZ.js";
|
|
279
287
|
import {
|
|
280
288
|
getSystemDefaultsPath,
|
|
@@ -283,7 +291,7 @@ import {
|
|
|
283
291
|
import {
|
|
284
292
|
getCurrentLanguage,
|
|
285
293
|
setLanguageAsync
|
|
286
|
-
} from "./chunk-
|
|
294
|
+
} from "./chunk-RWZB422L.js";
|
|
287
295
|
import {
|
|
288
296
|
SUPPORTED_LANGUAGES
|
|
289
297
|
} from "./chunk-5EJZE3FP.js";
|
|
@@ -291,19 +299,19 @@ import {
|
|
|
291
299
|
findEnvFiles,
|
|
292
300
|
preResolveHomeEnvOverrides,
|
|
293
301
|
reloadEnvironment
|
|
294
|
-
} from "./chunk-
|
|
302
|
+
} from "./chunk-DP4MWIM3.js";
|
|
295
303
|
import {
|
|
296
304
|
ENV_ACP_REPEATED_TOOL_FAILURE_GUARD,
|
|
297
305
|
QWEN_CODE_SERVE_ENV
|
|
298
306
|
} from "./chunk-5PA6UEYA.js";
|
|
299
|
-
import "./chunk-
|
|
300
|
-
import "./chunk-
|
|
307
|
+
import "./chunk-V2NDP3I4.js";
|
|
308
|
+
import "./chunk-GGNE3JAW.js";
|
|
301
309
|
import "./chunk-W3N5XAZ6.js";
|
|
302
310
|
import {
|
|
303
311
|
isFolderTrustEnabled,
|
|
304
312
|
isWorkspaceTrusted,
|
|
305
313
|
loadTrustedFolders
|
|
306
|
-
} from "./chunk-
|
|
314
|
+
} from "./chunk-CYAUBK46.js";
|
|
307
315
|
import "./chunk-NPQ5ZKRP.js";
|
|
308
316
|
import "./chunk-MR3PXB6E.js";
|
|
309
317
|
import {
|
|
@@ -333,30 +341,30 @@ import {
|
|
|
333
341
|
resolveBaseUrl,
|
|
334
342
|
runManagedRememberByAgent,
|
|
335
343
|
subagentGenerator
|
|
336
|
-
} from "./chunk-
|
|
337
|
-
import "./chunk-
|
|
344
|
+
} from "./chunk-W6DUQ5GA.js";
|
|
345
|
+
import "./chunk-CRKKHXTI.js";
|
|
338
346
|
import "./chunk-XFSFZCM5.js";
|
|
339
347
|
import "./chunk-2EAZ43JQ.js";
|
|
340
348
|
import "./chunk-NF5J2WFA.js";
|
|
341
349
|
import {
|
|
342
350
|
CreateSubSessionTool
|
|
343
|
-
} from "./chunk-
|
|
351
|
+
} from "./chunk-CQH5KTKC.js";
|
|
344
352
|
import "./chunk-LJZSMWOH.js";
|
|
345
|
-
import "./chunk-
|
|
346
|
-
import "./chunk-
|
|
347
|
-
import "./chunk-
|
|
353
|
+
import "./chunk-V2QDDC5J.js";
|
|
354
|
+
import "./chunk-OI4NY7RA.js";
|
|
355
|
+
import "./chunk-K5KXUXWC.js";
|
|
348
356
|
import {
|
|
349
357
|
restoreWorktreeContext
|
|
350
|
-
} from "./chunk-
|
|
351
|
-
import "./chunk-
|
|
352
|
-
import "./chunk-
|
|
353
|
-
import "./chunk-
|
|
358
|
+
} from "./chunk-62GQFYID.js";
|
|
359
|
+
import "./chunk-C3KURPP7.js";
|
|
360
|
+
import "./chunk-XQFT3QUF.js";
|
|
361
|
+
import "./chunk-VTHREBQM.js";
|
|
354
362
|
import "./chunk-ZPJWUGCS.js";
|
|
355
363
|
import {
|
|
356
364
|
clearCachedCredentialFile,
|
|
357
365
|
qwenOAuth2Events
|
|
358
|
-
} from "./chunk-
|
|
359
|
-
import "./chunk-
|
|
366
|
+
} from "./chunk-3JXM2CVW.js";
|
|
367
|
+
import "./chunk-TW3E6YNO.js";
|
|
360
368
|
import {
|
|
361
369
|
APPROVAL_MODE_INFO,
|
|
362
370
|
BranchPointInvalidError,
|
|
@@ -374,7 +382,6 @@ import {
|
|
|
374
382
|
MessageDisplayDispatcher,
|
|
375
383
|
PLAN_MODE_ENTRY_SIBLING_SKIP_MESSAGE,
|
|
376
384
|
POOLED_TRANSPORTS_DEFAULT,
|
|
377
|
-
SESSION_ARTIFACT_PERSISTENCE_VERSION,
|
|
378
385
|
SESSION_TITLE_MAX_LENGTH,
|
|
379
386
|
SESSION_TRANSCRIPT_MAX_LIMIT,
|
|
380
387
|
SESSION_TRANSCRIPT_MAX_PAGE_BYTES,
|
|
@@ -391,6 +398,7 @@ import {
|
|
|
391
398
|
TURN_RESULT_TEXT_MAX_CHARS,
|
|
392
399
|
abortGoalForStopHookCap,
|
|
393
400
|
acquireSleepInhibitor,
|
|
401
|
+
ambientGoalToolResultProvenance,
|
|
394
402
|
applyAutoModeDecision,
|
|
395
403
|
approxBase64Bytes,
|
|
396
404
|
bridgeToolResultImages,
|
|
@@ -448,8 +456,6 @@ import {
|
|
|
448
456
|
mcpServerRequiresOAuth,
|
|
449
457
|
needsConfirmation,
|
|
450
458
|
normalizeDerivedBranchTitle,
|
|
451
|
-
normalizeEventPayload,
|
|
452
|
-
normalizeSnapshotPayload,
|
|
453
459
|
normalizeTurnResultError,
|
|
454
460
|
observeToolResultBoundary,
|
|
455
461
|
persistPermissionOutcome,
|
|
@@ -473,43 +479,55 @@ import {
|
|
|
473
479
|
updateSetting,
|
|
474
480
|
validatePlanModeShellApproval,
|
|
475
481
|
validatePlanModeShellContext
|
|
476
|
-
} from "./chunk-
|
|
482
|
+
} from "./chunk-EWIQ3NAE.js";
|
|
477
483
|
import "./chunk-GOFAQQZA.js";
|
|
478
484
|
import "./chunk-5M6IDOMF.js";
|
|
479
485
|
import "./chunk-TWPJO254.js";
|
|
480
486
|
import {
|
|
481
487
|
external_exports
|
|
482
488
|
} from "./chunk-CQ35AJ4Z.js";
|
|
483
|
-
import "./chunk-
|
|
484
|
-
import "./chunk-
|
|
485
|
-
import "./chunk-
|
|
486
|
-
import "./chunk-
|
|
489
|
+
import "./chunk-EKSCLBBF.js";
|
|
490
|
+
import "./chunk-LUEHOUHM.js";
|
|
491
|
+
import "./chunk-WXEA74YB.js";
|
|
492
|
+
import "./chunk-42IDLQWS.js";
|
|
487
493
|
import {
|
|
488
494
|
parsePositiveIntegerEnv
|
|
489
495
|
} from "./chunk-6PVPNMXU.js";
|
|
490
496
|
import {
|
|
491
497
|
RUNTIME_SNAPSHOT_PREFIX
|
|
492
|
-
} from "./chunk-
|
|
498
|
+
} from "./chunk-JB4JIVTJ.js";
|
|
499
|
+
import {
|
|
500
|
+
SESSION_ARTIFACT_PERSISTENCE_VERSION,
|
|
501
|
+
normalizeEventPayload,
|
|
502
|
+
normalizeSnapshotPayload
|
|
503
|
+
} from "./chunk-DJBQCO2E.js";
|
|
493
504
|
import "./chunk-IRH27ZC2.js";
|
|
494
505
|
import "./chunk-QHWCP53L.js";
|
|
495
|
-
import "./chunk-
|
|
506
|
+
import "./chunk-D5LUXLUH.js";
|
|
496
507
|
import {
|
|
497
508
|
promptIdContext,
|
|
498
509
|
todoWorkChainContext
|
|
499
510
|
} from "./chunk-O6GEWCJA.js";
|
|
500
511
|
import "./chunk-T26EAKDL.js";
|
|
501
|
-
import "./chunk-
|
|
512
|
+
import "./chunk-2SXSLSQE.js";
|
|
502
513
|
import "./chunk-CPBF7KYF.js";
|
|
503
|
-
import
|
|
514
|
+
import {
|
|
515
|
+
AgentOutputMessageCapture,
|
|
516
|
+
addAgentInputMessageAttributes,
|
|
517
|
+
addToolArgumentsAttributes,
|
|
518
|
+
addToolCallResultAttributes,
|
|
519
|
+
registerAcpEventLoopLagGauge,
|
|
520
|
+
startEventLoopLagMonitor
|
|
521
|
+
} from "./chunk-6W2IK5KC.js";
|
|
504
522
|
import {
|
|
505
523
|
HookEventName,
|
|
506
524
|
createHookOutput
|
|
507
|
-
} from "./chunk-
|
|
508
|
-
import "./chunk-
|
|
509
|
-
import "./chunk-
|
|
510
|
-
import "./chunk-
|
|
511
|
-
import "./chunk-
|
|
512
|
-
import "./chunk-
|
|
525
|
+
} from "./chunk-TTX2JUE6.js";
|
|
526
|
+
import "./chunk-4K7KNVWH.js";
|
|
527
|
+
import "./chunk-SMPR7SPO.js";
|
|
528
|
+
import "./chunk-JWALNCLT.js";
|
|
529
|
+
import "./chunk-NIFYWDYN.js";
|
|
530
|
+
import "./chunk-C2X7KY45.js";
|
|
513
531
|
import {
|
|
514
532
|
GoalConflictError,
|
|
515
533
|
GoalInvalidTransitionError,
|
|
@@ -518,50 +536,41 @@ import {
|
|
|
518
536
|
goalTurnContext,
|
|
519
537
|
parseGoalControlRequest,
|
|
520
538
|
parseGoalSnapshotV2,
|
|
521
|
-
parseGoalStateCause
|
|
539
|
+
parseGoalStateCause
|
|
540
|
+
} from "./chunk-XLLQJRAH.js";
|
|
541
|
+
import {
|
|
522
542
|
wrapUserPromptSubmitContext
|
|
523
|
-
} from "./chunk-
|
|
543
|
+
} from "./chunk-7J6OTNGO.js";
|
|
524
544
|
import {
|
|
525
545
|
APPROVAL_MODES
|
|
526
|
-
} from "./chunk-
|
|
546
|
+
} from "./chunk-V5J4J5TP.js";
|
|
527
547
|
import "./chunk-MLXTMF7H.js";
|
|
528
548
|
import "./chunk-NAVJD2PQ.js";
|
|
529
|
-
import "./chunk-
|
|
530
|
-
import "./chunk-
|
|
549
|
+
import "./chunk-B466ZSHZ.js";
|
|
550
|
+
import "./chunk-4QHPPXK2.js";
|
|
531
551
|
import "./chunk-QHMLYMMS.js";
|
|
532
|
-
import {
|
|
533
|
-
AgentOutputMessageCapture,
|
|
534
|
-
addAgentInputMessageAttributes,
|
|
535
|
-
addToolArgumentsAttributes,
|
|
536
|
-
addToolCallResultAttributes,
|
|
537
|
-
registerAcpEventLoopLagGauge,
|
|
538
|
-
startEventLoopLagMonitor
|
|
539
|
-
} from "./chunk-SDVF6A42.js";
|
|
540
|
-
import "./chunk-P3QQPMQA.js";
|
|
541
552
|
import {
|
|
542
553
|
addDaemonRequestAttribute,
|
|
543
554
|
extractDaemonTraceContext,
|
|
544
555
|
withDaemonSpan
|
|
545
|
-
} from "./chunk-
|
|
556
|
+
} from "./chunk-3WK3QDNV.js";
|
|
546
557
|
import "./chunk-VNOVK4I7.js";
|
|
547
|
-
import "./chunk-
|
|
548
|
-
import "./chunk-
|
|
558
|
+
import "./chunk-PQEISIKS.js";
|
|
559
|
+
import "./chunk-EB6QRGHM.js";
|
|
549
560
|
import {
|
|
550
561
|
runWithRuntimeContentGenerator
|
|
551
|
-
} from "./chunk-
|
|
562
|
+
} from "./chunk-CMHFCLBU.js";
|
|
552
563
|
import "./chunk-S6LOFUVP.js";
|
|
564
|
+
import {
|
|
565
|
+
getToolCallPreparations
|
|
566
|
+
} from "./chunk-CFKIH3D3.js";
|
|
553
567
|
import {
|
|
554
568
|
REASONING_EFFORT_TIERS,
|
|
555
569
|
applyReasoningEffort
|
|
556
570
|
} from "./chunk-2LD5U7Q3.js";
|
|
557
571
|
import "./chunk-DJ2GSRLV.js";
|
|
558
|
-
import "./chunk-
|
|
559
|
-
import "./chunk-
|
|
560
|
-
import {
|
|
561
|
-
getToolCallPreparations
|
|
562
|
-
} from "./chunk-CFKIH3D3.js";
|
|
563
|
-
import "./chunk-EB4VDXNI.js";
|
|
564
|
-
import "./chunk-FJWICLG7.js";
|
|
572
|
+
import "./chunk-DYXFD5RO.js";
|
|
573
|
+
import "./chunk-Y3QL45LS.js";
|
|
565
574
|
import {
|
|
566
575
|
ConversationFinishedEvent,
|
|
567
576
|
DiscoveredMCPTool,
|
|
@@ -592,35 +601,35 @@ import {
|
|
|
592
601
|
shouldRunVisionBridge,
|
|
593
602
|
splitImageParts,
|
|
594
603
|
uiTelemetryService
|
|
595
|
-
} from "./chunk-
|
|
596
|
-
import "./chunk-
|
|
604
|
+
} from "./chunk-SZLBBZH4.js";
|
|
605
|
+
import "./chunk-XBVNNDPK.js";
|
|
597
606
|
import "./chunk-VGC4I5JJ.js";
|
|
598
607
|
import {
|
|
599
|
-
|
|
608
|
+
getAllMemoryFilenames,
|
|
600
609
|
getSpecificMimeType
|
|
601
|
-
} from "./chunk-
|
|
610
|
+
} from "./chunk-BKWNKLZB.js";
|
|
602
611
|
import {
|
|
603
612
|
getAutoMemoryRoot,
|
|
604
613
|
getUserAutoMemoryRoot
|
|
605
|
-
} from "./chunk-
|
|
614
|
+
} from "./chunk-6PJOTWAN.js";
|
|
606
615
|
import {
|
|
607
616
|
runSideQuery
|
|
608
|
-
} from "./chunk-
|
|
617
|
+
} from "./chunk-BWORX6FA.js";
|
|
609
618
|
import "./chunk-WZAD4ZNJ.js";
|
|
610
619
|
import {
|
|
611
620
|
DEFAULT_TOKEN_LIMIT,
|
|
612
621
|
tokenLimit
|
|
613
622
|
} from "./chunk-FPGTNKCP.js";
|
|
614
|
-
import "./chunk-
|
|
623
|
+
import "./chunk-6DIGWMGT.js";
|
|
615
624
|
import {
|
|
616
625
|
hasVertexProjectConfigured,
|
|
617
626
|
preloadContentGenerator
|
|
618
|
-
} from "./chunk-
|
|
627
|
+
} from "./chunk-3K6TUZHS.js";
|
|
619
628
|
import "./chunk-XZA32HII.js";
|
|
620
|
-
import "./chunk-
|
|
629
|
+
import "./chunk-23RFD54N.js";
|
|
621
630
|
import {
|
|
622
631
|
AuthType
|
|
623
|
-
} from "./chunk-
|
|
632
|
+
} from "./chunk-PPKZ7JOE.js";
|
|
624
633
|
import "./chunk-HHJLM3WQ.js";
|
|
625
634
|
import {
|
|
626
635
|
endToolExecutionSpan,
|
|
@@ -632,17 +641,17 @@ import {
|
|
|
632
641
|
startToolExecutionSpan,
|
|
633
642
|
startToolSpan,
|
|
634
643
|
withInteractionSpan
|
|
635
|
-
} from "./chunk-
|
|
644
|
+
} from "./chunk-B5PHIJGI.js";
|
|
636
645
|
import "./chunk-74TONY4F.js";
|
|
637
|
-
import "./chunk-
|
|
646
|
+
import "./chunk-XF63PKEN.js";
|
|
638
647
|
import {
|
|
639
648
|
FORK_SUBAGENT_TYPE,
|
|
640
649
|
getStartupContextLength,
|
|
641
650
|
isSystemReminderContent
|
|
642
|
-
} from "./chunk-
|
|
643
|
-
import "./chunk-
|
|
651
|
+
} from "./chunk-CAJTKR6W.js";
|
|
652
|
+
import "./chunk-ZU4UDIWX.js";
|
|
644
653
|
import "./chunk-AQ37AY7B.js";
|
|
645
|
-
import "./chunk-
|
|
654
|
+
import "./chunk-PDQGMSZK.js";
|
|
646
655
|
import {
|
|
647
656
|
BaseDeclarativeTool,
|
|
648
657
|
BaseToolInvocation,
|
|
@@ -650,7 +659,7 @@ import {
|
|
|
650
659
|
ToolNames,
|
|
651
660
|
canonicalToolName,
|
|
652
661
|
isShellProgressData
|
|
653
|
-
} from "./chunk-
|
|
662
|
+
} from "./chunk-UTLCH2FK.js";
|
|
654
663
|
import {
|
|
655
664
|
Storage,
|
|
656
665
|
createDebugLogger,
|
|
@@ -658,11 +667,11 @@ import {
|
|
|
658
667
|
getErrorStatus,
|
|
659
668
|
isSubpath,
|
|
660
669
|
sessionIdContext
|
|
661
|
-
} from "./chunk-
|
|
662
|
-
import "./chunk-
|
|
670
|
+
} from "./chunk-UHQFIS7N.js";
|
|
671
|
+
import "./chunk-X3ZRTCJD.js";
|
|
663
672
|
import {
|
|
664
673
|
runExitCleanup
|
|
665
|
-
} from "./chunk-
|
|
674
|
+
} from "./chunk-SJ5ERAW3.js";
|
|
666
675
|
import {
|
|
667
676
|
writeStderrLine,
|
|
668
677
|
writeStderrLineSafe
|
|
@@ -1044,9 +1053,6 @@ function inactiveExtensionSkillRefs(config) {
|
|
|
1044
1053
|
if (extension.isActive) continue;
|
|
1045
1054
|
for (const skill of extension.skills ?? []) {
|
|
1046
1055
|
refs.add(extensionSkillRef(extension.name, skill.name));
|
|
1047
|
-
if (extension.displayName) {
|
|
1048
|
-
refs.add(extensionSkillRef(extension.displayName, skill.name));
|
|
1049
|
-
}
|
|
1050
1056
|
}
|
|
1051
1057
|
}
|
|
1052
1058
|
return refs;
|
|
@@ -1952,6 +1958,19 @@ var basicPermissionOptions = [
|
|
|
1952
1958
|
kind: "reject_once"
|
|
1953
1959
|
}
|
|
1954
1960
|
];
|
|
1961
|
+
function filterPermissionPersistenceOptions(options, policy) {
|
|
1962
|
+
if (!policy) return options;
|
|
1963
|
+
return options.filter((option) => {
|
|
1964
|
+
if (option.optionId === "proceed_always_project" /* ProceedAlwaysProject */ && !policy.allowProjectPersistence) {
|
|
1965
|
+
return false;
|
|
1966
|
+
}
|
|
1967
|
+
if (option.optionId === "proceed_always_user" /* ProceedAlwaysUser */ && !policy.allowUserPersistence) {
|
|
1968
|
+
return false;
|
|
1969
|
+
}
|
|
1970
|
+
return true;
|
|
1971
|
+
});
|
|
1972
|
+
}
|
|
1973
|
+
__name(filterPermissionPersistenceOptions, "filterPermissionPersistenceOptions");
|
|
1955
1974
|
function supportsHideAlwaysAllow(confirmation) {
|
|
1956
1975
|
return confirmation.type !== "ask_user_question";
|
|
1957
1976
|
}
|
|
@@ -2087,7 +2106,7 @@ function resolvePermissionOutcome(response, offeredOptions) {
|
|
|
2087
2106
|
return optionId;
|
|
2088
2107
|
}
|
|
2089
2108
|
__name(resolvePermissionOutcome, "resolvePermissionOutcome");
|
|
2090
|
-
function toPermissionOptions(confirmation, forceHideAlwaysAllow = false) {
|
|
2109
|
+
function toPermissionOptions(confirmation, forceHideAlwaysAllow = false, persistencePolicy) {
|
|
2091
2110
|
switch (confirmation.type) {
|
|
2092
2111
|
case "edit":
|
|
2093
2112
|
return filterAlwaysAllowOptions(
|
|
@@ -2106,56 +2125,65 @@ function toPermissionOptions(confirmation, forceHideAlwaysAllow = false) {
|
|
|
2106
2125
|
const label = formatExecPermissionScopeLabel(confirmation);
|
|
2107
2126
|
return filterAlwaysAllowOptions(
|
|
2108
2127
|
confirmation,
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2128
|
+
filterPermissionPersistenceOptions(
|
|
2129
|
+
[
|
|
2130
|
+
{
|
|
2131
|
+
optionId: "proceed_always_project" /* ProceedAlwaysProject */,
|
|
2132
|
+
name: `Always Allow in project: ${label}`,
|
|
2133
|
+
kind: "allow_always"
|
|
2134
|
+
},
|
|
2135
|
+
{
|
|
2136
|
+
optionId: "proceed_always_user" /* ProceedAlwaysUser */,
|
|
2137
|
+
name: `Always Allow for user: ${label}`,
|
|
2138
|
+
kind: "allow_always"
|
|
2139
|
+
},
|
|
2140
|
+
...basicPermissionOptions
|
|
2141
|
+
],
|
|
2142
|
+
persistencePolicy
|
|
2143
|
+
),
|
|
2122
2144
|
forceHideAlwaysAllow
|
|
2123
2145
|
);
|
|
2124
2146
|
}
|
|
2125
2147
|
case "mcp":
|
|
2126
2148
|
return filterAlwaysAllowOptions(
|
|
2127
2149
|
confirmation,
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2150
|
+
filterPermissionPersistenceOptions(
|
|
2151
|
+
[
|
|
2152
|
+
{
|
|
2153
|
+
optionId: "proceed_always_project" /* ProceedAlwaysProject */,
|
|
2154
|
+
name: `Always Allow in project: ${confirmation.toolName}`,
|
|
2155
|
+
kind: "allow_always"
|
|
2156
|
+
},
|
|
2157
|
+
{
|
|
2158
|
+
optionId: "proceed_always_user" /* ProceedAlwaysUser */,
|
|
2159
|
+
name: `Always Allow for user: ${confirmation.toolName}`,
|
|
2160
|
+
kind: "allow_always"
|
|
2161
|
+
},
|
|
2162
|
+
...basicPermissionOptions
|
|
2163
|
+
],
|
|
2164
|
+
persistencePolicy
|
|
2165
|
+
),
|
|
2141
2166
|
forceHideAlwaysAllow
|
|
2142
2167
|
);
|
|
2143
2168
|
case "info":
|
|
2144
2169
|
return filterAlwaysAllowOptions(
|
|
2145
2170
|
confirmation,
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2171
|
+
filterPermissionPersistenceOptions(
|
|
2172
|
+
[
|
|
2173
|
+
{
|
|
2174
|
+
optionId: "proceed_always_project" /* ProceedAlwaysProject */,
|
|
2175
|
+
name: "Always Allow in project",
|
|
2176
|
+
kind: "allow_always"
|
|
2177
|
+
},
|
|
2178
|
+
{
|
|
2179
|
+
optionId: "proceed_always_user" /* ProceedAlwaysUser */,
|
|
2180
|
+
name: "Always Allow for user",
|
|
2181
|
+
kind: "allow_always"
|
|
2182
|
+
},
|
|
2183
|
+
...basicPermissionOptions
|
|
2184
|
+
],
|
|
2185
|
+
persistencePolicy
|
|
2186
|
+
),
|
|
2159
2187
|
forceHideAlwaysAllow
|
|
2160
2188
|
);
|
|
2161
2189
|
case "plan":
|
|
@@ -2205,11 +2233,12 @@ __name(toPermissionOptions, "toPermissionOptions");
|
|
|
2205
2233
|
// packages/cli/src/acp-integration/session/SubAgentTracker.ts
|
|
2206
2234
|
var debugLogger3 = createDebugLogger("ACP_SUBAGENT_TRACKER");
|
|
2207
2235
|
var SubAgentTracker = class {
|
|
2208
|
-
constructor(ctx, client, parentToolCallId, subagentType, onPermissionCancel, permissionRequester = (params, signal) => requestPermissionWithAbort(this.client, params, signal)) {
|
|
2236
|
+
constructor(ctx, client, parentToolCallId, subagentType, onPermissionCancel, permissionRequester = (params, signal) => requestPermissionWithAbort(this.client, params, signal), permissionPersistencePolicy) {
|
|
2209
2237
|
this.ctx = ctx;
|
|
2210
2238
|
this.client = client;
|
|
2211
2239
|
this.onPermissionCancel = onPermissionCancel;
|
|
2212
2240
|
this.permissionRequester = permissionRequester;
|
|
2241
|
+
this.permissionPersistencePolicy = permissionPersistencePolicy;
|
|
2213
2242
|
this.toolCallEmitter = new ToolCallEmitter(ctx);
|
|
2214
2243
|
this.messageEmitter = new MessageEmitter(ctx);
|
|
2215
2244
|
this.subagentMeta = { parentToolCallId, subagentType };
|
|
@@ -2325,7 +2354,11 @@ var SubAgentTracker = class {
|
|
|
2325
2354
|
}, "onConfirm")
|
|
2326
2355
|
};
|
|
2327
2356
|
const { title, locations, kind } = this.toolCallEmitter.resolveToolMetadata(event.name, state?.args);
|
|
2328
|
-
const permissionOptions = toPermissionOptions(
|
|
2357
|
+
const permissionOptions = toPermissionOptions(
|
|
2358
|
+
fullConfirmationDetails,
|
|
2359
|
+
false,
|
|
2360
|
+
this.permissionPersistencePolicy
|
|
2361
|
+
);
|
|
2329
2362
|
const offeredPermissionOptions = permissionOptions.map((option) => ({
|
|
2330
2363
|
...option
|
|
2331
2364
|
}));
|
|
@@ -3248,6 +3281,18 @@ var LOOP_DETECTED_CONTEXT_MESSAGE = "System: this turn was terminated because th
|
|
|
3248
3281
|
var LOOP_DETECTED_TURN_ERROR_MESSAGE = "Tool-call loop protection stopped this turn. The session is still available; send a more specific instruction to continue.";
|
|
3249
3282
|
var TOOL_EXECUTION_CANCELLED_MESSAGE = "Tool execution was cancelled.";
|
|
3250
3283
|
var TOOL_POST_EXECUTION_CANCELLED_MESSAGE = "The tool had already completed; its output was discarded.";
|
|
3284
|
+
function sameManagedConversationExpectation(left, right) {
|
|
3285
|
+
return left.canonicalSessionId === right.canonicalSessionId && left.root.canonicalPath === right.root.canonicalPath && left.root.device === right.root.device && left.root.inode === right.root.inode && left.child.name === right.child.name && left.child.canonicalPath === right.child.canonicalPath && left.child.device === right.child.device && left.child.inode === right.child.inode;
|
|
3286
|
+
}
|
|
3287
|
+
__name(sameManagedConversationExpectation, "sameManagedConversationExpectation");
|
|
3288
|
+
function managedConversationBindingError() {
|
|
3289
|
+
return new RequestError(
|
|
3290
|
+
-32004,
|
|
3291
|
+
"The standalone working directory is missing.",
|
|
3292
|
+
{ errorKind: "working_directory_missing" }
|
|
3293
|
+
);
|
|
3294
|
+
}
|
|
3295
|
+
__name(managedConversationBindingError, "managedConversationBindingError");
|
|
3251
3296
|
function createDaemonToolLoopState(repeatedToolFailureMode) {
|
|
3252
3297
|
return {
|
|
3253
3298
|
totalToolCalls: 0,
|
|
@@ -3814,22 +3859,55 @@ async function registerCreateSubSessionTool(config) {
|
|
|
3814
3859
|
return;
|
|
3815
3860
|
}
|
|
3816
3861
|
const permissionManager = config.getPermissionManager();
|
|
3817
|
-
|
|
3862
|
+
const registrationStatus = permissionManager ? await permissionManager.getToolRegistrationStatus(
|
|
3863
|
+
ToolNames.CREATE_SUB_SESSION
|
|
3864
|
+
) : "registered";
|
|
3865
|
+
if (registrationStatus === "disabled") {
|
|
3818
3866
|
return;
|
|
3819
3867
|
}
|
|
3820
3868
|
const toolRegistry = config.getToolRegistry();
|
|
3869
|
+
if (registrationStatus === "deferred") {
|
|
3870
|
+
toolRegistry.registerPermissionDeferredFactory(
|
|
3871
|
+
ToolNames.CREATE_SUB_SESSION,
|
|
3872
|
+
async () => new CreateSubSessionTool(config)
|
|
3873
|
+
);
|
|
3874
|
+
await config.getGeminiClient().setTools();
|
|
3875
|
+
return;
|
|
3876
|
+
}
|
|
3821
3877
|
toolRegistry.registerTool(new CreateSubSessionTool(config));
|
|
3822
3878
|
toolRegistry.revealDeferredTool(ToolNames.CREATE_SUB_SESSION);
|
|
3823
3879
|
toolRegistry.pinDeferredToolReveal(ToolNames.CREATE_SUB_SESSION);
|
|
3824
3880
|
await config.getGeminiClient().setTools();
|
|
3825
3881
|
}
|
|
3826
3882
|
__name(registerCreateSubSessionTool, "registerCreateSubSessionTool");
|
|
3827
|
-
|
|
3883
|
+
var STANDALONE_SLASH_COMMAND_POLICY = Object.freeze({
|
|
3884
|
+
allowSessionReset: false,
|
|
3885
|
+
allowWorkspaceSettingsWrite: false,
|
|
3886
|
+
persistModelSelection: false,
|
|
3887
|
+
blockedBuiltinCommandNames: Object.freeze([
|
|
3888
|
+
"cd",
|
|
3889
|
+
"clear",
|
|
3890
|
+
"directory",
|
|
3891
|
+
"diff",
|
|
3892
|
+
"dream",
|
|
3893
|
+
"export",
|
|
3894
|
+
"learn",
|
|
3895
|
+
"curator",
|
|
3896
|
+
"workflows"
|
|
3897
|
+
])
|
|
3898
|
+
});
|
|
3899
|
+
var STANDALONE_PERMISSION_PERSISTENCE_POLICY = Object.freeze({
|
|
3900
|
+
allowProjectPersistence: false,
|
|
3901
|
+
allowUserPersistence: true
|
|
3902
|
+
});
|
|
3903
|
+
var STANDALONE_WORKTREE_ACTION_ERROR = "Standalone sessions cannot change or override their working directory.";
|
|
3904
|
+
async function buildAvailableCommandsSnapshot(config, abortSignal = AbortSignal.timeout(1e4), settings, executionPolicy) {
|
|
3828
3905
|
const slashCommands = await getAvailableCommands(
|
|
3829
3906
|
config,
|
|
3830
3907
|
abortSignal,
|
|
3831
3908
|
"acp",
|
|
3832
|
-
settings
|
|
3909
|
+
settings,
|
|
3910
|
+
executionPolicy
|
|
3833
3911
|
);
|
|
3834
3912
|
const disabledSkillNames = config.getDisabledSkillNames();
|
|
3835
3913
|
const inactiveSkillRefs = inactiveExtensionSkillRefs(config);
|
|
@@ -3923,6 +4001,11 @@ var Session = class {
|
|
|
3923
4001
|
this.runExclusiveAutomaticHistoryMutation = runExclusiveAutomaticHistoryMutation;
|
|
3924
4002
|
this.onActiveWorkChanged = onActiveWorkChanged;
|
|
3925
4003
|
this.sessionId = id;
|
|
4004
|
+
this.requiresManagedConversationBinding = isReservedStandaloneSessionSourceType(
|
|
4005
|
+
this.config.getSessionSourceType?.()
|
|
4006
|
+
);
|
|
4007
|
+
this.requiresManagedConversationActivation = this.requiresManagedConversationBinding && this.config.isProvisionalWorkspace?.() === true;
|
|
4008
|
+
this.slashCommandPolicy = this.requiresManagedConversationBinding ? STANDALONE_SLASH_COMMAND_POLICY : void 0;
|
|
3926
4009
|
this.runtimeBaseDir = config.storage.getRuntimeBaseDir();
|
|
3927
4010
|
const todoStopGuardEnabled = this.settings.merged.experimental?.todoStopGuard === true && !this.config.getBareMode() && !this.config.isSafeMode();
|
|
3928
4011
|
this.todoStopGuard = new DaemonTodoStopGuard(todoStopGuardEnabled);
|
|
@@ -3942,6 +4025,7 @@ var Session = class {
|
|
|
3942
4025
|
this.#bindGoalRuntime();
|
|
3943
4026
|
this.#registerBackgroundNotificationCallbacks();
|
|
3944
4027
|
this.#registerSubSessionSpawner();
|
|
4028
|
+
this.#registerCurrentSessionScheduledTaskCreator();
|
|
3945
4029
|
this.config.getWorkflowRunRegistry?.().setApprovalRequestCallback(
|
|
3946
4030
|
(entry, approval, rawArgs, signal) => this.#requestWorkflowApproval(entry.runId, approval, rawArgs, signal)
|
|
3947
4031
|
);
|
|
@@ -4066,6 +4150,11 @@ var Session = class {
|
|
|
4066
4150
|
liveSpeakToUserTool;
|
|
4067
4151
|
liveConversationActive;
|
|
4068
4152
|
liveEndInstructionPending = false;
|
|
4153
|
+
requiresManagedConversationBinding;
|
|
4154
|
+
requiresManagedConversationActivation;
|
|
4155
|
+
slashCommandPolicy;
|
|
4156
|
+
managedConversationBinding;
|
|
4157
|
+
managedConversationActivation;
|
|
4069
4158
|
// Message rewrite middleware (optional, installed after history replay)
|
|
4070
4159
|
messageRewriter;
|
|
4071
4160
|
/**
|
|
@@ -4122,6 +4211,8 @@ var Session = class {
|
|
|
4122
4211
|
controller: new AbortController(),
|
|
4123
4212
|
origin: "runtime",
|
|
4124
4213
|
continuationContext: input.continuationContext,
|
|
4214
|
+
...input.objectiveUpdated ? { objectiveUpdated: input.objectiveUpdated } : {},
|
|
4215
|
+
...input.windDown ? { windDown: true } : {},
|
|
4125
4216
|
...input.verifierFeedback ? { verifierFeedback: input.verifierFeedback } : {},
|
|
4126
4217
|
modelStarted: false
|
|
4127
4218
|
});
|
|
@@ -4278,13 +4369,14 @@ var Session = class {
|
|
|
4278
4369
|
return publication;
|
|
4279
4370
|
}
|
|
4280
4371
|
async #drainGoalQueue() {
|
|
4372
|
+
if (this.#isAutomaticWorkHeld()) return;
|
|
4281
4373
|
if (this.goalQueue.length === 0) return;
|
|
4282
4374
|
await this.runExclusiveAutomaticHistoryMutation(
|
|
4283
4375
|
() => this.#drainGoalQueueExclusive()
|
|
4284
4376
|
);
|
|
4285
4377
|
}
|
|
4286
4378
|
async #drainGoalQueueExclusive() {
|
|
4287
|
-
if (this.disposed || this.closing || this.goalProcessing || this.pendingPrompt || this.pendingPromptCompletion || this.cronProcessing || this.cronAbortController || this.notificationProcessing || this.notificationAbortController) {
|
|
4379
|
+
if (this.disposed || this.closing || this.goalProcessing || this.pendingPrompt || this.pendingPromptCompletion || this.cronProcessing || this.cronAbortController || this.notificationProcessing || this.notificationAbortController || this.#isAutomaticWorkHeld()) {
|
|
4288
4380
|
return;
|
|
4289
4381
|
}
|
|
4290
4382
|
const turn = this.goalQueue.shift();
|
|
@@ -4322,6 +4414,24 @@ var Session = class {
|
|
|
4322
4414
|
void this.#drainGoalQueue();
|
|
4323
4415
|
}
|
|
4324
4416
|
}
|
|
4417
|
+
/**
|
|
4418
|
+
* Confirms the continuation's prompt reached the model.
|
|
4419
|
+
*
|
|
4420
|
+
* `startGoalTurn` resolves at enqueue time, so the runtime cannot tell a
|
|
4421
|
+
* delivered turn from a queued one when it settles; `#settleGoalTurn`'s
|
|
4422
|
+
* degraded-persistence fallback settles a model-started turn through
|
|
4423
|
+
* `releaseTurn`, and only this confirmation keeps that turn's objective
|
|
4424
|
+
* announcement from rolling back and re-firing on the next continuation.
|
|
4425
|
+
*/
|
|
4426
|
+
#markGoalTurnDelivered(turnKey) {
|
|
4427
|
+
try {
|
|
4428
|
+
this.config.getGoalRuntime().markTurnDelivered(turnKey);
|
|
4429
|
+
} catch (error) {
|
|
4430
|
+
debugLogger6.debug(
|
|
4431
|
+
`Failed to confirm ACP Goal turn delivery: ${error instanceof Error ? error.message : String(error)}`
|
|
4432
|
+
);
|
|
4433
|
+
}
|
|
4434
|
+
}
|
|
4325
4435
|
async #settleGoalTurn(turn, result, failed) {
|
|
4326
4436
|
try {
|
|
4327
4437
|
const runtime = await this.config.getGoalRuntimeReady();
|
|
@@ -4826,6 +4936,48 @@ var Session = class {
|
|
|
4826
4936
|
};
|
|
4827
4937
|
});
|
|
4828
4938
|
}
|
|
4939
|
+
#registerCurrentSessionScheduledTaskCreator() {
|
|
4940
|
+
if (process.env[QWEN_CODE_SERVE_ENV] !== "1") {
|
|
4941
|
+
return;
|
|
4942
|
+
}
|
|
4943
|
+
this.config.setCurrentSessionScheduledTaskCreator(async (req) => {
|
|
4944
|
+
let resp;
|
|
4945
|
+
try {
|
|
4946
|
+
resp = await this.client.extMethod(
|
|
4947
|
+
SERVE_CONTROL_EXT_METHODS.createCurrentSessionScheduledTask,
|
|
4948
|
+
{
|
|
4949
|
+
callerSessionId: this.sessionId,
|
|
4950
|
+
promptId: getInvocationContext()?.promptId ?? req.promptId,
|
|
4951
|
+
cron: req.cron,
|
|
4952
|
+
prompt: req.prompt,
|
|
4953
|
+
recurring: req.recurring
|
|
4954
|
+
}
|
|
4955
|
+
);
|
|
4956
|
+
} catch (error) {
|
|
4957
|
+
const code = error && typeof error === "object" && "code" in error ? error.code : void 0;
|
|
4958
|
+
if (code === -32601) {
|
|
4959
|
+
throw new Error(
|
|
4960
|
+
"current_session_scheduling_unavailable: The daemon does not support current-session scheduling."
|
|
4961
|
+
);
|
|
4962
|
+
}
|
|
4963
|
+
const data = isRecord2(error) && isRecord2(error["data"]) ? error["data"] : void 0;
|
|
4964
|
+
const errorKind = data?.["errorKind"];
|
|
4965
|
+
if (typeof errorKind === "string") {
|
|
4966
|
+
const hint = data?.["hint"];
|
|
4967
|
+
throw new Error(
|
|
4968
|
+
`${errorKind}: ${typeof hint === "string" && hint.length > 0 ? hint : "Current-session scheduled task creation was rejected."}`
|
|
4969
|
+
);
|
|
4970
|
+
}
|
|
4971
|
+
throw error;
|
|
4972
|
+
}
|
|
4973
|
+
if (typeof resp["id"] !== "string" || resp["id"].length === 0 || typeof resp["cron"] !== "string" || resp["cron"].length === 0) {
|
|
4974
|
+
throw new Error(
|
|
4975
|
+
"cron_create: bridge returned an invalid scheduled-task result"
|
|
4976
|
+
);
|
|
4977
|
+
}
|
|
4978
|
+
return { id: resp["id"], cron: resp["cron"] };
|
|
4979
|
+
});
|
|
4980
|
+
}
|
|
4829
4981
|
async enableLiveScreenContext() {
|
|
4830
4982
|
const registry = this.config.getToolRegistry();
|
|
4831
4983
|
const existing = registry.getTool(CAPTURE_SCREEN_CONTEXT_TOOL_NAME);
|
|
@@ -4984,6 +5136,7 @@ var Session = class {
|
|
|
4984
5136
|
* mount.
|
|
4985
5137
|
*/
|
|
4986
5138
|
startCronScheduler() {
|
|
5139
|
+
if (this.#isAutomaticWorkHeld()) return;
|
|
4987
5140
|
this.#startCronSchedulerInRuntime().catch((error) => {
|
|
4988
5141
|
debugLogger6.warn(
|
|
4989
5142
|
`Cron scheduler startup failed [session ${this.sessionId}]: ${error}`
|
|
@@ -4993,6 +5146,113 @@ var Session = class {
|
|
|
4993
5146
|
getConfig() {
|
|
4994
5147
|
return this.config;
|
|
4995
5148
|
}
|
|
5149
|
+
installPendingManagedConversationBinding(expectation, assertIdentity) {
|
|
5150
|
+
if (!this.requiresManagedConversationBinding || expectation.canonicalSessionId !== this.sessionId) {
|
|
5151
|
+
throw managedConversationBindingError();
|
|
5152
|
+
}
|
|
5153
|
+
if (this.managedConversationBinding && this.managedConversationBinding.state !== "released" && !sameManagedConversationExpectation(
|
|
5154
|
+
this.managedConversationBinding.expectation,
|
|
5155
|
+
expectation
|
|
5156
|
+
)) {
|
|
5157
|
+
throw managedConversationBindingError();
|
|
5158
|
+
}
|
|
5159
|
+
this.managedConversationBinding = {
|
|
5160
|
+
expectation,
|
|
5161
|
+
assertIdentity,
|
|
5162
|
+
state: "pending"
|
|
5163
|
+
};
|
|
5164
|
+
}
|
|
5165
|
+
installManagedConversationActivation(run, onRelease) {
|
|
5166
|
+
if (!this.requiresManagedConversationActivation || this.managedConversationActivation) {
|
|
5167
|
+
throw managedConversationBindingError();
|
|
5168
|
+
}
|
|
5169
|
+
this.managedConversationActivation = {
|
|
5170
|
+
run,
|
|
5171
|
+
...onRelease ? { onRelease } : {},
|
|
5172
|
+
releaseScheduled: false,
|
|
5173
|
+
state: "pending"
|
|
5174
|
+
};
|
|
5175
|
+
}
|
|
5176
|
+
async activateManagedConversation() {
|
|
5177
|
+
if (!this.requiresManagedConversationActivation) return;
|
|
5178
|
+
const activation = this.managedConversationActivation;
|
|
5179
|
+
if (!activation) throw managedConversationBindingError();
|
|
5180
|
+
if (activation.state === "ready") return;
|
|
5181
|
+
if (activation.state === "poisoned") throw activation.error;
|
|
5182
|
+
if (activation.promise) return activation.promise;
|
|
5183
|
+
activation.state = "activating";
|
|
5184
|
+
const promise = activation.run().then(() => {
|
|
5185
|
+
activation.state = "ready";
|
|
5186
|
+
}).catch((error) => {
|
|
5187
|
+
activation.state = "poisoned";
|
|
5188
|
+
activation.error = error;
|
|
5189
|
+
throw error;
|
|
5190
|
+
});
|
|
5191
|
+
activation.promise = promise;
|
|
5192
|
+
return promise;
|
|
5193
|
+
}
|
|
5194
|
+
async commitManagedConversationBinding(expectation) {
|
|
5195
|
+
const binding = this.managedConversationBinding;
|
|
5196
|
+
if (!this.requiresManagedConversationBinding || !binding || !sameManagedConversationExpectation(binding.expectation, expectation)) {
|
|
5197
|
+
throw managedConversationBindingError();
|
|
5198
|
+
}
|
|
5199
|
+
if (binding.state === "committed" || binding.state === "released") return;
|
|
5200
|
+
if (!isSameConversationPath(
|
|
5201
|
+
this.config.getTargetDir(),
|
|
5202
|
+
binding.expectation.child.canonicalPath
|
|
5203
|
+
)) {
|
|
5204
|
+
throw managedConversationBindingError();
|
|
5205
|
+
}
|
|
5206
|
+
await binding.assertIdentity();
|
|
5207
|
+
await this.activateManagedConversation();
|
|
5208
|
+
await binding.assertIdentity();
|
|
5209
|
+
binding.state = "committed";
|
|
5210
|
+
}
|
|
5211
|
+
async releaseManagedConversationBinding(expectation) {
|
|
5212
|
+
const binding = this.managedConversationBinding;
|
|
5213
|
+
if (!this.requiresManagedConversationBinding || !binding || binding.state === "pending" || !sameManagedConversationExpectation(binding.expectation, expectation)) {
|
|
5214
|
+
throw managedConversationBindingError();
|
|
5215
|
+
}
|
|
5216
|
+
if (binding.state === "released") return;
|
|
5217
|
+
if (!isSameConversationPath(
|
|
5218
|
+
this.config.getTargetDir(),
|
|
5219
|
+
binding.expectation.child.canonicalPath
|
|
5220
|
+
)) {
|
|
5221
|
+
throw managedConversationBindingError();
|
|
5222
|
+
}
|
|
5223
|
+
await binding.assertIdentity();
|
|
5224
|
+
binding.state = "released";
|
|
5225
|
+
const activation = this.managedConversationActivation;
|
|
5226
|
+
if (activation && !activation.releaseScheduled) {
|
|
5227
|
+
activation.releaseScheduled = true;
|
|
5228
|
+
try {
|
|
5229
|
+
activation.onRelease?.();
|
|
5230
|
+
} catch (error) {
|
|
5231
|
+
debugLogger6.warn(
|
|
5232
|
+
`Managed conversation release callback failed [session ${this.sessionId}]: ${error}`
|
|
5233
|
+
);
|
|
5234
|
+
}
|
|
5235
|
+
}
|
|
5236
|
+
this.startCronScheduler();
|
|
5237
|
+
void this.sendAvailableCommandsUpdate();
|
|
5238
|
+
void this.#drainGoalQueue();
|
|
5239
|
+
void this.#drainCronQueue();
|
|
5240
|
+
void this.#drainNotificationQueue();
|
|
5241
|
+
}
|
|
5242
|
+
async assertManagedConversationBindingReady() {
|
|
5243
|
+
if (!this.requiresManagedConversationBinding) return;
|
|
5244
|
+
const binding = this.managedConversationBinding;
|
|
5245
|
+
if (binding?.state !== "released" || !isSameConversationPath(
|
|
5246
|
+
this.config.getTargetDir(),
|
|
5247
|
+
binding.expectation.child.canonicalPath
|
|
5248
|
+
)) {
|
|
5249
|
+
throw managedConversationBindingError();
|
|
5250
|
+
}
|
|
5251
|
+
await binding.assertIdentity();
|
|
5252
|
+
}
|
|
5253
|
+
#isAutomaticWorkHeld() {
|
|
5254
|
+
return this.requiresManagedConversationBinding && this.managedConversationBinding?.state !== "released";
|
|
5255
|
+
}
|
|
4996
5256
|
shouldHintAskUserQuestionRestore() {
|
|
4997
5257
|
if (this.config.getRestoreAskUserQuestion?.() !== true) return false;
|
|
4998
5258
|
if (this.pendingPrompt && !this.pendingPrompt.signal.aborted) return false;
|
|
@@ -5010,6 +5270,9 @@ var Session = class {
|
|
|
5010
5270
|
"Session history mutation is in progress"
|
|
5011
5271
|
);
|
|
5012
5272
|
}
|
|
5273
|
+
if (this.requiresManagedConversationBinding) {
|
|
5274
|
+
await this.assertManagedConversationBindingReady();
|
|
5275
|
+
}
|
|
5013
5276
|
try {
|
|
5014
5277
|
await this.config.assertCanStartTurn();
|
|
5015
5278
|
} catch (error) {
|
|
@@ -5020,6 +5283,9 @@ var Session = class {
|
|
|
5020
5283
|
}
|
|
5021
5284
|
throw error;
|
|
5022
5285
|
}
|
|
5286
|
+
if (this.requiresManagedConversationBinding) {
|
|
5287
|
+
await this.assertManagedConversationBindingReady();
|
|
5288
|
+
}
|
|
5023
5289
|
if (this.closing) {
|
|
5024
5290
|
throw RequestError.invalidParams(void 0, "Session is closing");
|
|
5025
5291
|
}
|
|
@@ -5081,6 +5347,9 @@ var Session = class {
|
|
|
5081
5347
|
}
|
|
5082
5348
|
return holds;
|
|
5083
5349
|
}
|
|
5350
|
+
hasStandaloneRelocationBlockers() {
|
|
5351
|
+
return this.collectActiveWorkHolds().length > 0 || this.config.getMonitorRegistry().getAll().some((monitor) => monitor.status === "running");
|
|
5352
|
+
}
|
|
5084
5353
|
#activeWorkChanged() {
|
|
5085
5354
|
this.onActiveWorkChanged?.();
|
|
5086
5355
|
}
|
|
@@ -5236,6 +5505,7 @@ var Session = class {
|
|
|
5236
5505
|
this.unsubscribeChatRecordingFailure?.();
|
|
5237
5506
|
this.unsubscribeChatRecordingFailure = void 0;
|
|
5238
5507
|
this.config.setSubSessionSpawner(void 0);
|
|
5508
|
+
this.config.setCurrentSessionScheduledTaskCreator(void 0);
|
|
5239
5509
|
this.config.getWorkflowRunRegistry?.().setApprovalRequestCallback(void 0);
|
|
5240
5510
|
this.workflowApprovalAbortController.abort(SESSION_DISPOSE_ABORT_REASON);
|
|
5241
5511
|
}
|
|
@@ -5926,6 +6196,7 @@ var Session = class {
|
|
|
5926
6196
|
return goalTurn ? goalTurnContext.run(goalTurn.permit, execute) : goalTurnContext.exit(execute);
|
|
5927
6197
|
}
|
|
5928
6198
|
async #executePromptInner(params, pendingSend, responseCapture, modelPrompt, rejectOnLoopDetected = false, goalTurn, channelTurn = false) {
|
|
6199
|
+
let managedMemoryRecallStarted = false;
|
|
5929
6200
|
return Storage.runWithRuntimeBaseDir(
|
|
5930
6201
|
this.runtimeBaseDir,
|
|
5931
6202
|
this.config.getWorkingDir(),
|
|
@@ -6071,7 +6342,8 @@ var Session = class {
|
|
|
6071
6342
|
// long-lived Session; without this the goal-state
|
|
6072
6343
|
// subscription stays on the disposed instance.
|
|
6073
6344
|
startNewSession: /* @__PURE__ */ __name(() => this.rebindGoalRuntimeForNewSession(), "startNewSession")
|
|
6074
|
-
}
|
|
6345
|
+
},
|
|
6346
|
+
this.slashCommandPolicy
|
|
6075
6347
|
);
|
|
6076
6348
|
if (slashCommandName === "advisor" && pendingSend.signal.aborted && slashCommandResult.type === "message") {
|
|
6077
6349
|
this.todoStopGuard.suspend();
|
|
@@ -6137,6 +6409,7 @@ var Session = class {
|
|
|
6137
6409
|
const hooksEnabled = !this.config.getDisableAllHooks?.();
|
|
6138
6410
|
const messageBus = this.config.getMessageBus?.();
|
|
6139
6411
|
const isRuntimeContinuation = goalTurn?.origin === "runtime";
|
|
6412
|
+
const isFreshUserTurn = !isRetry && !isContinue && !isRestoreAskUserQuestion && !isRuntimeContinuation;
|
|
6140
6413
|
if (!isContinue && !isRestoreAskUserQuestion && !isRuntimeContinuation && hooksEnabled && messageBus && this.config.hasHooksForEvent?.("UserPromptSubmit")) {
|
|
6141
6414
|
const response = await messageBus.request(
|
|
6142
6415
|
{
|
|
@@ -6165,6 +6438,10 @@ var Session = class {
|
|
|
6165
6438
|
];
|
|
6166
6439
|
}
|
|
6167
6440
|
}
|
|
6441
|
+
if (isFreshUserTurn) {
|
|
6442
|
+
managedMemoryRecallStarted = true;
|
|
6443
|
+
this.config.getGeminiClient().beginManagedAutoMemoryRecall(promptText, pendingSend.signal);
|
|
6444
|
+
}
|
|
6168
6445
|
if (!continuesCurrentWorkChain && !this.todoStopGuard.enabled) {
|
|
6169
6446
|
this.#resetTodoStopGuardBackgroundLineage();
|
|
6170
6447
|
}
|
|
@@ -6190,6 +6467,12 @@ var Session = class {
|
|
|
6190
6467
|
}
|
|
6191
6468
|
}
|
|
6192
6469
|
const systemReminders = await this.#buildInitialSystemReminders();
|
|
6470
|
+
if (isFreshUserTurn) {
|
|
6471
|
+
const memory = await this.config.getGeminiClient().consumeManagedAutoMemoryRecall("initial");
|
|
6472
|
+
if (memory?.prompt) {
|
|
6473
|
+
systemReminders.unshift({ text: memory.prompt });
|
|
6474
|
+
}
|
|
6475
|
+
}
|
|
6193
6476
|
if (systemReminders.length > 0 && !isRestoreAskUserQuestion) {
|
|
6194
6477
|
const alreadyHasReminder = isContinue && parts.some(
|
|
6195
6478
|
(part) => isSystemReminderContent({ role: "user", parts: [part] })
|
|
@@ -6366,7 +6649,12 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
6366
6649
|
let channelDeliveryResponseBlock;
|
|
6367
6650
|
let channelDeliveryCheckpoint = 0;
|
|
6368
6651
|
try {
|
|
6369
|
-
if (goalTurn)
|
|
6652
|
+
if (goalTurn) {
|
|
6653
|
+
goalTurn.modelStarted = true;
|
|
6654
|
+
if (goalTurn.origin === "runtime") {
|
|
6655
|
+
this.#markGoalTurnDelivered(goalTurn.turnKey);
|
|
6656
|
+
}
|
|
6657
|
+
}
|
|
6370
6658
|
const sendResult = await this.#sendMessageStreamWithAutoCompression(
|
|
6371
6659
|
promptId,
|
|
6372
6660
|
nextMessage?.parts ?? [],
|
|
@@ -6587,7 +6875,32 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
6587
6875
|
getActiveInteractionSpan()
|
|
6588
6876
|
);
|
|
6589
6877
|
}
|
|
6590
|
-
|
|
6878
|
+
if (isFreshUserTurn && result.stopReason === "end_turn" && !result.loopProtectionStopped && this.config.getManagedAutoMemoryEnabled()) {
|
|
6879
|
+
const memoryManager = this.config.getMemoryManager();
|
|
6880
|
+
const history = this.#getCurrentChat().getHistoryShallow();
|
|
6881
|
+
void memoryManager.scheduleExtract({
|
|
6882
|
+
projectRoot: this.config.getProjectRoot(),
|
|
6883
|
+
sessionId: this.config.getSessionId(),
|
|
6884
|
+
history,
|
|
6885
|
+
config: this.config
|
|
6886
|
+
}).catch((error) => {
|
|
6887
|
+
debugLogger6.warn(
|
|
6888
|
+
"Failed to schedule ACP managed auto-memory extraction.",
|
|
6889
|
+
error
|
|
6890
|
+
);
|
|
6891
|
+
});
|
|
6892
|
+
void memoryManager.scheduleDream({
|
|
6893
|
+
projectRoot: this.config.getProjectRoot(),
|
|
6894
|
+
sessionId: this.config.getSessionId(),
|
|
6895
|
+
config: this.config
|
|
6896
|
+
}).catch((error) => {
|
|
6897
|
+
debugLogger6.warn(
|
|
6898
|
+
"Failed to schedule ACP managed auto-memory dream.",
|
|
6899
|
+
error
|
|
6900
|
+
);
|
|
6901
|
+
});
|
|
6902
|
+
}
|
|
6903
|
+
return { stopReason: result.stopReason };
|
|
6591
6904
|
} finally {
|
|
6592
6905
|
logConversationFinishedEvent(
|
|
6593
6906
|
this.config,
|
|
@@ -6606,7 +6919,11 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
6606
6919
|
(result) => result.stopReason === "cancelled" ? "cancelled" : "ok"
|
|
6607
6920
|
);
|
|
6608
6921
|
}
|
|
6609
|
-
)
|
|
6922
|
+
).finally(() => {
|
|
6923
|
+
if (managedMemoryRecallStarted) {
|
|
6924
|
+
this.config.getGeminiClient().finishManagedAutoMemoryRecall();
|
|
6925
|
+
}
|
|
6926
|
+
});
|
|
6610
6927
|
}
|
|
6611
6928
|
async #handleStopHookLoop(pendingSend, promptId, hooksEnabled, messageBus, allowExternalHooks = true, modelOverride, responseCapture, rejectOnLoopDetected = false) {
|
|
6612
6929
|
const stopHookBlockingCap = this.config.getStopHookBlockingCap();
|
|
@@ -6673,7 +6990,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
6673
6990
|
}
|
|
6674
6991
|
);
|
|
6675
6992
|
if (continuation2.kind === "terminal") {
|
|
6676
|
-
return
|
|
6993
|
+
return continuation2;
|
|
6677
6994
|
}
|
|
6678
6995
|
continue;
|
|
6679
6996
|
}
|
|
@@ -6758,7 +7075,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
6758
7075
|
}
|
|
6759
7076
|
);
|
|
6760
7077
|
if (continuation2.kind === "terminal") {
|
|
6761
|
-
return
|
|
7078
|
+
return continuation2;
|
|
6762
7079
|
}
|
|
6763
7080
|
continue;
|
|
6764
7081
|
}
|
|
@@ -6862,7 +7179,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
6862
7179
|
stopHookReasons = stopHookReasons.slice(0, -1);
|
|
6863
7180
|
}
|
|
6864
7181
|
if (continuation.kind === "terminal") {
|
|
6865
|
-
return
|
|
7182
|
+
return continuation;
|
|
6866
7183
|
}
|
|
6867
7184
|
}
|
|
6868
7185
|
}
|
|
@@ -7317,6 +7634,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7317
7634
|
// and background-notification turns keep the graceful end-turn
|
|
7318
7635
|
// handling they had before loop stops became rejections.
|
|
7319
7636
|
stopReason: options.rejectOnLoopDetected ? cancelledOrThrowLoopDetected(pendingSend.signal, toolLoopState) : getAbortAwareEndTurnStopReason(pendingSend.signal),
|
|
7637
|
+
loopProtectionStopped: true,
|
|
7320
7638
|
...supersededAutomaticContinuation ? { supersededAutomaticContinuation: true } : {}
|
|
7321
7639
|
};
|
|
7322
7640
|
}
|
|
@@ -7329,6 +7647,14 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7329
7647
|
options.rejectOnLoopDetected ?? false
|
|
7330
7648
|
);
|
|
7331
7649
|
nextMessage = nextAfterTools.message;
|
|
7650
|
+
if (nextAfterTools.stoppedByRepeatedToolFailure) {
|
|
7651
|
+
return {
|
|
7652
|
+
kind: "terminal",
|
|
7653
|
+
stopReason: options.rejectOnLoopDetected ? cancelledOrThrowLoopDetected(pendingSend.signal, toolLoopState) : getAbortAwareEndTurnStopReason(pendingSend.signal),
|
|
7654
|
+
loopProtectionStopped: true,
|
|
7655
|
+
...supersededAutomaticContinuation ? { supersededAutomaticContinuation: true } : {}
|
|
7656
|
+
};
|
|
7657
|
+
}
|
|
7332
7658
|
if (nextAfterTools.hadMidTurnUserInput) {
|
|
7333
7659
|
nextGuardContinuation = void 0;
|
|
7334
7660
|
continue;
|
|
@@ -7627,6 +7953,14 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
7627
7953
|
);
|
|
7628
7954
|
return { responseStream: null, stopReason: "cancelled" };
|
|
7629
7955
|
}
|
|
7956
|
+
if (message[0]?.functionResponse) {
|
|
7957
|
+
const memory = await geminiClient.consumeManagedAutoMemoryRecall("tool_result");
|
|
7958
|
+
if (memory?.prompt) {
|
|
7959
|
+
message = insertAfterFunctionResponses(message, [
|
|
7960
|
+
{ text: memory.prompt }
|
|
7961
|
+
]);
|
|
7962
|
+
}
|
|
7963
|
+
}
|
|
7630
7964
|
const chat = this.#getCurrentChat();
|
|
7631
7965
|
const model = options.getModelOverride?.() ?? options.modelOverride ?? this.config.getModel();
|
|
7632
7966
|
const request = {
|
|
@@ -8000,13 +8334,23 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8000
8334
|
const displayText = message.kind === "text" ? message.message : message.displayText;
|
|
8001
8335
|
let rawParts;
|
|
8002
8336
|
try {
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8337
|
+
if (message.kind === "text") {
|
|
8338
|
+
rawParts = [{ text: message.message }];
|
|
8339
|
+
} else {
|
|
8340
|
+
rawParts = await withTimeoutSignal(
|
|
8341
|
+
abortSignal,
|
|
8342
|
+
MID_TURN_QUEUE_RESOLVE_TIMEOUT_MS,
|
|
8343
|
+
(signal) => this.#resolvePrompt(message.content, signal, {
|
|
8344
|
+
deferBridgeConversions: true
|
|
8345
|
+
})
|
|
8346
|
+
);
|
|
8347
|
+
rawParts = await this.#applyBridgeConversionsIfNeeded(
|
|
8348
|
+
rawParts,
|
|
8349
|
+
abortSignal,
|
|
8350
|
+
options.onFullTurnModel
|
|
8351
|
+
);
|
|
8352
|
+
abortSignal.throwIfAborted();
|
|
8353
|
+
}
|
|
8010
8354
|
} catch (messageError) {
|
|
8011
8355
|
if (abortSignal.aborted && !options.preserveFallbackOnAbort) {
|
|
8012
8356
|
return parts;
|
|
@@ -8052,15 +8396,18 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8052
8396
|
*/
|
|
8053
8397
|
async #startCronSchedulerIfNeeded() {
|
|
8054
8398
|
if (this.disposed) return;
|
|
8399
|
+
if (this.#isAutomaticWorkHeld()) return;
|
|
8055
8400
|
if (!this.config.isCronEnabled()) return;
|
|
8056
8401
|
if (this.cronDisabledByTokenLimit) return;
|
|
8057
8402
|
const scheduler = this.config.getCronScheduler();
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8403
|
+
if (!this.requiresManagedConversationBinding) {
|
|
8404
|
+
try {
|
|
8405
|
+
await scheduler.enableDurable(this.sessionId);
|
|
8406
|
+
} catch (err) {
|
|
8407
|
+
debugLogger6.warn(
|
|
8408
|
+
`Durable cron init failed \u2014 persistent tasks will not fire in this session: ${err}`
|
|
8409
|
+
);
|
|
8410
|
+
}
|
|
8064
8411
|
}
|
|
8065
8412
|
if (this.disposed) return;
|
|
8066
8413
|
if (!scheduler.hasPendingWork) return;
|
|
@@ -8136,6 +8483,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8136
8483
|
async #drainCronQueue() {
|
|
8137
8484
|
if (this.disposed) return;
|
|
8138
8485
|
if (this.closing) return;
|
|
8486
|
+
if (this.#isAutomaticWorkHeld()) return;
|
|
8139
8487
|
if (this.cronProcessing) return;
|
|
8140
8488
|
if (this.pendingPrompt) return;
|
|
8141
8489
|
if (this.goalProcessing) return;
|
|
@@ -8148,6 +8496,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8148
8496
|
}
|
|
8149
8497
|
async #drainCronQueueExclusive() {
|
|
8150
8498
|
if (this.disposed || this.closing || this.cronProcessing) return;
|
|
8499
|
+
if (this.#isAutomaticWorkHeld()) return;
|
|
8151
8500
|
if (this.pendingPrompt || this.notificationProcessing) return;
|
|
8152
8501
|
if (this.#deferAutomaticQueueDrainUntilTurnsSettle()) return;
|
|
8153
8502
|
if (this.#nextCronQueueIndex() < 0) return;
|
|
@@ -8224,11 +8573,13 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8224
8573
|
* `_meta.source='cron'`, streams the model response, and handles tool calls.
|
|
8225
8574
|
*/
|
|
8226
8575
|
async #executeCronPrompt(item) {
|
|
8227
|
-
return
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8576
|
+
return goalTurnContext.exit(
|
|
8577
|
+
() => runWithInvocationContext(
|
|
8578
|
+
void 0,
|
|
8579
|
+
() => sessionIdContext.run(
|
|
8580
|
+
this.config.getSessionId(),
|
|
8581
|
+
() => this.#executeCronPromptInner(item)
|
|
8582
|
+
)
|
|
8232
8583
|
)
|
|
8233
8584
|
);
|
|
8234
8585
|
}
|
|
@@ -8741,6 +9092,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8741
9092
|
async #drainNotificationQueue() {
|
|
8742
9093
|
if (this.disposed) return;
|
|
8743
9094
|
if (this.closing) return;
|
|
9095
|
+
if (this.#isAutomaticWorkHeld()) return;
|
|
8744
9096
|
if (this.notificationProcessing) return;
|
|
8745
9097
|
if (this.pendingPrompt || this.goalProcessing || this.cronProcessing || this.cronAbortController) {
|
|
8746
9098
|
return;
|
|
@@ -8754,6 +9106,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8754
9106
|
}
|
|
8755
9107
|
async #drainNotificationQueueExclusive() {
|
|
8756
9108
|
if (this.disposed || this.closing || this.notificationProcessing) return;
|
|
9109
|
+
if (this.#isAutomaticWorkHeld()) return;
|
|
8757
9110
|
if (this.pendingPrompt || this.cronProcessing || this.cronAbortController) {
|
|
8758
9111
|
return;
|
|
8759
9112
|
}
|
|
@@ -8790,11 +9143,13 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
8790
9143
|
this.currentShellNotificationActive = item.kind === "shell";
|
|
8791
9144
|
this.#activeWorkChanged();
|
|
8792
9145
|
try {
|
|
8793
|
-
await
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
9146
|
+
await goalTurnContext.exit(
|
|
9147
|
+
() => runWithInvocationContext(
|
|
9148
|
+
void 0,
|
|
9149
|
+
() => sessionIdContext.run(
|
|
9150
|
+
this.config.getSessionId(),
|
|
9151
|
+
() => this.#executeBackgroundNotificationPromptInner(item)
|
|
9152
|
+
)
|
|
8798
9153
|
)
|
|
8799
9154
|
);
|
|
8800
9155
|
} finally {
|
|
@@ -9173,12 +9528,17 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9173
9528
|
reloadSkillSettings() {
|
|
9174
9529
|
this.settings.reloadScopeFromDisk("Workspace" /* Workspace */);
|
|
9175
9530
|
}
|
|
9176
|
-
|
|
9177
|
-
|
|
9531
|
+
buildAvailableCommandsSnapshot() {
|
|
9532
|
+
return buildAvailableCommandsSnapshot(
|
|
9178
9533
|
this.config,
|
|
9179
9534
|
void 0,
|
|
9180
|
-
this.settings
|
|
9535
|
+
this.settings,
|
|
9536
|
+
this.slashCommandPolicy
|
|
9181
9537
|
);
|
|
9538
|
+
}
|
|
9539
|
+
async sendAvailableCommandsUpdateOrThrow() {
|
|
9540
|
+
if (this.#isAutomaticWorkHeld()) return;
|
|
9541
|
+
const { availableCommands, availableSkills, availableSkillDetails } = await this.buildAvailableCommandsSnapshot();
|
|
9182
9542
|
const update = {
|
|
9183
9543
|
sessionUpdate: "available_commands_update",
|
|
9184
9544
|
availableCommands,
|
|
@@ -9321,7 +9681,8 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9321
9681
|
}).catch((error) => {
|
|
9322
9682
|
debugLogger6.debug("model-update extNotification failed", error);
|
|
9323
9683
|
});
|
|
9324
|
-
|
|
9684
|
+
const persistDefault = !this.requiresManagedConversationBinding && (options.persistDefault ?? true);
|
|
9685
|
+
if (persistDefault) {
|
|
9325
9686
|
const persistScope = getPersistScopeForModelSelection(this.settings);
|
|
9326
9687
|
this.settings.setValue(
|
|
9327
9688
|
persistScope,
|
|
@@ -9445,11 +9806,16 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9445
9806
|
if (record.skipPersistence === true || this.#shouldSkipRestoredAskUserQuestionPersistence(record.callId)) {
|
|
9446
9807
|
return;
|
|
9447
9808
|
}
|
|
9448
|
-
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
|
|
9452
|
-
|
|
9809
|
+
const goalProvenance = ambientGoalToolResultProvenance(record.toolName);
|
|
9810
|
+
this.config.getChatRecordingService()?.recordToolResult(
|
|
9811
|
+
finalized[index].responseParts,
|
|
9812
|
+
{
|
|
9813
|
+
...record.metadata,
|
|
9814
|
+
persistedOutputFiles: finalized[index].persistedOutputFiles,
|
|
9815
|
+
artifacts: finalized[index].artifacts
|
|
9816
|
+
},
|
|
9817
|
+
...goalProvenance ? [goalProvenance] : []
|
|
9818
|
+
);
|
|
9453
9819
|
});
|
|
9454
9820
|
return {
|
|
9455
9821
|
...result,
|
|
@@ -9936,11 +10302,6 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
9936
10302
|
* branches in `GeminiClient.sendMessageStream` (`client.ts:848-878`) —
|
|
9937
10303
|
* the ACP path bypasses that code, so without this helper plan mode is
|
|
9938
10304
|
* silently inert and subagent/arena sessions lose context.
|
|
9939
|
-
*
|
|
9940
|
-
* Scope note: the `relevantAutoMemory` reminder is intentionally NOT
|
|
9941
|
-
* included here. Managed auto-memory requires a prefetch pipeline that
|
|
9942
|
-
* lives in `GeminiClient`, and porting it into the ACP path is tracked
|
|
9943
|
-
* separately as part of the broader middleware-alignment work.
|
|
9944
10305
|
*/
|
|
9945
10306
|
async #buildInitialSystemReminders() {
|
|
9946
10307
|
const reminders = [];
|
|
@@ -10221,6 +10582,18 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10221
10582
|
const isAgentTool = tool.name === ToolNames.AGENT;
|
|
10222
10583
|
const isExitPlanModeTool = tool.name === ToolNames.EXIT_PLAN_MODE;
|
|
10223
10584
|
const isEnterPlanModeTool = tool.name === ToolNames.ENTER_PLAN_MODE;
|
|
10585
|
+
const requestsAgentWorkingDirectory = isAgentTool && (args["isolation"] === "worktree" || typeof args["working_dir"] === "string" && args["working_dir"].trim().length > 0);
|
|
10586
|
+
if (this.requiresManagedConversationBinding && (requestsAgentWorkingDirectory || tool.name === ToolNames.ENTER_WORKTREE || tool.name === ToolNames.EXIT_WORKTREE)) {
|
|
10587
|
+
return earlyErrorResponse(
|
|
10588
|
+
new Error(STANDALONE_WORKTREE_ACTION_ERROR),
|
|
10589
|
+
toolName,
|
|
10590
|
+
{
|
|
10591
|
+
status: "error",
|
|
10592
|
+
errorType: "execution_denied" /* EXECUTION_DENIED */,
|
|
10593
|
+
executionStatus: "not_started"
|
|
10594
|
+
}
|
|
10595
|
+
);
|
|
10596
|
+
}
|
|
10224
10597
|
if (isAgentTool) {
|
|
10225
10598
|
agentToolAbortController = new AbortController();
|
|
10226
10599
|
activeToolAbortSignal = agentToolAbortController.signal;
|
|
@@ -10260,7 +10633,8 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10260
10633
|
agentToolAbortController?.abort(USER_CANCEL_ABORT_REASON);
|
|
10261
10634
|
onStopAfterPermissionCancel?.();
|
|
10262
10635
|
},
|
|
10263
|
-
(params, signal) => this.#requestPermissionQueued(params, signal)
|
|
10636
|
+
(params, signal) => this.#requestPermissionQueued(params, signal),
|
|
10637
|
+
this.requiresManagedConversationBinding ? STANDALONE_PERMISSION_PERSISTENCE_POLICY : void 0
|
|
10264
10638
|
);
|
|
10265
10639
|
subAgentCleanupFunctions = subSubAgentTracker.setup(
|
|
10266
10640
|
taskEventEmitter,
|
|
@@ -10678,7 +11052,8 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10678
11052
|
}
|
|
10679
11053
|
const permissionOptions = toPermissionOptions(
|
|
10680
11054
|
confirmationDetails,
|
|
10681
|
-
pmForcedAsk
|
|
11055
|
+
pmForcedAsk,
|
|
11056
|
+
this.requiresManagedConversationBinding ? STANDALONE_PERMISSION_PERSISTENCE_POLICY : void 0
|
|
10682
11057
|
);
|
|
10683
11058
|
const offeredPermissionOptions = permissionOptions.map(
|
|
10684
11059
|
(option) => ({ ...option })
|
|
@@ -10831,7 +11206,7 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
10831
11206
|
const modeUpdateCancellation = cancelBeforeExecutionIfAborted(toolName);
|
|
10832
11207
|
if (modeUpdateCancellation) return modeUpdateCancellation;
|
|
10833
11208
|
}
|
|
10834
|
-
if (outcome === "
|
|
11209
|
+
if (outcome === "proceed_always_project" /* ProceedAlwaysProject */ || outcome === "proceed_always_user" /* ProceedAlwaysUser */) {
|
|
10835
11210
|
await persistPermissionOutcome(
|
|
10836
11211
|
outcome,
|
|
10837
11212
|
confirmationDetails,
|
|
@@ -11469,6 +11844,9 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
11469
11844
|
executionStatus
|
|
11470
11845
|
});
|
|
11471
11846
|
} finally {
|
|
11847
|
+
if (terminalStatus && terminalStatus !== "cancelled") {
|
|
11848
|
+
this.config.getGeminiClient().recordCompletedToolCall(toolName, args);
|
|
11849
|
+
}
|
|
11472
11850
|
if (terminalStatus === "cancelled") {
|
|
11473
11851
|
endToolSpan(toolSpan, { success: false, cancelled: true });
|
|
11474
11852
|
} else {
|
|
@@ -11541,6 +11919,13 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
11541
11919
|
return null;
|
|
11542
11920
|
}
|
|
11543
11921
|
case "unsupported": {
|
|
11922
|
+
if (result.originalType === "unsupported_action") {
|
|
11923
|
+
throw new RequestError(
|
|
11924
|
+
-32004,
|
|
11925
|
+
"This action is not supported in this standalone session.",
|
|
11926
|
+
{ errorKind: "unsupported_action" }
|
|
11927
|
+
);
|
|
11928
|
+
}
|
|
11544
11929
|
const unsupportedError = `Slash command not supported in ACP integration: ${result.reason}`;
|
|
11545
11930
|
throw new Error(unsupportedError);
|
|
11546
11931
|
}
|
|
@@ -11575,6 +11960,11 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
11575
11960
|
const preserveUnsupportedImageForBridge = shouldRunVisionBridge(
|
|
11576
11961
|
this.config
|
|
11577
11962
|
);
|
|
11963
|
+
const finish = /* @__PURE__ */ __name((parts2) => options.deferBridgeConversions ? parts2 : this.#applyBridgeConversionsIfNeeded(
|
|
11964
|
+
parts2,
|
|
11965
|
+
abortSignal,
|
|
11966
|
+
options.onFullTurnModel
|
|
11967
|
+
), "finish");
|
|
11578
11968
|
const parts = message.map((part) => {
|
|
11579
11969
|
switch (part.type) {
|
|
11580
11970
|
case "text":
|
|
@@ -11680,18 +12070,10 @@ ${this.pendingRecoveredAgentsNotice}
|
|
|
11680
12070
|
(part) => !("fileData" in part) || acceptedFileUris.has(part.fileData.fileUri)
|
|
11681
12071
|
);
|
|
11682
12072
|
if (pathSpecsToRead.length === 0 && embeddedContext.length === 0 && extensionParts.length === 0 && mcpServerParts.length === 0) {
|
|
11683
|
-
return
|
|
11684
|
-
partsToSend,
|
|
11685
|
-
abortSignal,
|
|
11686
|
-
options.onFullTurnModel
|
|
11687
|
-
);
|
|
12073
|
+
return finish(partsToSend);
|
|
11688
12074
|
}
|
|
11689
12075
|
if (pathSpecsToRead.length === 0 && embeddedContext.length === 0) {
|
|
11690
|
-
return
|
|
11691
|
-
[...partsToSend, ...extensionParts, ...mcpServerParts],
|
|
11692
|
-
abortSignal,
|
|
11693
|
-
options.onFullTurnModel
|
|
11694
|
-
);
|
|
12076
|
+
return finish([...partsToSend, ...extensionParts, ...mcpServerParts]);
|
|
11695
12077
|
}
|
|
11696
12078
|
let initialQueryText = "";
|
|
11697
12079
|
for (let i = 0; i < partsToSend.length; i++) {
|
|
@@ -11752,11 +12134,7 @@ ${contextPart.text}`
|
|
|
11752
12134
|
const promptText = pathSpecsToRead.length > 0 ? initialQueryText : initialQueryText.trim();
|
|
11753
12135
|
const promptPart = { text: promptText };
|
|
11754
12136
|
const processedQueryParts = options.promptLast ? [...referenceParts, promptPart] : [promptPart, ...referenceParts];
|
|
11755
|
-
return
|
|
11756
|
-
processedQueryParts,
|
|
11757
|
-
abortSignal,
|
|
11758
|
-
options.onFullTurnModel
|
|
11759
|
-
);
|
|
12137
|
+
return finish(processedQueryParts);
|
|
11760
12138
|
}
|
|
11761
12139
|
async #applyBridgeConversionsIfNeeded(originalParts, abortSignal, onFullTurnModel) {
|
|
11762
12140
|
const parts = await this.#applyVoiceBridgeIfNeeded(
|
|
@@ -13703,7 +14081,8 @@ function getSessionSource(params) {
|
|
|
13703
14081
|
}
|
|
13704
14082
|
return {
|
|
13705
14083
|
sourceType: value["sourceType"],
|
|
13706
|
-
...typeof value["sourceId"] === "string" ? { sourceId: value["sourceId"] } : {}
|
|
14084
|
+
...typeof value["sourceId"] === "string" ? { sourceId: value["sourceId"] } : {},
|
|
14085
|
+
...value[DAEMON_OWNED_STANDALONE_CREATION_KEY] === true ? { daemonOwnedStandaloneCreation: true } : {}
|
|
13707
14086
|
};
|
|
13708
14087
|
}
|
|
13709
14088
|
__name(getSessionSource, "getSessionSource");
|
|
@@ -14521,7 +14900,7 @@ function readScopeSettings(settings, scope) {
|
|
|
14521
14900
|
}
|
|
14522
14901
|
__name(readScopeSettings, "readScopeSettings");
|
|
14523
14902
|
async function resolvePreferredMemoryFile(dir, fallbackFilename) {
|
|
14524
|
-
for (const filename of
|
|
14903
|
+
for (const filename of getAllMemoryFilenames()) {
|
|
14525
14904
|
const filePath = path6.join(dir, filename);
|
|
14526
14905
|
try {
|
|
14527
14906
|
await fs3.access(filePath);
|
|
@@ -14533,7 +14912,7 @@ async function resolvePreferredMemoryFile(dir, fallbackFilename) {
|
|
|
14533
14912
|
}
|
|
14534
14913
|
__name(resolvePreferredMemoryFile, "resolvePreferredMemoryFile");
|
|
14535
14914
|
async function resolveQwenMemoryPaths(params) {
|
|
14536
|
-
const fallbackFilename =
|
|
14915
|
+
const fallbackFilename = getAllMemoryFilenames()[0] ?? "QWEN.md";
|
|
14537
14916
|
const userMemoryFile = await resolvePreferredMemoryFile(
|
|
14538
14917
|
Storage.getGlobalQwenDir(),
|
|
14539
14918
|
fallbackFilename
|
|
@@ -15149,6 +15528,100 @@ function isOwnerOnlyDirectory(stats) {
|
|
|
15149
15528
|
return (stats.mode & 63) === 0;
|
|
15150
15529
|
}
|
|
15151
15530
|
__name(isOwnerOnlyDirectory, "isOwnerOnlyDirectory");
|
|
15531
|
+
function hasOnlyKeys(value, keys) {
|
|
15532
|
+
const actual = Object.keys(value).sort();
|
|
15533
|
+
const expected = [...keys].sort();
|
|
15534
|
+
return actual.length === expected.length && actual.every((key, index) => key === expected[index]);
|
|
15535
|
+
}
|
|
15536
|
+
__name(hasOnlyKeys, "hasOnlyKeys");
|
|
15537
|
+
function isManagedConversationPath(value) {
|
|
15538
|
+
return typeof value === "string" && value.length > 0 && !value.includes("\0") && path6.isAbsolute(value);
|
|
15539
|
+
}
|
|
15540
|
+
__name(isManagedConversationPath, "isManagedConversationPath");
|
|
15541
|
+
function isManagedConversationIdentityNumber(value) {
|
|
15542
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
|
|
15543
|
+
}
|
|
15544
|
+
__name(isManagedConversationIdentityNumber, "isManagedConversationIdentityNumber");
|
|
15545
|
+
function parseConversationDirectoryExpectation(value) {
|
|
15546
|
+
if (value === void 0) return void 0;
|
|
15547
|
+
if (!isObjectRecord(value) || !hasOnlyKeys(value, ["canonicalSessionId", "root", "child"])) {
|
|
15548
|
+
throw RequestError.invalidParams(
|
|
15549
|
+
void 0,
|
|
15550
|
+
"Invalid managed conversation directory expectation"
|
|
15551
|
+
);
|
|
15552
|
+
}
|
|
15553
|
+
const canonicalSessionId = value["canonicalSessionId"];
|
|
15554
|
+
const root = value["root"];
|
|
15555
|
+
const child = value["child"];
|
|
15556
|
+
const parsedSessionId = parseCallerSuppliedSessionId(canonicalSessionId);
|
|
15557
|
+
if (parsedSessionId.kind !== "valid" || parsedSessionId.sessionId !== canonicalSessionId || !isObjectRecord(root) || !hasOnlyKeys(root, ["canonicalPath", "device", "inode"]) || !isManagedConversationPath(root["canonicalPath"]) || !isManagedConversationIdentityNumber(root["device"]) || !isManagedConversationIdentityNumber(root["inode"]) || !isObjectRecord(child) || !hasOnlyKeys(child, ["name", "canonicalPath", "device", "inode"]) || typeof child["name"] !== "string" || child["name"] !== getConversationDirectoryName(canonicalSessionId) || !isManagedConversationPath(child["canonicalPath"]) || !isManagedConversationIdentityNumber(child["device"]) || !isManagedConversationIdentityNumber(child["inode"]) || !isSameConversationPath(
|
|
15558
|
+
path6.dirname(child["canonicalPath"]),
|
|
15559
|
+
root["canonicalPath"]
|
|
15560
|
+
) || path6.basename(child["canonicalPath"]) !== child["name"]) {
|
|
15561
|
+
throw RequestError.invalidParams(
|
|
15562
|
+
void 0,
|
|
15563
|
+
"Invalid managed conversation directory expectation"
|
|
15564
|
+
);
|
|
15565
|
+
}
|
|
15566
|
+
return {
|
|
15567
|
+
canonicalSessionId,
|
|
15568
|
+
root: {
|
|
15569
|
+
canonicalPath: root["canonicalPath"],
|
|
15570
|
+
device: root["device"],
|
|
15571
|
+
inode: root["inode"]
|
|
15572
|
+
},
|
|
15573
|
+
child: {
|
|
15574
|
+
name: child["name"],
|
|
15575
|
+
canonicalPath: child["canonicalPath"],
|
|
15576
|
+
device: child["device"],
|
|
15577
|
+
inode: child["inode"]
|
|
15578
|
+
}
|
|
15579
|
+
};
|
|
15580
|
+
}
|
|
15581
|
+
__name(parseConversationDirectoryExpectation, "parseConversationDirectoryExpectation");
|
|
15582
|
+
function managedConversationDirectoryError(missing) {
|
|
15583
|
+
return new RequestError(
|
|
15584
|
+
-32004,
|
|
15585
|
+
missing ? "The standalone working directory is missing." : "The standalone working directory identity is compromised.",
|
|
15586
|
+
{
|
|
15587
|
+
errorKind: missing ? "working_directory_missing" : "working_directory_compromised"
|
|
15588
|
+
}
|
|
15589
|
+
);
|
|
15590
|
+
}
|
|
15591
|
+
__name(managedConversationDirectoryError, "managedConversationDirectoryError");
|
|
15592
|
+
async function assertManagedConversationDirectoryIdentity(expectation) {
|
|
15593
|
+
let rootBefore;
|
|
15594
|
+
let canonicalRoot;
|
|
15595
|
+
let rootAfter;
|
|
15596
|
+
try {
|
|
15597
|
+
rootBefore = await fs3.lstat(expectation.root.canonicalPath);
|
|
15598
|
+
canonicalRoot = await fs3.realpath(expectation.root.canonicalPath);
|
|
15599
|
+
rootAfter = await fs3.lstat(canonicalRoot);
|
|
15600
|
+
} catch (error) {
|
|
15601
|
+
throw managedConversationDirectoryError(
|
|
15602
|
+
error.code === "ENOENT"
|
|
15603
|
+
);
|
|
15604
|
+
}
|
|
15605
|
+
if (!isOwnerOnlyDirectory(rootBefore) || !isOwnerOnlyDirectory(rootAfter) || !isSameConversationPath(canonicalRoot, expectation.root.canonicalPath) || rootBefore.dev !== expectation.root.device || rootBefore.ino !== expectation.root.inode || rootAfter.dev !== expectation.root.device || rootAfter.ino !== expectation.root.inode) {
|
|
15606
|
+
throw managedConversationDirectoryError(false);
|
|
15607
|
+
}
|
|
15608
|
+
let childBefore;
|
|
15609
|
+
let canonicalChild;
|
|
15610
|
+
let childAfter;
|
|
15611
|
+
try {
|
|
15612
|
+
childBefore = await fs3.lstat(expectation.child.canonicalPath);
|
|
15613
|
+
canonicalChild = await fs3.realpath(expectation.child.canonicalPath);
|
|
15614
|
+
childAfter = await fs3.lstat(canonicalChild);
|
|
15615
|
+
} catch (error) {
|
|
15616
|
+
throw managedConversationDirectoryError(
|
|
15617
|
+
error.code === "ENOENT"
|
|
15618
|
+
);
|
|
15619
|
+
}
|
|
15620
|
+
if (!isOwnerOnlyDirectory(childBefore) || !isOwnerOnlyDirectory(childAfter) || !isSameConversationPath(canonicalChild, expectation.child.canonicalPath) || childBefore.dev !== expectation.child.device || childBefore.ino !== expectation.child.inode || childAfter.dev !== expectation.child.device || childAfter.ino !== expectation.child.inode) {
|
|
15621
|
+
throw managedConversationDirectoryError(false);
|
|
15622
|
+
}
|
|
15623
|
+
}
|
|
15624
|
+
__name(assertManagedConversationDirectoryIdentity, "assertManagedConversationDirectoryIdentity");
|
|
15152
15625
|
var QwenAgent = class {
|
|
15153
15626
|
constructor(config, settings, argv, connection, expectedPrivateParentCapability, sessionWriterLeaseEnabledAtStartup = false, managedToolInvocationGuard, externalToolGuardProviderAttached = false) {
|
|
15154
15627
|
this.config = config;
|
|
@@ -16043,7 +16516,7 @@ var QwenAgent = class {
|
|
|
16043
16516
|
}
|
|
16044
16517
|
this.clientCapabilities = args.clientCapabilities;
|
|
16045
16518
|
const authMethods = buildAuthMethods();
|
|
16046
|
-
const version = "0.22.
|
|
16519
|
+
const version = "0.22.2-nightly.20260828.7357136dd1";
|
|
16047
16520
|
const response = {
|
|
16048
16521
|
protocolVersion: PROTOCOL_VERSION,
|
|
16049
16522
|
agentInfo: {
|
|
@@ -16180,6 +16653,15 @@ var QwenAgent = class {
|
|
|
16180
16653
|
const releaseStartingSessionId = requestedSessionId ? this.reserveStartingSessionId(requestedSessionId) : void 0;
|
|
16181
16654
|
try {
|
|
16182
16655
|
const sessionSource = getSessionSource(params);
|
|
16656
|
+
const provisionalStandalone = isReservedStandaloneSessionSourceType(
|
|
16657
|
+
sessionSource?.sourceType
|
|
16658
|
+
);
|
|
16659
|
+
if (sessionSource && isReservedStandaloneSessionSourceType(sessionSource.sourceType) && (sessionSource.daemonOwnedStandaloneCreation !== true || !this.isTrustedManagedParent())) {
|
|
16660
|
+
throw RequestError.invalidParams(
|
|
16661
|
+
void 0,
|
|
16662
|
+
"`standalone` is reserved for daemon-owned session creation"
|
|
16663
|
+
);
|
|
16664
|
+
}
|
|
16183
16665
|
const parentContext = extractDaemonTraceContext(params);
|
|
16184
16666
|
return await withDaemonSpan(
|
|
16185
16667
|
"qwen-code.daemon.session_start",
|
|
@@ -16205,14 +16687,21 @@ var QwenAgent = class {
|
|
|
16205
16687
|
);
|
|
16206
16688
|
let session;
|
|
16207
16689
|
try {
|
|
16208
|
-
|
|
16209
|
-
|
|
16210
|
-
|
|
16211
|
-
|
|
16212
|
-
|
|
16690
|
+
if (!provisionalStandalone) {
|
|
16691
|
+
await profiler.time(
|
|
16692
|
+
"auth",
|
|
16693
|
+
() => this.ensureAuthenticated(config)
|
|
16694
|
+
);
|
|
16695
|
+
profiler.timeSync(
|
|
16696
|
+
"file_system_setup",
|
|
16697
|
+
() => this.setupFileSystem(config)
|
|
16698
|
+
);
|
|
16699
|
+
}
|
|
16213
16700
|
session = await profiler.time(
|
|
16214
16701
|
"session_register",
|
|
16215
|
-
() => this.createAndStoreSession(config, settings
|
|
16702
|
+
() => this.createAndStoreSession(config, settings, void 0, {
|
|
16703
|
+
deferWorkspaceActivation: provisionalStandalone
|
|
16704
|
+
})
|
|
16216
16705
|
);
|
|
16217
16706
|
} catch (error) {
|
|
16218
16707
|
return this.cleanupAfterRequestFailure(error, async () => {
|
|
@@ -16256,6 +16745,15 @@ var QwenAgent = class {
|
|
|
16256
16745
|
async loadSessionWithProfiler(params, initialSessionId, profiler) {
|
|
16257
16746
|
let sessionId = initialSessionId;
|
|
16258
16747
|
const sessionSource = getSessionSource(params);
|
|
16748
|
+
const provisionalStandalone = isReservedStandaloneSessionSourceType(
|
|
16749
|
+
sessionSource?.sourceType
|
|
16750
|
+
);
|
|
16751
|
+
if (provisionalStandalone && (sessionSource?.daemonOwnedStandaloneCreation !== true || !this.isTrustedManagedParent())) {
|
|
16752
|
+
throw RequestError.invalidParams(
|
|
16753
|
+
void 0,
|
|
16754
|
+
"`standalone` is reserved for daemon-owned session restore"
|
|
16755
|
+
);
|
|
16756
|
+
}
|
|
16259
16757
|
const restoreOptions = loadRestoreOptions(params);
|
|
16260
16758
|
const suppressRestoreAskUserQuestion = params._meta?.[DAEMON_SUPPRESS_RESTORE_ASK_USER_QUESTION_META_KEY] === true;
|
|
16261
16759
|
const withRestoreHint = /* @__PURE__ */ __name((session, response) => suppressRestoreAskUserQuestion ? response : this.withAskUserQuestionRestoreHint(session, response), "withRestoreHint");
|
|
@@ -16418,21 +16916,37 @@ var QwenAgent = class {
|
|
|
16418
16916
|
} : {}
|
|
16419
16917
|
})), "buildResponse");
|
|
16420
16918
|
try {
|
|
16421
|
-
|
|
16422
|
-
|
|
16423
|
-
|
|
16424
|
-
|
|
16425
|
-
|
|
16426
|
-
|
|
16427
|
-
|
|
16428
|
-
|
|
16429
|
-
|
|
16430
|
-
|
|
16431
|
-
|
|
16432
|
-
|
|
16919
|
+
if (!provisionalStandalone) {
|
|
16920
|
+
await profiler.time(
|
|
16921
|
+
"restore_session_model",
|
|
16922
|
+
() => restoreSessionModelThenAuthenticate(
|
|
16923
|
+
config,
|
|
16924
|
+
projection,
|
|
16925
|
+
() => profiler.time("auth", () => this.ensureAuthenticated(config))
|
|
16926
|
+
)
|
|
16927
|
+
);
|
|
16928
|
+
profiler.timeSync(
|
|
16929
|
+
"file_system_setup",
|
|
16930
|
+
() => this.setupFileSystem(config)
|
|
16931
|
+
);
|
|
16932
|
+
}
|
|
16433
16933
|
await profiler.time(
|
|
16434
16934
|
"session_register",
|
|
16435
16935
|
() => this.createAndStoreSession(config, settings, void 0, {
|
|
16936
|
+
deferWorkspaceActivation: provisionalStandalone,
|
|
16937
|
+
...provisionalStandalone ? {
|
|
16938
|
+
beforeDeferredWorkspaceActivation: /* @__PURE__ */ __name(() => profiler.time(
|
|
16939
|
+
"restore_session_model",
|
|
16940
|
+
() => restoreSessionModelThenAuthenticate(
|
|
16941
|
+
config,
|
|
16942
|
+
projection,
|
|
16943
|
+
() => profiler.time(
|
|
16944
|
+
"auth",
|
|
16945
|
+
() => this.ensureAuthenticated(config)
|
|
16946
|
+
)
|
|
16947
|
+
)
|
|
16948
|
+
), "beforeDeferredWorkspaceActivation")
|
|
16949
|
+
} : {},
|
|
16436
16950
|
enableLiveScreenContext: isCompatibleLiveSessionSource(
|
|
16437
16951
|
sessionSource ?? {}
|
|
16438
16952
|
),
|
|
@@ -16578,7 +17092,9 @@ var QwenAgent = class {
|
|
|
16578
17092
|
}
|
|
16579
17093
|
}
|
|
16580
17094
|
await profiler.time("post_replay_services", async () => {
|
|
16581
|
-
|
|
17095
|
+
if (!provisionalStandalone) {
|
|
17096
|
+
await this.#restoreWorktreeOnResume(config, createdSession);
|
|
17097
|
+
}
|
|
16582
17098
|
await this.#restoreBackgroundAgentsOnResume(
|
|
16583
17099
|
config,
|
|
16584
17100
|
createdSession
|
|
@@ -16627,6 +17143,15 @@ var QwenAgent = class {
|
|
|
16627
17143
|
async resumeSessionWithProfiler(params, initialSessionId, profiler) {
|
|
16628
17144
|
let sessionId = initialSessionId;
|
|
16629
17145
|
const sessionSource = getSessionSource(params);
|
|
17146
|
+
const provisionalStandalone = isReservedStandaloneSessionSourceType(
|
|
17147
|
+
sessionSource?.sourceType
|
|
17148
|
+
);
|
|
17149
|
+
if (provisionalStandalone && (sessionSource?.daemonOwnedStandaloneCreation !== true || !this.isTrustedManagedParent())) {
|
|
17150
|
+
throw RequestError.invalidParams(
|
|
17151
|
+
void 0,
|
|
17152
|
+
"`standalone` is reserved for daemon-owned session restore"
|
|
17153
|
+
);
|
|
17154
|
+
}
|
|
16630
17155
|
const suppressRestoreAskUserQuestion = params._meta?.[DAEMON_SUPPRESS_RESTORE_ASK_USER_QUESTION_META_KEY] === true;
|
|
16631
17156
|
const withRestoreHint = /* @__PURE__ */ __name((session, response) => suppressRestoreAskUserQuestion ? response : this.withAskUserQuestionRestoreHint(session, response), "withRestoreHint");
|
|
16632
17157
|
const liveSession = this.sessions.get(sessionId);
|
|
@@ -16697,21 +17222,37 @@ var QwenAgent = class {
|
|
|
16697
17222
|
const projection = config.consumeSessionRestoreProjection?.();
|
|
16698
17223
|
let response;
|
|
16699
17224
|
try {
|
|
16700
|
-
|
|
16701
|
-
|
|
16702
|
-
|
|
16703
|
-
|
|
16704
|
-
|
|
16705
|
-
|
|
16706
|
-
|
|
16707
|
-
|
|
16708
|
-
|
|
16709
|
-
|
|
16710
|
-
|
|
16711
|
-
|
|
17225
|
+
if (!provisionalStandalone) {
|
|
17226
|
+
await profiler.time(
|
|
17227
|
+
"restore_session_model",
|
|
17228
|
+
() => restoreSessionModelThenAuthenticate(
|
|
17229
|
+
config,
|
|
17230
|
+
projection,
|
|
17231
|
+
() => profiler.time("auth", () => this.ensureAuthenticated(config))
|
|
17232
|
+
)
|
|
17233
|
+
);
|
|
17234
|
+
profiler.timeSync(
|
|
17235
|
+
"file_system_setup",
|
|
17236
|
+
() => this.setupFileSystem(config)
|
|
17237
|
+
);
|
|
17238
|
+
}
|
|
16712
17239
|
await profiler.time(
|
|
16713
17240
|
"session_register",
|
|
16714
17241
|
() => this.createAndStoreSession(config, settings, void 0, {
|
|
17242
|
+
deferWorkspaceActivation: provisionalStandalone,
|
|
17243
|
+
...provisionalStandalone ? {
|
|
17244
|
+
beforeDeferredWorkspaceActivation: /* @__PURE__ */ __name(() => profiler.time(
|
|
17245
|
+
"restore_session_model",
|
|
17246
|
+
() => restoreSessionModelThenAuthenticate(
|
|
17247
|
+
config,
|
|
17248
|
+
projection,
|
|
17249
|
+
() => profiler.time(
|
|
17250
|
+
"auth",
|
|
17251
|
+
() => this.ensureAuthenticated(config)
|
|
17252
|
+
)
|
|
17253
|
+
)
|
|
17254
|
+
), "beforeDeferredWorkspaceActivation")
|
|
17255
|
+
} : {},
|
|
16715
17256
|
enableLiveScreenContext: isCompatibleLiveSessionSource(
|
|
16716
17257
|
sessionSource ?? {}
|
|
16717
17258
|
),
|
|
@@ -16735,7 +17276,9 @@ var QwenAgent = class {
|
|
|
16735
17276
|
}, "primeSession"),
|
|
16736
17277
|
beforeStartPostReplayServices: /* @__PURE__ */ __name(async (createdSession) => {
|
|
16737
17278
|
await profiler.time("post_replay_services", async () => {
|
|
16738
|
-
|
|
17279
|
+
if (!provisionalStandalone) {
|
|
17280
|
+
await this.#restoreWorktreeOnResume(config, createdSession);
|
|
17281
|
+
}
|
|
16739
17282
|
await this.#restoreBackgroundAgentsOnResume(
|
|
16740
17283
|
config,
|
|
16741
17284
|
createdSession
|
|
@@ -16871,15 +17414,17 @@ var QwenAgent = class {
|
|
|
16871
17414
|
break;
|
|
16872
17415
|
}
|
|
16873
17416
|
case "reasoning_effort": {
|
|
17417
|
+
const generation = session.getConfig().getContentGeneratorConfig();
|
|
17418
|
+
const thinkingMandatory = generation.thinkingMandatory === true;
|
|
16874
17419
|
const modelReasoning = this.getModelReasoningConfiguration(
|
|
16875
17420
|
session.getConfig()
|
|
16876
17421
|
);
|
|
16877
17422
|
if (modelReasoning) {
|
|
16878
17423
|
const effortValues = modelReasoning.toggleOnly ? void 0 : modelReasoning.efforts;
|
|
16879
|
-
const selected = value === REASONING_EFFORT_NONE ? REASONING_EFFORT_NONE : modelReasoning.toggleOnly ? value === REASONING_EFFORT_DEFAULT ? REASONING_EFFORT_DEFAULT : void 0 : effortValues?.find((effort2) => effort2 === value);
|
|
17424
|
+
const selected = value === REASONING_EFFORT_NONE && !thinkingMandatory ? REASONING_EFFORT_NONE : modelReasoning.toggleOnly ? value === REASONING_EFFORT_DEFAULT ? REASONING_EFFORT_DEFAULT : void 0 : effortValues?.find((effort2) => effort2 === value);
|
|
16880
17425
|
if (!selected) {
|
|
16881
17426
|
const choices = [
|
|
16882
|
-
REASONING_EFFORT_NONE,
|
|
17427
|
+
...thinkingMandatory ? [] : [REASONING_EFFORT_NONE],
|
|
16883
17428
|
...effortValues ?? [REASONING_EFFORT_DEFAULT]
|
|
16884
17429
|
];
|
|
16885
17430
|
throw RequestError.invalidParams(
|
|
@@ -16887,7 +17432,17 @@ var QwenAgent = class {
|
|
|
16887
17432
|
`Unknown reasoning effort: ${value}. Choose one of: ${choices.join(", ")}`
|
|
16888
17433
|
);
|
|
16889
17434
|
}
|
|
16890
|
-
|
|
17435
|
+
if (!modelReasoning.toggleOnly) {
|
|
17436
|
+
for (const source of ["extra_body", "samplingParams"]) {
|
|
17437
|
+
const layer = generation[source];
|
|
17438
|
+
if (!layer) continue;
|
|
17439
|
+
const next = { ...layer };
|
|
17440
|
+
delete next["enable_thinking"];
|
|
17441
|
+
delete next["reasoning_effort"];
|
|
17442
|
+
delete next["thinking_budget"];
|
|
17443
|
+
generation[source] = next;
|
|
17444
|
+
}
|
|
17445
|
+
}
|
|
16891
17446
|
if (selected === REASONING_EFFORT_NONE) {
|
|
16892
17447
|
generation.reasoning = false;
|
|
16893
17448
|
} else if (selected === REASONING_EFFORT_DEFAULT) {
|
|
@@ -17771,18 +18326,17 @@ var QwenAgent = class {
|
|
|
17771
18326
|
for (const extension of config.getExtensions()) {
|
|
17772
18327
|
if (extension.isActive) continue;
|
|
17773
18328
|
for (const skill of extension.skills ?? []) {
|
|
17774
|
-
const extensionName = extension.
|
|
18329
|
+
const extensionName = extension.name;
|
|
17775
18330
|
const key = `extension:${extensionName}:${skill.name}`;
|
|
17776
|
-
if (skillsByKey.has(
|
|
17777
|
-
continue;
|
|
17778
|
-
}
|
|
18331
|
+
if (skillsByKey.has(key)) continue;
|
|
17779
18332
|
skillsByKey.set(
|
|
17780
18333
|
key,
|
|
17781
18334
|
mapSkillConfigToStatus(
|
|
17782
18335
|
{
|
|
17783
18336
|
...skill,
|
|
17784
18337
|
level: "extension",
|
|
17785
|
-
extensionName
|
|
18338
|
+
extensionName,
|
|
18339
|
+
extensionDisplayName: extension.displayName
|
|
17786
18340
|
},
|
|
17787
18341
|
disablements,
|
|
17788
18342
|
{ disabled: true }
|
|
@@ -17841,7 +18395,13 @@ var QwenAgent = class {
|
|
|
17841
18395
|
providers.set(authType, provider);
|
|
17842
18396
|
}
|
|
17843
18397
|
const isCurrent = currentAuth === model.authType && currentAcpModelId === modelId;
|
|
17844
|
-
const configOptions = model.isRuntimeModel || modelId.startsWith(ACP_ROUTE_ID_PREFIX) ? void 0 : buildModelReasoningConfigPreview(model.id
|
|
18398
|
+
const configOptions = model.isRuntimeModel || modelId.startsWith(ACP_ROUTE_ID_PREFIX) ? void 0 : buildModelReasoningConfigPreview(model.id, {
|
|
18399
|
+
thinkingMandatory: config.getResolvedModelConfig?.(
|
|
18400
|
+
model.authType,
|
|
18401
|
+
model.id,
|
|
18402
|
+
model.registryBaseUrl ?? model.baseUrl
|
|
18403
|
+
)?.generationConfig.thinkingMandatory === true
|
|
18404
|
+
});
|
|
17845
18405
|
const providerModel = {
|
|
17846
18406
|
modelId,
|
|
17847
18407
|
baseModelId: parseAcpBaseModelId(effectiveModelId),
|
|
@@ -18296,7 +18856,7 @@ var QwenAgent = class {
|
|
|
18296
18856
|
}
|
|
18297
18857
|
async buildSessionSupportedCommandsStatus(sessionId) {
|
|
18298
18858
|
const session = this.sessionOrThrow(sessionId);
|
|
18299
|
-
const { availableCommands, availableSkills } = await
|
|
18859
|
+
const { availableCommands, availableSkills } = await session.buildAvailableCommandsSnapshot();
|
|
18300
18860
|
return {
|
|
18301
18861
|
v: STATUS_SCHEMA_VERSION,
|
|
18302
18862
|
sessionId,
|
|
@@ -18341,12 +18901,26 @@ var QwenAgent = class {
|
|
|
18341
18901
|
const now = Date.now();
|
|
18342
18902
|
const createdAt = session.getCreatedAt();
|
|
18343
18903
|
const models = {};
|
|
18344
|
-
for (const [name,
|
|
18904
|
+
for (const [name, rawMetrics] of Object.entries(metrics.models)) {
|
|
18905
|
+
const m = metrics.statsModels?.[name] ?? rawMetrics;
|
|
18345
18906
|
models[name] = {
|
|
18346
18907
|
api: { ...m.api },
|
|
18347
18908
|
tokens: { ...m.tokens }
|
|
18348
18909
|
};
|
|
18349
18910
|
}
|
|
18911
|
+
const sources = [];
|
|
18912
|
+
for (const [id, source] of Object.entries(metrics.sourceMetrics ?? {})) {
|
|
18913
|
+
const meta = metrics.sourceMeta?.[id];
|
|
18914
|
+
sources.push({
|
|
18915
|
+
id,
|
|
18916
|
+
type: meta?.type ?? "",
|
|
18917
|
+
name: meta?.name ?? id,
|
|
18918
|
+
tokens: { ...source.tokens }
|
|
18919
|
+
});
|
|
18920
|
+
}
|
|
18921
|
+
sources.sort(
|
|
18922
|
+
(a, b) => b.tokens.total - a.tokens.total || a.id.localeCompare(b.id)
|
|
18923
|
+
);
|
|
18350
18924
|
const byName = {};
|
|
18351
18925
|
for (const [name, t] of Object.entries(metrics.tools.byName)) {
|
|
18352
18926
|
byName[name] = {
|
|
@@ -18389,6 +18963,7 @@ var QwenAgent = class {
|
|
|
18389
18963
|
durationMs: now - createdAt,
|
|
18390
18964
|
promptCount: session.getTurnCount(),
|
|
18391
18965
|
models,
|
|
18966
|
+
sources,
|
|
18392
18967
|
tools: {
|
|
18393
18968
|
totalCalls: metrics.tools.totalCalls,
|
|
18394
18969
|
totalSuccess: metrics.tools.totalSuccess,
|
|
@@ -20064,6 +20639,17 @@ var QwenAgent = class {
|
|
|
20064
20639
|
"error" in source ? source.error : "Invalid or missing sourceType"
|
|
20065
20640
|
);
|
|
20066
20641
|
}
|
|
20642
|
+
if (isReservedStandaloneSessionSourceType(source.sourceType)) {
|
|
20643
|
+
const standaloneSession = this.sessionOrThrow(sessionId);
|
|
20644
|
+
if (params[DAEMON_OWNED_STANDALONE_CREATION_KEY] !== true || this.privateParentState !== "trusted" || !isReservedStandaloneSessionSourceType(
|
|
20645
|
+
standaloneSession.getConfig().getSessionSourceType()
|
|
20646
|
+
)) {
|
|
20647
|
+
throw RequestError.invalidParams(
|
|
20648
|
+
void 0,
|
|
20649
|
+
"`standalone` is reserved for daemon-owned session creation"
|
|
20650
|
+
);
|
|
20651
|
+
}
|
|
20652
|
+
}
|
|
20067
20653
|
const session = this.sessionOrThrow(sessionId);
|
|
20068
20654
|
if (isCompatibleLiveSessionSource(source)) {
|
|
20069
20655
|
await session.enableLiveScreenContext();
|
|
@@ -20260,9 +20846,41 @@ var QwenAgent = class {
|
|
|
20260
20846
|
"Invalid managed relocation capability"
|
|
20261
20847
|
);
|
|
20262
20848
|
}
|
|
20849
|
+
const conversationDirectoryExpectation = parseConversationDirectoryExpectation(
|
|
20850
|
+
params["conversationDirectoryExpectation"]
|
|
20851
|
+
);
|
|
20852
|
+
if (conversationDirectoryExpectation !== void 0 && managedRelocation !== "live-conversation") {
|
|
20853
|
+
throw RequestError.invalidParams(
|
|
20854
|
+
void 0,
|
|
20855
|
+
"Managed conversation directory expectation requires managed relocation"
|
|
20856
|
+
);
|
|
20857
|
+
}
|
|
20263
20858
|
const allowedRoots = params["allowedRoots"];
|
|
20264
20859
|
const session = this.sessionOrThrow(sessionId);
|
|
20265
20860
|
const config = session.getConfig();
|
|
20861
|
+
const standalone = isReservedStandaloneSessionSourceType(
|
|
20862
|
+
config.getSessionSourceType()
|
|
20863
|
+
);
|
|
20864
|
+
if (standalone && (managedRelocation !== "live-conversation" || conversationDirectoryExpectation === void 0)) {
|
|
20865
|
+
throw RequestError.invalidParams(
|
|
20866
|
+
void 0,
|
|
20867
|
+
"Standalone relocation requires an exact managed directory expectation"
|
|
20868
|
+
);
|
|
20869
|
+
}
|
|
20870
|
+
if (conversationDirectoryExpectation !== void 0) {
|
|
20871
|
+
if (this.privateParentState !== "trusted" || conversationDirectoryExpectation.canonicalSessionId !== normalizeSessionIdForLookup(sessionId) || !Array.isArray(allowedRoots) || allowedRoots.length !== 1 || typeof allowedRoots[0] !== "string" || !isSameConversationPath(
|
|
20872
|
+
allowedRoots[0],
|
|
20873
|
+
conversationDirectoryExpectation.root.canonicalPath
|
|
20874
|
+
) || !isSameConversationPath(
|
|
20875
|
+
targetPath,
|
|
20876
|
+
conversationDirectoryExpectation.child.canonicalPath
|
|
20877
|
+
)) {
|
|
20878
|
+
throw managedConversationDirectoryError(false);
|
|
20879
|
+
}
|
|
20880
|
+
await assertManagedConversationDirectoryIdentity(
|
|
20881
|
+
conversationDirectoryExpectation
|
|
20882
|
+
);
|
|
20883
|
+
}
|
|
20266
20884
|
if (config.isRestrictiveSandbox()) {
|
|
20267
20885
|
throw new RequestError(-32003, "Restrictive sandbox mode active", {
|
|
20268
20886
|
errorKind: "restrictive_sandbox"
|
|
@@ -20272,18 +20890,34 @@ var QwenAgent = class {
|
|
|
20272
20890
|
try {
|
|
20273
20891
|
stats = await fs3.stat(targetPath);
|
|
20274
20892
|
} catch {
|
|
20893
|
+
if (conversationDirectoryExpectation !== void 0) {
|
|
20894
|
+
throw managedConversationDirectoryError(true);
|
|
20895
|
+
}
|
|
20275
20896
|
throw new RequestError(-32002, `Directory not found: ${targetPath}`, {
|
|
20276
20897
|
errorKind: "directory_not_found",
|
|
20277
20898
|
path: targetPath
|
|
20278
20899
|
});
|
|
20279
20900
|
}
|
|
20280
20901
|
if (!stats.isDirectory()) {
|
|
20902
|
+
if (conversationDirectoryExpectation !== void 0) {
|
|
20903
|
+
throw managedConversationDirectoryError(false);
|
|
20904
|
+
}
|
|
20281
20905
|
throw new RequestError(-32002, `Not a directory: ${targetPath}`, {
|
|
20282
20906
|
errorKind: "directory_not_found",
|
|
20283
20907
|
path: targetPath
|
|
20284
20908
|
});
|
|
20285
20909
|
}
|
|
20286
|
-
|
|
20910
|
+
let canonicalPath;
|
|
20911
|
+
try {
|
|
20912
|
+
canonicalPath = await fs3.realpath(targetPath);
|
|
20913
|
+
} catch (error) {
|
|
20914
|
+
if (conversationDirectoryExpectation !== void 0) {
|
|
20915
|
+
throw managedConversationDirectoryError(
|
|
20916
|
+
error.code === "ENOENT"
|
|
20917
|
+
);
|
|
20918
|
+
}
|
|
20919
|
+
throw error;
|
|
20920
|
+
}
|
|
20287
20921
|
let containmentRoots = allowedRoots;
|
|
20288
20922
|
let managedTrustAllowed = false;
|
|
20289
20923
|
if (managedRelocation === "live-conversation") {
|
|
@@ -20308,13 +20942,22 @@ var QwenAgent = class {
|
|
|
20308
20942
|
canonicalRoot = await fs3.realpath(rootPath);
|
|
20309
20943
|
rootAfter = await fs3.lstat(canonicalRoot);
|
|
20310
20944
|
} catch {
|
|
20945
|
+
if (conversationDirectoryExpectation !== void 0) {
|
|
20946
|
+
throw managedConversationDirectoryError(false);
|
|
20947
|
+
}
|
|
20311
20948
|
throw new RequestError(
|
|
20312
20949
|
-32004,
|
|
20313
20950
|
"Live managed relocation requires an owner-only allowed root",
|
|
20314
20951
|
{ errorKind: "containment_violation", path: rootPath }
|
|
20315
20952
|
);
|
|
20316
20953
|
}
|
|
20317
|
-
if (!isOwnerOnlyDirectory(rootBefore) || !isOwnerOnlyDirectory(rootAfter) || rootBefore.dev !== rootAfter.dev || rootBefore.ino !== rootAfter.ino
|
|
20954
|
+
if (!isOwnerOnlyDirectory(rootBefore) || !isOwnerOnlyDirectory(rootAfter) || rootBefore.dev !== rootAfter.dev || rootBefore.ino !== rootAfter.ino || conversationDirectoryExpectation !== void 0 && (!isSameConversationPath(
|
|
20955
|
+
canonicalRoot,
|
|
20956
|
+
conversationDirectoryExpectation.root.canonicalPath
|
|
20957
|
+
) || rootAfter.dev !== conversationDirectoryExpectation.root.device || rootAfter.ino !== conversationDirectoryExpectation.root.inode)) {
|
|
20958
|
+
if (conversationDirectoryExpectation !== void 0) {
|
|
20959
|
+
throw managedConversationDirectoryError(false);
|
|
20960
|
+
}
|
|
20318
20961
|
throw new RequestError(
|
|
20319
20962
|
-32004,
|
|
20320
20963
|
"Live managed relocation requires an owner-only allowed root",
|
|
@@ -20326,7 +20969,12 @@ var QwenAgent = class {
|
|
|
20326
20969
|
try {
|
|
20327
20970
|
targetBefore = await fs3.lstat(targetPath);
|
|
20328
20971
|
targetAfter = await fs3.lstat(canonicalPath);
|
|
20329
|
-
} catch {
|
|
20972
|
+
} catch (error) {
|
|
20973
|
+
if (conversationDirectoryExpectation !== void 0) {
|
|
20974
|
+
throw managedConversationDirectoryError(
|
|
20975
|
+
error.code === "ENOENT"
|
|
20976
|
+
);
|
|
20977
|
+
}
|
|
20330
20978
|
throw new RequestError(
|
|
20331
20979
|
-32004,
|
|
20332
20980
|
"Live managed relocation requires an owner-only direct child",
|
|
@@ -20334,7 +20982,13 @@ var QwenAgent = class {
|
|
|
20334
20982
|
);
|
|
20335
20983
|
}
|
|
20336
20984
|
const relativeTarget = path6.relative(canonicalRoot, canonicalPath);
|
|
20337
|
-
if (!isOwnerOnlyDirectory(targetBefore) || !isOwnerOnlyDirectory(targetAfter) || targetBefore.dev !== targetAfter.dev || targetBefore.ino !== targetAfter.ino ||
|
|
20985
|
+
if (!isOwnerOnlyDirectory(targetBefore) || !isOwnerOnlyDirectory(targetAfter) || targetBefore.dev !== targetAfter.dev || targetBefore.ino !== targetAfter.ino || conversationDirectoryExpectation !== void 0 && (!isSameConversationPath(
|
|
20986
|
+
canonicalPath,
|
|
20987
|
+
conversationDirectoryExpectation.child.canonicalPath
|
|
20988
|
+
) || targetAfter.dev !== conversationDirectoryExpectation.child.device || targetAfter.ino !== conversationDirectoryExpectation.child.inode) || relativeTarget.length === 0 || relativeTarget.startsWith("..") || path6.isAbsolute(relativeTarget) || relativeTarget.includes(path6.sep)) {
|
|
20989
|
+
if (conversationDirectoryExpectation !== void 0) {
|
|
20990
|
+
throw managedConversationDirectoryError(false);
|
|
20991
|
+
}
|
|
20338
20992
|
throw new RequestError(
|
|
20339
20993
|
-32004,
|
|
20340
20994
|
"Live managed relocation requires an owner-only direct child",
|
|
@@ -20345,13 +20999,19 @@ var QwenAgent = class {
|
|
|
20345
20999
|
try {
|
|
20346
21000
|
rootFinal = await fs3.lstat(canonicalRoot);
|
|
20347
21001
|
} catch {
|
|
21002
|
+
if (conversationDirectoryExpectation !== void 0) {
|
|
21003
|
+
throw managedConversationDirectoryError(false);
|
|
21004
|
+
}
|
|
20348
21005
|
throw new RequestError(
|
|
20349
21006
|
-32004,
|
|
20350
21007
|
"Live managed relocation allowed root changed during validation",
|
|
20351
21008
|
{ errorKind: "containment_violation", path: canonicalRoot }
|
|
20352
21009
|
);
|
|
20353
21010
|
}
|
|
20354
|
-
if (!isOwnerOnlyDirectory(rootFinal) || rootFinal.dev !== rootAfter.dev || rootFinal.ino !== rootAfter.ino) {
|
|
21011
|
+
if (!isOwnerOnlyDirectory(rootFinal) || rootFinal.dev !== rootAfter.dev || rootFinal.ino !== rootAfter.ino || conversationDirectoryExpectation !== void 0 && (rootFinal.dev !== conversationDirectoryExpectation.root.device || rootFinal.ino !== conversationDirectoryExpectation.root.inode)) {
|
|
21012
|
+
if (conversationDirectoryExpectation !== void 0) {
|
|
21013
|
+
throw managedConversationDirectoryError(false);
|
|
21014
|
+
}
|
|
20355
21015
|
throw new RequestError(
|
|
20356
21016
|
-32004,
|
|
20357
21017
|
"Live managed relocation allowed root changed during validation",
|
|
@@ -20368,6 +21028,9 @@ var QwenAgent = class {
|
|
|
20368
21028
|
return !rel.startsWith("..") && !path6.isAbsolute(rel);
|
|
20369
21029
|
});
|
|
20370
21030
|
if (!contained) {
|
|
21031
|
+
if (conversationDirectoryExpectation !== void 0) {
|
|
21032
|
+
throw managedConversationDirectoryError(false);
|
|
21033
|
+
}
|
|
20371
21034
|
throw new RequestError(
|
|
20372
21035
|
-32004,
|
|
20373
21036
|
`Path outside allowed roots: ${canonicalPath}`,
|
|
@@ -20401,7 +21064,7 @@ var QwenAgent = class {
|
|
|
20401
21064
|
);
|
|
20402
21065
|
try {
|
|
20403
21066
|
const settledPreviousCwd = config.getTargetDir();
|
|
20404
|
-
if (canonicalPath === settledPreviousCwd) {
|
|
21067
|
+
if (canonicalPath === settledPreviousCwd && conversationDirectoryExpectation === void 0) {
|
|
20405
21068
|
return {
|
|
20406
21069
|
previousCwd: settledPreviousCwd,
|
|
20407
21070
|
newCwd: canonicalPath,
|
|
@@ -20417,12 +21080,30 @@ var QwenAgent = class {
|
|
|
20417
21080
|
SESSION_DRAIN_TIMEOUT_MS,
|
|
20418
21081
|
"close"
|
|
20419
21082
|
);
|
|
21083
|
+
if (conversationDirectoryExpectation !== void 0 && session.hasStandaloneRelocationBlockers()) {
|
|
21084
|
+
throw new RequestError(
|
|
21085
|
+
-32602,
|
|
21086
|
+
"Cannot relocate while standalone background work is active",
|
|
21087
|
+
{ errorKind: "session_busy" }
|
|
21088
|
+
);
|
|
21089
|
+
}
|
|
20420
21090
|
const warnings = [];
|
|
20421
21091
|
const relocation = await config.relocateWorkingDirectory(
|
|
20422
21092
|
canonicalPath,
|
|
20423
21093
|
canonicalPath,
|
|
20424
21094
|
{ skipProcessChdir: true, skipArtifactMigration: true }
|
|
20425
21095
|
);
|
|
21096
|
+
if (conversationDirectoryExpectation !== void 0) {
|
|
21097
|
+
await assertManagedConversationDirectoryIdentity(
|
|
21098
|
+
conversationDirectoryExpectation
|
|
21099
|
+
);
|
|
21100
|
+
session.installPendingManagedConversationBinding(
|
|
21101
|
+
conversationDirectoryExpectation,
|
|
21102
|
+
() => assertManagedConversationDirectoryIdentity(
|
|
21103
|
+
conversationDirectoryExpectation
|
|
21104
|
+
)
|
|
21105
|
+
);
|
|
21106
|
+
}
|
|
20426
21107
|
if (relocation.memoryRefreshError) {
|
|
20427
21108
|
warnings.push(
|
|
20428
21109
|
`Memory refresh failed: ${relocation.memoryRefreshError instanceof Error ? relocation.memoryRefreshError.message : String(relocation.memoryRefreshError)}`
|
|
@@ -20452,6 +21133,41 @@ var QwenAgent = class {
|
|
|
20452
21133
|
releaseGate();
|
|
20453
21134
|
}
|
|
20454
21135
|
}
|
|
21136
|
+
case SERVE_CONTROL_EXT_METHODS.sessionManagedConversationBindingCommit:
|
|
21137
|
+
case SERVE_CONTROL_EXT_METHODS.sessionManagedConversationBindingRelease: {
|
|
21138
|
+
const sessionId = params["sessionId"];
|
|
21139
|
+
if (typeof sessionId !== "string" || sessionId.length === 0) {
|
|
21140
|
+
throw RequestError.invalidParams(
|
|
21141
|
+
void 0,
|
|
21142
|
+
"Invalid or missing sessionId"
|
|
21143
|
+
);
|
|
21144
|
+
}
|
|
21145
|
+
if (this.privateParentState !== "trusted") {
|
|
21146
|
+
throw RequestError.invalidParams(
|
|
21147
|
+
void 0,
|
|
21148
|
+
"Managed conversation binding requires a trusted private ACP parent"
|
|
21149
|
+
);
|
|
21150
|
+
}
|
|
21151
|
+
const expectation = parseConversationDirectoryExpectation(
|
|
21152
|
+
params["conversationDirectoryExpectation"]
|
|
21153
|
+
);
|
|
21154
|
+
if (expectation === void 0 || expectation.canonicalSessionId !== normalizeSessionIdForLookup(sessionId)) {
|
|
21155
|
+
throw managedConversationDirectoryError(false);
|
|
21156
|
+
}
|
|
21157
|
+
const session = this.sessionOrThrow(sessionId);
|
|
21158
|
+
if (!isReservedStandaloneSessionSourceType(
|
|
21159
|
+
session.getConfig().getSessionSourceType()
|
|
21160
|
+
)) {
|
|
21161
|
+
throw managedConversationDirectoryError(false);
|
|
21162
|
+
}
|
|
21163
|
+
await assertManagedConversationDirectoryIdentity(expectation);
|
|
21164
|
+
if (method === SERVE_CONTROL_EXT_METHODS.sessionManagedConversationBindingCommit) {
|
|
21165
|
+
await session.commitManagedConversationBinding(expectation);
|
|
21166
|
+
return { sessionId, committed: true };
|
|
21167
|
+
}
|
|
21168
|
+
await session.releaseManagedConversationBinding(expectation);
|
|
21169
|
+
return { sessionId, released: true };
|
|
21170
|
+
}
|
|
20455
21171
|
case SERVE_CONTROL_EXT_METHODS.sessionApprovalMode: {
|
|
20456
21172
|
const sessionId = params["sessionId"];
|
|
20457
21173
|
const mode = params["mode"];
|
|
@@ -22175,6 +22891,9 @@ ${outputText}
|
|
|
22175
22891
|
}
|
|
22176
22892
|
}
|
|
22177
22893
|
async newSessionConfigInRuntimeContext(cwd, mcpServers, settings, sessionSource, sessionId, resume, initializeOptions = {}, chatRecording, restoreOptions) {
|
|
22894
|
+
const provisionalWorkspace = isReservedStandaloneSessionSourceType(
|
|
22895
|
+
sessionSource?.sourceType
|
|
22896
|
+
);
|
|
22178
22897
|
const sessionMcpServers = {};
|
|
22179
22898
|
for (const server of mcpServers) {
|
|
22180
22899
|
const stdioServer = toStdioServer(server);
|
|
@@ -22236,6 +22955,7 @@ ${outputText}
|
|
|
22236
22955
|
const sessionArg = resume === true ? { resume: sessionId, sessionId: void 0 } : { sessionId, resume: void 0 };
|
|
22237
22956
|
const argvForSession = {
|
|
22238
22957
|
...this.argv,
|
|
22958
|
+
...provisionalWorkspace ? { experimentalLsp: false } : {},
|
|
22239
22959
|
// Docker sandbox relaunch injects a fixed --sandbox-session-id into
|
|
22240
22960
|
// the ACP process argv. Without clearing it, every newSession()
|
|
22241
22961
|
// inherits the same ID and the second session collides with the
|
|
@@ -22272,7 +22992,8 @@ ${outputText}
|
|
|
22272
22992
|
// not process.exit(1) the shared ACP child and every session on its
|
|
22273
22993
|
// channel. newSessionConfig maps the throw to a RequestError.
|
|
22274
22994
|
true,
|
|
22275
|
-
this.managedToolInvocationGuard || restoreOptions ? {
|
|
22995
|
+
this.managedToolInvocationGuard || restoreOptions || provisionalWorkspace ? {
|
|
22996
|
+
...provisionalWorkspace ? { provisionalWorkspace: true } : {},
|
|
22276
22997
|
...this.managedToolInvocationGuard ? { toolInvocationGuard: this.managedToolInvocationGuard } : {},
|
|
22277
22998
|
...restoreOptions && sessionId ? {
|
|
22278
22999
|
sessionRestore: {
|
|
@@ -22351,8 +23072,12 @@ ${outputText}
|
|
|
22351
23072
|
() => this.cleanupUnstoredConfig(config)
|
|
22352
23073
|
);
|
|
22353
23074
|
}
|
|
22354
|
-
|
|
22355
|
-
|
|
23075
|
+
if (!provisionalWorkspace) {
|
|
23076
|
+
startNonInteractiveOpenAILogHousekeeping(config, settings);
|
|
23077
|
+
}
|
|
23078
|
+
if (!provisionalWorkspace) {
|
|
23079
|
+
void this.surfaceMcpFailuresWhenReady(config);
|
|
23080
|
+
}
|
|
22356
23081
|
return config;
|
|
22357
23082
|
}
|
|
22358
23083
|
async surfaceMcpFailuresWhenReady(config) {
|
|
@@ -22410,7 +23135,7 @@ ${outputText}
|
|
|
22410
23135
|
const sessionId = normalizeSessionIdForLookup(config.getSessionId());
|
|
22411
23136
|
const geminiClient = config.getGeminiClient();
|
|
22412
23137
|
const needsInitialize = !geminiClient.isInitialized();
|
|
22413
|
-
if (needsInitialize) {
|
|
23138
|
+
if (needsInitialize && options.deferWorkspaceActivation !== true) {
|
|
22414
23139
|
await geminiClient.initialize();
|
|
22415
23140
|
}
|
|
22416
23141
|
this.assertManagedSessionAdmission();
|
|
@@ -22439,11 +23164,59 @@ ${outputText}
|
|
|
22439
23164
|
(operation) => this.runExclusiveHistoryMutation(sessionId, operation),
|
|
22440
23165
|
() => this.activeWorkReporter?.notifyChanged()
|
|
22441
23166
|
);
|
|
23167
|
+
const replaySessionHistory = /* @__PURE__ */ __name(async () => {
|
|
23168
|
+
if (options.replayHistory === false || !sessionData?.conversation.messages) {
|
|
23169
|
+
return;
|
|
23170
|
+
}
|
|
23171
|
+
await session.replayHistory(
|
|
23172
|
+
sessionData.conversation.messages,
|
|
23173
|
+
sessionData.historyGaps
|
|
23174
|
+
);
|
|
23175
|
+
try {
|
|
23176
|
+
await session.publishRecoveredGoalState(
|
|
23177
|
+
sessionData.conversation.messages
|
|
23178
|
+
);
|
|
23179
|
+
} catch (error) {
|
|
23180
|
+
debugLogger9.debug(
|
|
23181
|
+
`Failed to publish recovered Goal state: ${error instanceof Error ? error.message : String(error)}`
|
|
23182
|
+
);
|
|
23183
|
+
}
|
|
23184
|
+
}, "replaySessionHistory");
|
|
23185
|
+
if (options.deferWorkspaceActivation === true) {
|
|
23186
|
+
session.installManagedConversationActivation(
|
|
23187
|
+
async () => {
|
|
23188
|
+
this.assertManagedSessionAdmission();
|
|
23189
|
+
if (options.beforeDeferredWorkspaceActivation) {
|
|
23190
|
+
await options.beforeDeferredWorkspaceActivation();
|
|
23191
|
+
} else {
|
|
23192
|
+
await this.ensureAuthenticated(config);
|
|
23193
|
+
}
|
|
23194
|
+
this.assertManagedSessionAdmission();
|
|
23195
|
+
await config.activateProvisionalWorkspace();
|
|
23196
|
+
this.assertManagedSessionAdmission();
|
|
23197
|
+
this.setupFileSystem(config);
|
|
23198
|
+
config.hydrateSessionRestoreFileHistory?.();
|
|
23199
|
+
if (sessionData?.fileHistorySnapshots?.length) {
|
|
23200
|
+
config.getFileHistoryService().restoreFromSnapshots(sessionData.fileHistorySnapshots);
|
|
23201
|
+
}
|
|
23202
|
+
await replaySessionHistory();
|
|
23203
|
+
await options.beforeStartPostReplayServices?.(session);
|
|
23204
|
+
session.installRewriter();
|
|
23205
|
+
config.finalizeSessionRestore?.();
|
|
23206
|
+
startNonInteractiveOpenAILogHousekeeping(config, settings);
|
|
23207
|
+
},
|
|
23208
|
+
() => {
|
|
23209
|
+
void this.surfaceMcpFailuresWhenReady(config);
|
|
23210
|
+
}
|
|
23211
|
+
);
|
|
23212
|
+
}
|
|
22442
23213
|
let published = false;
|
|
22443
23214
|
try {
|
|
22444
23215
|
await registerCreateSubSessionTool(config);
|
|
22445
23216
|
options.primeSession?.(session);
|
|
22446
|
-
|
|
23217
|
+
if (options.deferWorkspaceActivation !== true) {
|
|
23218
|
+
config.hydrateSessionRestoreFileHistory?.();
|
|
23219
|
+
}
|
|
22447
23220
|
this.sessions.set(sessionId, session);
|
|
22448
23221
|
published = true;
|
|
22449
23222
|
this.activeWorkReporter?.notifyChanged();
|
|
@@ -22451,30 +23224,24 @@ ${outputText}
|
|
|
22451
23224
|
if (options.enableLiveScreenContext) {
|
|
22452
23225
|
await session.enableLiveScreenContext();
|
|
22453
23226
|
}
|
|
22454
|
-
if (sessionData?.fileHistorySnapshots?.length) {
|
|
23227
|
+
if (options.deferWorkspaceActivation !== true && sessionData?.fileHistorySnapshots?.length) {
|
|
22455
23228
|
config.getFileHistoryService().restoreFromSnapshots(sessionData.fileHistorySnapshots);
|
|
22456
23229
|
}
|
|
22457
23230
|
if (sessionData?.conversation.messages) {
|
|
22458
23231
|
config.getChatRecordingService()?.rebuildTurnBoundaries(sessionData.conversation.messages);
|
|
22459
23232
|
}
|
|
22460
|
-
if (options.
|
|
22461
|
-
await
|
|
22462
|
-
|
|
22463
|
-
|
|
22464
|
-
);
|
|
22465
|
-
|
|
22466
|
-
|
|
22467
|
-
|
|
22468
|
-
|
|
22469
|
-
|
|
22470
|
-
|
|
22471
|
-
`Failed to publish recovered Goal state: ${error instanceof Error ? error.message : String(error)}`
|
|
22472
|
-
);
|
|
22473
|
-
}
|
|
23233
|
+
if (options.deferWorkspaceActivation !== true) {
|
|
23234
|
+
await replaySessionHistory();
|
|
23235
|
+
}
|
|
23236
|
+
if (options.deferWorkspaceActivation !== true) {
|
|
23237
|
+
await options.beforeStartPostReplayServices?.(session);
|
|
23238
|
+
}
|
|
23239
|
+
if (options.deferWorkspaceActivation !== true) {
|
|
23240
|
+
session.installRewriter();
|
|
23241
|
+
}
|
|
23242
|
+
if (options.deferWorkspaceActivation !== true) {
|
|
23243
|
+
config.finalizeSessionRestore?.();
|
|
22474
23244
|
}
|
|
22475
|
-
await options.beforeStartPostReplayServices?.(session);
|
|
22476
|
-
session.installRewriter();
|
|
22477
|
-
config.finalizeSessionRestore?.();
|
|
22478
23245
|
session.startCronScheduler();
|
|
22479
23246
|
setTimeout(() => {
|
|
22480
23247
|
void session.sendAvailableCommandsUpdate();
|
|
@@ -22582,11 +23349,29 @@ ${outputText}
|
|
|
22582
23349
|
currentValue: currentModelId,
|
|
22583
23350
|
options: configModelOptions
|
|
22584
23351
|
};
|
|
22585
|
-
const
|
|
23352
|
+
const generation = config.getContentGeneratorConfig();
|
|
23353
|
+
const modelReasoning = this.getModelReasoningConfiguration(
|
|
23354
|
+
config,
|
|
23355
|
+
currentModelId
|
|
23356
|
+
);
|
|
22586
23357
|
const currentModelEffort = config.getReasoningEffort?.();
|
|
23358
|
+
const reasoningOverride = config.getReasoningEffortOverride?.();
|
|
23359
|
+
const reasoningOverrideValue = reasoningOverride ? generation[reasoningOverride.source]?.[reasoningOverride.field] : void 0;
|
|
23360
|
+
const normalizedEffortOverride = reasoningOverride?.field === "reasoning_effort" && typeof reasoningOverrideValue === "string" ? reasoningOverrideValue === "minimal" ? "low" : REASONING_EFFORT_TIERS.find(
|
|
23361
|
+
(effort) => effort === reasoningOverrideValue
|
|
23362
|
+
) : void 0;
|
|
23363
|
+
const normalizedBudgetOverride = reasoningOverride?.field === "thinking_budget" && typeof reasoningOverrideValue === "number" && Number.isFinite(reasoningOverrideValue) && reasoningOverrideValue >= 0 && reasoningOverrideValue <= 262144 ? reasoningOverrideValue <= 4096 ? "low" : reasoningOverrideValue <= 16384 ? "medium" : "xhigh" : void 0;
|
|
23364
|
+
const normalizedOverrideEffort = normalizedEffortOverride ?? normalizedBudgetOverride;
|
|
23365
|
+
const overrideDisablesReasoning = reasoningOverride?.field === "enable_thinking" && reasoningOverrideValue === false || reasoningOverride?.field === "reasoning_effort" && reasoningOverrideValue === REASONING_EFFORT_NONE;
|
|
23366
|
+
const mandatoryUsesDefaultEffort = generation.thinkingMandatory === true && (overrideDisablesReasoning || generation.reasoning === false && reasoningOverride?.field === "reasoning_effort");
|
|
23367
|
+
const effectiveModelEffort = modelReasoning && !modelReasoning.toggleOnly ? mandatoryUsesDefaultEffort ? modelReasoning.defaultEffort : normalizedOverrideEffort ? modelReasoning.efforts.find(
|
|
23368
|
+
(effort) => effort === normalizedOverrideEffort
|
|
23369
|
+
) ?? modelReasoning.defaultEffort : currentModelEffort : currentModelEffort;
|
|
23370
|
+
const reasoningEnabled = generation.reasoning !== false && (!reasoningOverride || !overrideDisablesReasoning);
|
|
22587
23371
|
const reasoningEffortConfigOption = (modelReasoning ? buildModelReasoningConfigOption(rawCurrentModelId, {
|
|
22588
|
-
enabled:
|
|
22589
|
-
effort:
|
|
23372
|
+
enabled: reasoningEnabled,
|
|
23373
|
+
effort: effectiveModelEffort,
|
|
23374
|
+
thinkingMandatory: generation.thinkingMandatory === true
|
|
22590
23375
|
}) : void 0) ?? {
|
|
22591
23376
|
id: "reasoning_effort",
|
|
22592
23377
|
name: "Reasoning effort",
|
|
@@ -22609,13 +23394,21 @@ ${outputText}
|
|
|
22609
23394
|
};
|
|
22610
23395
|
return [modeConfigOption, modelConfigOption, reasoningEffortConfigOption];
|
|
22611
23396
|
}
|
|
22612
|
-
getModelReasoningConfiguration(config) {
|
|
22613
|
-
if (config.getActiveRuntimeModelSnapshot?.()
|
|
23397
|
+
getModelReasoningConfiguration(config, currentAcpModelId) {
|
|
23398
|
+
if (config.getActiveRuntimeModelSnapshot?.()) {
|
|
23399
|
+
return void 0;
|
|
23400
|
+
}
|
|
23401
|
+
const completeModelId = currentAcpModelId ?? getCurrentAcpModelId(
|
|
23402
|
+
this.buildSelectableModelOptions(config),
|
|
23403
|
+
(config.getModel() || "").trim(),
|
|
23404
|
+
config.getAuthType?.(),
|
|
23405
|
+
config.getCurrentModelRegistryBaseUrl?.()
|
|
23406
|
+
);
|
|
23407
|
+
if (completeModelId.startsWith(ACP_ROUTE_ID_PREFIX)) {
|
|
22614
23408
|
return void 0;
|
|
22615
23409
|
}
|
|
22616
23410
|
const reasoning = getModelConfiguration(config.getModel())?.reasoning;
|
|
22617
|
-
|
|
22618
|
-
return reasoning?.thinking && (reasoning.toggleOnly || !currentEffort || reasoning.efforts.includes(currentEffort)) ? reasoning : void 0;
|
|
23411
|
+
return reasoning?.thinking ? reasoning : void 0;
|
|
22619
23412
|
}
|
|
22620
23413
|
buildSelectableModelOptions(config) {
|
|
22621
23414
|
const currentAuthType = config.getAuthType();
|