@qwen-code/qwen-code 0.22.2-preview.1 → 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 +10 -10
- 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-5D2L22SF.js → StandaloneSessionPicker-AVLI6VJP.js} +76 -76
- package/chunks/{acpAgent-4DCKLA32.js → acpAgent-MXEAN54C.js} +969 -255
- package/chunks/{agent-B4AFZL6H.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-QR4AHMGQ.js → chunk-2K6ORIHJ.js} +13 -13
- package/chunks/{chunk-3D6PDLNJ.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-JSY43GMI.js → chunk-3DXFGHAJ.js} +185 -174
- package/chunks/{chunk-T45CL2NT.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-J3CBIEDS.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-NEZZHGEI.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-XMSMTU6H.js → chunk-4JWNNLPT.js} +4 -4
- package/chunks/{chunk-ALTQLFEG.js → chunk-4MQEPP3Y.js} +9 -84
- package/chunks/{chunk-3JKUX4PB.js → chunk-5O72BNDD.js} +8 -8
- package/chunks/{chunk-IKN3IUJP.js → chunk-5XBFCMWD.js} +2 -2
- package/chunks/{chunk-2YDYDDE2.js → chunk-66KDY3LV.js} +3 -3
- package/chunks/{chunk-VOEMVOM4.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-BHTJAO36.js → chunk-6LFJEACX.js} +4 -4
- package/chunks/{chunk-AP7WZONS.js → chunk-6LFTG244.js} +8 -8
- package/chunks/{chunk-PVBT5QPD.js → chunk-6PJOTWAN.js} +1 -1
- package/chunks/{chunk-5CMWFBML.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-H3HZ4AWW.js → chunk-7UYV53BC.js} +1 -1
- package/chunks/{chunk-FCSWZAS3.js → chunk-A7YP63XN.js} +4 -4
- package/chunks/{chunk-E4I5MVBR.js → chunk-ABS25QER.js} +1 -1
- package/chunks/{chunk-WZ3QKPMQ.js → chunk-AGR5UROZ.js} +5 -5
- package/chunks/{chunk-5T4LWWNX.js → chunk-B7CDU2SL.js} +2 -2
- package/chunks/{chunk-HPECDZ6X.js → chunk-BAJKAAOY.js} +68 -64
- package/chunks/{chunk-WXDZZFH3.js → chunk-BBWV7ONL.js} +3 -3
- package/chunks/{chunk-4TPAG3O7.js → chunk-BFPESSTR.js} +1 -1
- package/chunks/{chunk-DID6IRGC.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-IOGKXPL3.js → chunk-C6K43ZDE.js} +4 -4
- package/chunks/{chunk-7OBH4AM2.js → chunk-CAJTKR6W.js} +5 -5
- package/chunks/{chunk-SUE2ZMUH.js → chunk-CCBZDVUA.js} +30 -25
- package/chunks/{chunk-U45D46O5.js → chunk-CMHFCLBU.js} +1 -1
- package/chunks/{chunk-AWFZDYSD.js → chunk-CPGJJJLU.js} +1 -1
- package/chunks/{chunk-LRKMQPMD.js → chunk-CQH5KTKC.js} +1 -1
- package/chunks/{chunk-3WBMPR3S.js → chunk-CSMI4FP5.js} +1 -1
- package/chunks/{chunk-JECO75XD.js → chunk-D5LUXLUH.js} +2 -2
- package/chunks/{chunk-UWICO5KN.js → chunk-DZWPESIF.js} +3 -3
- package/chunks/{chunk-I6DY753S.js → chunk-EFUM7RVY.js} +2 -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-GTUZ3R6I.js → chunk-F5SZP77N.js} +310 -78
- package/chunks/{chunk-SQPOJ4ZI.js → chunk-F6FV3C5K.js} +12 -7
- package/chunks/{chunk-TDQBVEPK.js → chunk-F7TNAPZ4.js} +9 -7
- package/chunks/{chunk-F7M6ZFGU.js → chunk-FBSSIAAQ.js} +6 -6
- package/chunks/{chunk-2FN2HNTI.js → chunk-FDY5RMGH.js} +2 -2
- package/chunks/{chunk-PTQF7WRA.js → chunk-FY76G3G5.js} +5 -5
- package/chunks/{chunk-X3XGCJ32.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-5JCZ3UKB.js → chunk-HVQ3B7FF.js} +2 -2
- package/chunks/{chunk-VBF4KZRQ.js → chunk-IJKTMLBE.js} +1 -1
- package/chunks/{chunk-R7G7GKOX.js → chunk-IK5BW3CS.js} +2 -2
- package/chunks/{chunk-UCQOSV6A.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-XUX6O2ZT.js → chunk-JHS74YAB.js} +4 -1
- package/chunks/{chunk-KPF2K55D.js → chunk-JSC3H3TD.js} +27 -4
- package/chunks/{chunk-CZFQ62RM.js → chunk-JSHHYW6T.js} +4 -4
- package/chunks/{chunk-MCKJTBZN.js → chunk-JU4EEXC7.js} +2 -2
- package/chunks/{chunk-T6OODF2U.js → chunk-JWALNCLT.js} +1 -1
- package/chunks/{chunk-CDUN63IN.js → chunk-K2NQPH5D.js} +3 -3
- package/chunks/{chunk-7UJTY5V3.js → chunk-KEKZFOL6.js} +1 -1
- package/chunks/{chunk-5URK47RN.js → chunk-KUX5D6DK.js} +1197 -336
- package/chunks/{chunk-OF2DPXUS.js → chunk-L2M46FP5.js} +116 -21
- package/chunks/{chunk-6US7BF3G.js → chunk-L6BZRIUL.js} +2 -2
- package/chunks/{chunk-TR7G7XFQ.js → chunk-L6YT5H34.js} +4 -4
- package/chunks/{chunk-W2WRNJKX.js → chunk-LDP5OD6N.js} +5 -5
- package/chunks/{chunk-OLS3MAXQ.js → chunk-LXIBMVRN.js} +7 -7
- package/chunks/{chunk-GNMJNDZE.js → chunk-M6FOJXW3.js} +1 -1
- package/chunks/{chunk-J5352S3S.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-LWLEPXKK.js → chunk-O2UN57NX.js} +2 -2
- package/chunks/{chunk-5SM2AK65.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-JLU3FPQR.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-KQYW2GB5.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-HABT2Z7R.js → chunk-Q26AYA62.js} +4 -4
- package/chunks/{chunk-WEGXPP5E.js → chunk-QFCDF5PL.js} +1 -1
- package/chunks/{chunk-R3T33BG5.js → chunk-QP4C6WCE.js} +3 -3
- package/chunks/{chunk-Z6L3C4VF.js → chunk-R4PMVSR5.js} +27 -25
- package/chunks/{chunk-AKQA3WCH.js → chunk-RIEFGNTP.js} +579 -3419
- package/chunks/{chunk-ATLGYSYH.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-VYWCFWI5.js → chunk-RUGNCYNO.js} +11 -633
- package/chunks/{chunk-ZLTEQYNC.js → chunk-SFPGAQUL.js} +2 -2
- package/chunks/{chunk-TMGAS5TO.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-BPMVPWBT.js → chunk-T32W2JHI.js} +6 -6
- package/chunks/chunk-T3WXYEZ4.js +304 -0
- package/chunks/{chunk-XIRDDFRS.js → chunk-TGWAQ5RB.js} +695 -294
- 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-ZGWDHSUM.js → chunk-V4QXXQJ2.js} +3 -3
- package/chunks/{chunk-XR7OIAQF.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-66GIFJ63.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-TFV4RXPU.js → chunk-Y6LSMB6J.js} +1 -1
- package/chunks/{chunk-2SERYG4T.js → chunk-YTDVNSUQ.js} +1 -1
- package/chunks/{chunk-AA7VBRBG.js → chunk-Z7FLBQPR.js} +7 -7
- package/chunks/{chunk-4K44OMLI.js → chunk-Z7TGYN5F.js} +3 -3
- package/chunks/{chunk-FJAITR4L.js → chunk-ZFKOCECU.js} +2 -2
- package/chunks/chunk-ZGXYO7DY.js +3416 -0
- package/chunks/{chunk-OT4YKUUV.js → chunk-ZU4UDIWX.js} +2 -2
- package/chunks/config-utils-BBOCOGZW.js +113 -0
- package/chunks/contextCommand-EET67MQ2.js +108 -0
- package/chunks/{core-runtime-CEJRHCRF.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-DFZVIG56.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-L6ZUFKF7.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-2G3EKQEU.js → daemon-trust-policy-monitor-B5U6TQX5.js} +59 -59
- package/chunks/deferred-core-runtime-BBVIOP24.js +116 -0
- package/chunks/{display-image-6KHQNEAE.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-ZERGX3RV.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-W2RP3P5B.js → enterPlanMode-PKNF35FE.js} +41 -41
- package/chunks/{environment-ZBJ23YVR.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-VFJ5R5DD.js → exitPlanMode-UE4FGCY4.js} +41 -41
- package/chunks/{fast-path-4MWBCEUF.js → fast-path-773PV7PU.js} +5 -5
- package/chunks/{gemini-X5GQHQYF.js → gemini-IP4FJAP5.js} +101 -100
- package/chunks/{geminiContentGenerator-UDSWXZXL.js → geminiContentGenerator-PUNEBWJW.js} +8 -8
- package/chunks/{glob-DKTNG32L.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-KX7FEKJJ.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-73C7TKDK.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-H2KOLQZU.js → managed-npm-update-5TEV2E3J.js} +54 -54
- package/chunks/mcp-QGG5NMJJ.js +112 -0
- package/chunks/{monitor-TGCMNJJH.js → monitor-FI7PY36Z.js} +41 -41
- package/chunks/nonInteractiveCli-4LO2TL72.js +186 -0
- package/chunks/{notebook-edit-YEUNZYDX.js → notebook-edit-TPGMGBST.js} +42 -42
- package/chunks/{openaiContentGenerator-J7LD4VSL.js → openaiContentGenerator-SUCYANUZ.js} +24 -24
- package/chunks/pidfile-JMF2CLMY.js +113 -0
- package/chunks/{processUtils-ZHFC7CSL.js → processUtils-IQZBYWSB.js} +2 -2
- package/chunks/prompt-terminal-ledger-DCZO6S7C.js +107 -0
- package/chunks/{qwenContentGenerator-YEWWK3JQ.js → qwenContentGenerator-J4TXFGJT.js} +46 -46
- package/chunks/{qwenOAuth2-JIYAWXTW.js → qwenOAuth2-RF33DNZW.js} +8 -8
- package/chunks/{read-file-ZQI3WPVK.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-6IW46GD7.js → request-shutdown-BCLA3JV2.js} +7 -7
- package/chunks/resumeHistoryUtils-CZ4JRDVW.js +120 -0
- package/chunks/{ripGrep-46N4FLOS.js → ripGrep-R6B6HWPX.js} +17 -17
- package/chunks/{run-qwen-serve-WHWU7NZ6.js → run-qwen-serve-TPHZMSXJ.js} +148 -319
- package/chunks/{runtime-E7BSPWQP.js → runtime-TTIGSBM4.js} +62 -62
- package/chunks/scheduled-tasks-QB4ZVUQS.js +129 -0
- package/chunks/{scheduler-TJPATFOM.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-OXZK6USO.js → send-message-Y5I6NYAM.js} +7 -7
- package/chunks/serve-MXXCDAQN.js +120 -0
- package/chunks/{server-AXCN7QBJ.js → server-DFUSSSHI.js} +19760 -19444
- package/chunks/{session-HO4US3AG.js → session-3TEHNENZ.js} +100 -99
- package/chunks/{settings-B2PFJJN4.js → settings-VOZYKLTT.js} +58 -58
- package/chunks/{shell-7XMSANI3.js → shell-6RTKZVMI.js} +41 -41
- package/chunks/{skill-NL3VH562.js → skill-FEOKFX26.js} +18 -18
- package/chunks/{skill-settings-SKMN5YXC.js → skill-settings-VA4XVYVL.js} +58 -58
- package/chunks/spawnChannel-F6WVP723.js +114 -0
- package/chunks/{standalone-update-XOCWGXAH.js → standalone-update-RGILUQVK.js} +55 -55
- package/chunks/{startInteractiveUI-G2XKSCQ7.js → startInteractiveUI-WHJPFOGH.js} +2757 -2223
- package/chunks/{syntheticOutput-5AJ444QT.js → syntheticOutput-ML43GEFN.js} +3 -3
- package/chunks/{task-create-TY7P6UHG.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-O4IGDPCK.js → task-update-N536I4GQ.js} +11 -11
- package/chunks/{team-create-IYBUOORE.js → team-create-QYSWCYCL.js} +41 -41
- package/chunks/{team-delete-YWFXX77L.js → team-delete-FJRFX33M.js} +5 -5
- package/chunks/{team-plan-approval-YKU57LBM.js → team-plan-approval-P7DAD644.js} +41 -41
- package/chunks/{terminal-image-renderer-NREKYTAD.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-4Q3KASIQ.js → tool-search-F2EMIAPV.js} +17 -17
- package/chunks/total-session-admission-HTVTP4BS.js +116 -0
- package/chunks/{trustedFolders-OILZCHRD.js → trustedFolders-7OCNMUQE.js} +54 -54
- package/chunks/{update-relaunch-4DC2KKFS.js → update-relaunch-4GF3OXMB.js} +5 -5
- package/chunks/{updateCheck-AK4COHNK.js → updateCheck-7QBDXZRT.js} +56 -56
- package/chunks/useAutoAcceptIndicator-UI4SNL2O.js +122 -0
- package/chunks/{validateNonInterActiveAuth-YAE4YPO3.js → validateNonInterActiveAuth-BPPA563H.js} +96 -95
- package/chunks/{version-QFP7OGWX.js → version-ANP4TS6O.js} +1 -1
- package/chunks/{web-fetch-6T23IK6Q.js → web-fetch-QJADSAH3.js} +16 -16
- package/chunks/{web-search-WBWTCZK2.js → web-search-7TTQKEKM.js} +9 -9
- package/chunks/{workflow-FMAA3D4R.js → workflow-5XN6XSOT.js} +105 -60
- package/chunks/workspace-providers-status-PDFZWL5Q.js +116 -0
- package/chunks/{workspace-registration-store-CMMX7EPX.js → workspace-registration-store-XKVW2YVH.js} +1 -1
- package/chunks/{workspace-registry-WJLZPRTG.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-PJDQUTJL.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-WVYVFRXF.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-d-8xa8uz.js → abnfDiagram-VCTEODGH-uS-vtfs3.js} +1 -1
- package/web-shell/assets/{arc-BhB7CrGK.js → arc-BSTnk5pu.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-BDCd_IcJ.js → architectureDiagram-5GKGNRK7-DCMyiqzy.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-C-AHu6mi.js → blockDiagram-NRAW4CY4-C7_gt0r1.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-CFjQt0vl.js → c4Diagram-UCG6FXSJ-BeQg2L8B.js} +1 -1
- package/web-shell/assets/channel-CENAhErJ.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-DRjwqaDq.js → chunk-2Q5K7J3B-DnV9bKBe.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-eHM9noJE.js → chunk-5VM5RSS4-rT1GAcT7.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-CcSWUYn1.js → chunk-F27PBJKO-BcgSxqGA.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-DNr-RF5S.js → chunk-G27WJ6UU-Bw1ZhyZq.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-rVJHoNF8.js → chunk-JWPE2WC7-D4iDw-96.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-B2aX0Gzy.js → chunk-LCL6LL3I-D3MB3GTZ.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-DVp07n32.js → chunk-POPQ4Y6H-Cep2ndrS.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-C6QB_KUr.js → chunk-SVP7TREG-BuahMHJc.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-CLVxDNCy.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-B_aKX3A3.js → cose-bilkent-JH36ORCC-CGLLUbF8.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-BBw2pPUa.js → cynefin-OW5HDTMX-D6kDsRSh.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-WWPiBTwk.js → cynefinDiagram-5FMLGOSQ-CCy78qZx.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-CPtIdka-.js → dagre-3AP2YEHR-D5gJuJsf.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-Dj5og1Xi.js → diagram-S7CK7UJ4-ZwEZ5W__.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-CC_x70YC.js → diagram-UQ7AKVKN-B036APjv.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-rXMfsO4n.js → diagram-VSXAHHWV-BfDJ57Fq.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-DEmLYQbh.js → diagram-VX7I27RA-Wha0p5rT.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-B0ys6Vxx.js → diagram-Z3DM3KII-L20bz2K1.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-Bq6y6lKH.js → ebnfDiagram-PWID7BFC-D1ZM0Cp7.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-l69JeBZ4.js → erDiagram-SSCWMZ5O-CMtA19v8.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-Cm-EzGY4.js → flowDiagram-A5DVABFB-D96m326S.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-BRS9ZOp7.js → ganttDiagram-EL5Y4UJY-BuHiYG2o.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-DAMRKgLk.js → gitGraphDiagram-WWUBYQGX-Ck3NmkSw.js} +1 -1
- package/web-shell/assets/index-8hXIpvo4.js +1865 -0
- package/web-shell/assets/{index-Bncx8E8M.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-DasffaZp.js → infoDiagram-RXCK75RN-B6DAOyXe.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-CmRUt3C-.js → ishikawaDiagram-5VMMS53U-Bpg-joFo.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-DzhE_c1Z.js → journeyDiagram-EYS64GPL-BclrHzGa.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-BH5b6nn3.js → kanban-definition-3QL26DDD-5gJzNTYG.js} +1 -1
- package/web-shell/assets/{layout-BxoLK-LY.js → layout-CEz_1L8z.js} +1 -1
- package/web-shell/assets/{linear-CqDPvVI7.js → linear-CBjTq9Hc.js} +1 -1
- package/web-shell/assets/{mermaid.core-DBoN4plo.js → mermaid.core-Dzhbxx_I.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-DJJtXPEM.js → mindmap-definition-FBJOCRG2-DQdVqlBF.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-DmgPXP5l.js → pegDiagram-XKGWAZYB-D1JZlYXL.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-1ezjzcI5.js → pieDiagram-E7YTZNPT-BmkpYL0w.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-ChKARz3k.js → quadrantDiagram-AXDQQJYC-DRvD6co5.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-k7mNB_QT.js → railroadDiagram-O6MQD6OU-CEdjDuoo.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-B0XFsii0.js → requirementDiagram-EFPCY7ZU-BCHG-ie8.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-repJ2Ukk.js → sankeyDiagram-P5KCCOFB-C9cZMnye.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-D0gUSKGu.js → sequenceDiagram-WJ2MYXX4-DYHRV4zL.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-CE463F74.js → sizeCapture-X5ZJPWSS-DlK21aye.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-003zYtJa.js → stateDiagram-HBIQ2CUA-BrmZssvk.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-B2Q7XDaE.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-DBj8MFpu.js → swimlanes-XN3QIQJK-D9xfcayR.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DpZPOSbX.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-D2aCh4a9.js → timeline-definition-24CTP7MA-D4gdDL_d.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-BHMfWBpl.js → vennDiagram-4TSXK5OY-DdhIExjI.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-RdHAj66j.js → wardleyDiagram-VM6X3IG4-C9RS_Zof.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-BgJWOvq0.js → xychartDiagram-S5SC5T6Z-orRgmxWk.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/MaxSizedBox-BFVLZP2E.js +0 -112
- package/chunks/agent-headless-UCBCS4V4.js +0 -87
- package/chunks/bridge-FRNYLYY7.js +0 -119
- package/chunks/channel-settings-store-IV4KDL7N.js +0 -117
- package/chunks/chunk-JS73NNWF.js +0 -30
- package/chunks/chunk-VGHZT6JR.js +0 -51
- package/chunks/config-utils-PMX4QZ5Y.js +0 -113
- package/chunks/contextCommand-NZRLVAFC.js +0 -108
- package/chunks/daemon-status-provider-FTTYZEKN.js +0 -118
- package/chunks/daemon-trust-policy-WMGFPA3Z.js +0 -114
- package/chunks/deferred-core-runtime-BUFEFYNA.js +0 -116
- package/chunks/earlyInputCapture-ROPLMXA7.js +0 -109
- package/chunks/errors-U5KNAADB.js +0 -115
- package/chunks/handleAutoUpdate-W4BUYFT7.js +0 -111
- package/chunks/initializer-SNVVLS7Y.js +0 -115
- package/chunks/installationInfo-D4XGQNHJ.js +0 -109
- package/chunks/list-WYECMLXZ.js +0 -118
- package/chunks/loadedSettingsAdapter-5WZBXBCR.js +0 -112
- package/chunks/mcp-CBWAROY3.js +0 -112
- package/chunks/nonInteractiveCli-O232UUV7.js +0 -185
- package/chunks/pidfile-MSPQ255Y.js +0 -113
- package/chunks/prompt-terminal-ledger-YPGMNDXT.js +0 -107
- package/chunks/resumeHistoryUtils-35D4KAVT.js +0 -120
- package/chunks/serve-WQ54UIYG.js +0 -120
- package/chunks/spawnChannel-NE43EEO3.js +0 -113
- package/chunks/theme-manager-IJS6OICX.js +0 -104
- package/chunks/total-session-admission-L5RPEFZ2.js +0 -114
- package/chunks/useAutoAcceptIndicator-O2N2Q6KG.js +0 -122
- package/chunks/workspace-providers-status-OCFEWIPQ.js +0 -116
- package/chunks/workspace-service-5ZOBMMIB.js +0 -131
- package/chunks/workspace-skills-status-B6NJZD4B.js +0 -115
- package/chunks/write-file-B2RNX6SU.js +0 -90
- package/web-shell/assets/channel-CU-Zyv0r.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-C0J2_LKs.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-C0J2_LKs.js +0 -1
- package/web-shell/assets/index-gdvMN4J1.js +0 -1860
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-2uACDdJN.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-C4JJkavU.js +0 -8
|
@@ -0,0 +1,645 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
init_esbuild_shims
|
|
5
|
+
} from "./chunk-5O2XNYP6.js";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "./chunk-J2S4EL5Y.js";
|
|
9
|
+
|
|
10
|
+
// packages/acp-bridge/src/ndJsonStream.ts
|
|
11
|
+
init_esbuild_shims();
|
|
12
|
+
import { createHash } from "node:crypto";
|
|
13
|
+
import { inspect } from "node:util";
|
|
14
|
+
var NdJsonFrameTooLargeError = class extends Error {
|
|
15
|
+
constructor(direction, limitBytes, observedBytes) {
|
|
16
|
+
super(
|
|
17
|
+
`NDJSON ${direction} frame exceeds ${limitBytes} bytes (observed ${observedBytes} bytes)`
|
|
18
|
+
);
|
|
19
|
+
this.direction = direction;
|
|
20
|
+
this.limitBytes = limitBytes;
|
|
21
|
+
this.observedBytes = observedBytes;
|
|
22
|
+
this.name = "NdJsonFrameTooLargeError";
|
|
23
|
+
}
|
|
24
|
+
static {
|
|
25
|
+
__name(this, "NdJsonFrameTooLargeError");
|
|
26
|
+
}
|
|
27
|
+
code = "ndjson_frame_too_large";
|
|
28
|
+
};
|
|
29
|
+
var NdJsonQueueLimitError = class extends Error {
|
|
30
|
+
constructor(maxQueuedMessages, maxQueuedBytes, requiredBytes, availableBytes) {
|
|
31
|
+
super(
|
|
32
|
+
`NDJSON decoded queue is full (required ${requiredBytes} bytes, available ${availableBytes} bytes)`
|
|
33
|
+
);
|
|
34
|
+
this.maxQueuedMessages = maxQueuedMessages;
|
|
35
|
+
this.maxQueuedBytes = maxQueuedBytes;
|
|
36
|
+
this.requiredBytes = requiredBytes;
|
|
37
|
+
this.availableBytes = availableBytes;
|
|
38
|
+
this.name = "NdJsonQueueLimitError";
|
|
39
|
+
}
|
|
40
|
+
static {
|
|
41
|
+
__name(this, "NdJsonQueueLimitError");
|
|
42
|
+
}
|
|
43
|
+
code = "ndjson_queue_limit_exceeded";
|
|
44
|
+
};
|
|
45
|
+
var NdJsonIncompleteFrameError = class extends Error {
|
|
46
|
+
constructor(observedBytes) {
|
|
47
|
+
super(`NDJSON input ended with an incomplete ${observedBytes}-byte frame`);
|
|
48
|
+
this.observedBytes = observedBytes;
|
|
49
|
+
this.name = "NdJsonIncompleteFrameError";
|
|
50
|
+
}
|
|
51
|
+
static {
|
|
52
|
+
__name(this, "NdJsonIncompleteFrameError");
|
|
53
|
+
}
|
|
54
|
+
code = "ndjson_incomplete_frame";
|
|
55
|
+
};
|
|
56
|
+
var NdJsonUnexpectedEofError = class extends Error {
|
|
57
|
+
static {
|
|
58
|
+
__name(this, "NdJsonUnexpectedEofError");
|
|
59
|
+
}
|
|
60
|
+
code = "ndjson_unexpected_eof";
|
|
61
|
+
constructor() {
|
|
62
|
+
super("NDJSON input ended while the bounded transport was active");
|
|
63
|
+
this.name = "NdJsonUnexpectedEofError";
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var NdJsonInvalidMessageError = class extends Error {
|
|
67
|
+
constructor(code, observedBytes) {
|
|
68
|
+
super(`NDJSON input contains an invalid ${observedBytes}-byte message`);
|
|
69
|
+
this.code = code;
|
|
70
|
+
this.observedBytes = observedBytes;
|
|
71
|
+
this.name = "NdJsonInvalidMessageError";
|
|
72
|
+
}
|
|
73
|
+
static {
|
|
74
|
+
__name(this, "NdJsonInvalidMessageError");
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var MAX_JSON_RPC_METHOD_BYTES = 1024;
|
|
78
|
+
var MAX_JSON_RPC_ID_BYTES = 256;
|
|
79
|
+
var MAX_JSON_RPC_ERROR_MESSAGE_BYTES = 1024;
|
|
80
|
+
var MAX_JSON_DEPTH = 64;
|
|
81
|
+
var MAX_JSON_NODES = 1e4;
|
|
82
|
+
var MAX_JSON_ARRAY_LENGTH = 4096;
|
|
83
|
+
function ndJsonStream(output, input, hooks, limits, validateInboundMessage, fatalCleanEof = false) {
|
|
84
|
+
const textEncoder = new TextEncoder();
|
|
85
|
+
const textDecoder = new TextDecoder();
|
|
86
|
+
if (limits) validateNdJsonStreamLimits(limits);
|
|
87
|
+
const outboundRequests = limits ? new BoundedOutstandingRequestLedger(limits) : void 0;
|
|
88
|
+
const inboundRequests = limits ? new BoundedInboundRequestLedger(limits) : void 0;
|
|
89
|
+
const readable = limits ? createBoundedReadable(
|
|
90
|
+
input,
|
|
91
|
+
textDecoder,
|
|
92
|
+
hooks,
|
|
93
|
+
limits,
|
|
94
|
+
outboundRequests,
|
|
95
|
+
inboundRequests,
|
|
96
|
+
validateInboundMessage,
|
|
97
|
+
fatalCleanEof
|
|
98
|
+
) : createLegacyReadable(input, textDecoder, hooks);
|
|
99
|
+
const writable = new WritableStream({
|
|
100
|
+
async write(message) {
|
|
101
|
+
let writer;
|
|
102
|
+
let expectedResponseId;
|
|
103
|
+
try {
|
|
104
|
+
const content = JSON.stringify(message);
|
|
105
|
+
const payload = textEncoder.encode(content);
|
|
106
|
+
const frameBytes = payload.byteLength + 1;
|
|
107
|
+
if (limits && frameBytes > limits.maxFrameBytes) {
|
|
108
|
+
throw new NdJsonFrameTooLargeError(
|
|
109
|
+
"sent",
|
|
110
|
+
limits.maxFrameBytes,
|
|
111
|
+
frameBytes
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
const frame = new Uint8Array(frameBytes);
|
|
115
|
+
frame.set(payload);
|
|
116
|
+
frame[payload.byteLength] = 10;
|
|
117
|
+
if (outboundRequests && isJsonRpcRequestMessage(message)) {
|
|
118
|
+
outboundRequests.admit(message.id, frameBytes);
|
|
119
|
+
expectedResponseId = message.id;
|
|
120
|
+
}
|
|
121
|
+
writer = output.getWriter();
|
|
122
|
+
await writer.write(frame);
|
|
123
|
+
inboundRequests?.release(message);
|
|
124
|
+
callHook(hooks?.onMessageSent, payload.byteLength);
|
|
125
|
+
callHook(hooks?.onMessageObserved, {
|
|
126
|
+
direction: "sent",
|
|
127
|
+
bytes: payload.byteLength,
|
|
128
|
+
message
|
|
129
|
+
});
|
|
130
|
+
} catch (error) {
|
|
131
|
+
if (expectedResponseId !== void 0) {
|
|
132
|
+
outboundRequests?.discard(expectedResponseId);
|
|
133
|
+
}
|
|
134
|
+
if (limits) callHook(hooks?.onTransportError, error);
|
|
135
|
+
throw error;
|
|
136
|
+
} finally {
|
|
137
|
+
writer?.releaseLock();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
return { readable, writable };
|
|
142
|
+
}
|
|
143
|
+
__name(ndJsonStream, "ndJsonStream");
|
|
144
|
+
function createLegacyReadable(input, textDecoder, hooks) {
|
|
145
|
+
return new ReadableStream({
|
|
146
|
+
async start(controller) {
|
|
147
|
+
const pending = [];
|
|
148
|
+
const reader = input.getReader();
|
|
149
|
+
try {
|
|
150
|
+
while (true) {
|
|
151
|
+
const { value, done } = await reader.read();
|
|
152
|
+
if (done) break;
|
|
153
|
+
if (!value) continue;
|
|
154
|
+
readLegacyChunk(value, pending, controller, textDecoder, hooks);
|
|
155
|
+
}
|
|
156
|
+
} finally {
|
|
157
|
+
reader.releaseLock();
|
|
158
|
+
controller.close();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
__name(createLegacyReadable, "createLegacyReadable");
|
|
164
|
+
function createBoundedReadable(input, textDecoder, hooks, limits, outboundRequests, inboundRequests, validateInboundMessage, fatalCleanEof) {
|
|
165
|
+
const pending = new BoundedFrameBuffer(limits.maxFrameBytes);
|
|
166
|
+
const minimumQueueCharge = Math.ceil(
|
|
167
|
+
limits.maxQueuedBytes / limits.maxQueuedMessages
|
|
168
|
+
);
|
|
169
|
+
let nextQueueCharge = minimumQueueCharge;
|
|
170
|
+
let reader;
|
|
171
|
+
let canceled = false;
|
|
172
|
+
return new ReadableStream(
|
|
173
|
+
{
|
|
174
|
+
start(controller) {
|
|
175
|
+
reader = input.getReader();
|
|
176
|
+
void pumpBoundedInput(
|
|
177
|
+
reader,
|
|
178
|
+
pending,
|
|
179
|
+
controller,
|
|
180
|
+
textDecoder,
|
|
181
|
+
hooks,
|
|
182
|
+
limits,
|
|
183
|
+
outboundRequests,
|
|
184
|
+
inboundRequests,
|
|
185
|
+
validateInboundMessage,
|
|
186
|
+
fatalCleanEof,
|
|
187
|
+
minimumQueueCharge,
|
|
188
|
+
(charge) => {
|
|
189
|
+
nextQueueCharge = charge;
|
|
190
|
+
},
|
|
191
|
+
() => canceled
|
|
192
|
+
);
|
|
193
|
+
},
|
|
194
|
+
async cancel(reason) {
|
|
195
|
+
canceled = true;
|
|
196
|
+
pending.clear();
|
|
197
|
+
if (reader) await cancelReader(reader, reason);
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
highWaterMark: limits.maxQueuedBytes,
|
|
202
|
+
size: /* @__PURE__ */ __name(() => nextQueueCharge, "size")
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
__name(createBoundedReadable, "createBoundedReadable");
|
|
207
|
+
async function pumpBoundedInput(reader, pending, controller, textDecoder, hooks, limits, outboundRequests, inboundRequests, validateInboundMessage, fatalCleanEof, minimumQueueCharge, setNextQueueCharge, isCanceled) {
|
|
208
|
+
try {
|
|
209
|
+
while (true) {
|
|
210
|
+
const result = await reader.read();
|
|
211
|
+
if (result.done) {
|
|
212
|
+
if (isCanceled()) return;
|
|
213
|
+
if (pending.byteLength > 0) {
|
|
214
|
+
throw new NdJsonIncompleteFrameError(pending.byteLength);
|
|
215
|
+
}
|
|
216
|
+
if (fatalCleanEof) throw new NdJsonUnexpectedEofError();
|
|
217
|
+
controller.close();
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
if (!result.value) continue;
|
|
221
|
+
readBoundedChunk(
|
|
222
|
+
result.value,
|
|
223
|
+
pending,
|
|
224
|
+
controller,
|
|
225
|
+
textDecoder,
|
|
226
|
+
hooks,
|
|
227
|
+
limits,
|
|
228
|
+
outboundRequests,
|
|
229
|
+
inboundRequests,
|
|
230
|
+
validateInboundMessage,
|
|
231
|
+
minimumQueueCharge,
|
|
232
|
+
setNextQueueCharge
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
} catch (error) {
|
|
236
|
+
if (isCanceled()) return;
|
|
237
|
+
pending.clear();
|
|
238
|
+
callHook(hooks?.onTransportError, error);
|
|
239
|
+
await cancelReader(reader, error);
|
|
240
|
+
if (!isCanceled()) controller.close();
|
|
241
|
+
} finally {
|
|
242
|
+
pending.clear();
|
|
243
|
+
outboundRequests.clear();
|
|
244
|
+
inboundRequests.clear();
|
|
245
|
+
reader.releaseLock();
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
__name(pumpBoundedInput, "pumpBoundedInput");
|
|
249
|
+
function readLegacyChunk(chunk, pending, controller, textDecoder, hooks) {
|
|
250
|
+
let start = 0;
|
|
251
|
+
let newline = chunk.indexOf(10, start);
|
|
252
|
+
while (newline !== -1) {
|
|
253
|
+
const lineBytes = takeLegacyLineBytes(
|
|
254
|
+
pending,
|
|
255
|
+
chunk.subarray(start, newline)
|
|
256
|
+
);
|
|
257
|
+
handleLegacyLine(lineBytes, controller, textDecoder, hooks);
|
|
258
|
+
start = newline + 1;
|
|
259
|
+
newline = chunk.indexOf(10, start);
|
|
260
|
+
}
|
|
261
|
+
if (start < chunk.length) {
|
|
262
|
+
pending.push(chunk.subarray(start));
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
__name(readLegacyChunk, "readLegacyChunk");
|
|
266
|
+
function readBoundedChunk(chunk, pending, controller, textDecoder, hooks, limits, outboundRequests, inboundRequests, validateInboundMessage, minimumQueueCharge, setNextQueueCharge) {
|
|
267
|
+
let start = 0;
|
|
268
|
+
let newline = chunk.indexOf(10, start);
|
|
269
|
+
while (newline !== -1) {
|
|
270
|
+
const current = chunk.subarray(start, newline);
|
|
271
|
+
const frameBytes = pending.byteLength + current.byteLength + 1;
|
|
272
|
+
assertFrameSize("received", limits.maxFrameBytes, frameBytes);
|
|
273
|
+
if (pending.isJsonWhitespaceLine(current)) {
|
|
274
|
+
pending.clear();
|
|
275
|
+
start = newline + 1;
|
|
276
|
+
newline = chunk.indexOf(10, start);
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
const queueCharge = Math.max(frameBytes, minimumQueueCharge);
|
|
280
|
+
const availableBytes = controller.desiredSize;
|
|
281
|
+
if (availableBytes === null || queueCharge > availableBytes) {
|
|
282
|
+
throw new NdJsonQueueLimitError(
|
|
283
|
+
limits.maxQueuedMessages,
|
|
284
|
+
limits.maxQueuedBytes,
|
|
285
|
+
queueCharge,
|
|
286
|
+
Math.max(0, availableBytes ?? 0)
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
setNextQueueCharge(queueCharge);
|
|
290
|
+
handleBoundedLine(
|
|
291
|
+
pending.take(current),
|
|
292
|
+
controller,
|
|
293
|
+
textDecoder,
|
|
294
|
+
hooks,
|
|
295
|
+
outboundRequests,
|
|
296
|
+
inboundRequests,
|
|
297
|
+
validateInboundMessage
|
|
298
|
+
);
|
|
299
|
+
start = newline + 1;
|
|
300
|
+
newline = chunk.indexOf(10, start);
|
|
301
|
+
}
|
|
302
|
+
if (start < chunk.length) pending.append(chunk.subarray(start));
|
|
303
|
+
}
|
|
304
|
+
__name(readBoundedChunk, "readBoundedChunk");
|
|
305
|
+
function takeLegacyLineBytes(pending, current) {
|
|
306
|
+
if (pending.length === 0) return current;
|
|
307
|
+
const totalLength = pending.reduce((sum, part) => sum + part.byteLength, 0) + current.byteLength;
|
|
308
|
+
const line = new Uint8Array(totalLength);
|
|
309
|
+
let offset = 0;
|
|
310
|
+
for (const part of pending) {
|
|
311
|
+
line.set(part, offset);
|
|
312
|
+
offset += part.byteLength;
|
|
313
|
+
}
|
|
314
|
+
line.set(current, offset);
|
|
315
|
+
pending.length = 0;
|
|
316
|
+
return line;
|
|
317
|
+
}
|
|
318
|
+
__name(takeLegacyLineBytes, "takeLegacyLineBytes");
|
|
319
|
+
function handleLegacyLine(lineBytes, controller, textDecoder, hooks) {
|
|
320
|
+
const line = textDecoder.decode(lineBytes);
|
|
321
|
+
const trimmedLine = line.trim();
|
|
322
|
+
if (!trimmedLine) return;
|
|
323
|
+
try {
|
|
324
|
+
const message = JSON.parse(trimmedLine);
|
|
325
|
+
controller.enqueue(message);
|
|
326
|
+
reportReceivedMessage(lineBytes, message, hooks);
|
|
327
|
+
} catch (err) {
|
|
328
|
+
console.error("Failed to parse JSON message:", trimmedLine, err);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
__name(handleLegacyLine, "handleLegacyLine");
|
|
332
|
+
function handleBoundedLine(lineBytes, controller, textDecoder, hooks, outboundRequests, inboundRequests, validateInboundMessage) {
|
|
333
|
+
const line = textDecoder.decode(lineBytes);
|
|
334
|
+
const trimmedLine = line.trim();
|
|
335
|
+
if (!trimmedLine) return;
|
|
336
|
+
let parsed;
|
|
337
|
+
try {
|
|
338
|
+
parsed = JSON.parse(trimmedLine);
|
|
339
|
+
} catch {
|
|
340
|
+
throw logBoundedInvalidMessage("ndjson_parse_error", lineBytes);
|
|
341
|
+
}
|
|
342
|
+
if (!isJsonRpcMessage(parsed)) {
|
|
343
|
+
throw logBoundedInvalidMessage("ndjson_invalid_message", lineBytes);
|
|
344
|
+
}
|
|
345
|
+
const isResponse = isJsonRpcResponseMessage(parsed);
|
|
346
|
+
if (!isResponse && !hasBoundedJsonStructure(parsed) || validateInboundMessage && !validateInboundMessage(parsed)) {
|
|
347
|
+
throw logBoundedInvalidMessage("ndjson_invalid_message", lineBytes);
|
|
348
|
+
}
|
|
349
|
+
if (isJsonRpcResponseMessage(parsed) && !outboundRequests?.consumeResponse(parsed.id)) {
|
|
350
|
+
throw logBoundedInvalidMessage("ndjson_invalid_message", lineBytes);
|
|
351
|
+
}
|
|
352
|
+
inboundRequests?.admit(parsed, lineBytes.byteLength + 1);
|
|
353
|
+
const message = installBoundedLogRedaction(parsed);
|
|
354
|
+
controller.enqueue(message);
|
|
355
|
+
reportReceivedMessage(lineBytes, message, hooks);
|
|
356
|
+
}
|
|
357
|
+
__name(handleBoundedLine, "handleBoundedLine");
|
|
358
|
+
function installBoundedLogRedaction(message) {
|
|
359
|
+
Object.defineProperty(message, inspect.custom, {
|
|
360
|
+
configurable: false,
|
|
361
|
+
enumerable: false,
|
|
362
|
+
value: inspectBoundedJsonRpcMessage,
|
|
363
|
+
writable: false
|
|
364
|
+
});
|
|
365
|
+
return message;
|
|
366
|
+
}
|
|
367
|
+
__name(installBoundedLogRedaction, "installBoundedLogRedaction");
|
|
368
|
+
function inspectBoundedJsonRpcMessage() {
|
|
369
|
+
return {
|
|
370
|
+
jsonrpc: "2.0",
|
|
371
|
+
messageType: "method" in this ? "id" in this ? "request" : "notification" : "response",
|
|
372
|
+
payloadOmitted: true
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
__name(inspectBoundedJsonRpcMessage, "inspectBoundedJsonRpcMessage");
|
|
376
|
+
function isJsonRpcMessage(value) {
|
|
377
|
+
if (!isRecord(value) || value["jsonrpc"] !== "2.0") return false;
|
|
378
|
+
const hasMethod = Object.hasOwn(value, "method");
|
|
379
|
+
const hasId = Object.hasOwn(value, "id");
|
|
380
|
+
if (hasMethod) {
|
|
381
|
+
return typeof value["method"] === "string" && Buffer.byteLength(value["method"]) <= MAX_JSON_RPC_METHOD_BYTES && (!hasId || isJsonRpcId(value["id"]));
|
|
382
|
+
}
|
|
383
|
+
if (!hasId || !isJsonRpcId(value["id"])) return false;
|
|
384
|
+
const hasResult = Object.hasOwn(value, "result");
|
|
385
|
+
const hasError = Object.hasOwn(value, "error");
|
|
386
|
+
if (hasResult === hasError) return false;
|
|
387
|
+
if (!hasError) return true;
|
|
388
|
+
const error = value["error"];
|
|
389
|
+
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;
|
|
390
|
+
}
|
|
391
|
+
__name(isJsonRpcMessage, "isJsonRpcMessage");
|
|
392
|
+
function isRecord(value) {
|
|
393
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
394
|
+
}
|
|
395
|
+
__name(isRecord, "isRecord");
|
|
396
|
+
function hasBoundedJsonStructure(value) {
|
|
397
|
+
const stack = [{ value, depth: 1 }];
|
|
398
|
+
let nodes = 0;
|
|
399
|
+
while (stack.length > 0) {
|
|
400
|
+
const current = stack.pop();
|
|
401
|
+
nodes++;
|
|
402
|
+
if (nodes > MAX_JSON_NODES || current.depth > MAX_JSON_DEPTH) return false;
|
|
403
|
+
if (Array.isArray(current.value)) {
|
|
404
|
+
if (current.value.length > MAX_JSON_ARRAY_LENGTH) return false;
|
|
405
|
+
for (let index = current.value.length - 1; index >= 0; index--) {
|
|
406
|
+
if (nodes + stack.length >= MAX_JSON_NODES || current.depth + 1 > MAX_JSON_DEPTH) {
|
|
407
|
+
return false;
|
|
408
|
+
}
|
|
409
|
+
stack.push({
|
|
410
|
+
value: current.value[index],
|
|
411
|
+
depth: current.depth + 1
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
} else if (isRecord(current.value)) {
|
|
415
|
+
for (const key in current.value) {
|
|
416
|
+
if (!Object.hasOwn(current.value, key)) continue;
|
|
417
|
+
if (nodes + stack.length >= MAX_JSON_NODES || current.depth + 1 > MAX_JSON_DEPTH) {
|
|
418
|
+
return false;
|
|
419
|
+
}
|
|
420
|
+
stack.push({
|
|
421
|
+
value: current.value[key],
|
|
422
|
+
depth: current.depth + 1
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
return true;
|
|
428
|
+
}
|
|
429
|
+
__name(hasBoundedJsonStructure, "hasBoundedJsonStructure");
|
|
430
|
+
function isJsonRpcId(value) {
|
|
431
|
+
return value === null || typeof value === "string" && Buffer.byteLength(value) <= MAX_JSON_RPC_ID_BYTES || typeof value === "number" && Number.isFinite(value);
|
|
432
|
+
}
|
|
433
|
+
__name(isJsonRpcId, "isJsonRpcId");
|
|
434
|
+
function isJsonRpcRequestMessage(value) {
|
|
435
|
+
return "method" in value && "id" in value && typeof value.method === "string" && isJsonRpcId(value.id);
|
|
436
|
+
}
|
|
437
|
+
__name(isJsonRpcRequestMessage, "isJsonRpcRequestMessage");
|
|
438
|
+
function isJsonRpcResponseMessage(value) {
|
|
439
|
+
return !("method" in value) && "id" in value;
|
|
440
|
+
}
|
|
441
|
+
__name(isJsonRpcResponseMessage, "isJsonRpcResponseMessage");
|
|
442
|
+
var BoundedInboundRequestLedger = class {
|
|
443
|
+
constructor(limits) {
|
|
444
|
+
this.limits = limits;
|
|
445
|
+
}
|
|
446
|
+
static {
|
|
447
|
+
__name(this, "BoundedInboundRequestLedger");
|
|
448
|
+
}
|
|
449
|
+
requests = /* @__PURE__ */ new Map();
|
|
450
|
+
retainedBytes = 0;
|
|
451
|
+
admit(message, frameBytes) {
|
|
452
|
+
if (!isJsonRpcRequestMessage(message)) return;
|
|
453
|
+
const availableBytes = Math.max(
|
|
454
|
+
0,
|
|
455
|
+
this.limits.maxQueuedBytes - this.retainedBytes
|
|
456
|
+
);
|
|
457
|
+
if (this.requests.has(message.id) || this.requests.size >= this.limits.maxQueuedMessages || frameBytes > availableBytes) {
|
|
458
|
+
throw new NdJsonQueueLimitError(
|
|
459
|
+
this.limits.maxQueuedMessages,
|
|
460
|
+
this.limits.maxQueuedBytes,
|
|
461
|
+
frameBytes,
|
|
462
|
+
this.requests.has(message.id) ? 0 : availableBytes
|
|
463
|
+
);
|
|
464
|
+
}
|
|
465
|
+
this.requests.set(message.id, frameBytes);
|
|
466
|
+
this.retainedBytes += frameBytes;
|
|
467
|
+
}
|
|
468
|
+
release(message) {
|
|
469
|
+
if (!isJsonRpcResponseMessage(message)) return;
|
|
470
|
+
const frameBytes = this.requests.get(message.id);
|
|
471
|
+
if (frameBytes === void 0) return;
|
|
472
|
+
this.requests.delete(message.id);
|
|
473
|
+
this.retainedBytes -= frameBytes;
|
|
474
|
+
}
|
|
475
|
+
clear() {
|
|
476
|
+
this.requests.clear();
|
|
477
|
+
this.retainedBytes = 0;
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
var BoundedOutstandingRequestLedger = class {
|
|
481
|
+
constructor(limits) {
|
|
482
|
+
this.limits = limits;
|
|
483
|
+
}
|
|
484
|
+
static {
|
|
485
|
+
__name(this, "BoundedOutstandingRequestLedger");
|
|
486
|
+
}
|
|
487
|
+
requests = /* @__PURE__ */ new Map();
|
|
488
|
+
retainedBytes = 0;
|
|
489
|
+
admit(id, frameBytes) {
|
|
490
|
+
const availableBytes = Math.max(
|
|
491
|
+
0,
|
|
492
|
+
this.limits.maxQueuedBytes - this.retainedBytes
|
|
493
|
+
);
|
|
494
|
+
if (this.requests.has(id) || this.requests.size >= this.limits.maxQueuedMessages || frameBytes > availableBytes) {
|
|
495
|
+
throw new NdJsonQueueLimitError(
|
|
496
|
+
this.limits.maxQueuedMessages,
|
|
497
|
+
this.limits.maxQueuedBytes,
|
|
498
|
+
frameBytes,
|
|
499
|
+
this.requests.has(id) ? 0 : availableBytes
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
this.requests.set(id, frameBytes);
|
|
503
|
+
this.retainedBytes += frameBytes;
|
|
504
|
+
}
|
|
505
|
+
consumeResponse(id) {
|
|
506
|
+
return this.discard(id);
|
|
507
|
+
}
|
|
508
|
+
discard(id) {
|
|
509
|
+
const frameBytes = this.requests.get(id);
|
|
510
|
+
if (frameBytes === void 0) return false;
|
|
511
|
+
this.requests.delete(id);
|
|
512
|
+
this.retainedBytes -= frameBytes;
|
|
513
|
+
return true;
|
|
514
|
+
}
|
|
515
|
+
clear() {
|
|
516
|
+
this.requests.clear();
|
|
517
|
+
this.retainedBytes = 0;
|
|
518
|
+
}
|
|
519
|
+
};
|
|
520
|
+
function logBoundedInvalidMessage(errorKind, lineBytes) {
|
|
521
|
+
const bytes = jsonPayloadByteLength(lineBytes);
|
|
522
|
+
const digest = createHash("sha256").update(lineBytes.subarray(0, bytes)).digest("hex");
|
|
523
|
+
console.error("Failed to parse JSON message:", {
|
|
524
|
+
errorKind,
|
|
525
|
+
bytes,
|
|
526
|
+
sha256: digest,
|
|
527
|
+
payloadOmitted: true
|
|
528
|
+
});
|
|
529
|
+
return new NdJsonInvalidMessageError(errorKind, bytes);
|
|
530
|
+
}
|
|
531
|
+
__name(logBoundedInvalidMessage, "logBoundedInvalidMessage");
|
|
532
|
+
function reportReceivedMessage(lineBytes, message, hooks) {
|
|
533
|
+
const bytes = jsonPayloadByteLength(lineBytes);
|
|
534
|
+
callHook(hooks?.onMessageReceived, bytes);
|
|
535
|
+
callHook(hooks?.onMessageObserved, {
|
|
536
|
+
direction: "received",
|
|
537
|
+
bytes,
|
|
538
|
+
message
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
__name(reportReceivedMessage, "reportReceivedMessage");
|
|
542
|
+
function jsonPayloadByteLength(lineBytes) {
|
|
543
|
+
return lineBytes[lineBytes.byteLength - 1] === 13 ? lineBytes.byteLength - 1 : lineBytes.byteLength;
|
|
544
|
+
}
|
|
545
|
+
__name(jsonPayloadByteLength, "jsonPayloadByteLength");
|
|
546
|
+
function validateNdJsonStreamLimits(limits) {
|
|
547
|
+
const values = [
|
|
548
|
+
["maxFrameBytes", limits.maxFrameBytes],
|
|
549
|
+
["maxQueuedMessages", limits.maxQueuedMessages],
|
|
550
|
+
["maxQueuedBytes", limits.maxQueuedBytes]
|
|
551
|
+
];
|
|
552
|
+
for (const [name, value] of values) {
|
|
553
|
+
if (!Number.isSafeInteger(value) || value <= 0) {
|
|
554
|
+
throw new RangeError(`${name} must be a positive safe integer`);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
__name(validateNdJsonStreamLimits, "validateNdJsonStreamLimits");
|
|
559
|
+
function assertFrameSize(direction, limitBytes, observedBytes) {
|
|
560
|
+
if (observedBytes > limitBytes) {
|
|
561
|
+
throw new NdJsonFrameTooLargeError(direction, limitBytes, observedBytes);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
__name(assertFrameSize, "assertFrameSize");
|
|
565
|
+
async function cancelReader(reader, reason) {
|
|
566
|
+
try {
|
|
567
|
+
await reader.cancel(reason);
|
|
568
|
+
} catch {
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
__name(cancelReader, "cancelReader");
|
|
572
|
+
function callHook(hook, value) {
|
|
573
|
+
try {
|
|
574
|
+
hook?.(value);
|
|
575
|
+
} catch {
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
__name(callHook, "callHook");
|
|
579
|
+
var BoundedFrameBuffer = class {
|
|
580
|
+
constructor(maxFrameBytes) {
|
|
581
|
+
this.maxFrameBytes = maxFrameBytes;
|
|
582
|
+
}
|
|
583
|
+
static {
|
|
584
|
+
__name(this, "BoundedFrameBuffer");
|
|
585
|
+
}
|
|
586
|
+
buffer;
|
|
587
|
+
length = 0;
|
|
588
|
+
get byteLength() {
|
|
589
|
+
return this.length;
|
|
590
|
+
}
|
|
591
|
+
append(bytes) {
|
|
592
|
+
const requiredBytes = this.length + bytes.byteLength;
|
|
593
|
+
assertFrameSize("received", this.maxFrameBytes, requiredBytes);
|
|
594
|
+
if (requiredBytes === 0) return;
|
|
595
|
+
if (!this.buffer || this.buffer.byteLength < requiredBytes) {
|
|
596
|
+
const doubledCapacity = Math.min(
|
|
597
|
+
this.maxFrameBytes,
|
|
598
|
+
Math.max(1024, (this.buffer?.byteLength ?? 0) * 2)
|
|
599
|
+
);
|
|
600
|
+
const next = new Uint8Array(Math.max(requiredBytes, doubledCapacity));
|
|
601
|
+
if (this.buffer) next.set(this.buffer.subarray(0, this.length));
|
|
602
|
+
this.buffer = next;
|
|
603
|
+
}
|
|
604
|
+
this.buffer.set(bytes, this.length);
|
|
605
|
+
this.length = requiredBytes;
|
|
606
|
+
}
|
|
607
|
+
take(current) {
|
|
608
|
+
if (this.length === 0) return current;
|
|
609
|
+
const line = new Uint8Array(this.length + current.byteLength);
|
|
610
|
+
line.set(this.buffer.subarray(0, this.length));
|
|
611
|
+
line.set(current, this.length);
|
|
612
|
+
this.clear();
|
|
613
|
+
return line;
|
|
614
|
+
}
|
|
615
|
+
isJsonWhitespaceLine(current) {
|
|
616
|
+
if (this.buffer) {
|
|
617
|
+
for (let index = 0; index < this.length; index++) {
|
|
618
|
+
if (!isJsonWhitespaceByte(this.buffer[index])) return false;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
for (const byte of current) {
|
|
622
|
+
if (!isJsonWhitespaceByte(byte)) return false;
|
|
623
|
+
}
|
|
624
|
+
return true;
|
|
625
|
+
}
|
|
626
|
+
clear() {
|
|
627
|
+
this.buffer = void 0;
|
|
628
|
+
this.length = 0;
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
function isJsonWhitespaceByte(byte) {
|
|
632
|
+
return byte === 32 || byte === 9 || byte === 13;
|
|
633
|
+
}
|
|
634
|
+
__name(isJsonWhitespaceByte, "isJsonWhitespaceByte");
|
|
635
|
+
|
|
636
|
+
export {
|
|
637
|
+
NdJsonQueueLimitError,
|
|
638
|
+
ndJsonStream,
|
|
639
|
+
validateNdJsonStreamLimits
|
|
640
|
+
};
|
|
641
|
+
/**
|
|
642
|
+
* @license
|
|
643
|
+
* Copyright 2026 Qwen Team
|
|
644
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
645
|
+
*/
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
isTelemetrySdkInitialized,
|
|
6
6
|
shouldForceSampled,
|
|
7
7
|
truncateSpanError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-L6BZRIUL.js";
|
|
9
9
|
import {
|
|
10
10
|
require_src
|
|
11
11
|
} from "./chunk-74TONY4F.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
formatTraceparent,
|
|
14
14
|
getActiveSpanTraceContext,
|
|
15
15
|
setSessionIdOnContext
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UHQFIS7N.js";
|
|
17
17
|
import {
|
|
18
18
|
ROOT_CONTEXT,
|
|
19
19
|
SpanKind,
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
getPlugin,
|
|
8
8
|
supportedTypes
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5XBFCMWD.js";
|
|
10
10
|
import {
|
|
11
11
|
APPROVAL_MODES
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-V5J4J5TP.js";
|
|
13
13
|
import {
|
|
14
14
|
init_esbuild_shims
|
|
15
15
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-5PA6UEYA.js";
|
|
13
13
|
import {
|
|
14
14
|
isWorkspaceTrusted
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-V4QXXQJ2.js";
|
|
16
16
|
import {
|
|
17
17
|
require_main
|
|
18
18
|
} from "./chunk-5M6IDOMF.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
QWEN_DIR,
|
|
21
21
|
Storage,
|
|
22
22
|
getErrorMessage
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-UHQFIS7N.js";
|
|
24
24
|
import {
|
|
25
25
|
init_esbuild_shims
|
|
26
26
|
} from "./chunk-5O2XNYP6.js";
|