@qwen-code/qwen-code 0.21.12-preview.1 → 0.21.12-preview.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/configuration/settings.md +10 -0
- package/bundled/qc-helper/docs/features/code-review.md +1 -1
- package/bundled/qc-helper/docs/qwen-serve.md +34 -34
- package/bundled/review/SKILL.md +55 -36
- package/chunks/{MaxSizedBox-VSAJNP52.js → MaxSizedBox-GFI5RYXH.js} +41 -41
- package/chunks/{StandaloneSessionPicker-N5MC42M2.js → StandaloneSessionPicker-JFWRY4V2.js} +60 -61
- package/chunks/{acp-startup-profiler-JMJBZDVO.js → acp-startup-profiler-TVI2OVUN.js} +2 -2
- package/chunks/{acpAgent-GUV7LTDH.js → acpAgent-7YC6SNIS.js} +676 -430
- package/chunks/{agent-WJT3BALC.js → agent-43KVQSB5.js} +38 -38
- package/chunks/{agent-headless-JRRUUVP3.js → agent-headless-P2N7PDGQ.js} +38 -38
- package/chunks/{anthropicContentGenerator-4JSC3ZFL.js → anthropicContentGenerator-ZBBX5VMY.js} +6 -6
- package/chunks/{artifact-tool-FRMBPDPB.js → artifact-tool-RWJAKYBZ.js} +2 -2
- package/chunks/{askUserQuestion-7G3LI3IZ.js → askUserQuestion-IQCA2SOX.js} +2 -2
- package/chunks/{bridge-VB3BPG7G.js → bridge-ZBMNALLA.js} +44 -44
- package/chunks/{channel-management-service-SKAN6NOB.js → channel-management-service-5ZYX4ROW.js} +4 -4
- package/chunks/{channel-settings-store-UM7JZEW7.js → channel-settings-store-ZJWM7EDP.js} +45 -45
- package/chunks/{channel-worker-group-YPTB5ASD.js → channel-worker-group-QFJKXO7R.js} +5 -5
- package/chunks/{channel-worker-manager-4EHJSPRH.js → channel-worker-manager-PWD2UURZ.js} +5 -5
- package/chunks/{channel-worker-supervisor-DZKHYFHV.js → channel-worker-supervisor-XQJBGFCM.js} +3 -3
- package/chunks/{chunk-GZGDJ4E6.js → chunk-2ASWIM4A.js} +1 -1
- package/chunks/{chunk-DP3IHZGG.js → chunk-2AUM35J5.js} +59 -7
- package/chunks/{chunk-T4FTABSW.js → chunk-2N6CV4PW.js} +1 -1
- package/chunks/{chunk-5PWLQ7SK.js → chunk-2RTRFLWH.js} +11 -4
- package/chunks/{chunk-TKAEODJR.js → chunk-2U3UCXZ3.js} +11 -1
- package/chunks/{chunk-QZ5G26ZE.js → chunk-32SNBMNP.js} +12 -12
- package/chunks/{chunk-5DDUYIY6.js → chunk-3JI5D6RU.js} +3 -3
- package/chunks/{chunk-E5BWLU5J.js → chunk-3MJ44LNC.js} +59 -23
- package/chunks/{chunk-QUESTNOP.js → chunk-4JS2QK7P.js} +1 -1
- package/chunks/{chunk-G4C5RLX6.js → chunk-4X5J3V2I.js} +47 -3
- package/chunks/{chunk-IQFYO5BF.js → chunk-5KZNWF2M.js} +1 -1
- package/chunks/{chunk-MMH3GO4Z.js → chunk-62TIEFNN.js} +8 -8
- package/chunks/{chunk-T6W4KACQ.js → chunk-67F2BEYW.js} +1 -1
- package/chunks/{chunk-EN2J77G7.js → chunk-6LDLDK6E.js} +3 -1
- package/chunks/{chunk-VESDV72K.js → chunk-6NQWER7D.js} +3 -3
- package/chunks/{chunk-732MOPEM.js → chunk-6OJDN5ZT.js} +1 -1
- package/chunks/{chunk-GLWWPFTW.js → chunk-6SU6OW5Z.js} +1 -1
- package/chunks/{chunk-T2VEHZH3.js → chunk-6T5HCY34.js} +3 -3
- package/chunks/{chunk-AQHNAA7E.js → chunk-7JL5YBSA.js} +1 -1
- package/chunks/{chunk-NWPO6I7V.js → chunk-7WUMS2UA.js} +1 -1
- package/chunks/{chunk-VUTOKX6F.js → chunk-A2QIWDFO.js} +347 -85
- package/chunks/{chunk-KT4OWAAZ.js → chunk-A4BAHMJF.js} +3 -3
- package/chunks/{chunk-N7NBMAMW.js → chunk-A6GQUQ7I.js} +2 -2
- package/chunks/{chunk-XLQS3VI6.js → chunk-AAZWJAPQ.js} +2 -2
- package/chunks/{chunk-LT532KF4.js → chunk-ADJDLEVO.js} +1 -1
- package/chunks/{chunk-7L64FSYQ.js → chunk-APQTLUZ3.js} +2120 -2085
- package/chunks/{chunk-JO45C3OY.js → chunk-ARL4UGRW.js} +3 -3
- package/chunks/{chunk-Q6FGSG6B.js → chunk-B2BKFWJK.js} +2 -2
- package/chunks/{chunk-SAQHDAUJ.js → chunk-B66LYK4B.js} +452 -57
- package/chunks/{chunk-XDN6SMAQ.js → chunk-B7IBCWDW.js} +3 -3
- package/chunks/{chunk-SZ36WFVK.js → chunk-BGIKUE5J.js} +1 -1
- package/chunks/{chunk-4W25XH7F.js → chunk-BNRIQWXW.js} +3 -3
- package/chunks/{chunk-M3QYOPGN.js → chunk-BXAGPCYH.js} +1 -1
- package/chunks/{chunk-IEP44U2R.js → chunk-C2DR57L6.js} +1 -1
- package/chunks/{chunk-TBVNYG5B.js → chunk-CDDLHCC2.js} +3 -3
- package/chunks/{chunk-PDKLO2DN.js → chunk-CJNKGZLC.js} +127 -4
- package/chunks/{chunk-VUFEW3SF.js → chunk-CTEGMF77.js} +285 -125
- package/chunks/{chunk-QIN5P5BP.js → chunk-DUFZ3OW6.js} +35 -35
- package/chunks/{chunk-ZWPWQEF5.js → chunk-E74YSVIN.js} +1 -1
- package/chunks/{chunk-WFBG4MF5.js → chunk-ECDXUCEO.js} +4 -4
- package/chunks/{chunk-47FQVRCO.js → chunk-EGB2PIYM.js} +1 -1
- package/chunks/{chunk-CX2MARRJ.js → chunk-FB5CQZMK.js} +1 -1
- package/chunks/{chunk-GQW6P73F.js → chunk-FNVF5RR4.js} +1 -1
- package/chunks/{chunk-O4BBDP2G.js → chunk-FTGU6G45.js} +2 -2
- package/chunks/{chunk-ZGWY4YUB.js → chunk-FVHLDSQS.js} +2 -2
- package/chunks/{chunk-7N6WK2W6.js → chunk-FXWGMPAP.js} +2 -2
- package/chunks/{chunk-FMLUVVQ6.js → chunk-GDNDZJSG.js} +2 -2
- package/chunks/{chunk-INQN4KIA.js → chunk-GHOUZ5X4.js} +1896 -623
- package/chunks/{chunk-3ZLUA4GV.js → chunk-H2U4FK62.js} +6 -6
- package/chunks/{chunk-EFIMD5VA.js → chunk-H6BFLALJ.js} +1 -1
- package/chunks/{chunk-MJ5FMYVQ.js → chunk-HOJZ2QQA.js} +3 -3
- package/chunks/{chunk-OYLNJPY3.js → chunk-HWCHDINS.js} +45 -279
- package/chunks/{chunk-DNRV2US3.js → chunk-HY5OHJEC.js} +5 -5
- package/chunks/{chunk-P2UCMHDT.js → chunk-IJCZP2MA.js} +2 -2
- package/chunks/{chunk-U6LT3QBF.js → chunk-JBZYGFIB.js} +1 -1
- package/chunks/{chunk-EAJESCBT.js → chunk-JGD35ZSJ.js} +4 -4
- package/chunks/{chunk-MLZCPGDX.js → chunk-JOVJCXN4.js} +1 -1
- package/chunks/{chunk-AJL3SAZG.js → chunk-JRMUA53D.js} +12 -12
- package/chunks/{chunk-CTQE2NB2.js → chunk-JRTJEGSP.js} +1 -1
- package/chunks/{chunk-MZSJ43WV.js → chunk-JVY7FHUZ.js} +15 -2
- package/chunks/{chunk-K7JW6V5O.js → chunk-JW5UEE3V.js} +1 -1
- package/chunks/{chunk-6LK2QPIA.js → chunk-JXS2JNMZ.js} +2 -2
- package/chunks/{chunk-L2GTEEEU.js → chunk-K5IDV3PC.js} +44 -1
- package/chunks/{chunk-OH5UKBLL.js → chunk-KB4ISUT3.js} +4 -4
- package/chunks/{chunk-GJJQV4PY.js → chunk-KK3FEHPJ.js} +1 -1
- package/chunks/{chunk-2AZMF6G5.js → chunk-KTWUFHS4.js} +2 -2
- package/chunks/chunk-L34XSHIZ.js +28 -0
- package/chunks/{chunk-VO52SIZW.js → chunk-L3YACXS2.js} +3 -3
- package/chunks/{chunk-JWXBLIQL.js → chunk-LIBTBTHP.js} +4 -4
- package/chunks/{chunk-JS4Q5NG5.js → chunk-LSMCI42W.js} +3 -3
- package/chunks/{chunk-A7M57KOL.js → chunk-MTV5W6WN.js} +7 -7
- package/chunks/{chunk-T5ZFG4CI.js → chunk-MUN34TTF.js} +7 -7
- package/chunks/{chunk-C2VGLLNA.js → chunk-N3J3CO35.js} +4 -4
- package/chunks/{chunk-3SIXC6QC.js → chunk-N56NYJWY.js} +7 -7
- package/chunks/{chunk-45TYWBCB.js → chunk-NAOHSM56.js} +1 -1
- package/chunks/{chunk-URK542T4.js → chunk-NF5J2WFA.js} +15 -2
- package/chunks/{chunk-OPBATTFQ.js → chunk-NHZF4VCD.js} +1 -1
- package/chunks/{chunk-QTI7SRXI.js → chunk-NM33GGOM.js} +3 -3
- package/chunks/{chunk-F6AOBFUN.js → chunk-NW7SPXVG.js} +1 -1
- package/chunks/{chunk-ABGS4FDQ.js → chunk-NX5QZVRS.js} +1 -1
- package/chunks/{chunk-XYVBANG5.js → chunk-O4MVJKSX.js} +289 -3
- package/chunks/{chunk-NC4O6UE6.js → chunk-O6SLWH4X.js} +2 -2
- package/chunks/{chunk-ZXUMPZRT.js → chunk-OIZWCOYC.js} +5 -5
- package/chunks/{chunk-YQB3HSQ7.js → chunk-ORR5EFCL.js} +4 -4
- package/chunks/{chunk-WQOE4IYF.js → chunk-OSA2TFDI.js} +2 -2
- package/chunks/{chunk-KPVVWKF3.js → chunk-PSTHNTHF.js} +1 -1
- package/chunks/{chunk-FWJRWCKU.js → chunk-PYLVQ6RT.js} +6 -6
- package/chunks/{chunk-XAAL4IFG.js → chunk-Q7ALOKK7.js} +3 -3
- package/chunks/{chunk-EYW54TBD.js → chunk-QEWAHAW2.js} +3 -3
- package/chunks/{chunk-L2O7DJIE.js → chunk-QSDPJROT.js} +2 -2
- package/chunks/{chunk-7PBUQKMT.js → chunk-QSMZHJ62.js} +1 -1
- package/chunks/{chunk-OSPIZEAM.js → chunk-QWAI7FNT.js} +17 -17
- package/chunks/{chunk-JRRZFO4A.js → chunk-QXFAQDBV.js} +2 -2
- package/chunks/{chunk-67LXZ6LV.js → chunk-SFBRH5RY.js} +19 -15
- package/chunks/{chunk-EYS3GGM3.js → chunk-SKRHR6N2.js} +1 -1
- package/chunks/{chunk-6LYDH7VT.js → chunk-SNHBRO4C.js} +2 -2
- package/chunks/{chunk-5TXOGH4I.js → chunk-T4G33L3W.js} +3 -3
- package/chunks/{chunk-DEVFUPC5.js → chunk-TB6DPBE4.js} +4 -4
- package/chunks/{chunk-DEG7R6Z6.js → chunk-TN3REXN4.js} +8 -8
- package/chunks/{chunk-MWZYNOCG.js → chunk-TNETSI2A.js} +3 -3
- package/chunks/{chunk-ZV4XVYL3.js → chunk-TROB4PZY.js} +4 -4
- package/chunks/{chunk-O5AZPHYZ.js → chunk-U5C2GIN2.js} +24 -16
- package/chunks/{chunk-3GCU5O2E.js → chunk-U7ROFHSH.js} +1 -1
- package/chunks/{chunk-HB6QW4LM.js → chunk-UAAWNTOC.js} +15 -12
- package/chunks/{chunk-HHGQGTJQ.js → chunk-UFHPAMAV.js} +4 -0
- package/chunks/{chunk-V3LXMASR.js → chunk-UHF5VBKO.js} +1 -1
- package/chunks/{chunk-AMXMM7DH.js → chunk-UPUAGRKY.js} +4 -2
- package/chunks/{chunk-6S52N6PG.js → chunk-UQPLUR4A.js} +2 -2
- package/chunks/{chunk-5AWARYOK.js → chunk-UWIJU22K.js} +66 -19
- package/chunks/{chunk-HGCQ5SE7.js → chunk-UXEO7E3V.js} +21 -0
- package/chunks/{chunk-DGM2XA3R.js → chunk-V2U6FOJB.js} +2 -2
- package/chunks/{chunk-7SUQZ7QH.js → chunk-V3NMFQD2.js} +2 -2
- package/chunks/{chunk-P5Y23G2L.js → chunk-V7RNNPGC.js} +1 -18
- package/chunks/{chunk-6XZERB6P.js → chunk-VPZMLGD3.js} +3 -3
- package/chunks/{chunk-MM4XBXF7.js → chunk-VRQD5D7R.js} +1 -1
- package/chunks/{chunk-YTYPRVIZ.js → chunk-VUTOV2HG.js} +2 -2
- package/chunks/{chunk-RE6JD2BH.js → chunk-VYDQD5J4.js} +1 -1
- package/chunks/{chunk-XCGIMOLN.js → chunk-WCCLLK7X.js} +14 -1
- package/chunks/{chunk-ZIS5I56G.js → chunk-WIHSDI6U.js} +4 -4
- package/chunks/{chunk-VJNBRRZG.js → chunk-WZMH7II3.js} +1 -1
- package/chunks/{chunk-LOJO2RPW.js → chunk-XJ6IMYUS.js} +7 -7
- package/chunks/{chunk-3XZYK76R.js → chunk-XL6GYJL2.js} +1 -1
- package/chunks/{chunk-OLU7GIF4.js → chunk-XUBM2A4F.js} +67 -16
- package/chunks/{chunk-ENEEQMGM.js → chunk-XY7DGTIC.js} +1 -1
- package/chunks/{chunk-LCWRQA5U.js → chunk-Y2EOB7WZ.js} +1 -1
- package/chunks/{chunk-FLUYVAQZ.js → chunk-Y2HK3ELT.js} +3 -3
- package/chunks/{chunk-PRWGIKKU.js → chunk-Y5C24BUY.js} +5 -5
- package/chunks/{chunk-5HBFERG5.js → chunk-YI5G32RU.js} +3 -3
- package/chunks/{chunk-MPBRV3UU.js → chunk-YMB77M76.js} +15 -0
- package/chunks/{chunk-KNQZXSLW.js → chunk-YY23TR4M.js} +23 -9
- package/chunks/{chunk-M2S67TPJ.js → chunk-ZA2JN5IZ.js} +3 -3
- package/chunks/{chunk-IX7CFQGA.js → chunk-ZPZANKVP.js} +3 -3
- package/chunks/{chunk-XTH2OMDS.js → chunk-ZRT36RSF.js} +1 -1
- package/chunks/{chunk-M2NMFAFR.js → chunk-ZZ7RUTJ4.js} +1 -1
- package/chunks/{computer-use-YOYLKIHT.js → computer-use-J5VUY257.js} +38 -38
- package/chunks/{config-utils-TXVKR27S.js → config-utils-7JZQN6L2.js} +4 -4
- package/chunks/{contextCommand-KZMV5EOI.js → contextCommand-RCTGC36R.js} +40 -40
- package/chunks/{core-runtime-VFUL2R7U.js → core-runtime-REBZ5ZYE.js} +38 -38
- package/chunks/{create-sub-session-Y4WYDZGC.js → create-sub-session-23ULO5PO.js} +2 -2
- package/chunks/{create-sub-session-EZW2NP4Z.js → create-sub-session-TEEUROAZ.js} +38 -38
- package/chunks/{cron-create-ZOVA3CC2.js → cron-create-5WUTNKNF.js} +4 -4
- package/chunks/{cron-delete-7Z3H4LJY.js → cron-delete-JEQ27YPS.js} +4 -4
- package/chunks/{cron-list-UHGX3IQG.js → cron-list-IXGCA7UR.js} +4 -4
- package/chunks/{daemon-PXIC4ZDK.js → daemon-UBVOQMWY.js} +2 -1
- package/chunks/{daemon-status-provider-6L3ZKVVR.js → daemon-status-provider-SV7KRLJ4.js} +49 -49
- package/chunks/{daemon-trust-policy-SZ3V4JEY.js → daemon-trust-policy-LFUJ4NGF.js} +44 -44
- package/chunks/{daemon-trust-policy-monitor-HN34EJQ5.js → daemon-trust-policy-monitor-BQZ77NDD.js} +44 -44
- package/chunks/{deferred-core-runtime-Z462KPKI.js → deferred-core-runtime-F4XOQJQL.js} +38 -38
- package/chunks/{dispatch-B53LNEO4.js → dispatch-FW7DX2CR.js} +7 -1
- package/chunks/{display-image-ZE3GZNIK.js → display-image-CAD7RAUM.js} +4 -4
- package/chunks/{dist-BNWP6IZL.js → dist-362MN6CP.js} +2 -2
- package/chunks/{dist-EFJILGIS.js → dist-5VDE7U3A.js} +1 -1
- package/chunks/{dist-AVUYBK7L.js → dist-6RK4U6VU.js} +1 -1
- package/chunks/{dist-KTYDJNYM.js → dist-B3ODKYEB.js} +1 -1
- package/chunks/{dist-NPS52B2V.js → dist-CCUH2Z4C.js} +1 -1
- package/chunks/{dist-BW2LDPV3.js → dist-DANKRAB3.js} +1 -1
- package/chunks/{dist-PKSRQAR2.js → dist-EZHCZSW6.js} +1 -1
- package/chunks/{dist-ZWDH5HLS.js → dist-M3XMEIP2.js} +1 -1
- package/chunks/{earlyInputCapture-GSE6MMC7.js → earlyInputCapture-JAJXDT2N.js} +39 -39
- package/chunks/{edit-YJX2HMSA.js → edit-OXBMFY5B.js} +38 -38
- package/chunks/{enter-worktree-H3GV4KQ7.js → enter-worktree-XS4JX4PO.js} +38 -38
- package/chunks/{enterPlanMode-6LPSFIN2.js → enterPlanMode-J6PDPFFT.js} +38 -38
- package/chunks/{environment-IVCQ3H7T.js → environment-BQW6FAZL.js} +40 -40
- package/chunks/{errors-2K5VJQVK.js → errors-TMSN7AZN.js} +40 -40
- package/chunks/{exit-worktree-QZC6DXGO.js → exit-worktree-2RIE6DAO.js} +38 -38
- package/chunks/{exitPlanMode-UHGM7I4A.js → exitPlanMode-QQL27HU4.js} +38 -38
- package/chunks/{fast-path-BDDOO4H6.js → fast-path-TSGUVE5K.js} +4 -4
- package/chunks/{gemini-VDUDROF7.js → gemini-RLTFENFV.js} +89 -86
- package/chunks/{geminiContentGenerator-O4HYJOR7.js → geminiContentGenerator-B6W6PSO7.js} +6 -6
- package/chunks/{glob-Z7VZDN7C.js → glob-JKVAHWL5.js} +38 -38
- package/chunks/{goal-tools-JDK2SNMV.js → goal-tools-LQFO4BRY.js} +4 -4
- package/chunks/{grep-JQ6AGN62.js → grep-6CN23ZPS.js} +38 -38
- package/chunks/{handleAutoUpdate-XZCLKEMR.js → handleAutoUpdate-Y6BUNMBG.js} +42 -42
- package/chunks/{i18n-G2BMPGAS.js → i18n-Y5PM6L5V.js} +39 -39
- package/chunks/{image-gen-NMKTIERQ.js → image-gen-DC2IQZ73.js} +10 -10
- package/chunks/{initializer-JEYFVIIG.js → initializer-OYKKBNHO.js} +45 -45
- package/chunks/{installationInfo-GY2OCLIS.js → installationInfo-63AFHLWA.js} +39 -39
- package/chunks/{keychain-token-storage-JTWUYFU7.js → keychain-token-storage-GU75J2T2.js} +2 -2
- package/chunks/{list-ZJ4GEKM4.js → list-KA63R3R6.js} +47 -47
- package/chunks/{list-agents-4GQ2XNEU.js → list-agents-5PNMK2AM.js} +2 -2
- package/chunks/{loadedSettingsAdapter-5BO2PZLD.js → loadedSettingsAdapter-IGBJN7C5.js} +44 -44
- package/chunks/{loggingContentGenerator-ER2Z5L3L.js → loggingContentGenerator-Z3NADCTQ.js} +115 -93
- package/chunks/{loop-wakeup-HOQI3K5D.js → loop-wakeup-OV65FEGR.js} +5 -5
- package/chunks/{ls-FSHISLLA.js → ls-RPRSX26R.js} +4 -4
- package/chunks/{lsp-APQJ5ZEZ.js → lsp-IWTJWFLT.js} +2 -2
- package/chunks/{managed-npm-update-X66EZDQD.js → managed-npm-update-HA262PFM.js} +41 -41
- package/chunks/{mcp-BDWPEXJF.js → mcp-T5ZUOKT3.js} +44 -44
- package/chunks/{monitor-7J3DCMBL.js → monitor-SLGY7CYB.js} +38 -38
- package/chunks/nonInteractiveCli-R5PK5B5G.js +166 -0
- package/chunks/{notebook-edit-IX7GCTIL.js → notebook-edit-STSSB5KQ.js} +38 -38
- package/chunks/{openaiContentGenerator-K65IDMQ6.js → openaiContentGenerator-OQED57JE.js} +24 -24
- package/chunks/{opentui-entry-L76XJNPE.js → opentui-entry-UTJ6MHDI.js} +5224 -825
- package/chunks/{pidfile-NNWTPHX2.js → pidfile-GES3MIHH.js} +39 -39
- package/chunks/{processUtils-ILOXESNR.js → processUtils-FU6VMUOL.js} +2 -2
- package/chunks/{qwenContentGenerator-YIKX3NHW.js → qwenContentGenerator-HWJSEGUL.js} +43 -43
- package/chunks/{qwenOAuth2-BLYU65Y4.js → qwenOAuth2-PAIR7XEW.js} +9 -9
- package/chunks/{read-file-GLBZFPNV.js → read-file-IYEBTQT5.js} +12 -12
- package/chunks/{read-mcp-resource-TJSJRH4F.js → read-mcp-resource-THCSZHXO.js} +2 -2
- package/chunks/{read-package-up-TCM6I7S2.js → read-package-up-K6RKTL5D.js} +1 -1
- package/chunks/{record-artifact-FXF5LHPE.js → record-artifact-76YYQA5F.js} +3 -3
- package/chunks/{resumeHistoryUtils-UMC4Y3E2.js → resumeHistoryUtils-WP446RP5.js} +44 -45
- package/chunks/{ripGrep-53XOGSZ4.js → ripGrep-VV2CRCL2.js} +38 -38
- package/chunks/{run-qwen-serve-BTZ46CLW.js → run-qwen-serve-AHQCTALV.js} +160 -71
- package/chunks/{runtime-RQ3ACQKH.js → runtime-AUUZGDK6.js} +49 -49
- package/chunks/{scheduler-WEIFVKQH.js → scheduler-Y4UPEURR.js} +40 -40
- package/chunks/{sdk-exporters-http-2VPMAPFI.js → sdk-exporters-http-A7XLKZO7.js} +11 -7
- package/chunks/{sdk-impl-5W3JUCWF.js → sdk-impl-XO4UF6PR.js} +11 -8
- package/chunks/{send-message-RBYLV5NY.js → send-message-P5SLP57G.js} +6 -6
- package/chunks/{serve-RJUR5OJH.js → serve-WI3SE4MY.js} +47 -47
- package/chunks/{server-WQ2ID4U7.js → server-G6JU6UWL.js} +264 -159
- package/chunks/{session-O4OXRVNI.js → session-2AO2UACB.js} +85 -85
- package/chunks/{settings-4BVJ36YG.js → settings-3HRWSH66.js} +43 -43
- package/chunks/{shell-DCQZWM5T.js → shell-AR7XFLHA.js} +38 -38
- package/chunks/{skill-4KWZ4J7U.js → skill-K6NOUUYM.js} +16 -16
- package/chunks/{skill-settings-TEMNXCLU.js → skill-settings-IOXQYS6X.js} +43 -43
- package/chunks/{spawnChannel-ROYEZK57.js → spawnChannel-V6P6HF4V.js} +42 -40
- package/chunks/{standalone-update-G4BETY4B.js → standalone-update-K5G3L2OJ.js} +40 -40
- package/chunks/{startInteractiveUI-PDFQ7N7A.js → startInteractiveUI-TRRP52QX.js} +422 -500
- package/chunks/{syntheticOutput-D3Z64LJC.js → syntheticOutput-SEW4NA47.js} +3 -3
- package/chunks/{task-create-URFZ5EUX.js → task-create-247EAVF7.js} +10 -10
- package/chunks/{task-list-6JDFMPUW.js → task-list-ZJN4QHLK.js} +5 -5
- package/chunks/{task-stop-HHUGCD25.js → task-stop-MAYQJ42I.js} +2 -2
- package/chunks/{task-update-DVV6CUGI.js → task-update-SU5TMZGG.js} +10 -10
- package/chunks/{team-create-KW4LOVHD.js → team-create-IEEEBLE2.js} +38 -38
- package/chunks/{team-delete-PZGGBQLM.js → team-delete-3XVRPQBP.js} +5 -5
- package/chunks/{team-plan-approval-XHFK2RTF.js → team-plan-approval-SJGNS5JL.js} +38 -38
- package/chunks/{terminal-image-renderer-46R2LHGR.js → terminal-image-renderer-C4RQMC67.js} +40 -40
- package/chunks/{theme-manager-E56XY2JG.js → theme-manager-IKZQJQ6C.js} +39 -39
- package/chunks/{todoWrite-WINAZSZI.js → todoWrite-IE2YTCK7.js} +4 -4
- package/chunks/{tool-search-EVVFQUMJ.js → tool-search-4UVNFYWU.js} +16 -16
- package/chunks/{total-session-admission-CULMHRTA.js → total-session-admission-DIN6FTZP.js} +44 -44
- package/chunks/{trustedFolders-BKLVSCXW.js → trustedFolders-IAHOLV6A.js} +39 -39
- package/chunks/{update-relaunch-46H4Q4VL.js → update-relaunch-5QSJ5CWP.js} +5 -5
- package/chunks/{updateCheck-3BQA7KNI.js → updateCheck-N4RT7HOZ.js} +44 -44
- package/chunks/{useAutoAcceptIndicator-3QJ7QV5R.js → useAutoAcceptIndicator-25T26VZS.js} +46 -46
- package/chunks/{validateNonInterActiveAuth-QVFJVBSY.js → validateNonInterActiveAuth-MCTVPLFE.js} +81 -81
- package/chunks/{version-6JJA54HH.js → version-6PLZ7PCV.js} +2 -2
- package/chunks/{web-fetch-75JBSDA3.js → web-fetch-5ANX6FSM.js} +16 -16
- package/chunks/{web-search-PKBISWS3.js → web-search-KQJWWRHW.js} +9 -9
- package/chunks/{workflow-KEZDQISR.js → workflow-C57ZKFUF.js} +111 -46
- package/chunks/{workspace-providers-status-YQW4VNIV.js → workspace-providers-status-3QAE4G4Y.js} +47 -47
- package/chunks/{workspace-registration-store-GQ42PR72.js → workspace-registration-store-Q3J5LV6T.js} +1 -1
- package/chunks/{workspace-registry-ZR6DVZQ6.js → workspace-registry-DSJ5NAII.js} +44 -44
- package/chunks/{workspace-service-BCMK3NLA.js → workspace-service-QW5LH7FA.js} +49 -49
- package/chunks/{workspace-skills-status-ZHBYM2X7.js → workspace-skills-status-N34ALJPZ.js} +45 -45
- package/chunks/{workspace-trust-reconciler-TWRB3TW2.js → workspace-trust-reconciler-YTOL7QEV.js} +50 -50
- package/chunks/{write-file-CQBI7HXO.js → write-file-MSFRVUZB.js} +38 -38
- package/chunks/{zoom-image-36I4WZIL.js → zoom-image-4TQA5GHG.js} +12 -12
- package/cli.js +13 -13
- package/package.json +4 -4
- package/web-shell/assets/{arc-CgGUyHWd.js → arc-lZ04kynw.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-BR0Qv-1Y.js → architectureDiagram-3BPJPVTR-B1wZVhzD.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-DIoaceaI.js → blockDiagram-GPEHLZMM-CO0e0yJt.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-Bc5k6BbI.js → c4Diagram-AAUBKEIU-Dfpo6Qie.js} +1 -1
- package/web-shell/assets/channel-BxvRq3pV.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-DtPEz2WX.js → chunk-2J33WTMH-BvxArftT.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-Dydo6ydE.js → chunk-4BX2VUAB-BS2XXjGY.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DD9_VWXm.js → chunk-55IACEB6-CYL6h3Ph.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-DVI2m59k.js → chunk-727SXJPM-C-cWPX30.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-luatmaTN.js → chunk-AQP2D5EJ-CJLxNbVV.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-Duy8NTIi.js → chunk-FMBD7UC4-DwfzKywA.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-CrL1yhms.js → chunk-ND2GUHAM-BI5raYHQ.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-C7BX6bu1.js → chunk-QZHKN3VN-_GkNI90J.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-tL8nAxYf.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-tL8nAxYf.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BTzs7mIi.js → cose-bilkent-S5V4N54A-BAVLNxh9.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-3VTUmWts.js → dagre-BM42HDAG-BD4XNLqp.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-Ehdp75GN.js → diagram-2AECGRRQ-WO567p8w.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-B3wu3teE.js → diagram-5GNKFQAL-mAk23VWO.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-DjgTSf2S.js → diagram-KO2AKTUF-YQEeHKze.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-Br9mwjY3.js → diagram-LMA3HP47-CMVjxAjv.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-D4xz5M-z.js → diagram-OG6HWLK6-42hPvbM-.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-CXayWlG_.js → erDiagram-TEJ5UH35-CXU_cPfu.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-CLonjQTi.js → flowDiagram-I6XJVG4X-D-3TdhMT.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BTySFT-1.js → ganttDiagram-6RSMTGT7-CsgkXolz.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII--2WcUjOe.js → gitGraphDiagram-PVQCEYII-B6Q3PBLD.js} +1 -1
- package/web-shell/assets/{index-DPJHkFOG.js → index-BFrkGj2B.js} +1 -1
- package/web-shell/assets/index-BgjULKyF.css +5 -0
- package/web-shell/assets/index-CxXlPYfl.js +1789 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-9vpgAf1m.js → infoDiagram-5YYISTIA-jiAfSXp8.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-DcRpHnAW.js → ishikawaDiagram-YF4QCWOH-BWif5KeJ.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-C2TKorRm.js → journeyDiagram-JHISSGLW-B-GAZthS.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-DdsFwB8b.js → kanban-definition-UN3LZRKU-9TEuATdL.js} +1 -1
- package/web-shell/assets/{linear-7PjRvJrf.js → linear-dy_QPfyE.js} +1 -1
- package/web-shell/assets/{mermaid.core-raDXa11C.js → mermaid.core-DB2uLAnq.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-DLHc-PRN.js → mindmap-definition-RKZ34NQL-ey_dyxi-.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-BftYpeTW.js → pieDiagram-4H26LBE5-_6BuMdDj.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-O-6ygOYn.js → quadrantDiagram-W4KKPZXB-B2rM19W2.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-BmZWVufJ.js → requirementDiagram-4Y6WPE33-DWj8b7vW.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-2x5beiWt.js → sankeyDiagram-5OEKKPKP-D5dtYh0N.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-BH8uKokQ.js → sequenceDiagram-3UESZ5HK-DVkdn_qW.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-Dq1MFgX_.js → stateDiagram-AJRCARHV-DgwD_fi6.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BWGkVGVB.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-Cl2WKbv9.js → timeline-definition-PNZ67QCA-vNr_1UNX.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BqoRo_Q-.js → vennDiagram-CIIHVFJN-ChFcGAcu.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-BTxp-Yot.js → wardley-L42UT6IY-C8PXoSWk.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DFXVCSH2.js → wardleyDiagram-YWT4CUSO-C2nqOV6i.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-qQhWx0aE.js → xychartDiagram-2RQKCTM6-BntaqhSB.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-7P32M35F.js +0 -51
- package/chunks/nonInteractiveCli-THJJIXKG.js +0 -166
- package/web-shell/assets/channel-D2b9IYpS.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-DHatTCmD.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DHatTCmD.js +0 -1
- package/web-shell/assets/index-CIFO52Wx.css +0 -5
- package/web-shell/assets/index-bhq3CUUF.js +0 -1789
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-spuAYji6.js +0 -1
|
@@ -6,18 +6,20 @@ import {
|
|
|
6
6
|
EventBus,
|
|
7
7
|
logEventSizingFailed,
|
|
8
8
|
serializedBridgeEventByteLength
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JVY7FHUZ.js";
|
|
10
10
|
import {
|
|
11
|
+
JOURNAL_GROWTH_HARD_CAP_BYTES,
|
|
11
12
|
normalizeCompactedReplayMaxBytes,
|
|
13
|
+
normalizeJournalGrowthPoolBytes,
|
|
12
14
|
normalizeMaxJournalBytes,
|
|
13
15
|
normalizeMaxJournalEvents
|
|
14
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WCCLLK7X.js";
|
|
15
17
|
import {
|
|
16
18
|
MCP_RESTART_SERVER_DEADLINE_MS
|
|
17
19
|
} from "./chunk-OCPBI7J5.js";
|
|
18
20
|
import {
|
|
19
21
|
defaultSpawnChannelFactory
|
|
20
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2U3UCXZ3.js";
|
|
21
23
|
import {
|
|
22
24
|
BridgeChannelClosedError,
|
|
23
25
|
BridgeTimeoutError,
|
|
@@ -27,7 +29,7 @@ import {
|
|
|
27
29
|
SessionRestoreTimeoutError,
|
|
28
30
|
createIdleWorkspaceExtensionsStatus,
|
|
29
31
|
createIdleWorkspaceHooksStatus
|
|
30
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-NHZF4VCD.js";
|
|
31
33
|
import {
|
|
32
34
|
ACTIVE_WORK_CLOSE_IF_UNHELD_PARAM,
|
|
33
35
|
ACTIVE_WORK_CLOSE_TIMEOUT_MS,
|
|
@@ -46,6 +48,7 @@ import {
|
|
|
46
48
|
DAEMON_PROMPT_DISPLAY_TEXT_META_KEY,
|
|
47
49
|
LOAD_REPLAY_BULK_MODE,
|
|
48
50
|
LOAD_REPLAY_HIDE_INHERITED_META_KEY,
|
|
51
|
+
LOAD_REPLAY_MAX_UPDATES,
|
|
49
52
|
LOAD_REPLAY_META_KEY,
|
|
50
53
|
LOAD_REPLAY_MODE_META_KEY,
|
|
51
54
|
LOAD_REPLAY_PAGE_SIZE_META_KEY,
|
|
@@ -59,7 +62,7 @@ import {
|
|
|
59
62
|
WORKTREE_MCP_DEFER_META_KEY,
|
|
60
63
|
clampActiveWorkIntervalMs,
|
|
61
64
|
isValidTrustedModelPrompt
|
|
62
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-UFHPAMAV.js";
|
|
63
66
|
import {
|
|
64
67
|
BranchWhilePromptActiveError,
|
|
65
68
|
BridgeChannelQuarantinedError,
|
|
@@ -116,16 +119,16 @@ import {
|
|
|
116
119
|
metadataBudgetBytes,
|
|
117
120
|
normalizeSnapshotPayload,
|
|
118
121
|
stableSessionArtifactId
|
|
119
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-GHOUZ5X4.js";
|
|
120
123
|
import {
|
|
121
124
|
DAEMON_TRACEPARENT_META_KEY,
|
|
122
125
|
DAEMON_TRACESTATE_META_KEY
|
|
123
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-U5C2GIN2.js";
|
|
124
127
|
import {
|
|
125
128
|
INVOCATION_CONTEXT_META_KEY,
|
|
126
129
|
PRIVATE_ACP_CAPABILITY_ENV,
|
|
127
130
|
PRIVATE_PARENT_CAPABILITY_META_KEY
|
|
128
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-UAAWNTOC.js";
|
|
129
132
|
import {
|
|
130
133
|
init_esbuild_shims
|
|
131
134
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -155,6 +158,17 @@ var LATEST_WINS_UPDATES = /* @__PURE__ */ new Set([
|
|
|
155
158
|
]);
|
|
156
159
|
var REPLAY_SEGMENT_COMPACT_THRESHOLD = 64;
|
|
157
160
|
var LIVE_JOURNAL_TEXT_CHUNKS_PER_EVENT = 256;
|
|
161
|
+
function createLiveJournalState() {
|
|
162
|
+
return {
|
|
163
|
+
entries: [],
|
|
164
|
+
entryBytes: [],
|
|
165
|
+
entryEvents: [],
|
|
166
|
+
totalBytes: 0,
|
|
167
|
+
totalEvents: 0,
|
|
168
|
+
truncatedEvents: 0
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
__name(createLiveJournalState, "createLiveJournalState");
|
|
158
172
|
function replayRecordId(event) {
|
|
159
173
|
if (event.type !== "session_update") return void 0;
|
|
160
174
|
const data = event.data;
|
|
@@ -180,26 +194,35 @@ function lastRecordIdIn(events) {
|
|
|
180
194
|
return void 0;
|
|
181
195
|
}
|
|
182
196
|
__name(lastRecordIdIn, "lastRecordIdIn");
|
|
197
|
+
function lastSummaryRecordIdIn(events) {
|
|
198
|
+
for (let i = events.length - 1; i >= 0; i--) {
|
|
199
|
+
if (!isSummaryLiveJournalEvent(events[i])) continue;
|
|
200
|
+
const id = replayRecordId(events[i]);
|
|
201
|
+
if (id !== void 0) return id;
|
|
202
|
+
}
|
|
203
|
+
return void 0;
|
|
204
|
+
}
|
|
205
|
+
__name(lastSummaryRecordIdIn, "lastSummaryRecordIdIn");
|
|
206
|
+
var JOURNAL_GROWTH_REASK_INTERVAL_MS = 1e4;
|
|
207
|
+
var JOURNAL_GROWTH_MAX_GRANTS_PER_BREACH = 64;
|
|
183
208
|
var TurnBoundaryCompactionEngine = class {
|
|
184
209
|
static {
|
|
185
210
|
__name(this, "TurnBoundaryCompactionEngine");
|
|
186
211
|
}
|
|
187
212
|
maxReplayBytes;
|
|
213
|
+
// Mutable: adaptive growth (see `maybeGrowJournalLimits`) raises these
|
|
214
|
+
// in place when the advisor grants headroom.
|
|
188
215
|
maxJournalEvents;
|
|
189
216
|
maxJournalBytes;
|
|
217
|
+
onJournalGrowth;
|
|
218
|
+
now;
|
|
219
|
+
journalGrowthDeniedAt;
|
|
190
220
|
onReplayWindowEviction;
|
|
191
221
|
replaySegments = [];
|
|
192
222
|
replaySegmentStart = 0;
|
|
193
223
|
replayBytes = 0;
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
journalEntryBytes = [];
|
|
197
|
-
/** Raw event count represented by each `liveJournal` entry. */
|
|
198
|
-
journalEntryEvents = [];
|
|
199
|
-
journalTotalBytes = 0;
|
|
200
|
-
journalTotalEvents = 0;
|
|
201
|
-
journalTruncatedEvents = 0;
|
|
202
|
-
liveJournalTextSegment;
|
|
224
|
+
fullJournal = createLiveJournalState();
|
|
225
|
+
summaryJournal = createLiveJournalState();
|
|
203
226
|
lastEventId = 0;
|
|
204
227
|
closed = false;
|
|
205
228
|
truncatedEvents = 0;
|
|
@@ -212,6 +235,7 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
212
235
|
// pagination. Undefined until at least one recordId has been observed;
|
|
213
236
|
// omitted from the marker in that case.
|
|
214
237
|
activeRecordId;
|
|
238
|
+
summaryRecordId;
|
|
215
239
|
// Pagination anchor for the replay-path `history_truncated` marker,
|
|
216
240
|
// frozen at the first replay-window eviction. Prefers the first
|
|
217
241
|
// retained recordId (the eviction boundary, so `beforeRecordId`
|
|
@@ -232,19 +256,30 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
232
256
|
this.maxReplayBytes = normalizeCompactedReplayMaxBytes(opts.maxReplayBytes);
|
|
233
257
|
this.maxJournalEvents = normalizeMaxJournalEvents(opts.maxJournalEvents);
|
|
234
258
|
this.maxJournalBytes = normalizeMaxJournalBytes(opts.maxJournalBytes);
|
|
259
|
+
this.onJournalGrowth = opts.onJournalGrowth;
|
|
260
|
+
this.now = opts.now ?? (() => performance.now());
|
|
235
261
|
this.onReplayWindowEviction = opts.onReplayWindowEviction;
|
|
236
262
|
}
|
|
263
|
+
/** Current journal caps — may have grown past the configured baseline. */
|
|
264
|
+
journalLimits() {
|
|
265
|
+
return { maxEvents: this.maxJournalEvents, maxBytes: this.maxJournalBytes };
|
|
266
|
+
}
|
|
237
267
|
ingest(event, byteLength) {
|
|
238
268
|
if (this.closed) return;
|
|
239
269
|
if (event.id !== void 0) {
|
|
240
270
|
this.lastEventId = event.id;
|
|
241
271
|
}
|
|
242
272
|
if (TRANSIENT_TYPES.has(event.type)) return;
|
|
273
|
+
const summaryEvent = isSummaryLiveJournalEvent(event);
|
|
243
274
|
const seenRecordId = replayRecordId(event);
|
|
244
275
|
if (seenRecordId !== void 0) {
|
|
245
276
|
this.activeRecordId = seenRecordId;
|
|
277
|
+
if (summaryEvent) this.summaryRecordId = seenRecordId;
|
|
278
|
+
}
|
|
279
|
+
this.appendLiveJournal(this.fullJournal, event, byteLength);
|
|
280
|
+
if (summaryEvent) {
|
|
281
|
+
this.appendLiveJournal(this.summaryJournal, event, byteLength);
|
|
246
282
|
}
|
|
247
|
-
this.appendLiveJournal(event, byteLength);
|
|
248
283
|
if (TURN_BOUNDARY_TYPES.has(event.type)) {
|
|
249
284
|
this.compactCurrentTurn(event);
|
|
250
285
|
return;
|
|
@@ -255,33 +290,35 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
255
290
|
}
|
|
256
291
|
this.slots.push({ kind: "misc", event });
|
|
257
292
|
}
|
|
258
|
-
snapshot() {
|
|
293
|
+
snapshot(liveReplayMode = "full") {
|
|
259
294
|
const compactedTurns = this.flattenReplaySegments();
|
|
260
295
|
if (this.truncatedEvents > 0) {
|
|
261
296
|
compactedTurns.unshift(
|
|
262
297
|
this.makeHistoryTruncatedEvent(compactedTurns.length)
|
|
263
298
|
);
|
|
264
299
|
}
|
|
265
|
-
const
|
|
300
|
+
const journal = liveReplayMode === "summary" ? this.summaryJournal : this.fullJournal;
|
|
301
|
+
const journalRecordId = liveReplayMode === "summary" ? this.summaryRecordId : this.activeRecordId;
|
|
302
|
+
const liveJournal = journal.entries.map(
|
|
266
303
|
(entry) => isLiveJournalTextSegment(entry) ? mergeLiveJournalTextEvent(
|
|
267
304
|
entry.firstEvent,
|
|
268
305
|
entry.lastEvent,
|
|
269
306
|
entry.chunks
|
|
270
307
|
) : entry
|
|
271
308
|
);
|
|
272
|
-
if (
|
|
309
|
+
if (journal.truncatedEvents > 0) {
|
|
273
310
|
liveJournal.unshift({
|
|
274
311
|
v: EVENT_SCHEMA_VERSION,
|
|
275
312
|
type: "history_truncated",
|
|
276
313
|
data: {
|
|
277
314
|
reason: "replay_window_exceeded",
|
|
278
315
|
scope: "live_journal",
|
|
279
|
-
truncatedEvents:
|
|
280
|
-
retainedEvents:
|
|
316
|
+
truncatedEvents: journal.truncatedEvents,
|
|
317
|
+
retainedEvents: journal.totalEvents,
|
|
281
318
|
maxBytes: this.maxJournalBytes,
|
|
282
319
|
maxEvents: this.maxJournalEvents,
|
|
283
320
|
// Pagination anchor — see makeHistoryTruncatedEvent.
|
|
284
|
-
...
|
|
321
|
+
...journalRecordId !== void 0 ? { recordId: journalRecordId } : {},
|
|
285
322
|
fullTranscriptAvailable: true
|
|
286
323
|
}
|
|
287
324
|
});
|
|
@@ -297,7 +334,9 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
297
334
|
this.resetReplayWindow();
|
|
298
335
|
this.lastEventId = snapshot.lastEventId;
|
|
299
336
|
this.activeRecordId = void 0;
|
|
337
|
+
this.summaryRecordId = void 0;
|
|
300
338
|
this.activeRecordId = lastRecordIdIn(snapshot.compactedTurns);
|
|
339
|
+
this.summaryRecordId = lastSummaryRecordIdIn(snapshot.compactedTurns);
|
|
301
340
|
for (const event of snapshot.compactedTurns) {
|
|
302
341
|
if (TRANSIENT_TYPES.has(event.type)) continue;
|
|
303
342
|
this.addReplaySegment([event], 0);
|
|
@@ -311,7 +350,9 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
311
350
|
if (this.closed) return;
|
|
312
351
|
this.resetReplayWindow();
|
|
313
352
|
this.activeRecordId = void 0;
|
|
353
|
+
this.summaryRecordId = void 0;
|
|
314
354
|
this.activeRecordId = lastRecordIdIn(events);
|
|
355
|
+
this.summaryRecordId = lastSummaryRecordIdIn(events);
|
|
315
356
|
let recordEvents = [];
|
|
316
357
|
let recordId;
|
|
317
358
|
const flushRecord = /* @__PURE__ */ __name(() => {
|
|
@@ -346,22 +387,23 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
346
387
|
this.resetReplayWindow();
|
|
347
388
|
this.resetJournal();
|
|
348
389
|
this.activeRecordId = void 0;
|
|
390
|
+
this.summaryRecordId = void 0;
|
|
349
391
|
this.slots = [];
|
|
350
392
|
this.toolSlotIndex.clear();
|
|
351
393
|
this.clearTextSlotIndex();
|
|
352
394
|
}
|
|
353
|
-
appendLiveJournal(event, byteLength) {
|
|
395
|
+
appendLiveJournal(journal, event, byteLength) {
|
|
354
396
|
const bytes = byteLength ?? serializedBridgeEventByteLength(event) ?? 0;
|
|
355
397
|
const textChunk = liveJournalTextChunk(event);
|
|
356
|
-
const current =
|
|
357
|
-
const currentIndex =
|
|
358
|
-
if (textChunk && current &&
|
|
398
|
+
const current = journal.textSegment;
|
|
399
|
+
const currentIndex = journal.entries.length - 1;
|
|
400
|
+
if (textChunk && current && journal.entries[currentIndex] === current && current.chunks.length < LIVE_JOURNAL_TEXT_CHUNKS_PER_EVENT && journal.entryBytes[currentIndex] + bytes <= this.maxJournalBytes && current.sessionUpdate === textChunk.sessionUpdate && current.parentToolCallId === textChunk.parentToolCallId && stringArraysEqual(current.sourceRecordIds, textChunk.sourceRecordIds) && current.promptId === event.promptId && current.originatorClientId === event.originatorClientId && current.sessionId === captureSessionId(event) && hasOnlyTimestampEnvelopeMeta(current.lastEvent._meta) && hasOnlyTimestampEnvelopeMeta(event._meta)) {
|
|
359
401
|
current.chunks.push(textChunk.text);
|
|
360
402
|
current.lastEvent = event;
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
403
|
+
journal.entryBytes[currentIndex] += bytes;
|
|
404
|
+
journal.entryEvents[currentIndex] += 1;
|
|
405
|
+
journal.totalBytes += bytes;
|
|
406
|
+
journal.totalEvents += 1;
|
|
365
407
|
} else {
|
|
366
408
|
let entry = event;
|
|
367
409
|
if (textChunk) {
|
|
@@ -377,27 +419,97 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
377
419
|
lastEvent: event
|
|
378
420
|
};
|
|
379
421
|
entry = segment;
|
|
380
|
-
|
|
422
|
+
journal.textSegment = segment;
|
|
381
423
|
} else {
|
|
382
|
-
|
|
424
|
+
journal.textSegment = void 0;
|
|
383
425
|
}
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
426
|
+
journal.entries.push(entry);
|
|
427
|
+
journal.entryBytes.push(bytes);
|
|
428
|
+
journal.entryEvents.push(1);
|
|
429
|
+
journal.totalBytes += bytes;
|
|
430
|
+
journal.totalEvents += 1;
|
|
431
|
+
}
|
|
432
|
+
if (!TURN_BOUNDARY_TYPES.has(event.type) && (journal.entries.length > this.maxJournalEvents || journal.totalBytes > this.maxJournalBytes && journal.entries.length > 1)) {
|
|
433
|
+
this.maybeGrowJournalLimits(journal);
|
|
389
434
|
}
|
|
390
|
-
while (
|
|
391
|
-
const dropped =
|
|
392
|
-
|
|
393
|
-
const droppedEvents =
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
if (dropped ===
|
|
397
|
-
|
|
435
|
+
while (journal.entries.length > this.maxJournalEvents || journal.totalBytes > this.maxJournalBytes && journal.entries.length > 1) {
|
|
436
|
+
const dropped = journal.entries.shift();
|
|
437
|
+
journal.totalBytes -= journal.entryBytes.shift() ?? 0;
|
|
438
|
+
const droppedEvents = journal.entryEvents.shift() ?? 0;
|
|
439
|
+
journal.totalEvents -= droppedEvents;
|
|
440
|
+
journal.truncatedEvents += droppedEvents;
|
|
441
|
+
if (dropped === journal.textSegment) {
|
|
442
|
+
journal.textSegment = void 0;
|
|
398
443
|
}
|
|
399
444
|
}
|
|
400
445
|
}
|
|
446
|
+
/**
|
|
447
|
+
* Consults the growth advisor once the journal breaches its caps and
|
|
448
|
+
* applies a grant in place, so the eviction loop below only drops what
|
|
449
|
+
* still exceeds the (possibly raised) caps. An intermediate grant that
|
|
450
|
+
* does not yet retain an extra entry is still applied tentatively —
|
|
451
|
+
* each applied cap is what the next ask reports and is charged for —
|
|
452
|
+
* and the walk continues until a grant retains strictly more than the
|
|
453
|
+
* pre-breach caps, the advisor refuses, or the step budget runs out. A
|
|
454
|
+
* walk that never improves retention rolls back to the original caps
|
|
455
|
+
* and counts as a refusal, so the pool is never charged for growth that
|
|
456
|
+
* preserves no replay. Never throws: a misbehaving advisor degrades to
|
|
457
|
+
* plain eviction, matching the engine's best-effort contract.
|
|
458
|
+
*/
|
|
459
|
+
maybeGrowJournalLimits(journal) {
|
|
460
|
+
const advisor = this.onJournalGrowth;
|
|
461
|
+
if (!advisor || this.closed) return;
|
|
462
|
+
const now = this.now();
|
|
463
|
+
if (this.journalGrowthDeniedAt !== void 0) {
|
|
464
|
+
const sinceDenialMs = now - this.journalGrowthDeniedAt;
|
|
465
|
+
if (sinceDenialMs >= 0 && sinceDenialMs < JOURNAL_GROWTH_REASK_INTERVAL_MS) {
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
const originalEvents = this.maxJournalEvents;
|
|
470
|
+
const originalBytes = this.maxJournalBytes;
|
|
471
|
+
const originalRetained = this.retainedTailCount(
|
|
472
|
+
journal,
|
|
473
|
+
originalEvents,
|
|
474
|
+
originalBytes
|
|
475
|
+
);
|
|
476
|
+
for (let step = 0; step < JOURNAL_GROWTH_MAX_GRANTS_PER_BREACH; step++) {
|
|
477
|
+
let grant;
|
|
478
|
+
try {
|
|
479
|
+
grant = advisor({
|
|
480
|
+
maxEvents: this.maxJournalEvents,
|
|
481
|
+
maxBytes: this.maxJournalBytes
|
|
482
|
+
});
|
|
483
|
+
} catch {
|
|
484
|
+
grant = void 0;
|
|
485
|
+
}
|
|
486
|
+
if (!grant || !Number.isSafeInteger(grant.maxBytes) || !Number.isSafeInteger(grant.maxEvents) || grant.maxBytes <= this.maxJournalBytes || grant.maxEvents < this.maxJournalEvents) {
|
|
487
|
+
break;
|
|
488
|
+
}
|
|
489
|
+
this.maxJournalBytes = grant.maxBytes;
|
|
490
|
+
this.maxJournalEvents = grant.maxEvents;
|
|
491
|
+
if (this.retainedTailCount(journal, grant.maxEvents, grant.maxBytes) > originalRetained) {
|
|
492
|
+
this.journalGrowthDeniedAt = void 0;
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
this.maxJournalEvents = originalEvents;
|
|
497
|
+
this.maxJournalBytes = originalBytes;
|
|
498
|
+
this.journalGrowthDeniedAt = now;
|
|
499
|
+
}
|
|
500
|
+
/** Entries of the newest-first tail the eviction loop would retain. */
|
|
501
|
+
retainedTailCount(journal, maxEvents, maxBytes) {
|
|
502
|
+
let count = 0;
|
|
503
|
+
let bytes = 0;
|
|
504
|
+
for (let i = journal.entries.length - 1; i >= 0; i--) {
|
|
505
|
+
const entryBytes = journal.entryBytes[i] ?? 0;
|
|
506
|
+
if (count + 1 > maxEvents) break;
|
|
507
|
+
if (count >= 1 && bytes + entryBytes > maxBytes) break;
|
|
508
|
+
count += 1;
|
|
509
|
+
bytes += entryBytes;
|
|
510
|
+
}
|
|
511
|
+
return count;
|
|
512
|
+
}
|
|
401
513
|
classifySessionUpdate(event) {
|
|
402
514
|
const data = event.data;
|
|
403
515
|
const updateType = data?.update?.sessionUpdate;
|
|
@@ -565,13 +677,9 @@ var TurnBoundaryCompactionEngine = class {
|
|
|
565
677
|
}
|
|
566
678
|
}
|
|
567
679
|
resetJournal() {
|
|
568
|
-
this.
|
|
569
|
-
this.
|
|
570
|
-
this.
|
|
571
|
-
this.journalTotalBytes = 0;
|
|
572
|
-
this.journalTotalEvents = 0;
|
|
573
|
-
this.journalTruncatedEvents = 0;
|
|
574
|
-
this.liveJournalTextSegment = void 0;
|
|
680
|
+
this.fullJournal = createLiveJournalState();
|
|
681
|
+
this.summaryJournal = createLiveJournalState();
|
|
682
|
+
this.journalGrowthDeniedAt = void 0;
|
|
575
683
|
}
|
|
576
684
|
addReplaySegment(events, turnCount) {
|
|
577
685
|
if (events.length === 0) return;
|
|
@@ -806,6 +914,21 @@ function extractParentToolCallIdFromMeta(meta) {
|
|
|
806
914
|
return void 0;
|
|
807
915
|
}
|
|
808
916
|
__name(extractParentToolCallIdFromMeta, "extractParentToolCallIdFromMeta");
|
|
917
|
+
function isSummaryLiveJournalEvent(event) {
|
|
918
|
+
if (event.type !== "session_update") return true;
|
|
919
|
+
const data = event.data;
|
|
920
|
+
const meta = data?.update?._meta;
|
|
921
|
+
const parentToolCallId = extractParentToolCallIdFromMeta(meta);
|
|
922
|
+
if (parentToolCallId === void 0) return true;
|
|
923
|
+
if (parentToolCallId === data?.update?.toolCallId) return true;
|
|
924
|
+
if (data?.update?.sessionUpdate !== "agent_message_chunk") return false;
|
|
925
|
+
if (typeof meta !== "object" || meta === null) return false;
|
|
926
|
+
const usage = meta["usage"];
|
|
927
|
+
if (typeof usage !== "object" || usage === null) return false;
|
|
928
|
+
const fields = usage;
|
|
929
|
+
return typeof fields["inputTokens"] === "number" || typeof fields["outputTokens"] === "number";
|
|
930
|
+
}
|
|
931
|
+
__name(isSummaryLiveJournalEvent, "isSummaryLiveJournalEvent");
|
|
809
932
|
function extractSourceRecordIdsFromMeta(meta) {
|
|
810
933
|
if (typeof meta !== "object" || meta === null) return void 0;
|
|
811
934
|
const transcript = meta["qwenTranscript"];
|
|
@@ -928,6 +1051,44 @@ function mergeTranscriptUpdateMeta(existing, incoming) {
|
|
|
928
1051
|
}
|
|
929
1052
|
__name(mergeTranscriptUpdateMeta, "mergeTranscriptUpdateMeta");
|
|
930
1053
|
|
|
1054
|
+
// packages/acp-bridge/src/journalGrowthPolicy.ts
|
|
1055
|
+
init_esbuild_shims();
|
|
1056
|
+
function createJournalGrowthPolicy(opts) {
|
|
1057
|
+
const hardCapEvents = Math.min(
|
|
1058
|
+
Number.MAX_SAFE_INTEGER,
|
|
1059
|
+
Math.max(
|
|
1060
|
+
opts.baselineEvents,
|
|
1061
|
+
Math.ceil(opts.hardCapBytes / opts.baselineBytes * opts.baselineEvents)
|
|
1062
|
+
)
|
|
1063
|
+
);
|
|
1064
|
+
return {
|
|
1065
|
+
grant(request) {
|
|
1066
|
+
if (request.currentMaxBytes >= opts.hardCapBytes) return void 0;
|
|
1067
|
+
const extraGranted = request.allSessionLimits.reduce(
|
|
1068
|
+
(sum, session) => sum + Math.max(0, session.limitBytes - session.baselineBytes),
|
|
1069
|
+
0
|
|
1070
|
+
);
|
|
1071
|
+
const available = opts.poolBytes - extraGranted;
|
|
1072
|
+
if (available <= 0) return void 0;
|
|
1073
|
+
const maxBytes = Math.min(
|
|
1074
|
+
request.currentMaxBytes * 2,
|
|
1075
|
+
request.currentMaxBytes + available,
|
|
1076
|
+
opts.hardCapBytes
|
|
1077
|
+
);
|
|
1078
|
+
if (maxBytes <= request.currentMaxBytes) return void 0;
|
|
1079
|
+
const maxEvents = Math.min(
|
|
1080
|
+
Math.max(
|
|
1081
|
+
request.currentMaxEvents,
|
|
1082
|
+
Math.ceil(maxBytes / opts.baselineBytes * opts.baselineEvents)
|
|
1083
|
+
),
|
|
1084
|
+
hardCapEvents
|
|
1085
|
+
);
|
|
1086
|
+
return { maxBytes, maxEvents };
|
|
1087
|
+
}
|
|
1088
|
+
};
|
|
1089
|
+
}
|
|
1090
|
+
__name(createJournalGrowthPolicy, "createJournalGrowthPolicy");
|
|
1091
|
+
|
|
931
1092
|
// packages/acp-bridge/src/session-restore-timeout.ts
|
|
932
1093
|
init_esbuild_shims();
|
|
933
1094
|
var DEFAULT_SESSION_RESTORE_TIMEOUT_MS = 6e4;
|
|
@@ -5911,7 +6072,6 @@ var KNOWN_SESSION_UPDATE_TYPES = /* @__PURE__ */ new Set([
|
|
|
5911
6072
|
"session_info_update",
|
|
5912
6073
|
"usage_update"
|
|
5913
6074
|
]);
|
|
5914
|
-
var MAX_BULK_REPLAY_UPDATES = 1e4;
|
|
5915
6075
|
function isRecord3(value) {
|
|
5916
6076
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5917
6077
|
}
|
|
@@ -6241,9 +6401,9 @@ function extractLoadReplayResponse(state) {
|
|
|
6241
6401
|
`Invalid qwen.session.loadReplay updates (version=${LOAD_REPLAY_VERSION}, count=not-array)`
|
|
6242
6402
|
);
|
|
6243
6403
|
}
|
|
6244
|
-
if (rawUpdates.length >
|
|
6404
|
+
if (rawUpdates.length > LOAD_REPLAY_MAX_UPDATES) {
|
|
6245
6405
|
throw new Error(
|
|
6246
|
-
`qwen.session.loadReplay updates exceed limit (${rawUpdates.length} > ${
|
|
6406
|
+
`qwen.session.loadReplay updates exceed limit (${rawUpdates.length} > ${LOAD_REPLAY_MAX_UPDATES})`
|
|
6247
6407
|
);
|
|
6248
6408
|
}
|
|
6249
6409
|
const partial = replay["partial"];
|
|
@@ -6264,6 +6424,12 @@ function extractLoadReplayResponse(state) {
|
|
|
6264
6424
|
`Invalid qwen.session.loadReplay hasMore (version=${LOAD_REPLAY_VERSION}, hasMore=${describeLoadReplayValue(hasMore)})`
|
|
6265
6425
|
);
|
|
6266
6426
|
}
|
|
6427
|
+
const anchorRecordId = replay["anchorRecordId"];
|
|
6428
|
+
if (anchorRecordId !== void 0 && typeof anchorRecordId !== "string") {
|
|
6429
|
+
throw new Error(
|
|
6430
|
+
`Invalid qwen.session.loadReplay anchorRecordId (version=${LOAD_REPLAY_VERSION}, anchorRecordId=${describeLoadReplayValue(anchorRecordId)})`
|
|
6431
|
+
);
|
|
6432
|
+
}
|
|
6267
6433
|
const invalidUpdateIndex = rawUpdates.findIndex(
|
|
6268
6434
|
(update) => !isBulkReplayUpdate(update)
|
|
6269
6435
|
);
|
|
@@ -6285,6 +6451,7 @@ function extractLoadReplayResponse(state) {
|
|
|
6285
6451
|
return {
|
|
6286
6452
|
state: cleanState,
|
|
6287
6453
|
updates: rawUpdates,
|
|
6454
|
+
...typeof anchorRecordId === "string" ? { anchorRecordId } : {},
|
|
6288
6455
|
...partial === true ? { partial: true } : {},
|
|
6289
6456
|
...typeof replayError === "string" ? { replayError } : {},
|
|
6290
6457
|
...hasMore === true ? { hasMore: true } : {}
|
|
@@ -6772,6 +6939,16 @@ function createAcpSessionBridge(opts) {
|
|
|
6772
6939
|
);
|
|
6773
6940
|
const maxJournalEvents = normalizeMaxJournalEvents(opts.maxJournalEvents);
|
|
6774
6941
|
const maxJournalBytes = normalizeMaxJournalBytes(opts.maxJournalBytes);
|
|
6942
|
+
const journalGrowthPoolBytes = normalizeJournalGrowthPoolBytes(
|
|
6943
|
+
opts.journalGrowthPoolBytes
|
|
6944
|
+
);
|
|
6945
|
+
const journalGrowthPolicy = journalGrowthPoolBytes !== void 0 ? createJournalGrowthPolicy({
|
|
6946
|
+
baselineEvents: maxJournalEvents,
|
|
6947
|
+
baselineBytes: maxJournalBytes,
|
|
6948
|
+
poolBytes: journalGrowthPoolBytes,
|
|
6949
|
+
hardCapBytes: JOURNAL_GROWTH_HARD_CAP_BYTES
|
|
6950
|
+
}) : void 0;
|
|
6951
|
+
const journalGrowthSessionLimits = opts.journalGrowthSessionLimits;
|
|
6775
6952
|
const channelFactory = opts.channelFactory ?? defaultSpawnChannelFactory;
|
|
6776
6953
|
const childEnvOverrides = opts.childEnvOverrides ? Object.freeze({ ...opts.childEnvOverrides }) : Object.freeze({});
|
|
6777
6954
|
const initTimeoutMs = opts.initializeTimeoutMs ?? DEFAULT_INIT_TIMEOUT_MS;
|
|
@@ -7295,6 +7472,22 @@ function createAcpSessionBridge(opts) {
|
|
|
7295
7472
|
const inFlightRequestedSessionSpawns = /* @__PURE__ */ new Map();
|
|
7296
7473
|
const inFlightRestores = /* @__PURE__ */ new Map();
|
|
7297
7474
|
const pendingRestoreEvents = /* @__PURE__ */ new Map();
|
|
7475
|
+
const journalSessionLimits = /* @__PURE__ */ __name(() => {
|
|
7476
|
+
const limits = [...byId.values()].map((entry) => ({
|
|
7477
|
+
limitBytes: entry.events.journalLimitBytes() ?? maxJournalBytes,
|
|
7478
|
+
baselineBytes: maxJournalBytes
|
|
7479
|
+
}));
|
|
7480
|
+
for (const [restoreId, bus] of pendingRestoreEvents) {
|
|
7481
|
+
if (!byId.has(restoreId)) {
|
|
7482
|
+
limits.push({
|
|
7483
|
+
limitBytes: bus.journalLimitBytes() ?? maxJournalBytes,
|
|
7484
|
+
baselineBytes: maxJournalBytes
|
|
7485
|
+
});
|
|
7486
|
+
}
|
|
7487
|
+
}
|
|
7488
|
+
return limits;
|
|
7489
|
+
}, "journalSessionLimits");
|
|
7490
|
+
const unregisterJournalGrowthSessionLimits = journalGrowthPolicy !== void 0 && opts.registerJournalGrowthSessionLimits !== void 0 ? opts.registerJournalGrowthSessionLimits(journalSessionLimits) : void 0;
|
|
7298
7491
|
const createClientId = /* @__PURE__ */ __name(() => `client_${randomUUID2()}`, "createClientId");
|
|
7299
7492
|
const registerClient = /* @__PURE__ */ __name((entry, requestedClientId) => {
|
|
7300
7493
|
if (requestedClientId && entry.clientIds.has(requestedClientId)) {
|
|
@@ -8506,7 +8699,34 @@ function createAcpSessionBridge(opts) {
|
|
|
8506
8699
|
teeServeDebugLine(
|
|
8507
8700
|
`replay window evicted ${JSON.stringify(eviction)}`
|
|
8508
8701
|
);
|
|
8509
|
-
}, "onReplayWindowEviction")
|
|
8702
|
+
}, "onReplayWindowEviction"),
|
|
8703
|
+
// Adaptive growth: the engine asks before evicting past its caps.
|
|
8704
|
+
// The policy accounts growth across this bridge's live sessions
|
|
8705
|
+
// from every session's CURRENT journal cap (stateless — no ledger
|
|
8706
|
+
// to reconcile when a session is reaped), so granted headroom dies
|
|
8707
|
+
// with its session.
|
|
8708
|
+
...journalGrowthPolicy ? {
|
|
8709
|
+
onJournalGrowth: /* @__PURE__ */ __name((current) => {
|
|
8710
|
+
const allSessionLimits = journalGrowthSessionLimits ? [...journalGrowthSessionLimits()] : journalSessionLimits();
|
|
8711
|
+
if (!byId.has(sessionId) && !pendingRestoreEvents.has(sessionId)) {
|
|
8712
|
+
allSessionLimits.push({
|
|
8713
|
+
limitBytes: current.maxBytes,
|
|
8714
|
+
baselineBytes: maxJournalBytes
|
|
8715
|
+
});
|
|
8716
|
+
}
|
|
8717
|
+
const grant = journalGrowthPolicy.grant({
|
|
8718
|
+
currentMaxEvents: current.maxEvents,
|
|
8719
|
+
currentMaxBytes: current.maxBytes,
|
|
8720
|
+
allSessionLimits
|
|
8721
|
+
});
|
|
8722
|
+
if (grant) {
|
|
8723
|
+
teeServeDebugLine(
|
|
8724
|
+
`live journal growth session=${JSON.stringify(sessionId)}: ${current.maxBytes} -> ${grant.maxBytes} bytes, ${current.maxEvents} -> ${grant.maxEvents} entries`
|
|
8725
|
+
);
|
|
8726
|
+
}
|
|
8727
|
+
return grant;
|
|
8728
|
+
}, "onJournalGrowth")
|
|
8729
|
+
} : {}
|
|
8510
8730
|
}),
|
|
8511
8731
|
{
|
|
8512
8732
|
// Fired once, on the FIRST ingest/seed failure (the bus keeps the
|
|
@@ -8782,18 +9002,19 @@ function createAcpSessionBridge(opts) {
|
|
|
8782
9002
|
}
|
|
8783
9003
|
return typeof maybe.message === "string" && maybe.message === `Resource not found: ${expectedUri}`;
|
|
8784
9004
|
}, "isAcpSessionResourceNotFound");
|
|
8785
|
-
const replayFieldsFor = /* @__PURE__ */ __name((entry, action) => {
|
|
9005
|
+
const replayFieldsFor = /* @__PURE__ */ __name((entry, action, liveReplayMode = "full") => {
|
|
8786
9006
|
const replayStatus = action === "load" && entry.restoreReplayPartial === true ? {
|
|
8787
9007
|
partial: true,
|
|
8788
9008
|
...typeof entry.restoreReplayError === "string" ? { replayError: entry.restoreReplayError } : {}
|
|
8789
9009
|
} : {};
|
|
8790
9010
|
const eventEpoch = entry.events.epoch;
|
|
8791
|
-
const snapshot = entry.events.snapshotReplay();
|
|
9011
|
+
const snapshot = entry.events.snapshotReplay(liveReplayMode);
|
|
8792
9012
|
if (!snapshot) {
|
|
8793
9013
|
return {
|
|
8794
9014
|
lastEventId: entry.events.lastEventId,
|
|
8795
9015
|
eventEpoch,
|
|
8796
|
-
...replayStatus
|
|
9016
|
+
...replayStatus,
|
|
9017
|
+
...action === "load" && entry.restoreHistoryAnchorRecordId !== void 0 ? { historyAnchorRecordId: entry.restoreHistoryAnchorRecordId } : {}
|
|
8797
9018
|
};
|
|
8798
9019
|
}
|
|
8799
9020
|
if (action === "load") {
|
|
@@ -8810,7 +9031,8 @@ function createAcpSessionBridge(opts) {
|
|
|
8810
9031
|
eventEpoch,
|
|
8811
9032
|
...replayStatus,
|
|
8812
9033
|
...snapshot.degraded ? { replayDegraded: true } : {},
|
|
8813
|
-
...entry.restoreHistoryHasMore === true ? { historyHasMore: true } : {}
|
|
9034
|
+
...entry.restoreHistoryHasMore === true ? { historyHasMore: true } : {},
|
|
9035
|
+
...entry.restoreHistoryAnchorRecordId !== void 0 ? { historyAnchorRecordId: entry.restoreHistoryAnchorRecordId } : {}
|
|
8814
9036
|
};
|
|
8815
9037
|
}
|
|
8816
9038
|
return { lastEventId: snapshot.lastEventId, eventEpoch, ...replayStatus };
|
|
@@ -8876,7 +9098,7 @@ function createAcpSessionBridge(opts) {
|
|
|
8876
9098
|
}
|
|
8877
9099
|
}
|
|
8878
9100
|
__name(requestSessionTranscriptPage, "requestSessionTranscriptPage");
|
|
8879
|
-
async function refreshedReplayFieldsFor(entry, historyPageSize) {
|
|
9101
|
+
async function refreshedReplayFieldsFor(entry, historyPageSize, liveReplayMode) {
|
|
8880
9102
|
for (let attempt = 0; attempt < 2; attempt++) {
|
|
8881
9103
|
try {
|
|
8882
9104
|
const lastEventId = entry.events.lastEventId;
|
|
@@ -8916,7 +9138,7 @@ function createAcpSessionBridge(opts) {
|
|
|
8916
9138
|
break;
|
|
8917
9139
|
}
|
|
8918
9140
|
}
|
|
8919
|
-
return replayFieldsFor(entry, "load");
|
|
9141
|
+
return replayFieldsFor(entry, "load", liveReplayMode);
|
|
8920
9142
|
}
|
|
8921
9143
|
__name(refreshedReplayFieldsFor, "refreshedReplayFieldsFor");
|
|
8922
9144
|
function transcriptEventRecordId(event) {
|
|
@@ -8971,6 +9193,13 @@ function createAcpSessionBridge(opts) {
|
|
|
8971
9193
|
}
|
|
8972
9194
|
const historyReplay = action === "load" ? req.historyReplay ?? "stream" : "stream";
|
|
8973
9195
|
const historyPageSize = action === "load" && historyReplay === "response" ? req.historyPageSize : void 0;
|
|
9196
|
+
const requestedLiveReplayMode = req.liveReplayMode;
|
|
9197
|
+
if (requestedLiveReplayMode !== void 0 && requestedLiveReplayMode !== "full" && requestedLiveReplayMode !== "summary") {
|
|
9198
|
+
throw new Error(
|
|
9199
|
+
`Invalid liveReplayMode: ${JSON.stringify(requestedLiveReplayMode)}`
|
|
9200
|
+
);
|
|
9201
|
+
}
|
|
9202
|
+
const liveReplayMode = action === "load" ? requestedLiveReplayMode ?? "full" : "full";
|
|
8974
9203
|
if (historyPageSize !== void 0 && (!Number.isSafeInteger(historyPageSize) || historyPageSize < 1 || historyPageSize > SESSION_TRANSCRIPT_MAX_LIMIT)) {
|
|
8975
9204
|
throw new Error(
|
|
8976
9205
|
`Invalid historyPageSize; expected 1..${SESSION_TRANSCRIPT_MAX_LIMIT}`
|
|
@@ -8980,7 +9209,11 @@ function createAcpSessionBridge(opts) {
|
|
|
8980
9209
|
const existing = byId.get(req.sessionId);
|
|
8981
9210
|
if (existing) {
|
|
8982
9211
|
assertAttachableSessionEntry(req.sessionId, existing);
|
|
8983
|
-
const replayFields = historyPageSize !== void 0 ? await refreshedReplayFieldsFor(
|
|
9212
|
+
const replayFields = historyPageSize !== void 0 ? await refreshedReplayFieldsFor(
|
|
9213
|
+
existing,
|
|
9214
|
+
historyPageSize,
|
|
9215
|
+
liveReplayMode
|
|
9216
|
+
) : replayFieldsFor(existing, action, liveReplayMode);
|
|
8984
9217
|
const historyAnchorRecordId = action === "load" ? await resolveHistoryAnchorRecordId(existing, replayFields) : void 0;
|
|
8985
9218
|
assertAttachableSessionEntry(req.sessionId, existing);
|
|
8986
9219
|
existing.attachCount++;
|
|
@@ -9026,7 +9259,7 @@ function createAcpSessionBridge(opts) {
|
|
|
9026
9259
|
}
|
|
9027
9260
|
const inFlight = inFlightRestores.get(req.sessionId);
|
|
9028
9261
|
if (inFlight) {
|
|
9029
|
-
if (inFlight.lifecycle.phase === "abandoned" || action !== inFlight.action || historyReplay !== inFlight.historyReplay || historyPageSize !== inFlight.historyPageSize || hideInheritedHistory !== inFlight.hideInheritedHistory) {
|
|
9262
|
+
if (inFlight.lifecycle.phase === "abandoned" || action !== inFlight.action || historyReplay !== inFlight.historyReplay || historyPageSize !== inFlight.historyPageSize || inFlight.liveReplayMode === "summary" && liveReplayMode === "full" || hideInheritedHistory !== inFlight.hideInheritedHistory) {
|
|
9030
9263
|
const abandoned = inFlight.lifecycle.phase === "abandoned";
|
|
9031
9264
|
throw new RestoreInProgressError(
|
|
9032
9265
|
req.sessionId,
|
|
@@ -9061,6 +9294,18 @@ function createAcpSessionBridge(opts) {
|
|
|
9061
9294
|
entry.attachCount = Math.max(0, entry.attachCount - 1);
|
|
9062
9295
|
throw error;
|
|
9063
9296
|
}
|
|
9297
|
+
const waiterReplayFields = liveReplayMode !== inFlight.liveReplayMode ? historyPageSize !== void 0 ? await refreshedReplayFieldsFor(
|
|
9298
|
+
entry,
|
|
9299
|
+
historyPageSize,
|
|
9300
|
+
liveReplayMode
|
|
9301
|
+
) : replayFieldsFor(entry, action, liveReplayMode) : void 0;
|
|
9302
|
+
try {
|
|
9303
|
+
assertAttachableSessionEntry(restored.sessionId, entry);
|
|
9304
|
+
} catch (error) {
|
|
9305
|
+
inFlight.coalesceState.count--;
|
|
9306
|
+
entry.attachCount = Math.max(0, entry.attachCount - 1);
|
|
9307
|
+
throw error;
|
|
9308
|
+
}
|
|
9064
9309
|
const clientId = registerClient(entry, req.clientId);
|
|
9065
9310
|
recordAttachRef(entry, clientId);
|
|
9066
9311
|
if (req.approvalMode) {
|
|
@@ -9086,7 +9331,8 @@ function createAcpSessionBridge(opts) {
|
|
|
9086
9331
|
attached: true,
|
|
9087
9332
|
clientId,
|
|
9088
9333
|
createdAt: entry.createdAt,
|
|
9089
|
-
hasActivePrompt: entry.promptActive
|
|
9334
|
+
hasActivePrompt: entry.promptActive,
|
|
9335
|
+
...waiterReplayFields ?? {}
|
|
9090
9336
|
};
|
|
9091
9337
|
}
|
|
9092
9338
|
assertFreshSessionsAvailable();
|
|
@@ -9260,6 +9506,7 @@ function createAcpSessionBridge(opts) {
|
|
|
9260
9506
|
let replayPartial;
|
|
9261
9507
|
let replayError;
|
|
9262
9508
|
let replayHasMore;
|
|
9509
|
+
let replayAnchorRecordId;
|
|
9263
9510
|
try {
|
|
9264
9511
|
const rawRestore = telemetry.withSpan(
|
|
9265
9512
|
"session.restore",
|
|
@@ -9370,6 +9617,7 @@ function createAcpSessionBridge(opts) {
|
|
|
9370
9617
|
replayPartial = extracted.partial;
|
|
9371
9618
|
replayError = extracted.replayError;
|
|
9372
9619
|
replayHasMore = extracted.hasMore === true ? true : void 0;
|
|
9620
|
+
replayAnchorRecordId = extracted.anchorRecordId;
|
|
9373
9621
|
}
|
|
9374
9622
|
} catch (err) {
|
|
9375
9623
|
if (err instanceof SessionRestoreTimeoutError) throw err;
|
|
@@ -9447,7 +9695,7 @@ function createAcpSessionBridge(opts) {
|
|
|
9447
9695
|
...racedEntry.sourceId !== void 0 ? { sourceId: racedEntry.sourceId } : {},
|
|
9448
9696
|
state: racedEntry.restoreState ?? {},
|
|
9449
9697
|
hasActivePrompt: racedEntry.promptActive,
|
|
9450
|
-
...replayFieldsFor(racedEntry, action)
|
|
9698
|
+
...replayFieldsFor(racedEntry, action, liveReplayMode)
|
|
9451
9699
|
};
|
|
9452
9700
|
}
|
|
9453
9701
|
const entry = createSessionEntry(
|
|
@@ -9478,6 +9726,9 @@ function createAcpSessionBridge(opts) {
|
|
|
9478
9726
|
if (replayHasMore === true) {
|
|
9479
9727
|
entry.restoreHistoryHasMore = true;
|
|
9480
9728
|
}
|
|
9729
|
+
if (replayAnchorRecordId !== void 0) {
|
|
9730
|
+
entry.restoreHistoryAnchorRecordId = replayAnchorRecordId;
|
|
9731
|
+
}
|
|
9481
9732
|
seedSnapshotCaches(entry, publicState);
|
|
9482
9733
|
const artifactRestoreWarnings = await entry.artifacts.restore(
|
|
9483
9734
|
restoredArtifactSnapshot
|
|
@@ -9520,7 +9771,7 @@ function createAcpSessionBridge(opts) {
|
|
|
9520
9771
|
state: publicState,
|
|
9521
9772
|
...artifactRestoreWarnings.length > 0 ? { artifactWarnings: artifactRestoreWarnings } : {},
|
|
9522
9773
|
hasActivePrompt: entry.promptActive,
|
|
9523
|
-
...replayFieldsFor(entry, action)
|
|
9774
|
+
...replayFieldsFor(entry, action, liveReplayMode)
|
|
9524
9775
|
};
|
|
9525
9776
|
})().finally(async () => {
|
|
9526
9777
|
if (restoreLifecycle.phase === "abandoned") return;
|
|
@@ -9583,6 +9834,7 @@ function createAcpSessionBridge(opts) {
|
|
|
9583
9834
|
action,
|
|
9584
9835
|
historyReplay,
|
|
9585
9836
|
...historyPageSize !== void 0 ? { historyPageSize } : {},
|
|
9837
|
+
liveReplayMode,
|
|
9586
9838
|
hideInheritedHistory,
|
|
9587
9839
|
publicPromise: promise,
|
|
9588
9840
|
settlementPromise,
|
|
@@ -9767,6 +10019,10 @@ function createAcpSessionBridge(opts) {
|
|
|
9767
10019
|
compactedReplayMaxBytes,
|
|
9768
10020
|
maxJournalEvents,
|
|
9769
10021
|
maxJournalBytes,
|
|
10022
|
+
journalGrowth: journalGrowthPoolBytes !== void 0 ? {
|
|
10023
|
+
poolBytes: journalGrowthPoolBytes,
|
|
10024
|
+
hardCapBytes: JOURNAL_GROWTH_HARD_CAP_BYTES
|
|
10025
|
+
} : null,
|
|
9770
10026
|
channelIdleTimeoutMs: resolvedChannelIdleTimeoutMs(),
|
|
9771
10027
|
sessionIdleTimeoutMs
|
|
9772
10028
|
},
|
|
@@ -9774,22 +10030,27 @@ function createAcpSessionBridge(opts) {
|
|
|
9774
10030
|
pendingPermissionCount: permissionMediator.pendingCount,
|
|
9775
10031
|
channelLive: !!liveChannelInfo(),
|
|
9776
10032
|
permissionPolicy: permissionMediator.policy,
|
|
9777
|
-
sessions: [...byId.values()].map((entry) =>
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
10033
|
+
sessions: [...byId.values()].map((entry) => {
|
|
10034
|
+
const journalLimits = entry.events.journalLimits();
|
|
10035
|
+
return {
|
|
10036
|
+
sessionId: entry.sessionId,
|
|
10037
|
+
workspaceCwd: entry.workspaceCwd,
|
|
10038
|
+
createdAt: entry.createdAt,
|
|
10039
|
+
...entry.displayName ? { displayName: entry.displayName } : {},
|
|
10040
|
+
clientCount: entry.clientIds.size,
|
|
10041
|
+
subscriberCount: entry.events.subscriberCount,
|
|
10042
|
+
attachCount: entry.attachCount,
|
|
10043
|
+
pendingPromptCount: entry.pendingPromptCount,
|
|
10044
|
+
pendingPermissionCount: entry.pendingPermissionIds.size,
|
|
10045
|
+
hasActivePrompt: entry.promptActive,
|
|
10046
|
+
lastEventId: entry.events.lastEventId,
|
|
10047
|
+
...entry.sessionLastSeenAt !== void 0 ? { lastSeenAt: entry.sessionLastSeenAt } : {},
|
|
10048
|
+
...entry.currentModelId ? { currentModelId: entry.currentModelId } : {},
|
|
10049
|
+
...entry.currentApprovalMode ? { currentApprovalMode: entry.currentApprovalMode } : {},
|
|
10050
|
+
maxJournalEvents: journalLimits?.maxEvents ?? maxJournalEvents,
|
|
10051
|
+
maxJournalBytes: journalLimits?.maxBytes ?? maxJournalBytes
|
|
10052
|
+
};
|
|
10053
|
+
})
|
|
9793
10054
|
};
|
|
9794
10055
|
},
|
|
9795
10056
|
get sessionCount() {
|
|
@@ -12765,6 +13026,7 @@ function createAcpSessionBridge(opts) {
|
|
|
12765
13026
|
});
|
|
12766
13027
|
void (async () => {
|
|
12767
13028
|
shuttingDown = true;
|
|
13029
|
+
unregisterJournalGrowthSessionLimits?.();
|
|
12768
13030
|
cancelIdleTimer();
|
|
12769
13031
|
stopSessionReaper();
|
|
12770
13032
|
const entries = Array.from(byId.values());
|