@qwen-code/qwen-code 0.22.2-preview.0 → 0.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/goal-draft/SKILL.md +109 -0
- package/bundled/qc-helper/docs/configuration/settings.md +12 -12
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- 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/chunks/MaxSizedBox-X5FZSNAJ.js +112 -0
- package/chunks/{StandaloneSessionPicker-KFMJILVY.js → StandaloneSessionPicker-AVLI6VJP.js} +76 -76
- package/chunks/{acpAgent-KNFTTDWL.js → acpAgent-MXEAN54C.js} +994 -277
- package/chunks/{agent-6V6MZOA7.js → agent-PJIPDWHB.js} +41 -41
- package/chunks/agent-headless-B4JVD7UK.js +87 -0
- package/chunks/{anthropicContentGenerator-U76GTVB6.js → anthropicContentGenerator-HGMBACVE.js} +7 -7
- package/chunks/{artifact-tool-XDJCZZCF.js → artifact-tool-5YT4QF7Y.js} +2 -2
- package/chunks/{askUserQuestion-ZXXERLEV.js → askUserQuestion-4SWJY65V.js} +2 -2
- package/chunks/bridge-FKZTVIS3.js +121 -0
- package/chunks/{channel-management-service-HXXS3HOZ.js → channel-management-service-X4AZ6IXX.js} +1 -1
- package/chunks/channel-settings-store-4UFCLBBG.js +117 -0
- package/chunks/{channel-worker-group-EVDC2P4K.js → channel-worker-group-27HMGD5S.js} +7 -6
- package/chunks/{channel-worker-manager-IJJZHGEI.js → channel-worker-manager-QEGX646Z.js} +9 -7
- package/chunks/{channel-worker-supervisor-YSKB5GVB.js → channel-worker-supervisor-UEW2WWCC.js} +5 -4
- package/chunks/{chunk-7QGEJI7M.js → chunk-23RFD54N.js} +1 -1
- package/chunks/{chunk-K5PNJ6VL.js → chunk-2K6ORIHJ.js} +13 -13
- package/chunks/{chunk-OGZAQWJP.js → chunk-2NYCN6F2.js} +11 -11
- package/chunks/chunk-2TNL5KPM.js +49 -0
- package/chunks/{chunk-ZEADBZLO.js → chunk-3AFMQUTI.js} +3 -3
- package/chunks/{chunk-LRLMDV5X.js → chunk-3DXFGHAJ.js} +185 -174
- package/chunks/{chunk-73WFGVIZ.js → chunk-3FDFA4MZ.js} +3 -3
- package/chunks/{chunk-WBT3STGU.js → chunk-3I6UTTDX.js} +1 -1
- package/chunks/{chunk-FVDQ5E67.js → chunk-3JGZSIDA.js} +3 -3
- package/chunks/{chunk-JJJD6QCC.js → chunk-3SGB2UHX.js} +15 -10
- package/chunks/{chunk-77TOMRBG.js → chunk-43GGFFLY.js} +3 -3
- package/chunks/{chunk-ZJG323IA.js → chunk-43UYNAWX.js} +6 -4
- package/chunks/{chunk-T2HMXHYA.js → chunk-4CDSK5AZ.js} +6 -6
- package/chunks/chunk-4CMJKUND.js +95 -0
- package/chunks/{chunk-EB4VDXNI.js → chunk-4FTKQNWJ.js} +1 -1
- package/chunks/{chunk-PAJGKZAA.js → chunk-4HV6HH33.js} +10 -8
- package/chunks/{chunk-BQBUZDDH.js → chunk-4J657AJR.js} +3 -3
- package/chunks/{chunk-BU7OUDQB.js → chunk-4JWNNLPT.js} +4 -4
- package/chunks/{chunk-4N6UAPD3.js → chunk-4MQEPP3Y.js} +9 -84
- package/chunks/{chunk-I6HWGOWD.js → chunk-5O72BNDD.js} +93 -14
- package/chunks/{chunk-IKN3IUJP.js → chunk-5XBFCMWD.js} +2 -2
- package/chunks/{chunk-2YDYDDE2.js → chunk-66KDY3LV.js} +3 -3
- package/chunks/{chunk-UVDOONRU.js → chunk-6CGL7E7G.js} +2 -2
- package/chunks/{chunk-SLEWBQWM.js → chunk-6DIGWMGT.js} +2 -2
- package/chunks/{chunk-SKNVVYIJ.js → chunk-6IUNAPLR.js} +3 -3
- package/chunks/{chunk-VUZY6MEQ.js → chunk-6LFJEACX.js} +4 -4
- package/chunks/{chunk-H2MDBYLL.js → chunk-6LFTG244.js} +8 -8
- package/chunks/{chunk-PVBT5QPD.js → chunk-6PJOTWAN.js} +1 -1
- package/chunks/{chunk-4IDJQOCO.js → chunk-77RG5SFQ.js} +1 -1
- package/chunks/{chunk-SDVF6A42.js → chunk-7DJCPZE3.js} +3 -3
- package/chunks/{chunk-ELY4QVIB.js → chunk-7EQQR46F.js} +1 -1
- package/chunks/{chunk-H4JK2A2V.js → chunk-7UYV53BC.js} +1 -1
- package/chunks/{chunk-6HOU52QX.js → chunk-A7YP63XN.js} +4 -4
- package/chunks/{chunk-E4I5MVBR.js → chunk-ABS25QER.js} +1 -1
- package/chunks/{chunk-XO4NGYRP.js → chunk-AGR5UROZ.js} +5 -5
- package/chunks/{chunk-5T4LWWNX.js → chunk-B7CDU2SL.js} +2 -2
- package/chunks/{chunk-GQAIZL3H.js → chunk-BAJKAAOY.js} +68 -64
- package/chunks/{chunk-DWRFOH3G.js → chunk-BBWV7ONL.js} +3 -3
- package/chunks/{chunk-4TPAG3O7.js → chunk-BFPESSTR.js} +1 -1
- package/chunks/{chunk-RUJTCU46.js → chunk-BNMF3K5X.js} +20 -19
- package/chunks/{chunk-IPQA4SR5.js → chunk-BWORX6FA.js} +1 -1
- package/chunks/{chunk-BKDAF7ES.js → chunk-BXDAPVQU.js} +2 -2
- package/chunks/{chunk-FY62MBPS.js → chunk-C6K43ZDE.js} +4 -4
- package/chunks/{chunk-JUIJ3FXC.js → chunk-CAJTKR6W.js} +5 -5
- package/chunks/{chunk-EADEZDPO.js → chunk-CCBZDVUA.js} +30 -25
- package/chunks/{chunk-DP7LABIB.js → chunk-CMHFCLBU.js} +1 -1
- package/chunks/{chunk-5AFPOEY3.js → chunk-CPGJJJLU.js} +1 -1
- package/chunks/{chunk-LRKMQPMD.js → chunk-CQH5KTKC.js} +1 -1
- package/chunks/{chunk-EWBY3PFB.js → chunk-CSMI4FP5.js} +1 -1
- package/chunks/{chunk-JECO75XD.js → chunk-D5LUXLUH.js} +2 -2
- package/chunks/{chunk-TQYZG5DU.js → chunk-DZWPESIF.js} +3 -3
- package/chunks/{chunk-5Y2JCJAH.js → chunk-EFUM7RVY.js} +15 -2
- package/chunks/{chunk-3UZCLCXR.js → chunk-EKSCLBBF.js} +3 -3
- package/chunks/{chunk-LJP2BBMK.js → chunk-EOGELB3H.js} +4 -4
- package/chunks/{chunk-624NHDGB.js → chunk-ERFDKH32.js} +11 -0
- package/chunks/{chunk-RQAMNZ4Y.js → chunk-F5SZP77N.js} +310 -78
- package/chunks/{chunk-SQPOJ4ZI.js → chunk-F6FV3C5K.js} +12 -7
- package/chunks/{chunk-C2BAEV64.js → chunk-F7TNAPZ4.js} +9 -7
- package/chunks/{chunk-OAAPGZVH.js → chunk-FBSSIAAQ.js} +6 -6
- package/chunks/{chunk-2FN2HNTI.js → chunk-FDY5RMGH.js} +2 -2
- package/chunks/{chunk-U66FXEH2.js → chunk-FY76G3G5.js} +5 -5
- package/chunks/{chunk-LKOSBI2M.js → chunk-G34IR3D6.js} +9 -9
- package/chunks/{chunk-ZWKGZB2K.js → chunk-H2WDGQ6D.js} +3 -3
- package/chunks/chunk-H72BQNM3.js +645 -0
- package/chunks/{chunk-ILPXSKGQ.js → chunk-HVEYF6VT.js} +2 -2
- package/chunks/{chunk-EAV3TENS.js → chunk-HVQ3B7FF.js} +2 -2
- package/chunks/{chunk-MI7CMXPU.js → chunk-IJKTMLBE.js} +1 -1
- package/chunks/{chunk-IN66KO3N.js → chunk-IK5BW3CS.js} +2 -2
- package/chunks/{chunk-5NV2AN56.js → chunk-IOPCFOTF.js} +3 -3
- package/chunks/{chunk-O3BUXIPM.js → chunk-IZIVM7LZ.js} +3 -3
- package/chunks/{chunk-I6VVOZDK.js → chunk-J2OSJFP3.js} +2 -2
- package/chunks/{chunk-AYVIGUUK.js → chunk-JB4JIVTJ.js} +1 -1
- package/chunks/{chunk-76WGY6LW.js → chunk-JCQD3INC.js} +3 -3
- package/chunks/{chunk-CITGRGCM.js → chunk-JHS74YAB.js} +4 -1
- package/chunks/{chunk-GXWY24QS.js → chunk-JSC3H3TD.js} +33 -10
- package/chunks/{chunk-NUHCXGAD.js → chunk-JSHHYW6T.js} +4 -4
- package/chunks/{chunk-5CW26JIE.js → chunk-JU4EEXC7.js} +2 -2
- package/chunks/{chunk-T6OODF2U.js → chunk-JWALNCLT.js} +1 -1
- package/chunks/{chunk-DX5FZGHZ.js → chunk-K2NQPH5D.js} +3 -3
- package/chunks/{chunk-VLY6XOBY.js → chunk-KEKZFOL6.js} +1 -1
- package/chunks/{chunk-RUQBJS34.js → chunk-KUX5D6DK.js} +1200 -339
- package/chunks/{chunk-UX3IFLJM.js → chunk-L2M46FP5.js} +149 -22
- package/chunks/{chunk-6US7BF3G.js → chunk-L6BZRIUL.js} +2 -2
- package/chunks/{chunk-BGWT7VBV.js → chunk-L6YT5H34.js} +4 -4
- package/chunks/{chunk-W2WRNJKX.js → chunk-LDP5OD6N.js} +5 -5
- package/chunks/{chunk-QB5DD75E.js → chunk-LXIBMVRN.js} +7 -7
- package/chunks/{chunk-GNMJNDZE.js → chunk-M6FOJXW3.js} +1 -1
- package/chunks/{chunk-OX44MOAN.js → chunk-MIIVI25Q.js} +3 -3
- package/chunks/{chunk-K3LPAED5.js → chunk-MQM5PJML.js} +24 -4
- package/chunks/{chunk-27ONXAFY.js → chunk-NIFYWDYN.js} +1 -1
- package/chunks/{chunk-IJVDHPKD.js → chunk-NU7RKEZR.js} +2 -2
- package/chunks/{chunk-MB4OCRQ2.js → chunk-O2UN57NX.js} +2 -2
- package/chunks/{chunk-TWUA5EIL.js → chunk-OIP7C4FE.js} +5 -5
- package/chunks/{chunk-UCSV2IZW.js → chunk-OIVXBW3W.js} +3 -3
- package/chunks/{chunk-TOF4UZHH.js → chunk-P2SU6ZTI.js} +3 -3
- package/chunks/{chunk-N4B7VPXK.js → chunk-P5GGM4KS.js} +5 -5
- package/chunks/{chunk-ZKAZP2ZG.js → chunk-PDMJ3KGS.js} +2 -2
- package/chunks/{chunk-RRKNX553.js → chunk-PDQGMSZK.js} +1 -1
- package/chunks/{chunk-3UXJFOB3.js → chunk-PFCQ62V4.js} +5 -5
- package/chunks/{chunk-JLGFGPZJ.js → chunk-PKAYJDB3.js} +2 -2
- package/chunks/{chunk-GTUKW3I6.js → chunk-PPKZ7JOE.js} +1 -1
- package/chunks/{chunk-HOANA6GC.js → chunk-Q26AYA62.js} +4 -4
- package/chunks/{chunk-WEGXPP5E.js → chunk-QFCDF5PL.js} +1 -1
- package/chunks/{chunk-4PLAO7FS.js → chunk-QP4C6WCE.js} +3 -3
- package/chunks/{chunk-3B5DCAQU.js → chunk-R4PMVSR5.js} +27 -25
- package/chunks/{chunk-7JJUFI36.js → chunk-RIEFGNTP.js} +579 -3419
- package/chunks/{chunk-7XKW4CVK.js → chunk-RJC5EIKY.js} +4 -4
- package/chunks/chunk-RKFGE7JH.js +93 -0
- package/chunks/{chunk-CPPYZHBN.js → chunk-RU7BK6B3.js} +1 -1
- package/chunks/{chunk-GZJUCMH4.js → chunk-RUGNCYNO.js} +11 -633
- package/chunks/{chunk-ZLTEQYNC.js → chunk-SFPGAQUL.js} +2 -2
- package/chunks/{chunk-K6FURWIX.js → chunk-SJ3ZUWFK.js} +26 -4
- package/chunks/{chunk-DEYPMJPD.js → chunk-SMPR7SPO.js} +1 -1
- package/chunks/{chunk-7CWEZQ6T.js → chunk-STUJ7IMZ.js} +0 -77
- package/chunks/{chunk-O5YGAEQS.js → chunk-T32W2JHI.js} +6 -6
- package/chunks/chunk-T3WXYEZ4.js +304 -0
- package/chunks/{chunk-D6XO27Z5.js → chunk-TGWAQ5RB.js} +750 -296
- package/chunks/{chunk-EC5BONC3.js → chunk-TPI7O7HR.js} +1 -1
- package/chunks/{chunk-OI2DR6QB.js → chunk-TRZTNIQ6.js} +2 -2
- package/chunks/{chunk-T2CRBIDJ.js → chunk-TTX2JUE6.js} +1 -1
- package/chunks/{chunk-2NNTE2ED.js → chunk-UHQFIS7N.js} +15 -0
- package/chunks/{chunk-KOJ6MHD5.js → chunk-UTLCH2FK.js} +1 -1
- package/chunks/{chunk-7DPKPBOQ.js → chunk-V2NDP3I4.js} +2 -2
- package/chunks/{chunk-RQ5ASDFQ.js → chunk-V4QXXQJ2.js} +3 -3
- 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-V3GINY6K.js → chunk-VVW4ZNFY.js} +3 -3
- package/chunks/{chunk-YT5XN3HV.js → chunk-W5MJJ2V7.js} +1 -1
- package/chunks/{chunk-FPH6TXD3.js → chunk-WAOIHTJS.js} +1 -1
- package/chunks/{chunk-FN5C6C7G.js → chunk-WKK5BQNP.js} +151 -60
- package/chunks/chunk-XDFHY4R3.js +1584 -0
- package/chunks/{chunk-L436XFLJ.js → chunk-XDLEZ5HX.js} +1 -1
- package/chunks/{chunk-VL4YX3FH.js → chunk-XF63PKEN.js} +1 -1
- package/chunks/{chunk-3FSBMAYD.js → chunk-XQFT3QUF.js} +1 -1
- package/chunks/{chunk-2MHGD7EE.js → chunk-XRSOI3DL.js} +1 -1
- package/chunks/{chunk-FJWICLG7.js → chunk-Y3QL45LS.js} +1 -1
- package/chunks/{chunk-RCDXSEJ5.js → chunk-Y6LSMB6J.js} +1 -1
- package/chunks/{chunk-2SERYG4T.js → chunk-YTDVNSUQ.js} +1 -1
- package/chunks/{chunk-4X5GYZFO.js → chunk-Z7FLBQPR.js} +7 -7
- package/chunks/{chunk-3BV7TZNQ.js → chunk-Z7TGYN5F.js} +3 -3
- package/chunks/{chunk-4Z3PSHN4.js → chunk-ZFKOCECU.js} +2 -2
- package/chunks/chunk-ZGXYO7DY.js +3416 -0
- package/chunks/{chunk-E6FGMDFQ.js → chunk-ZU4UDIWX.js} +19 -1
- package/chunks/config-utils-BBOCOGZW.js +113 -0
- package/chunks/contextCommand-EET67MQ2.js +108 -0
- package/chunks/{core-runtime-6TBMEULI.js → core-runtime-677KFX6Q.js} +53 -53
- package/chunks/{create-sub-session-RVHSWVAP.js → create-sub-session-23ITIELI.js} +3 -3
- package/chunks/{create-sub-session-SAOMTP62.js → create-sub-session-JKZAYZX7.js} +160 -79
- 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-MJQUO7RA.js} +28 -1
- package/chunks/{daemon-git-worktree-guard-TYLESM6G.js → daemon-git-worktree-guard-6MVAAZZZ.js} +53 -53
- package/chunks/daemon-status-provider-RFKZOK3S.js +119 -0
- package/chunks/daemon-trust-policy-DRZPFB4Q.js +114 -0
- package/chunks/{daemon-trust-policy-monitor-WWX7I7P6.js → daemon-trust-policy-monitor-B5U6TQX5.js} +59 -59
- package/chunks/deferred-core-runtime-BBVIOP24.js +116 -0
- package/chunks/{display-image-DR55LL6M.js → display-image-BE7I6ZB6.js} +5 -5
- package/chunks/{dist-FVJZSIO4.js → dist-ILDBUWDB.js} +71 -19
- package/chunks/{dist-6H6RZ5H6.js → dist-QODVOVWI.js} +58 -35
- package/chunks/earlyInputCapture-2JOMMNQ4.js +109 -0
- package/chunks/{edit-GBDKI5DZ.js → edit-BSV6YRVW.js} +42 -42
- package/chunks/{en-6MDBWMTG.js → en-YLXBXM4Z.js} +2 -1
- package/chunks/{enter-worktree-UOZ6ZTP7.js → enter-worktree-MQXFFPKM.js} +7 -7
- package/chunks/{enterPlanMode-2KTIPPM3.js → enterPlanMode-PKNF35FE.js} +41 -41
- package/chunks/{environment-XJ75LJ6N.js → environment-MOZMPUHR.js} +55 -55
- package/chunks/errors-DMPQVYJL.js +115 -0
- package/chunks/{exit-worktree-G2QATUCV.js → exit-worktree-L344UY7K.js} +7 -7
- package/chunks/{exitPlanMode-AUMYTFIQ.js → exitPlanMode-UE4FGCY4.js} +41 -41
- package/chunks/{fast-path-TU7U2ETU.js → fast-path-773PV7PU.js} +5 -5
- package/chunks/{gemini-FKMYDP64.js → gemini-IP4FJAP5.js} +101 -100
- package/chunks/{geminiContentGenerator-WSHP7CSR.js → geminiContentGenerator-PUNEBWJW.js} +8 -8
- package/chunks/{glob-EOM6XK7H.js → glob-CZHOWUEA.js} +41 -41
- package/chunks/{goal-tools-CNVXMSZD.js → goal-tools-YZQJXTGH.js} +9 -8
- package/chunks/{grep-3NLSS32D.js → grep-5GPICQBU.js} +6 -6
- package/chunks/handleAutoUpdate-SGXKTQM6.js +111 -0
- package/chunks/{i18n-XX7U2Q3X.js → i18n-B42HKHKH.js} +54 -54
- package/chunks/{image-gen-63NN2H5N.js → image-gen-HAYOEQ4O.js} +9 -9
- package/chunks/initializer-FB66WYR3.js +115 -0
- package/chunks/installationInfo-Y7AULNMX.js +109 -0
- package/chunks/{keychain-token-storage-3MGFRYGM.js → keychain-token-storage-37XPR34V.js} +2 -2
- package/chunks/list-2HWGSVRA.js +118 -0
- package/chunks/{list-agents-EXRSHIDJ.js → list-agents-DI3YFTDT.js} +2 -2
- package/chunks/loadedSettingsAdapter-7Y7IEI6T.js +112 -0
- package/chunks/{loggingContentGenerator-TUDGCVUG.js → loggingContentGenerator-2GGZNGLG.js} +35 -22
- 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-5K4FWFX2.js → managed-npm-update-5TEV2E3J.js} +54 -54
- package/chunks/mcp-QGG5NMJJ.js +112 -0
- package/chunks/{monitor-UUHIAGT7.js → monitor-FI7PY36Z.js} +41 -41
- package/chunks/nonInteractiveCli-4LO2TL72.js +186 -0
- package/chunks/{notebook-edit-GZPB3Q57.js → notebook-edit-TPGMGBST.js} +42 -42
- package/chunks/{openaiContentGenerator-RPP6YBS3.js → openaiContentGenerator-SUCYANUZ.js} +24 -24
- package/chunks/pidfile-JMF2CLMY.js +113 -0
- package/chunks/{processUtils-ENAY2GSA.js → processUtils-IQZBYWSB.js} +2 -2
- package/chunks/prompt-terminal-ledger-DCZO6S7C.js +107 -0
- package/chunks/{qwenContentGenerator-GLUZVJAU.js → qwenContentGenerator-J4TXFGJT.js} +46 -46
- package/chunks/{qwenOAuth2-JIYAWXTW.js → qwenOAuth2-RF33DNZW.js} +8 -8
- package/chunks/{read-file-75R5LUWQ.js → read-file-QE2B5FTX.js} +12 -12
- package/chunks/{read-mcp-resource-7A7NFSFL.js → read-mcp-resource-XD257PGJ.js} +2 -2
- package/chunks/{record-artifact-CPJ4IJSD.js → record-artifact-RZGZBENU.js} +4 -4
- package/chunks/{report-findings-VFM5DENC.js → report-findings-Q3SYKKW5.js} +5 -5
- package/chunks/{request-shutdown-AXVOFN5C.js → request-shutdown-BCLA3JV2.js} +7 -7
- package/chunks/resumeHistoryUtils-CZ4JRDVW.js +120 -0
- package/chunks/{ripGrep-FNLXQYBS.js → ripGrep-R6B6HWPX.js} +17 -17
- package/chunks/{run-qwen-serve-FJD4VMI2.js → run-qwen-serve-TPHZMSXJ.js} +148 -319
- package/chunks/{runtime-INDSJB4K.js → runtime-TTIGSBM4.js} +62 -62
- package/chunks/scheduled-tasks-QB4ZVUQS.js +129 -0
- package/chunks/{scheduler-Z52TCSUG.js → scheduler-YRUG22M7.js} +55 -55
- package/chunks/{sdk-exporters-http-XXSKBD2C.js → sdk-exporters-http-KCJ4ZFG7.js} +2 -2
- package/chunks/{sdk-impl-VPNBLV7I.js → sdk-impl-HLSEDAEP.js} +4 -4
- package/chunks/{send-message-A2GXDX3B.js → send-message-Y5I6NYAM.js} +7 -7
- package/chunks/serve-MXXCDAQN.js +120 -0
- package/chunks/{server-PSN5OOSX.js → server-DFUSSSHI.js} +19760 -19444
- package/chunks/{session-JPE34X6Q.js → session-3TEHNENZ.js} +100 -99
- package/chunks/{settings-IVGC4UYK.js → settings-VOZYKLTT.js} +58 -58
- package/chunks/{shell-A5PZGPBR.js → shell-6RTKZVMI.js} +41 -41
- package/chunks/{skill-UUXQPDEH.js → skill-FEOKFX26.js} +22 -21
- package/chunks/{skill-settings-WVRXLTK4.js → skill-settings-VA4XVYVL.js} +58 -58
- package/chunks/spawnChannel-F6WVP723.js +114 -0
- package/chunks/{standalone-update-IRFRNGAA.js → standalone-update-RGILUQVK.js} +55 -55
- package/chunks/{startInteractiveUI-MC4GLL6G.js → startInteractiveUI-WHJPFOGH.js} +2757 -2223
- package/chunks/{syntheticOutput-5AJ444QT.js → syntheticOutput-ML43GEFN.js} +3 -3
- package/chunks/{task-create-CDJSOEQD.js → task-create-TMSV7RD5.js} +11 -11
- package/chunks/{task-list-BELMPA75.js → task-list-W55RBFRX.js} +5 -5
- package/chunks/{task-stop-U3S3KZG2.js → task-stop-CXEH5L2D.js} +2 -2
- package/chunks/{task-update-77VCFDDZ.js → task-update-N536I4GQ.js} +11 -11
- package/chunks/{team-create-WO5ZBCFW.js → team-create-QYSWCYCL.js} +41 -41
- package/chunks/{team-delete-YWFXX77L.js → team-delete-FJRFX33M.js} +5 -5
- package/chunks/{team-plan-approval-KAVKRN7U.js → team-plan-approval-P7DAD644.js} +41 -41
- package/chunks/{terminal-image-renderer-SMRRNI6Z.js → terminal-image-renderer-SMQE46UJ.js} +55 -55
- package/chunks/theme-manager-RFO5WWFF.js +104 -0
- package/chunks/{todoWrite-435EO2CS.js → todoWrite-WDJNQEMW.js} +43 -25
- package/chunks/{tool-search-FBN6OC6U.js → tool-search-F2EMIAPV.js} +17 -17
- package/chunks/total-session-admission-HTVTP4BS.js +116 -0
- package/chunks/{trustedFolders-B4LPJBFK.js → trustedFolders-7OCNMUQE.js} +54 -54
- package/chunks/{update-relaunch-X5TJVKVG.js → update-relaunch-4GF3OXMB.js} +5 -5
- package/chunks/{updateCheck-JCLP5JFT.js → updateCheck-7QBDXZRT.js} +56 -56
- package/chunks/useAutoAcceptIndicator-UI4SNL2O.js +122 -0
- package/chunks/{validateNonInterActiveAuth-W7HYH5ZN.js → validateNonInterActiveAuth-BPPA563H.js} +96 -95
- package/chunks/{version-JG4J76GL.js → version-ANP4TS6O.js} +1 -1
- package/chunks/{web-fetch-SPLMEDWF.js → web-fetch-QJADSAH3.js} +16 -16
- package/chunks/{web-search-PNW6OEH6.js → web-search-7TTQKEKM.js} +9 -9
- package/chunks/{workflow-QHOIIXJO.js → workflow-5XN6XSOT.js} +105 -60
- package/chunks/workspace-providers-status-PDFZWL5Q.js +116 -0
- package/chunks/{workspace-registration-store-H375IYR2.js → workspace-registration-store-XKVW2YVH.js} +1 -1
- package/chunks/{workspace-registry-XTLCD7Z2.js → workspace-registry-23R7XRB5.js} +61 -59
- package/chunks/workspace-service-MUYO2QIC.js +131 -0
- package/chunks/workspace-skills-status-IKECTOOQ.js +115 -0
- package/chunks/{workspace-trust-reconciler-6SC6RKQE.js → workspace-trust-reconciler-KLGOB53D.js} +67 -65
- package/chunks/write-file-GGRBB5TZ.js +90 -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-WGNPZ572.js → zoom-image-6ASG6J4C.js} +12 -12
- 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-uS-vtfs3.js} +1 -1
- package/web-shell/assets/{arc-CbJO0xnT.js → arc-BSTnk5pu.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-CRh89421.js → architectureDiagram-5GKGNRK7-DCMyiqzy.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-C75KAhKv.js → blockDiagram-NRAW4CY4-C7_gt0r1.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BzlMveFB.js → c4Diagram-UCG6FXSJ-BeQg2L8B.js} +1 -1
- package/web-shell/assets/channel-CENAhErJ.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-DA8QDX3a.js → chunk-2Q5K7J3B-DnV9bKBe.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-Bgu7gQ7Y.js → chunk-5VM5RSS4-rT1GAcT7.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-BOew7pIK.js → chunk-F27PBJKO-BcgSxqGA.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-DHx1I-hO.js → chunk-G27WJ6UU-Bw1ZhyZq.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-SarFW0WU.js → chunk-JWPE2WC7-D4iDw-96.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-BLzP083Z.js → chunk-LCL6LL3I-D3MB3GTZ.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-Bmkv_iKm.js → chunk-POPQ4Y6H-Cep2ndrS.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-MPx9r1N2.js → chunk-SVP7TREG-BuahMHJc.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-Ck-09rKG.js → chunk-XXDRQBXY-BdujIvJY.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-CM6FArGH.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-CM6FArGH.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-DWm6lfOG.js → cose-bilkent-JH36ORCC-CGLLUbF8.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-DcBUyr5R.js → cynefin-OW5HDTMX-D6kDsRSh.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-Df8qmd_p.js → cynefinDiagram-5FMLGOSQ-CCy78qZx.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-DDmGspD7.js → dagre-3AP2YEHR-D5gJuJsf.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-BK_qFvbi.js → diagram-S7CK7UJ4-ZwEZ5W__.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-Uw3AP_bi.js → diagram-UQ7AKVKN-B036APjv.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-CJOQKxY7.js → diagram-VSXAHHWV-BfDJ57Fq.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-DhdvZna5.js → diagram-VX7I27RA-Wha0p5rT.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-edQU0nlP.js → diagram-Z3DM3KII-L20bz2K1.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-4kugBEsO.js → ebnfDiagram-PWID7BFC-D1ZM0Cp7.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-BMkFivWO.js → erDiagram-SSCWMZ5O-CMtA19v8.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-BM1ea8g-.js → flowDiagram-A5DVABFB-D96m326S.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-CXj_cKRf.js → ganttDiagram-EL5Y4UJY-BuHiYG2o.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-D0nEqwqu.js → gitGraphDiagram-WWUBYQGX-Ck3NmkSw.js} +1 -1
- package/web-shell/assets/index-8hXIpvo4.js +1865 -0
- package/web-shell/assets/{index-B6JN54Pd.js → index-CBGz4Qjl.js} +1 -1
- package/web-shell/assets/{index-C-XlQn24.css → index-DclEv91i.css} +1 -1
- package/web-shell/assets/{infoDiagram-RXCK75RN-DF7aGGbQ.js → infoDiagram-RXCK75RN-B6DAOyXe.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-CZYNX1lL.js → ishikawaDiagram-5VMMS53U-Bpg-joFo.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-CvrqMUz1.js → journeyDiagram-EYS64GPL-BclrHzGa.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-BZNJQZBj.js → kanban-definition-3QL26DDD-5gJzNTYG.js} +1 -1
- package/web-shell/assets/{layout-Bf83x7D6.js → layout-CEz_1L8z.js} +1 -1
- package/web-shell/assets/{linear-Bkc3ES2f.js → linear-CBjTq9Hc.js} +1 -1
- package/web-shell/assets/{mermaid.core-C6xuovwz.js → mermaid.core-Dzhbxx_I.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-DzH6gVRg.js → mindmap-definition-FBJOCRG2-DQdVqlBF.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-DCvLh2fa.js → pegDiagram-XKGWAZYB-D1JZlYXL.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-BtjVlx_6.js → pieDiagram-E7YTZNPT-BmkpYL0w.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-IbroqxFe.js → quadrantDiagram-AXDQQJYC-DRvD6co5.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-BvMykiWW.js → railroadDiagram-O6MQD6OU-CEdjDuoo.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-D-HHMyrh.js → requirementDiagram-EFPCY7ZU-BCHG-ie8.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-C0XXhB6d.js → sankeyDiagram-P5KCCOFB-C9cZMnye.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-DseAXj5d.js → sequenceDiagram-WJ2MYXX4-DYHRV4zL.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-Cek2EweK.js → sizeCapture-X5ZJPWSS-DlK21aye.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-yLv8wafW.js → stateDiagram-HBIQ2CUA-BrmZssvk.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-B2Q7XDaE.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-Cwz-opvE.js → swimlanes-XN3QIQJK-D9xfcayR.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DpZPOSbX.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-BJuFD7OG.js → timeline-definition-24CTP7MA-D4gdDL_d.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-CNAavdoV.js → vennDiagram-4TSXK5OY-DdhIExjI.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-DaIjAidq.js → wardleyDiagram-VM6X3IG4-C9RS_Zof.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-DkcQXjTy.js → xychartDiagram-S5SC5T6Z-orRgmxWk.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/MaxSizedBox-XYQOMOBE.js +0 -112
- package/chunks/agent-headless-3ZC4LX3E.js +0 -87
- package/chunks/bridge-LFFLHLU5.js +0 -119
- package/chunks/channel-settings-store-CAL2HWAH.js +0 -117
- package/chunks/chunk-JS73NNWF.js +0 -30
- package/chunks/chunk-VGHZT6JR.js +0 -51
- package/chunks/config-utils-YMJNA25D.js +0 -113
- package/chunks/contextCommand-WMPSNKPG.js +0 -108
- package/chunks/daemon-status-provider-YBQAZD3G.js +0 -118
- package/chunks/daemon-trust-policy-O75ZSIJN.js +0 -114
- package/chunks/deferred-core-runtime-MGCCR6LA.js +0 -116
- package/chunks/earlyInputCapture-2EJKJET3.js +0 -109
- package/chunks/errors-XEI3SJRV.js +0 -115
- package/chunks/handleAutoUpdate-S4CLP36D.js +0 -111
- package/chunks/initializer-D3CA3272.js +0 -115
- package/chunks/installationInfo-HVDQOSIE.js +0 -109
- package/chunks/list-XUDSTGT3.js +0 -118
- package/chunks/loadedSettingsAdapter-ZOJ4QEID.js +0 -112
- package/chunks/mcp-QJ6AUYE5.js +0 -112
- package/chunks/nonInteractiveCli-PAWO75YO.js +0 -185
- package/chunks/pidfile-RF3WUFKR.js +0 -113
- package/chunks/prompt-terminal-ledger-4CCXZ2LF.js +0 -107
- package/chunks/resumeHistoryUtils-GFPJD2XB.js +0 -120
- package/chunks/serve-GVD2WXVL.js +0 -120
- package/chunks/spawnChannel-KTURLD4B.js +0 -113
- package/chunks/theme-manager-A7CPN7F4.js +0 -104
- package/chunks/total-session-admission-B7U6UWKQ.js +0 -114
- package/chunks/useAutoAcceptIndicator-VBT3NKDM.js +0 -122
- package/chunks/workspace-providers-status-653DTR35.js +0 -116
- package/chunks/workspace-service-KVJWACCS.js +0 -131
- package/chunks/workspace-skills-status-TRJ2VWGU.js +0 -115
- package/chunks/write-file-EAZSJZKR.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-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,14 +1,19 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
NdJsonQueueLimitError,
|
|
5
|
+
ndJsonStream,
|
|
6
|
+
validateNdJsonStreamLimits
|
|
7
|
+
} from "./chunk-H72BQNM3.js";
|
|
6
8
|
import {
|
|
7
|
-
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
MissingCliEntryError
|
|
10
|
+
} from "./chunk-JHS74YAB.js";
|
|
9
11
|
import {
|
|
10
12
|
EXTERNAL_TOOL_GUARD_TOKEN_ENV
|
|
11
13
|
} from "./chunk-3VUENPWF.js";
|
|
14
|
+
import {
|
|
15
|
+
redactLogCredentials
|
|
16
|
+
} from "./chunk-M5GB774H.js";
|
|
12
17
|
import {
|
|
13
18
|
CLIENT_METHODS,
|
|
14
19
|
zCreateTerminalRequest,
|
|
@@ -35,632 +40,6 @@ import * as os from "node:os";
|
|
|
35
40
|
import { Readable, Writable } from "node:stream";
|
|
36
41
|
import { getHeapStatistics } from "node:v8";
|
|
37
42
|
|
|
38
|
-
// packages/acp-bridge/src/ndJsonStream.ts
|
|
39
|
-
init_esbuild_shims();
|
|
40
|
-
import { createHash } from "node:crypto";
|
|
41
|
-
import { inspect } from "node:util";
|
|
42
|
-
var NdJsonFrameTooLargeError = class extends Error {
|
|
43
|
-
constructor(direction, limitBytes, observedBytes) {
|
|
44
|
-
super(
|
|
45
|
-
`NDJSON ${direction} frame exceeds ${limitBytes} bytes (observed ${observedBytes} bytes)`
|
|
46
|
-
);
|
|
47
|
-
this.direction = direction;
|
|
48
|
-
this.limitBytes = limitBytes;
|
|
49
|
-
this.observedBytes = observedBytes;
|
|
50
|
-
this.name = "NdJsonFrameTooLargeError";
|
|
51
|
-
}
|
|
52
|
-
static {
|
|
53
|
-
__name(this, "NdJsonFrameTooLargeError");
|
|
54
|
-
}
|
|
55
|
-
code = "ndjson_frame_too_large";
|
|
56
|
-
};
|
|
57
|
-
var NdJsonQueueLimitError = class extends Error {
|
|
58
|
-
constructor(maxQueuedMessages, maxQueuedBytes, requiredBytes, availableBytes) {
|
|
59
|
-
super(
|
|
60
|
-
`NDJSON decoded queue is full (required ${requiredBytes} bytes, available ${availableBytes} bytes)`
|
|
61
|
-
);
|
|
62
|
-
this.maxQueuedMessages = maxQueuedMessages;
|
|
63
|
-
this.maxQueuedBytes = maxQueuedBytes;
|
|
64
|
-
this.requiredBytes = requiredBytes;
|
|
65
|
-
this.availableBytes = availableBytes;
|
|
66
|
-
this.name = "NdJsonQueueLimitError";
|
|
67
|
-
}
|
|
68
|
-
static {
|
|
69
|
-
__name(this, "NdJsonQueueLimitError");
|
|
70
|
-
}
|
|
71
|
-
code = "ndjson_queue_limit_exceeded";
|
|
72
|
-
};
|
|
73
|
-
var NdJsonIncompleteFrameError = class extends Error {
|
|
74
|
-
constructor(observedBytes) {
|
|
75
|
-
super(`NDJSON input ended with an incomplete ${observedBytes}-byte frame`);
|
|
76
|
-
this.observedBytes = observedBytes;
|
|
77
|
-
this.name = "NdJsonIncompleteFrameError";
|
|
78
|
-
}
|
|
79
|
-
static {
|
|
80
|
-
__name(this, "NdJsonIncompleteFrameError");
|
|
81
|
-
}
|
|
82
|
-
code = "ndjson_incomplete_frame";
|
|
83
|
-
};
|
|
84
|
-
var NdJsonUnexpectedEofError = class extends Error {
|
|
85
|
-
static {
|
|
86
|
-
__name(this, "NdJsonUnexpectedEofError");
|
|
87
|
-
}
|
|
88
|
-
code = "ndjson_unexpected_eof";
|
|
89
|
-
constructor() {
|
|
90
|
-
super("NDJSON input ended while the bounded transport was active");
|
|
91
|
-
this.name = "NdJsonUnexpectedEofError";
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
var NdJsonInvalidMessageError = class extends Error {
|
|
95
|
-
constructor(code, observedBytes) {
|
|
96
|
-
super(`NDJSON input contains an invalid ${observedBytes}-byte message`);
|
|
97
|
-
this.code = code;
|
|
98
|
-
this.observedBytes = observedBytes;
|
|
99
|
-
this.name = "NdJsonInvalidMessageError";
|
|
100
|
-
}
|
|
101
|
-
static {
|
|
102
|
-
__name(this, "NdJsonInvalidMessageError");
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
var MAX_JSON_RPC_METHOD_BYTES = 1024;
|
|
106
|
-
var MAX_JSON_RPC_ID_BYTES = 256;
|
|
107
|
-
var MAX_JSON_RPC_ERROR_MESSAGE_BYTES = 1024;
|
|
108
|
-
var MAX_JSON_DEPTH = 64;
|
|
109
|
-
var MAX_JSON_NODES = 1e4;
|
|
110
|
-
var MAX_JSON_ARRAY_LENGTH = 4096;
|
|
111
|
-
function ndJsonStream(output, input, hooks, limits, validateInboundMessage, fatalCleanEof = false) {
|
|
112
|
-
const textEncoder = new TextEncoder();
|
|
113
|
-
const textDecoder = new TextDecoder();
|
|
114
|
-
if (limits) validateNdJsonStreamLimits(limits);
|
|
115
|
-
const outboundRequests = limits ? new BoundedOutstandingRequestLedger(limits) : void 0;
|
|
116
|
-
const inboundRequests = limits ? new BoundedInboundRequestLedger(limits) : void 0;
|
|
117
|
-
const readable = limits ? createBoundedReadable(
|
|
118
|
-
input,
|
|
119
|
-
textDecoder,
|
|
120
|
-
hooks,
|
|
121
|
-
limits,
|
|
122
|
-
outboundRequests,
|
|
123
|
-
inboundRequests,
|
|
124
|
-
validateInboundMessage,
|
|
125
|
-
fatalCleanEof
|
|
126
|
-
) : createLegacyReadable(input, textDecoder, hooks);
|
|
127
|
-
const writable = new WritableStream({
|
|
128
|
-
async write(message) {
|
|
129
|
-
let writer;
|
|
130
|
-
let expectedResponseId;
|
|
131
|
-
try {
|
|
132
|
-
const content = JSON.stringify(message);
|
|
133
|
-
const payload = textEncoder.encode(content);
|
|
134
|
-
const frameBytes = payload.byteLength + 1;
|
|
135
|
-
if (limits && frameBytes > limits.maxFrameBytes) {
|
|
136
|
-
throw new NdJsonFrameTooLargeError(
|
|
137
|
-
"sent",
|
|
138
|
-
limits.maxFrameBytes,
|
|
139
|
-
frameBytes
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
const frame = new Uint8Array(frameBytes);
|
|
143
|
-
frame.set(payload);
|
|
144
|
-
frame[payload.byteLength] = 10;
|
|
145
|
-
if (outboundRequests && isJsonRpcRequestMessage(message)) {
|
|
146
|
-
outboundRequests.admit(message.id, frameBytes);
|
|
147
|
-
expectedResponseId = message.id;
|
|
148
|
-
}
|
|
149
|
-
writer = output.getWriter();
|
|
150
|
-
await writer.write(frame);
|
|
151
|
-
inboundRequests?.release(message);
|
|
152
|
-
callHook(hooks?.onMessageSent, payload.byteLength);
|
|
153
|
-
callHook(hooks?.onMessageObserved, {
|
|
154
|
-
direction: "sent",
|
|
155
|
-
bytes: payload.byteLength,
|
|
156
|
-
message
|
|
157
|
-
});
|
|
158
|
-
} catch (error) {
|
|
159
|
-
if (expectedResponseId !== void 0) {
|
|
160
|
-
outboundRequests?.discard(expectedResponseId);
|
|
161
|
-
}
|
|
162
|
-
if (limits) callHook(hooks?.onTransportError, error);
|
|
163
|
-
throw error;
|
|
164
|
-
} finally {
|
|
165
|
-
writer?.releaseLock();
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
return { readable, writable };
|
|
170
|
-
}
|
|
171
|
-
__name(ndJsonStream, "ndJsonStream");
|
|
172
|
-
function createLegacyReadable(input, textDecoder, hooks) {
|
|
173
|
-
return new ReadableStream({
|
|
174
|
-
async start(controller) {
|
|
175
|
-
const pending = [];
|
|
176
|
-
const reader = input.getReader();
|
|
177
|
-
try {
|
|
178
|
-
while (true) {
|
|
179
|
-
const { value, done } = await reader.read();
|
|
180
|
-
if (done) break;
|
|
181
|
-
if (!value) continue;
|
|
182
|
-
readLegacyChunk(value, pending, controller, textDecoder, hooks);
|
|
183
|
-
}
|
|
184
|
-
} finally {
|
|
185
|
-
reader.releaseLock();
|
|
186
|
-
controller.close();
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
__name(createLegacyReadable, "createLegacyReadable");
|
|
192
|
-
function createBoundedReadable(input, textDecoder, hooks, limits, outboundRequests, inboundRequests, validateInboundMessage, fatalCleanEof) {
|
|
193
|
-
const pending = new BoundedFrameBuffer(limits.maxFrameBytes);
|
|
194
|
-
const minimumQueueCharge = Math.ceil(
|
|
195
|
-
limits.maxQueuedBytes / limits.maxQueuedMessages
|
|
196
|
-
);
|
|
197
|
-
let nextQueueCharge = minimumQueueCharge;
|
|
198
|
-
let reader;
|
|
199
|
-
let canceled = false;
|
|
200
|
-
return new ReadableStream(
|
|
201
|
-
{
|
|
202
|
-
start(controller) {
|
|
203
|
-
reader = input.getReader();
|
|
204
|
-
void pumpBoundedInput(
|
|
205
|
-
reader,
|
|
206
|
-
pending,
|
|
207
|
-
controller,
|
|
208
|
-
textDecoder,
|
|
209
|
-
hooks,
|
|
210
|
-
limits,
|
|
211
|
-
outboundRequests,
|
|
212
|
-
inboundRequests,
|
|
213
|
-
validateInboundMessage,
|
|
214
|
-
fatalCleanEof,
|
|
215
|
-
minimumQueueCharge,
|
|
216
|
-
(charge) => {
|
|
217
|
-
nextQueueCharge = charge;
|
|
218
|
-
},
|
|
219
|
-
() => canceled
|
|
220
|
-
);
|
|
221
|
-
},
|
|
222
|
-
async cancel(reason) {
|
|
223
|
-
canceled = true;
|
|
224
|
-
pending.clear();
|
|
225
|
-
if (reader) await cancelReader(reader, reason);
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
highWaterMark: limits.maxQueuedBytes,
|
|
230
|
-
size: /* @__PURE__ */ __name(() => nextQueueCharge, "size")
|
|
231
|
-
}
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
__name(createBoundedReadable, "createBoundedReadable");
|
|
235
|
-
async function pumpBoundedInput(reader, pending, controller, textDecoder, hooks, limits, outboundRequests, inboundRequests, validateInboundMessage, fatalCleanEof, minimumQueueCharge, setNextQueueCharge, isCanceled) {
|
|
236
|
-
try {
|
|
237
|
-
while (true) {
|
|
238
|
-
const result = await reader.read();
|
|
239
|
-
if (result.done) {
|
|
240
|
-
if (isCanceled()) return;
|
|
241
|
-
if (pending.byteLength > 0) {
|
|
242
|
-
throw new NdJsonIncompleteFrameError(pending.byteLength);
|
|
243
|
-
}
|
|
244
|
-
if (fatalCleanEof) throw new NdJsonUnexpectedEofError();
|
|
245
|
-
controller.close();
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
if (!result.value) continue;
|
|
249
|
-
readBoundedChunk(
|
|
250
|
-
result.value,
|
|
251
|
-
pending,
|
|
252
|
-
controller,
|
|
253
|
-
textDecoder,
|
|
254
|
-
hooks,
|
|
255
|
-
limits,
|
|
256
|
-
outboundRequests,
|
|
257
|
-
inboundRequests,
|
|
258
|
-
validateInboundMessage,
|
|
259
|
-
minimumQueueCharge,
|
|
260
|
-
setNextQueueCharge
|
|
261
|
-
);
|
|
262
|
-
}
|
|
263
|
-
} catch (error) {
|
|
264
|
-
if (isCanceled()) return;
|
|
265
|
-
pending.clear();
|
|
266
|
-
callHook(hooks?.onTransportError, error);
|
|
267
|
-
await cancelReader(reader, error);
|
|
268
|
-
if (!isCanceled()) controller.close();
|
|
269
|
-
} finally {
|
|
270
|
-
pending.clear();
|
|
271
|
-
outboundRequests.clear();
|
|
272
|
-
inboundRequests.clear();
|
|
273
|
-
reader.releaseLock();
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
__name(pumpBoundedInput, "pumpBoundedInput");
|
|
277
|
-
function readLegacyChunk(chunk, pending, controller, textDecoder, hooks) {
|
|
278
|
-
let start = 0;
|
|
279
|
-
let newline = chunk.indexOf(10, start);
|
|
280
|
-
while (newline !== -1) {
|
|
281
|
-
const lineBytes = takeLegacyLineBytes(
|
|
282
|
-
pending,
|
|
283
|
-
chunk.subarray(start, newline)
|
|
284
|
-
);
|
|
285
|
-
handleLegacyLine(lineBytes, controller, textDecoder, hooks);
|
|
286
|
-
start = newline + 1;
|
|
287
|
-
newline = chunk.indexOf(10, start);
|
|
288
|
-
}
|
|
289
|
-
if (start < chunk.length) {
|
|
290
|
-
pending.push(chunk.subarray(start));
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
__name(readLegacyChunk, "readLegacyChunk");
|
|
294
|
-
function readBoundedChunk(chunk, pending, controller, textDecoder, hooks, limits, outboundRequests, inboundRequests, validateInboundMessage, minimumQueueCharge, setNextQueueCharge) {
|
|
295
|
-
let start = 0;
|
|
296
|
-
let newline = chunk.indexOf(10, start);
|
|
297
|
-
while (newline !== -1) {
|
|
298
|
-
const current = chunk.subarray(start, newline);
|
|
299
|
-
const frameBytes = pending.byteLength + current.byteLength + 1;
|
|
300
|
-
assertFrameSize("received", limits.maxFrameBytes, frameBytes);
|
|
301
|
-
if (pending.isJsonWhitespaceLine(current)) {
|
|
302
|
-
pending.clear();
|
|
303
|
-
start = newline + 1;
|
|
304
|
-
newline = chunk.indexOf(10, start);
|
|
305
|
-
continue;
|
|
306
|
-
}
|
|
307
|
-
const queueCharge = Math.max(frameBytes, minimumQueueCharge);
|
|
308
|
-
const availableBytes = controller.desiredSize;
|
|
309
|
-
if (availableBytes === null || queueCharge > availableBytes) {
|
|
310
|
-
throw new NdJsonQueueLimitError(
|
|
311
|
-
limits.maxQueuedMessages,
|
|
312
|
-
limits.maxQueuedBytes,
|
|
313
|
-
queueCharge,
|
|
314
|
-
Math.max(0, availableBytes ?? 0)
|
|
315
|
-
);
|
|
316
|
-
}
|
|
317
|
-
setNextQueueCharge(queueCharge);
|
|
318
|
-
handleBoundedLine(
|
|
319
|
-
pending.take(current),
|
|
320
|
-
controller,
|
|
321
|
-
textDecoder,
|
|
322
|
-
hooks,
|
|
323
|
-
outboundRequests,
|
|
324
|
-
inboundRequests,
|
|
325
|
-
validateInboundMessage
|
|
326
|
-
);
|
|
327
|
-
start = newline + 1;
|
|
328
|
-
newline = chunk.indexOf(10, start);
|
|
329
|
-
}
|
|
330
|
-
if (start < chunk.length) pending.append(chunk.subarray(start));
|
|
331
|
-
}
|
|
332
|
-
__name(readBoundedChunk, "readBoundedChunk");
|
|
333
|
-
function takeLegacyLineBytes(pending, current) {
|
|
334
|
-
if (pending.length === 0) return current;
|
|
335
|
-
const totalLength = pending.reduce((sum, part) => sum + part.byteLength, 0) + current.byteLength;
|
|
336
|
-
const line = new Uint8Array(totalLength);
|
|
337
|
-
let offset = 0;
|
|
338
|
-
for (const part of pending) {
|
|
339
|
-
line.set(part, offset);
|
|
340
|
-
offset += part.byteLength;
|
|
341
|
-
}
|
|
342
|
-
line.set(current, offset);
|
|
343
|
-
pending.length = 0;
|
|
344
|
-
return line;
|
|
345
|
-
}
|
|
346
|
-
__name(takeLegacyLineBytes, "takeLegacyLineBytes");
|
|
347
|
-
function handleLegacyLine(lineBytes, controller, textDecoder, hooks) {
|
|
348
|
-
const line = textDecoder.decode(lineBytes);
|
|
349
|
-
const trimmedLine = line.trim();
|
|
350
|
-
if (!trimmedLine) return;
|
|
351
|
-
try {
|
|
352
|
-
const message = JSON.parse(trimmedLine);
|
|
353
|
-
controller.enqueue(message);
|
|
354
|
-
reportReceivedMessage(lineBytes, message, hooks);
|
|
355
|
-
} catch (err) {
|
|
356
|
-
console.error("Failed to parse JSON message:", trimmedLine, err);
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
__name(handleLegacyLine, "handleLegacyLine");
|
|
360
|
-
function handleBoundedLine(lineBytes, controller, textDecoder, hooks, outboundRequests, inboundRequests, validateInboundMessage) {
|
|
361
|
-
const line = textDecoder.decode(lineBytes);
|
|
362
|
-
const trimmedLine = line.trim();
|
|
363
|
-
if (!trimmedLine) return;
|
|
364
|
-
let parsed;
|
|
365
|
-
try {
|
|
366
|
-
parsed = JSON.parse(trimmedLine);
|
|
367
|
-
} catch {
|
|
368
|
-
throw logBoundedInvalidMessage("ndjson_parse_error", lineBytes);
|
|
369
|
-
}
|
|
370
|
-
if (!isJsonRpcMessage(parsed)) {
|
|
371
|
-
throw logBoundedInvalidMessage("ndjson_invalid_message", lineBytes);
|
|
372
|
-
}
|
|
373
|
-
const isResponse = isJsonRpcResponseMessage(parsed);
|
|
374
|
-
if (!isResponse && !hasBoundedJsonStructure(parsed) || validateInboundMessage && !validateInboundMessage(parsed)) {
|
|
375
|
-
throw logBoundedInvalidMessage("ndjson_invalid_message", lineBytes);
|
|
376
|
-
}
|
|
377
|
-
if (isJsonRpcResponseMessage(parsed) && !outboundRequests?.consumeResponse(parsed.id)) {
|
|
378
|
-
throw logBoundedInvalidMessage("ndjson_invalid_message", lineBytes);
|
|
379
|
-
}
|
|
380
|
-
inboundRequests?.admit(parsed, lineBytes.byteLength + 1);
|
|
381
|
-
const message = installBoundedLogRedaction(parsed);
|
|
382
|
-
controller.enqueue(message);
|
|
383
|
-
reportReceivedMessage(lineBytes, message, hooks);
|
|
384
|
-
}
|
|
385
|
-
__name(handleBoundedLine, "handleBoundedLine");
|
|
386
|
-
function installBoundedLogRedaction(message) {
|
|
387
|
-
Object.defineProperty(message, inspect.custom, {
|
|
388
|
-
configurable: false,
|
|
389
|
-
enumerable: false,
|
|
390
|
-
value: inspectBoundedJsonRpcMessage,
|
|
391
|
-
writable: false
|
|
392
|
-
});
|
|
393
|
-
return message;
|
|
394
|
-
}
|
|
395
|
-
__name(installBoundedLogRedaction, "installBoundedLogRedaction");
|
|
396
|
-
function inspectBoundedJsonRpcMessage() {
|
|
397
|
-
return {
|
|
398
|
-
jsonrpc: "2.0",
|
|
399
|
-
messageType: "method" in this ? "id" in this ? "request" : "notification" : "response",
|
|
400
|
-
payloadOmitted: true
|
|
401
|
-
};
|
|
402
|
-
}
|
|
403
|
-
__name(inspectBoundedJsonRpcMessage, "inspectBoundedJsonRpcMessage");
|
|
404
|
-
function isJsonRpcMessage(value) {
|
|
405
|
-
if (!isRecord(value) || value["jsonrpc"] !== "2.0") return false;
|
|
406
|
-
const hasMethod = Object.hasOwn(value, "method");
|
|
407
|
-
const hasId = Object.hasOwn(value, "id");
|
|
408
|
-
if (hasMethod) {
|
|
409
|
-
return typeof value["method"] === "string" && Buffer.byteLength(value["method"]) <= MAX_JSON_RPC_METHOD_BYTES && (!hasId || isJsonRpcId(value["id"]));
|
|
410
|
-
}
|
|
411
|
-
if (!hasId || !isJsonRpcId(value["id"])) return false;
|
|
412
|
-
const hasResult = Object.hasOwn(value, "result");
|
|
413
|
-
const hasError = Object.hasOwn(value, "error");
|
|
414
|
-
if (hasResult === hasError) return false;
|
|
415
|
-
if (!hasError) return true;
|
|
416
|
-
const error = value["error"];
|
|
417
|
-
return isRecord(error) && typeof error["code"] === "number" && Number.isFinite(error["code"]) && typeof error["message"] === "string" && Buffer.byteLength(error["message"]) <= MAX_JSON_RPC_ERROR_MESSAGE_BYTES;
|
|
418
|
-
}
|
|
419
|
-
__name(isJsonRpcMessage, "isJsonRpcMessage");
|
|
420
|
-
function isRecord(value) {
|
|
421
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
422
|
-
}
|
|
423
|
-
__name(isRecord, "isRecord");
|
|
424
|
-
function hasBoundedJsonStructure(value) {
|
|
425
|
-
const stack = [{ value, depth: 1 }];
|
|
426
|
-
let nodes = 0;
|
|
427
|
-
while (stack.length > 0) {
|
|
428
|
-
const current = stack.pop();
|
|
429
|
-
nodes++;
|
|
430
|
-
if (nodes > MAX_JSON_NODES || current.depth > MAX_JSON_DEPTH) return false;
|
|
431
|
-
if (Array.isArray(current.value)) {
|
|
432
|
-
if (current.value.length > MAX_JSON_ARRAY_LENGTH) return false;
|
|
433
|
-
for (let index = current.value.length - 1; index >= 0; index--) {
|
|
434
|
-
if (nodes + stack.length >= MAX_JSON_NODES || current.depth + 1 > MAX_JSON_DEPTH) {
|
|
435
|
-
return false;
|
|
436
|
-
}
|
|
437
|
-
stack.push({
|
|
438
|
-
value: current.value[index],
|
|
439
|
-
depth: current.depth + 1
|
|
440
|
-
});
|
|
441
|
-
}
|
|
442
|
-
} else if (isRecord(current.value)) {
|
|
443
|
-
for (const key in current.value) {
|
|
444
|
-
if (!Object.hasOwn(current.value, key)) continue;
|
|
445
|
-
if (nodes + stack.length >= MAX_JSON_NODES || current.depth + 1 > MAX_JSON_DEPTH) {
|
|
446
|
-
return false;
|
|
447
|
-
}
|
|
448
|
-
stack.push({
|
|
449
|
-
value: current.value[key],
|
|
450
|
-
depth: current.depth + 1
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
return true;
|
|
456
|
-
}
|
|
457
|
-
__name(hasBoundedJsonStructure, "hasBoundedJsonStructure");
|
|
458
|
-
function isJsonRpcId(value) {
|
|
459
|
-
return value === null || typeof value === "string" && Buffer.byteLength(value) <= MAX_JSON_RPC_ID_BYTES || typeof value === "number" && Number.isFinite(value);
|
|
460
|
-
}
|
|
461
|
-
__name(isJsonRpcId, "isJsonRpcId");
|
|
462
|
-
function isJsonRpcRequestMessage(value) {
|
|
463
|
-
return "method" in value && "id" in value && typeof value.method === "string" && isJsonRpcId(value.id);
|
|
464
|
-
}
|
|
465
|
-
__name(isJsonRpcRequestMessage, "isJsonRpcRequestMessage");
|
|
466
|
-
function isJsonRpcResponseMessage(value) {
|
|
467
|
-
return !("method" in value) && "id" in value;
|
|
468
|
-
}
|
|
469
|
-
__name(isJsonRpcResponseMessage, "isJsonRpcResponseMessage");
|
|
470
|
-
var BoundedInboundRequestLedger = class {
|
|
471
|
-
constructor(limits) {
|
|
472
|
-
this.limits = limits;
|
|
473
|
-
}
|
|
474
|
-
static {
|
|
475
|
-
__name(this, "BoundedInboundRequestLedger");
|
|
476
|
-
}
|
|
477
|
-
requests = /* @__PURE__ */ new Map();
|
|
478
|
-
retainedBytes = 0;
|
|
479
|
-
admit(message, frameBytes) {
|
|
480
|
-
if (!isJsonRpcRequestMessage(message)) return;
|
|
481
|
-
const availableBytes = Math.max(
|
|
482
|
-
0,
|
|
483
|
-
this.limits.maxQueuedBytes - this.retainedBytes
|
|
484
|
-
);
|
|
485
|
-
if (this.requests.has(message.id) || this.requests.size >= this.limits.maxQueuedMessages || frameBytes > availableBytes) {
|
|
486
|
-
throw new NdJsonQueueLimitError(
|
|
487
|
-
this.limits.maxQueuedMessages,
|
|
488
|
-
this.limits.maxQueuedBytes,
|
|
489
|
-
frameBytes,
|
|
490
|
-
this.requests.has(message.id) ? 0 : availableBytes
|
|
491
|
-
);
|
|
492
|
-
}
|
|
493
|
-
this.requests.set(message.id, frameBytes);
|
|
494
|
-
this.retainedBytes += frameBytes;
|
|
495
|
-
}
|
|
496
|
-
release(message) {
|
|
497
|
-
if (!isJsonRpcResponseMessage(message)) return;
|
|
498
|
-
const frameBytes = this.requests.get(message.id);
|
|
499
|
-
if (frameBytes === void 0) return;
|
|
500
|
-
this.requests.delete(message.id);
|
|
501
|
-
this.retainedBytes -= frameBytes;
|
|
502
|
-
}
|
|
503
|
-
clear() {
|
|
504
|
-
this.requests.clear();
|
|
505
|
-
this.retainedBytes = 0;
|
|
506
|
-
}
|
|
507
|
-
};
|
|
508
|
-
var BoundedOutstandingRequestLedger = class {
|
|
509
|
-
constructor(limits) {
|
|
510
|
-
this.limits = limits;
|
|
511
|
-
}
|
|
512
|
-
static {
|
|
513
|
-
__name(this, "BoundedOutstandingRequestLedger");
|
|
514
|
-
}
|
|
515
|
-
requests = /* @__PURE__ */ new Map();
|
|
516
|
-
retainedBytes = 0;
|
|
517
|
-
admit(id, frameBytes) {
|
|
518
|
-
const availableBytes = Math.max(
|
|
519
|
-
0,
|
|
520
|
-
this.limits.maxQueuedBytes - this.retainedBytes
|
|
521
|
-
);
|
|
522
|
-
if (this.requests.has(id) || this.requests.size >= this.limits.maxQueuedMessages || frameBytes > availableBytes) {
|
|
523
|
-
throw new NdJsonQueueLimitError(
|
|
524
|
-
this.limits.maxQueuedMessages,
|
|
525
|
-
this.limits.maxQueuedBytes,
|
|
526
|
-
frameBytes,
|
|
527
|
-
this.requests.has(id) ? 0 : availableBytes
|
|
528
|
-
);
|
|
529
|
-
}
|
|
530
|
-
this.requests.set(id, frameBytes);
|
|
531
|
-
this.retainedBytes += frameBytes;
|
|
532
|
-
}
|
|
533
|
-
consumeResponse(id) {
|
|
534
|
-
return this.discard(id);
|
|
535
|
-
}
|
|
536
|
-
discard(id) {
|
|
537
|
-
const frameBytes = this.requests.get(id);
|
|
538
|
-
if (frameBytes === void 0) return false;
|
|
539
|
-
this.requests.delete(id);
|
|
540
|
-
this.retainedBytes -= frameBytes;
|
|
541
|
-
return true;
|
|
542
|
-
}
|
|
543
|
-
clear() {
|
|
544
|
-
this.requests.clear();
|
|
545
|
-
this.retainedBytes = 0;
|
|
546
|
-
}
|
|
547
|
-
};
|
|
548
|
-
function logBoundedInvalidMessage(errorKind, lineBytes) {
|
|
549
|
-
const bytes = jsonPayloadByteLength(lineBytes);
|
|
550
|
-
const digest = createHash("sha256").update(lineBytes.subarray(0, bytes)).digest("hex");
|
|
551
|
-
console.error("Failed to parse JSON message:", {
|
|
552
|
-
errorKind,
|
|
553
|
-
bytes,
|
|
554
|
-
sha256: digest,
|
|
555
|
-
payloadOmitted: true
|
|
556
|
-
});
|
|
557
|
-
return new NdJsonInvalidMessageError(errorKind, bytes);
|
|
558
|
-
}
|
|
559
|
-
__name(logBoundedInvalidMessage, "logBoundedInvalidMessage");
|
|
560
|
-
function reportReceivedMessage(lineBytes, message, hooks) {
|
|
561
|
-
const bytes = jsonPayloadByteLength(lineBytes);
|
|
562
|
-
callHook(hooks?.onMessageReceived, bytes);
|
|
563
|
-
callHook(hooks?.onMessageObserved, {
|
|
564
|
-
direction: "received",
|
|
565
|
-
bytes,
|
|
566
|
-
message
|
|
567
|
-
});
|
|
568
|
-
}
|
|
569
|
-
__name(reportReceivedMessage, "reportReceivedMessage");
|
|
570
|
-
function jsonPayloadByteLength(lineBytes) {
|
|
571
|
-
return lineBytes[lineBytes.byteLength - 1] === 13 ? lineBytes.byteLength - 1 : lineBytes.byteLength;
|
|
572
|
-
}
|
|
573
|
-
__name(jsonPayloadByteLength, "jsonPayloadByteLength");
|
|
574
|
-
function validateNdJsonStreamLimits(limits) {
|
|
575
|
-
const values = [
|
|
576
|
-
["maxFrameBytes", limits.maxFrameBytes],
|
|
577
|
-
["maxQueuedMessages", limits.maxQueuedMessages],
|
|
578
|
-
["maxQueuedBytes", limits.maxQueuedBytes]
|
|
579
|
-
];
|
|
580
|
-
for (const [name, value] of values) {
|
|
581
|
-
if (!Number.isSafeInteger(value) || value <= 0) {
|
|
582
|
-
throw new RangeError(`${name} must be a positive safe integer`);
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
__name(validateNdJsonStreamLimits, "validateNdJsonStreamLimits");
|
|
587
|
-
function assertFrameSize(direction, limitBytes, observedBytes) {
|
|
588
|
-
if (observedBytes > limitBytes) {
|
|
589
|
-
throw new NdJsonFrameTooLargeError(direction, limitBytes, observedBytes);
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
__name(assertFrameSize, "assertFrameSize");
|
|
593
|
-
async function cancelReader(reader, reason) {
|
|
594
|
-
try {
|
|
595
|
-
await reader.cancel(reason);
|
|
596
|
-
} catch {
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
__name(cancelReader, "cancelReader");
|
|
600
|
-
function callHook(hook, value) {
|
|
601
|
-
try {
|
|
602
|
-
hook?.(value);
|
|
603
|
-
} catch {
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
__name(callHook, "callHook");
|
|
607
|
-
var BoundedFrameBuffer = class {
|
|
608
|
-
constructor(maxFrameBytes) {
|
|
609
|
-
this.maxFrameBytes = maxFrameBytes;
|
|
610
|
-
}
|
|
611
|
-
static {
|
|
612
|
-
__name(this, "BoundedFrameBuffer");
|
|
613
|
-
}
|
|
614
|
-
buffer;
|
|
615
|
-
length = 0;
|
|
616
|
-
get byteLength() {
|
|
617
|
-
return this.length;
|
|
618
|
-
}
|
|
619
|
-
append(bytes) {
|
|
620
|
-
const requiredBytes = this.length + bytes.byteLength;
|
|
621
|
-
assertFrameSize("received", this.maxFrameBytes, requiredBytes);
|
|
622
|
-
if (requiredBytes === 0) return;
|
|
623
|
-
if (!this.buffer || this.buffer.byteLength < requiredBytes) {
|
|
624
|
-
const doubledCapacity = Math.min(
|
|
625
|
-
this.maxFrameBytes,
|
|
626
|
-
Math.max(1024, (this.buffer?.byteLength ?? 0) * 2)
|
|
627
|
-
);
|
|
628
|
-
const next = new Uint8Array(Math.max(requiredBytes, doubledCapacity));
|
|
629
|
-
if (this.buffer) next.set(this.buffer.subarray(0, this.length));
|
|
630
|
-
this.buffer = next;
|
|
631
|
-
}
|
|
632
|
-
this.buffer.set(bytes, this.length);
|
|
633
|
-
this.length = requiredBytes;
|
|
634
|
-
}
|
|
635
|
-
take(current) {
|
|
636
|
-
if (this.length === 0) return current;
|
|
637
|
-
const line = new Uint8Array(this.length + current.byteLength);
|
|
638
|
-
line.set(this.buffer.subarray(0, this.length));
|
|
639
|
-
line.set(current, this.length);
|
|
640
|
-
this.clear();
|
|
641
|
-
return line;
|
|
642
|
-
}
|
|
643
|
-
isJsonWhitespaceLine(current) {
|
|
644
|
-
if (this.buffer) {
|
|
645
|
-
for (let index = 0; index < this.length; index++) {
|
|
646
|
-
if (!isJsonWhitespaceByte(this.buffer[index])) return false;
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
for (const byte of current) {
|
|
650
|
-
if (!isJsonWhitespaceByte(byte)) return false;
|
|
651
|
-
}
|
|
652
|
-
return true;
|
|
653
|
-
}
|
|
654
|
-
clear() {
|
|
655
|
-
this.buffer = void 0;
|
|
656
|
-
this.length = 0;
|
|
657
|
-
}
|
|
658
|
-
};
|
|
659
|
-
function isJsonWhitespaceByte(byte) {
|
|
660
|
-
return byte === 32 || byte === 9 || byte === 13;
|
|
661
|
-
}
|
|
662
|
-
__name(isJsonWhitespaceByte, "isJsonWhitespaceByte");
|
|
663
|
-
|
|
664
43
|
// packages/acp-bridge/src/process-registry.ts
|
|
665
44
|
init_esbuild_shims();
|
|
666
45
|
var TERM_GRACE_MS = 5e3;
|
|
@@ -1301,7 +680,6 @@ function scrubChildEnv(source, scrubbed, overrides) {
|
|
|
1301
680
|
__name(scrubChildEnv, "scrubChildEnv");
|
|
1302
681
|
|
|
1303
682
|
export {
|
|
1304
|
-
ndJsonStream,
|
|
1305
683
|
DAEMON_ACP_NDJSON_LIMITS,
|
|
1306
684
|
getAcpMemoryArgs,
|
|
1307
685
|
createStderrForwarder,
|
|
@@ -1311,11 +689,11 @@ export {
|
|
|
1311
689
|
};
|
|
1312
690
|
/**
|
|
1313
691
|
* @license
|
|
1314
|
-
* Copyright
|
|
692
|
+
* Copyright 2025 Qwen Team
|
|
1315
693
|
* SPDX-License-Identifier: Apache-2.0
|
|
1316
694
|
*/
|
|
1317
695
|
/**
|
|
1318
696
|
* @license
|
|
1319
|
-
* Copyright
|
|
697
|
+
* Copyright 2026 Qwen Team
|
|
1320
698
|
* SPDX-License-Identifier: Apache-2.0
|
|
1321
699
|
*/
|
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
} from "./chunk-CPBF7KYF.js";
|
|
11
11
|
import {
|
|
12
12
|
atomicWriteJSON
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-23RFD54N.js";
|
|
14
14
|
import {
|
|
15
15
|
Storage,
|
|
16
16
|
isNodeError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-UHQFIS7N.js";
|
|
18
18
|
import {
|
|
19
19
|
init_esbuild_shims
|
|
20
20
|
} from "./chunk-5O2XNYP6.js";
|