@qwen-code/qwen-code 0.20.2-headless-image-routing.1 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/configuration/settings.md +5 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +23 -5
- package/bundled/qc-helper/docs/integration-github-action.md +9 -9
- package/bundled/review/SKILL.md +7 -3
- package/chunks/MaxSizedBox-5DPPWPGT.js +85 -0
- package/chunks/{StandaloneSessionPicker-PLQQB22E.js → StandaloneSessionPicker-BIRMPLRD.js} +66 -59
- package/chunks/{acp-startup-profiler-N3RHHXJ3.js → acp-startup-profiler-RV3IV562.js} +2 -2
- package/chunks/{acpAgent-AIVK2EM5.js → acpAgent-6J2U72PQ.js} +705 -182
- package/chunks/agent-6ODUANDO.js +81 -0
- package/chunks/agent-headless-7BYQTMHW.js +75 -0
- package/chunks/{anthropicContentGenerator-HGWAHO24.js → anthropicContentGenerator-75BKLTSP.js} +117 -43
- package/chunks/{artifact-tool-56T5IMBP.js → artifact-tool-Y5T7GG7F.js} +3 -3
- package/chunks/{askUserQuestion-E25OBIC2.js → askUserQuestion-2H6747FR.js} +3 -3
- package/chunks/bridge-ZUB64FAE.js +90 -0
- package/chunks/{build-GHIZ4MSZ.js → build-RV63TIRH.js} +2 -3
- package/chunks/{ca-N6VVUFVB.js → ca-25EDXPFZ.js} +2 -0
- package/chunks/{channel-worker-group-QZV2SP5U.js → channel-worker-group-2ZD7TVAT.js} +8 -7
- package/chunks/{channel-worker-manager-3GMAU45H.js → channel-worker-manager-4OA4BCGB.js} +190 -30
- package/chunks/{channel-worker-supervisor-QCXSXCRY.js → channel-worker-supervisor-V7KCFJTS.js} +7 -6
- package/chunks/{chunk-TYQMGACW.js → chunk-22C7BQ6D.js} +508 -10967
- package/chunks/chunk-2JZBVYTU.js +452 -0
- package/chunks/{chunk-H2XVO6NE.js → chunk-2MIN6GRR.js} +1 -1
- package/chunks/{chunk-4DWTDZGS.js → chunk-2NH6DYI4.js} +12 -12
- package/chunks/chunk-2SCDWPXI.js +246 -0
- package/chunks/{chunk-QE4KFTBS.js → chunk-2X55UKQE.js} +3 -3
- package/chunks/{chunk-QBUDF33N.js → chunk-3QMGYBFN.js} +1 -1
- package/chunks/{chunk-3OAKYHRG.js → chunk-3RN6GBKS.js} +1 -1
- package/chunks/{chunk-QR6U5QPP.js → chunk-3SJ43L4W.js} +4 -0
- package/chunks/chunk-46UV252V.js +128 -0
- package/chunks/{chunk-GHRSKGHF.js → chunk-4WIZGAH3.js} +7 -7
- package/chunks/{chunk-CAS7CB3T.js → chunk-55DJUCI2.js} +87 -29
- package/chunks/{chunk-QNLNLENL.js → chunk-5I2IWRSH.js} +2 -2
- package/chunks/{chunk-H24SOJIQ.js → chunk-5NBDS5S6.js} +147 -7
- package/chunks/{chunk-E4IMU4Y5.js → chunk-63P4EL5V.js} +1 -1
- package/chunks/chunk-6FGBXPWM.js +293 -0
- package/chunks/{chunk-FFFM6NJV.js → chunk-6GMVPFB2.js} +155 -73
- package/chunks/{chunk-KWK7UE6L.js → chunk-6OUGMXDC.js} +6 -6
- package/chunks/{chunk-QRUIS3DN.js → chunk-6PEXNQTX.js} +22 -1
- package/chunks/{chunk-FZPTCQY7.js → chunk-7JURR4JT.js} +1 -1
- package/chunks/{chunk-Q6NAKZTA.js → chunk-7MVVZO4N.js} +4 -4
- package/chunks/{chunk-6ZBPS62S.js → chunk-7ZCNENPP.js} +1 -1
- package/chunks/{chunk-6X4GWOPW.js → chunk-A5L3JMUA.js} +1 -1
- package/chunks/{chunk-YO2XRXY6.js → chunk-ACY3A37B.js} +3 -3
- package/chunks/chunk-AMDSOFFV.js +10860 -0
- package/chunks/{chunk-RV4C2ZFG.js → chunk-BIQWWWJN.js} +1 -1
- package/chunks/{chunk-ZHERRXZJ.js → chunk-BJX6ZSUK.js} +4 -4
- package/chunks/chunk-BK2UNYWD.js +29 -0
- package/chunks/{chunk-FRPDJNK3.js → chunk-BKHWX6I2.js} +3 -3
- package/chunks/chunk-BPJSQIJX.js +100 -0
- package/chunks/{chunk-M7WBGLYP.js → chunk-BULDBTYC.js} +2 -0
- package/chunks/{chunk-ZDP2Y2AL.js → chunk-CIKQ7KKO.js} +4625 -8645
- package/chunks/{chunk-PEJWA3QQ.js → chunk-D3UEZIQH.js} +4 -2
- package/chunks/chunk-DHHOYAPR.js +1462 -0
- package/chunks/{chunk-LESHKUWF.js → chunk-DLWL3Z7A.js} +5 -3
- package/chunks/{chunk-XHATNRQA.js → chunk-DP3IHZGG.js} +0 -2
- package/chunks/chunk-E5TUC6CA.js +479 -0
- package/chunks/{chunk-JC26SJ5Y.js → chunk-EBJQ6AXW.js} +13 -12
- package/chunks/{chunk-RCWKCN2Z.js → chunk-EPDRMGT4.js} +164 -17
- package/chunks/{chunk-FUFCALSJ.js → chunk-ETSW4KLJ.js} +2 -2
- package/chunks/{chunk-KHOVYUHX.js → chunk-FNQ6T3CV.js} +20 -3
- package/chunks/{chunk-SP5WRGVG.js → chunk-FQK6JAFG.js} +72 -23
- package/chunks/{chunk-NWZY2SPY.js → chunk-FSITMZJH.js} +8 -8
- package/chunks/{chunk-6RLROE6G.js → chunk-GLWP3FDB.js} +80 -15
- package/chunks/{chunk-KPBVP6SL.js → chunk-GSN55ZRI.js} +5 -5
- package/chunks/{chunk-MLYGPZGU.js → chunk-H4SBPHSA.js} +3 -3
- package/chunks/chunk-H5FFA6TH.js +902 -0
- package/chunks/{chunk-TDKQP3M6.js → chunk-HIJQF5B5.js} +1 -1
- package/chunks/{chunk-5G3ZVADU.js → chunk-IJTOWOD7.js} +17 -6
- package/chunks/chunk-IKCX4CCL.js +469 -0
- package/chunks/{chunk-LPEONXNV.js → chunk-IKYJHJNF.js} +3 -3
- package/chunks/{chunk-DTZY2SH2.js → chunk-IO3IX5Q4.js} +1 -1
- package/chunks/{chunk-RS7MT2QG.js → chunk-IPUUTYMV.js} +2 -4
- package/chunks/{chunk-XU457J4V.js → chunk-IRH27ZC2.js} +2 -2
- package/chunks/{chunk-46DK772E.js → chunk-J24WCGIN.js} +4 -4
- package/chunks/{chunk-4LVZNIDO.js → chunk-J56UI34H.js} +4 -13
- package/chunks/{chunk-TJTKSVIV.js → chunk-JLU636DO.js} +5 -1
- package/chunks/{chunk-RKWX4CMO.js → chunk-JVPM2ULZ.js} +6 -6
- package/chunks/{chunk-ENPCQK44.js → chunk-JXJFVC6E.js} +37 -18
- package/chunks/{chunk-NABLFI57.js → chunk-JZA3JUDJ.js} +1 -1
- package/chunks/{chunk-CGLQAVZE.js → chunk-K36B6G2O.js} +5 -5
- package/chunks/{chunk-GPSKDNEE.js → chunk-K4XWPEWB.js} +4 -4
- package/chunks/{chunk-QOZOIPSF.js → chunk-KIM5GUMA.js} +650 -113
- package/chunks/{chunk-JZSM2IZ3.js → chunk-KMQ33DO4.js} +7 -5
- package/chunks/{chunk-E2UVIFI2.js → chunk-KRXPRVGL.js} +0 -1
- package/chunks/{chunk-WHGVTP7Q.js → chunk-L26JL52R.js} +3 -3
- package/chunks/{chunk-7Z6JQEL6.js → chunk-L5UHQJTJ.js} +1 -1
- package/chunks/{chunk-O2XSCRCS.js → chunk-LB6DUZ26.js} +259 -67
- package/chunks/chunk-LEH5C7FV.js +232 -0
- package/chunks/{chunk-RWV32G2M.js → chunk-LH2BYDQ5.js} +6 -4
- package/chunks/{chunk-QKTHJXCS.js → chunk-LK7CHLVP.js} +79 -2
- package/chunks/{chunk-VRRF3GW5.js → chunk-LKEJ26GS.js} +11 -11
- package/chunks/{chunk-SQFXI7VK.js → chunk-LQIW3YFY.js} +227 -41
- package/chunks/chunk-LS77BEZP.js +405 -0
- package/chunks/{chunk-BSHD62QJ.js → chunk-M4FMGVY4.js} +3 -3
- package/chunks/{chunk-57FIIFJN.js → chunk-M5JM7OSF.js} +1 -1
- package/chunks/{chunk-7362QS5B.js → chunk-MB4MZHMJ.js} +80 -37
- package/chunks/{chunk-4K56OJFJ.js → chunk-MUP3T3AD.js} +1 -1
- package/chunks/{chunk-3HFNGB2O.js → chunk-MVSUYZDT.js} +4 -4
- package/chunks/{chunk-T5IO6FZ4.js → chunk-MZAXJAUM.js} +1 -1
- package/chunks/{chunk-QKNXKTZX.js → chunk-NH6KE4JX.js} +3 -3
- package/chunks/chunk-NIBLUX3Y.js +934 -0
- package/chunks/{chunk-OQB4EXO4.js → chunk-NL7LTRLR.js} +1 -1
- package/chunks/{chunk-CS2FSS7W.js → chunk-OFDOK3VM.js} +5 -5
- package/chunks/{chunk-LIZRAKPB.js → chunk-OHNBB4XR.js} +1 -1
- package/chunks/{chunk-MDZTPSXO.js → chunk-OKY7HXPG.js} +2 -2
- package/chunks/{chunk-NHDKSOEY.js → chunk-P3QQPMQA.js} +5 -5
- package/chunks/{chunk-7THPNISK.js → chunk-PC6JANNU.js} +5 -5
- package/chunks/{chunk-OTQ6PSZC.js → chunk-PHOF65IG.js} +3498 -1030
- package/chunks/{chunk-OQ5SYCPE.js → chunk-PJIZUQVC.js} +2 -2
- package/chunks/{chunk-5DTTYNB7.js → chunk-PQNHRFJC.js} +16 -3
- package/chunks/{chunk-YM3SZTH4.js → chunk-PR75REBZ.js} +18 -1
- package/chunks/{chunk-RECUEJ7B.js → chunk-PSOO6YXD.js} +18 -15
- package/chunks/{chunk-X6N25LXS.js → chunk-PWTZEM3C.js} +2 -2
- package/chunks/{chunk-5NJTNQUW.js → chunk-PWVFN2LF.js} +1 -1
- package/chunks/{chunk-7AUH6A4T.js → chunk-Q4M4MDQ4.js} +2 -2
- package/chunks/{chunk-EZPB6S2I.js → chunk-QAF7NMK7.js} +1 -1
- package/chunks/{chunk-5GI55PF5.js → chunk-R5AFZNQW.js} +5 -5
- package/chunks/{chunk-T5B5NQZX.js → chunk-RF3EXIHJ.js} +47 -60
- package/chunks/{chunk-4K7VDKAD.js → chunk-RHLZR4E5.js} +1 -1
- package/chunks/{chunk-TJDW42MV.js → chunk-RIBKPMRP.js} +220 -141
- package/chunks/{chunk-RVLZCXEE.js → chunk-RWTEFFPU.js} +82 -3
- package/chunks/{chunk-L5QZGCRH.js → chunk-RZIX2G32.js} +1 -1
- package/chunks/{chunk-LLKWRXSS.js → chunk-SQCQ4KO2.js} +350 -418
- package/chunks/{chunk-THJNPLI4.js → chunk-TARRHLLG.js} +1 -0
- package/chunks/{chunk-XCXYRDHB.js → chunk-TEHGS6UP.js} +47 -18
- package/chunks/{chunk-PQIVAWXN.js → chunk-TGILQ3YH.js} +8 -8
- package/chunks/{chunk-Q2YKNMLS.js → chunk-TOFQCPDC.js} +43 -10
- package/chunks/{chunk-L3KUB6XM.js → chunk-TPRQ7RZH.js} +586 -242
- package/chunks/{chunk-T4TZQJ7W.js → chunk-TWPJO254.js} +5 -16
- package/chunks/{chunk-HIP6TVWA.js → chunk-U7M2DMGW.js} +3 -3
- package/chunks/{chunk-ACW3VNUE.js → chunk-UDX5OBWR.js} +41 -9
- package/chunks/{chunk-LW2FUYBN.js → chunk-USTWD7QV.js} +6 -4
- package/chunks/{chunk-NPQDJGKU.js → chunk-UUUTRMI2.js} +1 -1
- package/chunks/chunk-UW5EOVUN.js +249 -0
- package/chunks/{chunk-6IL7KRLE.js → chunk-VAK25FTU.js} +1 -1
- package/chunks/{chunk-O4BHWVUD.js → chunk-VIA5XA4U.js} +5 -2
- package/chunks/{chunk-EBXZ2YGV.js → chunk-VRYUBFMC.js} +1 -1
- package/chunks/{chunk-TWVE5ZS5.js → chunk-VULLI6WQ.js} +172 -6
- package/chunks/{chunk-LNDD3IML.js → chunk-WCXCRJYB.js} +1 -1
- package/chunks/{chunk-2LI23QA6.js → chunk-X5XDDSSH.js} +1 -1
- package/chunks/{chunk-Q35QUZDQ.js → chunk-Y34KJKDC.js} +1 -1
- package/chunks/{chunk-7NR2AIK6.js → chunk-YBL3QUDD.js} +2 -2
- package/chunks/{chunk-H4AR2JQF.js → chunk-YH6G52F2.js} +3 -3
- package/chunks/{chunk-MBOJHHPI.js → chunk-YPE6A4GC.js} +2 -2
- package/chunks/{chunk-3EK5ZOUQ.js → chunk-YX324OPW.js} +1 -1
- package/chunks/{chunk-4PTLZ3NX.js → chunk-Z2BC6UJ5.js} +3 -3
- package/chunks/{chunk-QLJUC7TG.js → chunk-ZD6UTE4A.js} +1 -1
- package/chunks/{chunk-LX3COOXF.js → chunk-ZFDTEDCF.js} +6 -6
- package/chunks/chunk-ZJHVAS7M.js +289 -0
- package/chunks/{chunk-4OWXOUYF.js → chunk-ZNAUOR2I.js} +15 -12
- package/chunks/{chunk-T2L47JJK.js → chunk-ZOIFNCKL.js} +4 -4
- package/chunks/{computer-use-2VIV73WK.js → computer-use-SOQ4E3VX.js} +43 -35
- package/chunks/{config-utils-FYTBZLCJ.js → config-utils-7V7GGIW6.js} +3 -3
- package/chunks/contextCommand-JLHYA34Z.js +80 -0
- package/chunks/{create-sub-session-AZ77LBL3.js → create-sub-session-IWW2IZ2T.js} +3 -3
- package/chunks/{create-sub-session-XDHHC2P4.js → create-sub-session-QRJLW5BV.js} +43 -35
- package/chunks/{cron-create-KTWJM7QT.js → cron-create-YIID5XAW.js} +6 -6
- package/chunks/{cron-delete-2P3I5ULL.js → cron-delete-ZVHYCEP2.js} +5 -5
- package/chunks/{cron-list-PXDPGEDQ.js → cron-list-XEGS463Q.js} +5 -5
- package/chunks/{daemon-RAPSDJH7.js → daemon-YO6433NF.js} +350 -53
- package/chunks/daemon-status-provider-2233Q37D.js +89 -0
- package/chunks/{de-4IBXM7CN.js → de-HGRCYDEJ.js} +1 -0
- package/chunks/{dist-UIFWIFRO.js → dist-46NQKLTW.js} +2 -2
- package/chunks/{dist-XRYV6TJP.js → dist-AIKFMUKK.js} +50 -4
- package/chunks/{dist-XBJVSWS2.js → dist-BBLXMS3N.js} +14 -2
- package/chunks/{dist-OMW6WDEO.js → dist-F6IBUDR4.js} +40 -9
- package/chunks/{dist-PJLG2XYX.js → dist-WEAHOXDM.js} +1 -1
- package/chunks/{dist-OAV7LJGJ.js → dist-YFNEUWSE.js} +26 -2
- package/chunks/earlyInputCapture-A7NDU3PF.js +82 -0
- package/chunks/{edit-CS6SFEXC.js → edit-OBDSQURM.js} +43 -35
- package/chunks/{en-USMCCJAJ.js → en-MTWBNGDO.js} +15 -0
- package/chunks/{enter-worktree-LMAL75DY.js → enter-worktree-U6MRPQ2P.js} +43 -35
- package/chunks/{enterPlanMode-WVJB4DSS.js → enterPlanMode-BC5QUZZ2.js} +43 -35
- package/chunks/{environment-6YHC4JAJ.js → environment-W5UFC2CH.js} +46 -38
- package/chunks/errors-M7CLORXH.js +88 -0
- package/chunks/{exit-worktree-KPFD742L.js → exit-worktree-DGNYMECB.js} +43 -35
- package/chunks/{exitPlanMode-UEJS6CDY.js → exitPlanMode-GXTBWQAR.js} +43 -35
- package/chunks/{fast-path-G2N4NRCA.js → fast-path-JJZFJANL.js} +6 -6
- package/chunks/{fast-path-settings-DAOVFADC.js → fast-path-settings-WQJU2LAT.js} +2 -2
- package/chunks/{fr-WVHEBDDB.js → fr-45RLL55O.js} +1 -0
- package/chunks/{gemini-2MDVIOVT.js → gemini-QS36EBZV.js} +132 -102
- package/chunks/{geminiContentGenerator-ZXTDBMFR.js → geminiContentGenerator-AG4KB6CV.js} +14 -8
- package/chunks/{getMachineId-bsd-QFVLPUPT.js → getMachineId-bsd-V7W3GODC.js} +1 -1
- package/chunks/{getMachineId-darwin-DGMQQE2E.js → getMachineId-darwin-TDO75DQP.js} +1 -1
- package/chunks/{getMachineId-linux-R4Z6CSWC.js → getMachineId-linux-TF43WQT2.js} +1 -1
- package/chunks/{getMachineId-unsupported-Z3SBVBUV.js → getMachineId-unsupported-ZGUO3TXT.js} +1 -1
- package/chunks/{getMachineId-win-SCK5UFDT.js → getMachineId-win-ECFYZZFQ.js} +1 -1
- package/chunks/{glob-562XFLIZ.js → glob-V7R3PSK3.js} +43 -35
- package/chunks/{grep-MGEFBDQK.js → grep-QYPSK7OP.js} +43 -35
- package/chunks/handleAutoUpdate-6DBEZYPV.js +81 -0
- package/chunks/{i18n-R6HJENXA.js → i18n-VUJJZIMU.js} +44 -36
- package/chunks/image-gen-Z3VPGKRC.js +240 -0
- package/chunks/initializer-UWAK5U5O.js +86 -0
- package/chunks/installationInfo-6O2YAA52.js +80 -0
- package/chunks/{ja-KY4ROZTE.js → ja-B7DF7DFG.js} +1 -0
- package/chunks/{keychain-token-storage-6ACJDYIB.js → keychain-token-storage-MDTG3WRM.js} +3 -3
- package/chunks/{kittyProtocolDetector-HCNNKJTI.js → kittyProtocolDetector-MBRTDRBK.js} +5 -3
- package/chunks/list-GB4ESM3T.js +89 -0
- package/chunks/list-agents-5KJJHR6I.js +80 -0
- package/chunks/loadedSettingsAdapter-OT6JVQ7U.js +83 -0
- package/chunks/loggingContentGenerator-HS3S5H3Q.js +1077 -0
- package/chunks/{loop-wakeup-RNMRVA66.js → loop-wakeup-FXKNNYSY.js} +7 -7
- package/chunks/{ls-J2ZI5XYK.js → ls-NTK6VOQJ.js} +5 -5
- package/chunks/{lsp-UMS3NUB5.js → lsp-2JI24STP.js} +3 -3
- package/chunks/{managed-npm-update-4KNYSOYC.js → managed-npm-update-JYEMMXA3.js} +94 -38
- package/chunks/mcp-6DBDJPFU.js +83 -0
- package/chunks/{monitor-DMHKE4SW.js → monitor-R3ODH5U6.js} +45 -36
- package/chunks/node-UUDY34IG.js +305 -0
- package/chunks/nonInteractiveCli-MOYCYBBU.js +141 -0
- package/chunks/{notebook-edit-35SJGEOR.js → notebook-edit-BNOK452R.js} +43 -35
- package/chunks/{openaiContentGenerator-5LPAFXPF.js → openaiContentGenerator-WMCU3O2H.js} +27 -17
- package/chunks/pidfile-TFRZZZIO.js +86 -0
- package/chunks/{processUtils-GM2I55KF.js → processUtils-RT7UNCC2.js} +2 -2
- package/chunks/{pt-OK455PLH.js → pt-22Q3FP73.js} +1 -0
- package/chunks/{qwenContentGenerator-HKOYNP7H.js → qwenContentGenerator-HHCRK4SX.js} +56 -42
- package/chunks/{qwenOAuth2-NUUYC3V5.js → qwenOAuth2-OWLB5AKH.js} +14 -27
- package/chunks/read-file-APMO3PSX.js +31 -0
- package/chunks/{read-mcp-resource-F6HYMDUY.js → read-mcp-resource-4DKQWGHD.js} +3 -3
- package/chunks/{record-artifact-7GCFLDD7.js → record-artifact-RQKFYO5B.js} +3 -3
- package/chunks/resumeHistoryUtils-6KRYEAWZ.js +91 -0
- package/chunks/ripGrep-BEJDEDXW.js +73 -0
- package/chunks/{ru-7SPDGMGD.js → ru-FZCNZHDC.js} +1 -0
- package/chunks/{run-qwen-serve-5VH3F4NW.js → run-qwen-serve-FU6HEM4J.js} +271 -57
- package/chunks/{runtime-OH77YH7W.js → runtime-XXRRTNP6.js} +55 -45
- package/chunks/{scheduler-WJQSLCSV.js → scheduler-G2ZS2Z7E.js} +43 -35
- package/chunks/{sdk-exporters-grpc-ETLH47EP.js → sdk-exporters-grpc-AK3LGHNO.js} +3 -3
- package/chunks/{sdk-exporters-http-T3POX73F.js → sdk-exporters-http-FYBSUCPD.js} +6 -6
- package/chunks/{sdk-impl-NSLPDH6I.js → sdk-impl-GMVPB7NB.js} +6 -6
- package/chunks/{send-message-PYIJ2PZL.js → send-message-Q6OOR6BR.js} +46 -9
- package/chunks/serve-7BSTXJ4T.js +89 -0
- package/chunks/{server-E4N4AI6Z.js → server-4UMH7OIZ.js} +2362 -411
- package/chunks/{session-5YUWIOQE.js → session-K3O3Q2SV.js} +105 -87
- package/chunks/{settings-YY7ZSFO7.js → settings-CR2EWTBA.js} +53 -45
- package/chunks/shell-HH3PF3A2.js +83 -0
- package/chunks/{skill-PAIDX3EU.js → skill-I3SDA4MB.js} +17 -16
- package/chunks/spawnChannel-RWNDBXGA.js +82 -0
- package/chunks/{src-IZXLJI5M.js → src-GE4TTTML.js} +302 -184
- package/chunks/{standalone-update-X675JVBL.js → standalone-update-Q6WFRZZQ.js} +45 -37
- package/chunks/{startInteractiveUI-ND2IVBU3.js → startInteractiveUI-SLZGHRPH.js} +747 -310
- package/chunks/{syntheticOutput-H7RTI5KL.js → syntheticOutput-I3757IWH.js} +4 -4
- package/chunks/{task-create-7474AJJD.js → task-create-N7WQSGYA.js} +10 -10
- package/chunks/{task-list-633HGOIB.js → task-list-FOPULZEP.js} +7 -7
- package/chunks/{task-stop-MNUGHPIA.js → task-stop-H6RHXFVQ.js} +4 -4
- package/chunks/{task-update-66GQB5LI.js → task-update-M57TFZJT.js} +10 -10
- package/chunks/{team-create-2DEYNMMN.js → team-create-YJALH5D2.js} +46 -38
- package/chunks/{team-delete-BB3CG3QF.js → team-delete-QE2UXJL7.js} +7 -7
- package/chunks/{team-plan-approval-65AVAOCT.js → team-plan-approval-34QFYKGN.js} +43 -35
- package/chunks/theme-manager-SWRILQHI.js +77 -0
- package/chunks/{todoWrite-KRAUN54W.js → todoWrite-VQ7FKOHL.js} +5 -5
- package/chunks/{tool-search-ZQP3SMTV.js → tool-search-NF7GB6LE.js} +16 -16
- package/chunks/total-session-admission-DLHHHLD3.js +84 -0
- package/chunks/{tree-sitter-FS4VPMZA.js → tree-sitter-4D7QS7F6.js} +1 -1
- package/chunks/{tree-sitter-bash-6B46JJCV.js → tree-sitter-bash-VEJGF5XF.js} +1 -1
- package/chunks/{trustedFolders-LURI52LP.js → trustedFolders-KHXHY6PY.js} +44 -36
- package/chunks/{update-relaunch-BPWFIDLM.js → update-relaunch-WBUZJC5O.js} +5 -5
- package/chunks/updateCheck-RKL6M5XN.js +92 -0
- package/chunks/useAutoAcceptIndicator-CFQ5BUJL.js +93 -0
- package/chunks/{validateNonInterActiveAuth-HWD6Y22I.js → validateNonInterActiveAuth-3R223G3R.js} +89 -80
- package/chunks/{version-OD4JAFG7.js → version-HS7YSFHV.js} +1 -1
- package/chunks/{web-fetch-RFBKNU24.js → web-fetch-NKCSG7ZE.js} +18 -16
- package/chunks/{web-search-AKTVS5YZ.js → web-search-S62WAP4S.js} +13 -27
- package/chunks/{workflow-VZVCOSZN.js → workflow-QAGU5RU4.js} +44 -36
- package/chunks/workspace-providers-status-QSVZUETE.js +86 -0
- package/chunks/{workspace-registration-store-Q5SFJSX4.js → workspace-registration-store-24JMHDGF.js} +2 -2
- package/chunks/workspace-registry-UT4RBNBM.js +88 -0
- package/chunks/workspace-service-JFWRUS4V.js +98 -0
- package/chunks/workspace-skills-status-ZBBKJOI2.js +85 -0
- package/chunks/write-file-VHIXW5M7.js +73 -0
- package/chunks/{zh-WY5DWYZD.js → zh-LUIGBD55.js} +15 -0
- package/chunks/{zh-TW-BM47YBFH.js → zh-TW-F5KG2IYD.js} +15 -0
- package/cli-entry.js +10 -1
- package/cli.js +13 -13
- package/locales/ca.js +2 -0
- package/locales/de.js +1 -0
- package/locales/en.js +25 -0
- package/locales/fr.js +1 -0
- package/locales/ja.js +1 -0
- package/locales/pt.js +1 -0
- package/locales/ru.js +1 -0
- package/locales/zh-TW.js +23 -0
- package/locales/zh.js +23 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-BWFm0SI0.js → arc-DcbWnB9T.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-CZ_yL-DQ.js → architectureDiagram-3BPJPVTR-kMMF5sud.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-B9F9mJvG.js → blockDiagram-GPEHLZMM-Htl9vTJS.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-BUdwJW5f.js → c4Diagram-AAUBKEIU-BnZnm0mQ.js} +1 -1
- package/web-shell/assets/channel-Cq7YKtfC.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-w4cF-qlF.js → chunk-2J33WTMH-DziB7kDG.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BXwURxHJ.js → chunk-4BX2VUAB-CmkD8daw.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-Gem3LalC.js → chunk-55IACEB6-CHAd9A_U.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-A3ddVojI.js → chunk-727SXJPM-Dqaam3fE.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-CjHZ5L_R.js → chunk-AQP2D5EJ-D_-saBYM.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-CKgdgcpv.js → chunk-FMBD7UC4-B9r_veWD.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-Cn2Dykjb.js → chunk-ND2GUHAM-B3EaCSpL.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN--0SyraC5.js → chunk-QZHKN3VN-CYq8x9mn.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CQ9aC1Tg.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CQ9aC1Tg.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-CphhAity.js → cose-bilkent-S5V4N54A-D0ng4uiB.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-DU--jiKp.js → dagre-BM42HDAG-DCZollQv.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-BzvuZw1Y.js → diagram-2AECGRRQ-Dfk2pWS0.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-D84-49Y0.js → diagram-5GNKFQAL-kX38ltWR.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-DQTq-3_3.js → diagram-KO2AKTUF-CJz2vsXh.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-8FTrshzN.js → diagram-LMA3HP47-BvMLZm_7.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-BCjpDBCm.js → diagram-OG6HWLK6-l7kfStkO.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-BtRObkmg.js → erDiagram-TEJ5UH35-BSVa8GGT.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-DTrW6oxy.js → flowDiagram-I6XJVG4X-CoawKIXH.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BgPNSW6j.js → ganttDiagram-6RSMTGT7-DFUDH0zF.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BTclNgGV.js → gitGraphDiagram-PVQCEYII-Y2pvpT4e.js} +1 -1
- package/web-shell/assets/{index-CxA7AqY6.js → index-D0GX0zZf.js} +1 -1
- package/web-shell/assets/index-D9haPt0X.css +5 -0
- package/web-shell/assets/index-ckX9Pq5k.js +1230 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-DCE4AJt2.js → infoDiagram-5YYISTIA-CU8_zLiX.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-C8iE6q4Y.js → ishikawaDiagram-YF4QCWOH-AVQiV0DU.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-C_dxdyEc.js → journeyDiagram-JHISSGLW-DQ0VSKa3.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Dw3n1u3w.js → kanban-definition-UN3LZRKU-BqnWqsE_.js} +1 -1
- package/web-shell/assets/{linear-C2BF2zJ9.js → linear-BkoihsaA.js} +1 -1
- package/web-shell/assets/{mermaid.core-CGTQU3MA.js → mermaid.core-5RJs-31j.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BVFZm9ZC.js → mindmap-definition-RKZ34NQL-D33Bxnpd.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-Cc-TNN3n.js → pieDiagram-4H26LBE5-BuEAw3BH.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CgW3Rzsi.js → quadrantDiagram-W4KKPZXB-Kox_usEq.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-BAaj0Y3B.js → requirementDiagram-4Y6WPE33-CNjeUif0.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-XJWmekxS.js → sankeyDiagram-5OEKKPKP-BCd2OL_U.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CtRc_0wf.js → sequenceDiagram-3UESZ5HK-CF2ZTsz0.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-WCnvMGy5.js → stateDiagram-AJRCARHV-qenSzHtm.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-B7W4zlCr.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-C9cRx49L.js → timeline-definition-PNZ67QCA-B5DyWdgs.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BvXOCEt-.js → vennDiagram-CIIHVFJN-DqP4I_o_.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-ByafGtzu.js → wardley-L42UT6IY-CJe2e4mg.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-CozAnw8x.js → wardleyDiagram-YWT4CUSO-BMDSw-Rr.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-Camu9Qvq.js → xychartDiagram-2RQKCTM6-BTVZYkxD.js} +1 -1
- package/web-shell/index.html +17 -13
- package/chunks/MaxSizedBox-3XQIBACV.js +0 -78
- package/chunks/agent-QXD5NSKA.js +0 -73
- package/chunks/agent-headless-4VXR2TBK.js +0 -67
- package/chunks/bridge-GIBRSPE6.js +0 -81
- package/chunks/chunk-CBOQ3HY7.js +0 -2019
- package/chunks/chunk-MA6GYKK7.js +0 -6928
- package/chunks/contextCommand-XQU7KLIH.js +0 -72
- package/chunks/daemon-status-provider-KQVNB4VA.js +0 -80
- package/chunks/earlyInputCapture-WP5SA3KH.js +0 -74
- package/chunks/errors-JEYPXX4S.js +0 -80
- package/chunks/handleAutoUpdate-2VJPAW43.js +0 -73
- package/chunks/initializer-UOX67ZFQ.js +0 -78
- package/chunks/installationInfo-NQNY34X3.js +0 -72
- package/chunks/list-2Z7KS7ZF.js +0 -81
- package/chunks/loadedSettingsAdapter-LIYY3LE4.js +0 -75
- package/chunks/mcp-AJ4QW3JA.js +0 -75
- package/chunks/nonInteractiveCli-PUSO5QF6.js +0 -134
- package/chunks/pidfile-EH2JW2PB.js +0 -78
- package/chunks/read-file-JZ5VXILQ.js +0 -31
- package/chunks/resumeHistoryUtils-Z3HG4WKM.js +0 -84
- package/chunks/ripGrep-JNLJCT2B.js +0 -65
- package/chunks/serve-NN5FXWR6.js +0 -81
- package/chunks/shell-FXT3NVC6.js +0 -75
- package/chunks/spawnChannel-XAWLXNOD.js +0 -74
- package/chunks/theme-manager-2WZHPK2M.js +0 -69
- package/chunks/total-session-admission-HULB2TEQ.js +0 -75
- package/chunks/updateCheck-D4ESCHBJ.js +0 -88
- package/chunks/useAutoAcceptIndicator-CBNLOF2P.js +0 -86
- package/chunks/workspace-providers-status-TJTVHORI.js +0 -78
- package/chunks/workspace-registry-H6VM5WXK.js +0 -79
- package/chunks/workspace-service-ZNKD3I2J.js +0 -90
- package/chunks/workspace-skills-status-OOBIXADG.js +0 -77
- package/chunks/write-file-CAKK5IAO.js +0 -65
- package/web-shell/assets/channel-DiLlxxIf.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CkylTdM4.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CkylTdM4.js +0 -1
- package/web-shell/assets/index-CGtQqOIa.css +0 -5
- package/web-shell/assets/index-TtM0hVjU.js +0 -1207
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-D1gzH2Ue.js +0 -1
|
@@ -0,0 +1,902 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
createDebugLogger
|
|
5
|
+
} from "./chunk-NL7LTRLR.js";
|
|
6
|
+
import {
|
|
7
|
+
init_esbuild_shims
|
|
8
|
+
} from "./chunk-5O2XNYP6.js";
|
|
9
|
+
import {
|
|
10
|
+
__name
|
|
11
|
+
} from "./chunk-J2S4EL5Y.js";
|
|
12
|
+
|
|
13
|
+
// packages/core/src/utils/safeJsonParse.ts
|
|
14
|
+
init_esbuild_shims();
|
|
15
|
+
|
|
16
|
+
// node_modules/jsonrepair/lib/esm/index.js
|
|
17
|
+
init_esbuild_shims();
|
|
18
|
+
|
|
19
|
+
// node_modules/jsonrepair/lib/esm/regular/jsonrepair.js
|
|
20
|
+
init_esbuild_shims();
|
|
21
|
+
|
|
22
|
+
// node_modules/jsonrepair/lib/esm/utils/JSONRepairError.js
|
|
23
|
+
init_esbuild_shims();
|
|
24
|
+
var JSONRepairError = class extends Error {
|
|
25
|
+
static {
|
|
26
|
+
__name(this, "JSONRepairError");
|
|
27
|
+
}
|
|
28
|
+
constructor(message, position) {
|
|
29
|
+
super(`${message} at position ${position}`);
|
|
30
|
+
this.position = position;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// node_modules/jsonrepair/lib/esm/utils/stringUtils.js
|
|
35
|
+
init_esbuild_shims();
|
|
36
|
+
var codeSpace = 32;
|
|
37
|
+
var codeNewline = 10;
|
|
38
|
+
var codeTab = 9;
|
|
39
|
+
var codeReturn = 13;
|
|
40
|
+
var codeNonBreakingSpace = 160;
|
|
41
|
+
var codeEnQuad = 8192;
|
|
42
|
+
var codeHairSpace = 8202;
|
|
43
|
+
var codeNarrowNoBreakSpace = 8239;
|
|
44
|
+
var codeMediumMathematicalSpace = 8287;
|
|
45
|
+
var codeIdeographicSpace = 12288;
|
|
46
|
+
function isHex(char) {
|
|
47
|
+
return /^[0-9A-Fa-f]$/.test(char);
|
|
48
|
+
}
|
|
49
|
+
__name(isHex, "isHex");
|
|
50
|
+
function isDigit(char) {
|
|
51
|
+
return char >= "0" && char <= "9";
|
|
52
|
+
}
|
|
53
|
+
__name(isDigit, "isDigit");
|
|
54
|
+
function isValidStringCharacter(char) {
|
|
55
|
+
return char >= " ";
|
|
56
|
+
}
|
|
57
|
+
__name(isValidStringCharacter, "isValidStringCharacter");
|
|
58
|
+
function isDelimiter(char) {
|
|
59
|
+
return ",:[]/{}()\n+".includes(char);
|
|
60
|
+
}
|
|
61
|
+
__name(isDelimiter, "isDelimiter");
|
|
62
|
+
function isFunctionNameCharStart(char) {
|
|
63
|
+
return char >= "a" && char <= "z" || char >= "A" && char <= "Z" || char === "_" || char === "$";
|
|
64
|
+
}
|
|
65
|
+
__name(isFunctionNameCharStart, "isFunctionNameCharStart");
|
|
66
|
+
function isFunctionNameChar(char) {
|
|
67
|
+
return char >= "a" && char <= "z" || char >= "A" && char <= "Z" || char === "_" || char === "$" || char >= "0" && char <= "9";
|
|
68
|
+
}
|
|
69
|
+
__name(isFunctionNameChar, "isFunctionNameChar");
|
|
70
|
+
var regexUrlStart = /^(http|https|ftp|mailto|file|data|irc):\/\/$/;
|
|
71
|
+
var regexUrlChar = /^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/;
|
|
72
|
+
function isUnquotedStringDelimiter(char) {
|
|
73
|
+
return ",[]/{}\n+".includes(char);
|
|
74
|
+
}
|
|
75
|
+
__name(isUnquotedStringDelimiter, "isUnquotedStringDelimiter");
|
|
76
|
+
function isStartOfValue(char) {
|
|
77
|
+
return isQuote(char) || regexStartOfValue.test(char);
|
|
78
|
+
}
|
|
79
|
+
__name(isStartOfValue, "isStartOfValue");
|
|
80
|
+
var regexStartOfValue = /^[[{\w-]$/;
|
|
81
|
+
function isControlCharacter(char) {
|
|
82
|
+
return char === "\n" || char === "\r" || char === " " || char === "\b" || char === "\f";
|
|
83
|
+
}
|
|
84
|
+
__name(isControlCharacter, "isControlCharacter");
|
|
85
|
+
function isWhitespace(text, index) {
|
|
86
|
+
const code = text.charCodeAt(index);
|
|
87
|
+
return code === codeSpace || code === codeNewline || code === codeTab || code === codeReturn;
|
|
88
|
+
}
|
|
89
|
+
__name(isWhitespace, "isWhitespace");
|
|
90
|
+
function isWhitespaceExceptNewline(text, index) {
|
|
91
|
+
const code = text.charCodeAt(index);
|
|
92
|
+
return code === codeSpace || code === codeTab || code === codeReturn;
|
|
93
|
+
}
|
|
94
|
+
__name(isWhitespaceExceptNewline, "isWhitespaceExceptNewline");
|
|
95
|
+
function isSpecialWhitespace(text, index) {
|
|
96
|
+
const code = text.charCodeAt(index);
|
|
97
|
+
return code === codeNonBreakingSpace || code >= codeEnQuad && code <= codeHairSpace || code === codeNarrowNoBreakSpace || code === codeMediumMathematicalSpace || code === codeIdeographicSpace;
|
|
98
|
+
}
|
|
99
|
+
__name(isSpecialWhitespace, "isSpecialWhitespace");
|
|
100
|
+
function isQuote(char) {
|
|
101
|
+
return isDoubleQuoteLike(char) || isSingleQuoteLike(char);
|
|
102
|
+
}
|
|
103
|
+
__name(isQuote, "isQuote");
|
|
104
|
+
function isDoubleQuoteLike(char) {
|
|
105
|
+
return char === '"' || char === "\u201C" || char === "\u201D";
|
|
106
|
+
}
|
|
107
|
+
__name(isDoubleQuoteLike, "isDoubleQuoteLike");
|
|
108
|
+
function isDoubleQuote(char) {
|
|
109
|
+
return char === '"';
|
|
110
|
+
}
|
|
111
|
+
__name(isDoubleQuote, "isDoubleQuote");
|
|
112
|
+
function isSingleQuoteLike(char) {
|
|
113
|
+
return char === "'" || char === "\u2018" || char === "\u2019" || char === "`" || char === "\xB4";
|
|
114
|
+
}
|
|
115
|
+
__name(isSingleQuoteLike, "isSingleQuoteLike");
|
|
116
|
+
function isSingleQuote(char) {
|
|
117
|
+
return char === "'";
|
|
118
|
+
}
|
|
119
|
+
__name(isSingleQuote, "isSingleQuote");
|
|
120
|
+
function stripLastOccurrence(text, textToStrip) {
|
|
121
|
+
let stripRemainingText = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
122
|
+
const index = text.lastIndexOf(textToStrip);
|
|
123
|
+
return index !== -1 ? text.substring(0, index) + (stripRemainingText ? "" : text.substring(index + 1)) : text;
|
|
124
|
+
}
|
|
125
|
+
__name(stripLastOccurrence, "stripLastOccurrence");
|
|
126
|
+
function insertBeforeLastWhitespace(text, textToInsert) {
|
|
127
|
+
let index = text.length;
|
|
128
|
+
if (!isWhitespace(text, index - 1)) {
|
|
129
|
+
return text + textToInsert;
|
|
130
|
+
}
|
|
131
|
+
while (isWhitespace(text, index - 1)) {
|
|
132
|
+
index--;
|
|
133
|
+
}
|
|
134
|
+
return text.substring(0, index) + textToInsert + text.substring(index);
|
|
135
|
+
}
|
|
136
|
+
__name(insertBeforeLastWhitespace, "insertBeforeLastWhitespace");
|
|
137
|
+
function removeAtIndex(text, start, count) {
|
|
138
|
+
return text.substring(0, start) + text.substring(start + count);
|
|
139
|
+
}
|
|
140
|
+
__name(removeAtIndex, "removeAtIndex");
|
|
141
|
+
function endsWithCommaOrNewline(text) {
|
|
142
|
+
return /[,\n][ \t\r]*$/.test(text);
|
|
143
|
+
}
|
|
144
|
+
__name(endsWithCommaOrNewline, "endsWithCommaOrNewline");
|
|
145
|
+
|
|
146
|
+
// node_modules/jsonrepair/lib/esm/regular/jsonrepair.js
|
|
147
|
+
var controlCharacters = {
|
|
148
|
+
"\b": "\\b",
|
|
149
|
+
"\f": "\\f",
|
|
150
|
+
"\n": "\\n",
|
|
151
|
+
"\r": "\\r",
|
|
152
|
+
" ": "\\t"
|
|
153
|
+
};
|
|
154
|
+
var escapeCharacters = {
|
|
155
|
+
'"': '"',
|
|
156
|
+
"\\": "\\",
|
|
157
|
+
"/": "/",
|
|
158
|
+
b: "\b",
|
|
159
|
+
f: "\f",
|
|
160
|
+
n: "\n",
|
|
161
|
+
r: "\r",
|
|
162
|
+
t: " "
|
|
163
|
+
// note that \u is handled separately in parseString()
|
|
164
|
+
};
|
|
165
|
+
function jsonrepair(text) {
|
|
166
|
+
let i = 0;
|
|
167
|
+
let output = "";
|
|
168
|
+
parseMarkdownCodeBlock(["```", "[```", "{```"]);
|
|
169
|
+
const processed = parseValue();
|
|
170
|
+
if (!processed) {
|
|
171
|
+
throwUnexpectedEnd();
|
|
172
|
+
}
|
|
173
|
+
parseMarkdownCodeBlock(["```", "```]", "```}"]);
|
|
174
|
+
const processedComma = parseCharacter(",");
|
|
175
|
+
if (processedComma) {
|
|
176
|
+
parseWhitespaceAndSkipComments();
|
|
177
|
+
}
|
|
178
|
+
if (isStartOfValue(text[i]) && endsWithCommaOrNewline(output)) {
|
|
179
|
+
if (!processedComma) {
|
|
180
|
+
output = insertBeforeLastWhitespace(output, ",");
|
|
181
|
+
}
|
|
182
|
+
parseNewlineDelimitedJSON();
|
|
183
|
+
} else if (processedComma) {
|
|
184
|
+
output = stripLastOccurrence(output, ",");
|
|
185
|
+
}
|
|
186
|
+
while (text[i] === "}" || text[i] === "]") {
|
|
187
|
+
i++;
|
|
188
|
+
parseWhitespaceAndSkipComments();
|
|
189
|
+
}
|
|
190
|
+
if (i >= text.length) {
|
|
191
|
+
return output;
|
|
192
|
+
}
|
|
193
|
+
throwUnexpectedCharacter();
|
|
194
|
+
function parseValue() {
|
|
195
|
+
parseWhitespaceAndSkipComments();
|
|
196
|
+
const processed2 = parseObject() || parseArray() || parseString() || parseNumber() || parseKeywords() || parseUnquotedString(false) || parseRegex();
|
|
197
|
+
parseWhitespaceAndSkipComments();
|
|
198
|
+
return processed2;
|
|
199
|
+
}
|
|
200
|
+
__name(parseValue, "parseValue");
|
|
201
|
+
function parseWhitespaceAndSkipComments() {
|
|
202
|
+
let skipNewline = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
|
|
203
|
+
const start = i;
|
|
204
|
+
let changed = parseWhitespace(skipNewline);
|
|
205
|
+
do {
|
|
206
|
+
changed = parseComment();
|
|
207
|
+
if (changed) {
|
|
208
|
+
changed = parseWhitespace(skipNewline);
|
|
209
|
+
}
|
|
210
|
+
} while (changed);
|
|
211
|
+
return i > start;
|
|
212
|
+
}
|
|
213
|
+
__name(parseWhitespaceAndSkipComments, "parseWhitespaceAndSkipComments");
|
|
214
|
+
function parseWhitespace(skipNewline) {
|
|
215
|
+
const _isWhiteSpace = skipNewline ? isWhitespace : isWhitespaceExceptNewline;
|
|
216
|
+
let whitespace = "";
|
|
217
|
+
while (true) {
|
|
218
|
+
if (_isWhiteSpace(text, i)) {
|
|
219
|
+
whitespace += text[i];
|
|
220
|
+
i++;
|
|
221
|
+
} else if (isSpecialWhitespace(text, i)) {
|
|
222
|
+
whitespace += " ";
|
|
223
|
+
i++;
|
|
224
|
+
} else {
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (whitespace.length > 0) {
|
|
229
|
+
output += whitespace;
|
|
230
|
+
return true;
|
|
231
|
+
}
|
|
232
|
+
return false;
|
|
233
|
+
}
|
|
234
|
+
__name(parseWhitespace, "parseWhitespace");
|
|
235
|
+
function parseComment() {
|
|
236
|
+
if (text[i] === "/" && text[i + 1] === "*") {
|
|
237
|
+
while (i < text.length && !atEndOfBlockComment(text, i)) {
|
|
238
|
+
i++;
|
|
239
|
+
}
|
|
240
|
+
i += 2;
|
|
241
|
+
return true;
|
|
242
|
+
}
|
|
243
|
+
if (text[i] === "/" && text[i + 1] === "/") {
|
|
244
|
+
while (i < text.length && text[i] !== "\n") {
|
|
245
|
+
i++;
|
|
246
|
+
}
|
|
247
|
+
return true;
|
|
248
|
+
}
|
|
249
|
+
return false;
|
|
250
|
+
}
|
|
251
|
+
__name(parseComment, "parseComment");
|
|
252
|
+
function parseMarkdownCodeBlock(blocks) {
|
|
253
|
+
if (skipMarkdownCodeBlock(blocks)) {
|
|
254
|
+
if (isFunctionNameCharStart(text[i])) {
|
|
255
|
+
while (i < text.length && isFunctionNameChar(text[i])) {
|
|
256
|
+
i++;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
parseWhitespaceAndSkipComments();
|
|
260
|
+
return true;
|
|
261
|
+
}
|
|
262
|
+
return false;
|
|
263
|
+
}
|
|
264
|
+
__name(parseMarkdownCodeBlock, "parseMarkdownCodeBlock");
|
|
265
|
+
function skipMarkdownCodeBlock(blocks) {
|
|
266
|
+
parseWhitespace(true);
|
|
267
|
+
for (const block of blocks) {
|
|
268
|
+
const end = i + block.length;
|
|
269
|
+
if (text.slice(i, end) === block) {
|
|
270
|
+
i = end;
|
|
271
|
+
return true;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return false;
|
|
275
|
+
}
|
|
276
|
+
__name(skipMarkdownCodeBlock, "skipMarkdownCodeBlock");
|
|
277
|
+
function parseCharacter(char) {
|
|
278
|
+
if (text[i] === char) {
|
|
279
|
+
output += text[i];
|
|
280
|
+
i++;
|
|
281
|
+
return true;
|
|
282
|
+
}
|
|
283
|
+
return false;
|
|
284
|
+
}
|
|
285
|
+
__name(parseCharacter, "parseCharacter");
|
|
286
|
+
function skipCharacter(char) {
|
|
287
|
+
if (text[i] === char) {
|
|
288
|
+
i++;
|
|
289
|
+
return true;
|
|
290
|
+
}
|
|
291
|
+
return false;
|
|
292
|
+
}
|
|
293
|
+
__name(skipCharacter, "skipCharacter");
|
|
294
|
+
function skipEscapeCharacter() {
|
|
295
|
+
return skipCharacter("\\");
|
|
296
|
+
}
|
|
297
|
+
__name(skipEscapeCharacter, "skipEscapeCharacter");
|
|
298
|
+
function skipEllipsis() {
|
|
299
|
+
parseWhitespaceAndSkipComments();
|
|
300
|
+
if (text[i] === "." && text[i + 1] === "." && text[i + 2] === ".") {
|
|
301
|
+
i += 3;
|
|
302
|
+
parseWhitespaceAndSkipComments();
|
|
303
|
+
skipCharacter(",");
|
|
304
|
+
return true;
|
|
305
|
+
}
|
|
306
|
+
return false;
|
|
307
|
+
}
|
|
308
|
+
__name(skipEllipsis, "skipEllipsis");
|
|
309
|
+
function parseObject() {
|
|
310
|
+
if (text[i] === "{") {
|
|
311
|
+
output += "{";
|
|
312
|
+
i++;
|
|
313
|
+
parseWhitespaceAndSkipComments();
|
|
314
|
+
if (skipCharacter(",")) {
|
|
315
|
+
parseWhitespaceAndSkipComments();
|
|
316
|
+
}
|
|
317
|
+
let initial = true;
|
|
318
|
+
while (i < text.length && text[i] !== "}") {
|
|
319
|
+
let processedComma2;
|
|
320
|
+
if (!initial) {
|
|
321
|
+
processedComma2 = parseCharacter(",");
|
|
322
|
+
if (!processedComma2) {
|
|
323
|
+
output = insertBeforeLastWhitespace(output, ",");
|
|
324
|
+
}
|
|
325
|
+
parseWhitespaceAndSkipComments();
|
|
326
|
+
} else {
|
|
327
|
+
processedComma2 = true;
|
|
328
|
+
initial = false;
|
|
329
|
+
}
|
|
330
|
+
skipEllipsis();
|
|
331
|
+
const processedKey = parseString() || parseUnquotedString(true);
|
|
332
|
+
if (!processedKey) {
|
|
333
|
+
if (text[i] === "}" || text[i] === "{" || text[i] === "]" || text[i] === "[" || text[i] === void 0) {
|
|
334
|
+
output = stripLastOccurrence(output, ",");
|
|
335
|
+
} else {
|
|
336
|
+
throwObjectKeyExpected();
|
|
337
|
+
}
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
parseWhitespaceAndSkipComments();
|
|
341
|
+
const processedColon = parseCharacter(":");
|
|
342
|
+
const truncatedText = i >= text.length;
|
|
343
|
+
if (!processedColon) {
|
|
344
|
+
if (isStartOfValue(text[i]) || truncatedText) {
|
|
345
|
+
output = insertBeforeLastWhitespace(output, ":");
|
|
346
|
+
} else {
|
|
347
|
+
throwColonExpected();
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
const processedValue = parseValue();
|
|
351
|
+
if (!processedValue) {
|
|
352
|
+
if (processedColon || truncatedText) {
|
|
353
|
+
output += "null";
|
|
354
|
+
} else {
|
|
355
|
+
throwColonExpected();
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
if (text[i] === "}") {
|
|
360
|
+
output += "}";
|
|
361
|
+
i++;
|
|
362
|
+
} else {
|
|
363
|
+
output = insertBeforeLastWhitespace(output, "}");
|
|
364
|
+
}
|
|
365
|
+
return true;
|
|
366
|
+
}
|
|
367
|
+
return false;
|
|
368
|
+
}
|
|
369
|
+
__name(parseObject, "parseObject");
|
|
370
|
+
function parseArray() {
|
|
371
|
+
if (text[i] === "[") {
|
|
372
|
+
output += "[";
|
|
373
|
+
i++;
|
|
374
|
+
parseWhitespaceAndSkipComments();
|
|
375
|
+
if (skipCharacter(",")) {
|
|
376
|
+
parseWhitespaceAndSkipComments();
|
|
377
|
+
}
|
|
378
|
+
let initial = true;
|
|
379
|
+
while (i < text.length && text[i] !== "]") {
|
|
380
|
+
if (!initial) {
|
|
381
|
+
const processedComma2 = parseCharacter(",");
|
|
382
|
+
if (!processedComma2) {
|
|
383
|
+
output = insertBeforeLastWhitespace(output, ",");
|
|
384
|
+
}
|
|
385
|
+
} else {
|
|
386
|
+
initial = false;
|
|
387
|
+
}
|
|
388
|
+
skipEllipsis();
|
|
389
|
+
const processedValue = parseValue();
|
|
390
|
+
if (!processedValue) {
|
|
391
|
+
output = stripLastOccurrence(output, ",");
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
if (text[i] === "]") {
|
|
396
|
+
output += "]";
|
|
397
|
+
i++;
|
|
398
|
+
} else {
|
|
399
|
+
output = insertBeforeLastWhitespace(output, "]");
|
|
400
|
+
}
|
|
401
|
+
return true;
|
|
402
|
+
}
|
|
403
|
+
return false;
|
|
404
|
+
}
|
|
405
|
+
__name(parseArray, "parseArray");
|
|
406
|
+
function parseNewlineDelimitedJSON() {
|
|
407
|
+
let initial = true;
|
|
408
|
+
let processedValue = true;
|
|
409
|
+
while (processedValue) {
|
|
410
|
+
if (!initial) {
|
|
411
|
+
const processedComma2 = parseCharacter(",");
|
|
412
|
+
if (!processedComma2) {
|
|
413
|
+
output = insertBeforeLastWhitespace(output, ",");
|
|
414
|
+
}
|
|
415
|
+
} else {
|
|
416
|
+
initial = false;
|
|
417
|
+
}
|
|
418
|
+
processedValue = parseValue();
|
|
419
|
+
}
|
|
420
|
+
if (!processedValue) {
|
|
421
|
+
output = stripLastOccurrence(output, ",");
|
|
422
|
+
}
|
|
423
|
+
output = `[
|
|
424
|
+
${output}
|
|
425
|
+
]`;
|
|
426
|
+
}
|
|
427
|
+
__name(parseNewlineDelimitedJSON, "parseNewlineDelimitedJSON");
|
|
428
|
+
function parseString() {
|
|
429
|
+
let stopAtDelimiter = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
430
|
+
let stopAtIndex = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1;
|
|
431
|
+
let skipEscapeChars = text[i] === "\\";
|
|
432
|
+
if (skipEscapeChars) {
|
|
433
|
+
i++;
|
|
434
|
+
skipEscapeChars = true;
|
|
435
|
+
}
|
|
436
|
+
if (isQuote(text[i])) {
|
|
437
|
+
const isEndQuote = isDoubleQuote(text[i]) ? isDoubleQuote : isSingleQuote(text[i]) ? isSingleQuote : isSingleQuoteLike(text[i]) ? isSingleQuoteLike : isDoubleQuoteLike;
|
|
438
|
+
const iBefore = i;
|
|
439
|
+
const oBefore = output.length;
|
|
440
|
+
let str = '"';
|
|
441
|
+
i++;
|
|
442
|
+
while (true) {
|
|
443
|
+
if (i >= text.length) {
|
|
444
|
+
const iPrev = prevNonWhitespaceIndex(i - 1);
|
|
445
|
+
if (!stopAtDelimiter && isDelimiter(text.charAt(iPrev))) {
|
|
446
|
+
i = iBefore;
|
|
447
|
+
output = output.substring(0, oBefore);
|
|
448
|
+
return parseString(true);
|
|
449
|
+
}
|
|
450
|
+
str = insertBeforeLastWhitespace(str, '"');
|
|
451
|
+
output += str;
|
|
452
|
+
return true;
|
|
453
|
+
}
|
|
454
|
+
if (i === stopAtIndex) {
|
|
455
|
+
str = insertBeforeLastWhitespace(str, '"');
|
|
456
|
+
output += str;
|
|
457
|
+
return true;
|
|
458
|
+
}
|
|
459
|
+
if (isEndQuote(text[i])) {
|
|
460
|
+
const iQuote = i;
|
|
461
|
+
const oQuote = str.length;
|
|
462
|
+
str += '"';
|
|
463
|
+
i++;
|
|
464
|
+
output += str;
|
|
465
|
+
parseWhitespaceAndSkipComments(false);
|
|
466
|
+
if (stopAtDelimiter || i >= text.length || isDelimiter(text[i]) || isQuote(text[i]) || isDigit(text[i])) {
|
|
467
|
+
parseConcatenatedString();
|
|
468
|
+
return true;
|
|
469
|
+
}
|
|
470
|
+
const iPrevChar = prevNonWhitespaceIndex(iQuote - 1);
|
|
471
|
+
const prevChar = text.charAt(iPrevChar);
|
|
472
|
+
if (prevChar === ",") {
|
|
473
|
+
i = iBefore;
|
|
474
|
+
output = output.substring(0, oBefore);
|
|
475
|
+
return parseString(false, iPrevChar);
|
|
476
|
+
}
|
|
477
|
+
if (isDelimiter(prevChar)) {
|
|
478
|
+
i = iBefore;
|
|
479
|
+
output = output.substring(0, oBefore);
|
|
480
|
+
return parseString(true);
|
|
481
|
+
}
|
|
482
|
+
output = output.substring(0, oBefore);
|
|
483
|
+
i = iQuote + 1;
|
|
484
|
+
str = `${str.substring(0, oQuote)}\\${str.substring(oQuote)}`;
|
|
485
|
+
} else if (stopAtDelimiter && isUnquotedStringDelimiter(text[i])) {
|
|
486
|
+
if (text[i - 1] === ":" && regexUrlStart.test(text.substring(iBefore + 1, i + 2))) {
|
|
487
|
+
while (i < text.length && regexUrlChar.test(text[i])) {
|
|
488
|
+
str += text[i];
|
|
489
|
+
i++;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
str = insertBeforeLastWhitespace(str, '"');
|
|
493
|
+
output += str;
|
|
494
|
+
parseConcatenatedString();
|
|
495
|
+
return true;
|
|
496
|
+
} else if (text[i] === "\\") {
|
|
497
|
+
const char = text.charAt(i + 1);
|
|
498
|
+
const escapeChar = escapeCharacters[char];
|
|
499
|
+
if (escapeChar !== void 0) {
|
|
500
|
+
str += text.slice(i, i + 2);
|
|
501
|
+
i += 2;
|
|
502
|
+
} else if (char === "u") {
|
|
503
|
+
let j = 2;
|
|
504
|
+
while (j < 6 && isHex(text[i + j])) {
|
|
505
|
+
j++;
|
|
506
|
+
}
|
|
507
|
+
if (j === 6) {
|
|
508
|
+
str += text.slice(i, i + 6);
|
|
509
|
+
i += 6;
|
|
510
|
+
} else if (i + j >= text.length) {
|
|
511
|
+
i = text.length;
|
|
512
|
+
} else {
|
|
513
|
+
throwInvalidUnicodeCharacter();
|
|
514
|
+
}
|
|
515
|
+
} else {
|
|
516
|
+
str += char;
|
|
517
|
+
i += 2;
|
|
518
|
+
}
|
|
519
|
+
} else {
|
|
520
|
+
const char = text.charAt(i);
|
|
521
|
+
if (char === '"' && text[i - 1] !== "\\") {
|
|
522
|
+
str += `\\${char}`;
|
|
523
|
+
i++;
|
|
524
|
+
} else if (isControlCharacter(char)) {
|
|
525
|
+
str += controlCharacters[char];
|
|
526
|
+
i++;
|
|
527
|
+
} else {
|
|
528
|
+
if (!isValidStringCharacter(char)) {
|
|
529
|
+
throwInvalidCharacter(char);
|
|
530
|
+
}
|
|
531
|
+
str += char;
|
|
532
|
+
i++;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
if (skipEscapeChars) {
|
|
536
|
+
skipEscapeCharacter();
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
return false;
|
|
541
|
+
}
|
|
542
|
+
__name(parseString, "parseString");
|
|
543
|
+
function parseConcatenatedString() {
|
|
544
|
+
let processed2 = false;
|
|
545
|
+
parseWhitespaceAndSkipComments();
|
|
546
|
+
while (text[i] === "+") {
|
|
547
|
+
processed2 = true;
|
|
548
|
+
i++;
|
|
549
|
+
parseWhitespaceAndSkipComments();
|
|
550
|
+
output = stripLastOccurrence(output, '"', true);
|
|
551
|
+
const start = output.length;
|
|
552
|
+
const parsedStr = parseString();
|
|
553
|
+
if (parsedStr) {
|
|
554
|
+
output = removeAtIndex(output, start, 1);
|
|
555
|
+
} else {
|
|
556
|
+
output = insertBeforeLastWhitespace(output, '"');
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
return processed2;
|
|
560
|
+
}
|
|
561
|
+
__name(parseConcatenatedString, "parseConcatenatedString");
|
|
562
|
+
function parseNumber() {
|
|
563
|
+
const start = i;
|
|
564
|
+
if (text[i] === "-") {
|
|
565
|
+
i++;
|
|
566
|
+
if (atEndOfNumber()) {
|
|
567
|
+
repairNumberEndingWithNumericSymbol(start);
|
|
568
|
+
return true;
|
|
569
|
+
}
|
|
570
|
+
if (!isDigit(text[i])) {
|
|
571
|
+
i = start;
|
|
572
|
+
return false;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
while (isDigit(text[i])) {
|
|
576
|
+
i++;
|
|
577
|
+
}
|
|
578
|
+
if (text[i] === ".") {
|
|
579
|
+
i++;
|
|
580
|
+
if (atEndOfNumber()) {
|
|
581
|
+
repairNumberEndingWithNumericSymbol(start);
|
|
582
|
+
return true;
|
|
583
|
+
}
|
|
584
|
+
if (!isDigit(text[i])) {
|
|
585
|
+
i = start;
|
|
586
|
+
return false;
|
|
587
|
+
}
|
|
588
|
+
while (isDigit(text[i])) {
|
|
589
|
+
i++;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
if (text[i] === "e" || text[i] === "E") {
|
|
593
|
+
i++;
|
|
594
|
+
if (text[i] === "-" || text[i] === "+") {
|
|
595
|
+
i++;
|
|
596
|
+
}
|
|
597
|
+
if (atEndOfNumber()) {
|
|
598
|
+
repairNumberEndingWithNumericSymbol(start);
|
|
599
|
+
return true;
|
|
600
|
+
}
|
|
601
|
+
if (!isDigit(text[i])) {
|
|
602
|
+
i = start;
|
|
603
|
+
return false;
|
|
604
|
+
}
|
|
605
|
+
while (isDigit(text[i])) {
|
|
606
|
+
i++;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
if (!atEndOfNumber()) {
|
|
610
|
+
i = start;
|
|
611
|
+
return false;
|
|
612
|
+
}
|
|
613
|
+
if (i > start) {
|
|
614
|
+
const num = text.slice(start, i);
|
|
615
|
+
const hasInvalidLeadingZero = /^0\d/.test(num);
|
|
616
|
+
output += hasInvalidLeadingZero ? `"${num}"` : num;
|
|
617
|
+
return true;
|
|
618
|
+
}
|
|
619
|
+
return false;
|
|
620
|
+
}
|
|
621
|
+
__name(parseNumber, "parseNumber");
|
|
622
|
+
function parseKeywords() {
|
|
623
|
+
return parseKeyword("true", "true") || parseKeyword("false", "false") || parseKeyword("null", "null") || // repair Python keywords True, False, None
|
|
624
|
+
parseKeyword("True", "true") || parseKeyword("False", "false") || parseKeyword("None", "null");
|
|
625
|
+
}
|
|
626
|
+
__name(parseKeywords, "parseKeywords");
|
|
627
|
+
function parseKeyword(name, value) {
|
|
628
|
+
if (text.slice(i, i + name.length) === name) {
|
|
629
|
+
output += value;
|
|
630
|
+
i += name.length;
|
|
631
|
+
return true;
|
|
632
|
+
}
|
|
633
|
+
return false;
|
|
634
|
+
}
|
|
635
|
+
__name(parseKeyword, "parseKeyword");
|
|
636
|
+
function parseUnquotedString(isKey) {
|
|
637
|
+
const start = i;
|
|
638
|
+
if (isFunctionNameCharStart(text[i])) {
|
|
639
|
+
while (i < text.length && isFunctionNameChar(text[i])) {
|
|
640
|
+
i++;
|
|
641
|
+
}
|
|
642
|
+
let j = i;
|
|
643
|
+
while (isWhitespace(text, j)) {
|
|
644
|
+
j++;
|
|
645
|
+
}
|
|
646
|
+
if (text[j] === "(") {
|
|
647
|
+
i = j + 1;
|
|
648
|
+
parseValue();
|
|
649
|
+
if (text[i] === ")") {
|
|
650
|
+
i++;
|
|
651
|
+
if (text[i] === ";") {
|
|
652
|
+
i++;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
return true;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
while (i < text.length && !isUnquotedStringDelimiter(text[i]) && !isQuote(text[i]) && (!isKey || text[i] !== ":")) {
|
|
659
|
+
i++;
|
|
660
|
+
}
|
|
661
|
+
if (text[i - 1] === ":" && regexUrlStart.test(text.substring(start, i + 2))) {
|
|
662
|
+
while (i < text.length && regexUrlChar.test(text[i])) {
|
|
663
|
+
i++;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
if (i > start) {
|
|
667
|
+
while (isWhitespace(text, i - 1) && i > 0) {
|
|
668
|
+
i--;
|
|
669
|
+
}
|
|
670
|
+
const symbol = text.slice(start, i);
|
|
671
|
+
output += symbol === "undefined" ? "null" : JSON.stringify(symbol);
|
|
672
|
+
if (text[i] === '"') {
|
|
673
|
+
i++;
|
|
674
|
+
}
|
|
675
|
+
return true;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
__name(parseUnquotedString, "parseUnquotedString");
|
|
679
|
+
function parseRegex() {
|
|
680
|
+
if (text[i] === "/") {
|
|
681
|
+
const start = i;
|
|
682
|
+
i++;
|
|
683
|
+
while (i < text.length && (text[i] !== "/" || text[i - 1] === "\\")) {
|
|
684
|
+
i++;
|
|
685
|
+
}
|
|
686
|
+
i++;
|
|
687
|
+
output += `"${text.substring(start, i)}"`;
|
|
688
|
+
return true;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
__name(parseRegex, "parseRegex");
|
|
692
|
+
function prevNonWhitespaceIndex(start) {
|
|
693
|
+
let prev = start;
|
|
694
|
+
while (prev > 0 && isWhitespace(text, prev)) {
|
|
695
|
+
prev--;
|
|
696
|
+
}
|
|
697
|
+
return prev;
|
|
698
|
+
}
|
|
699
|
+
__name(prevNonWhitespaceIndex, "prevNonWhitespaceIndex");
|
|
700
|
+
function atEndOfNumber() {
|
|
701
|
+
return i >= text.length || isDelimiter(text[i]) || isWhitespace(text, i);
|
|
702
|
+
}
|
|
703
|
+
__name(atEndOfNumber, "atEndOfNumber");
|
|
704
|
+
function repairNumberEndingWithNumericSymbol(start) {
|
|
705
|
+
output += `${text.slice(start, i)}0`;
|
|
706
|
+
}
|
|
707
|
+
__name(repairNumberEndingWithNumericSymbol, "repairNumberEndingWithNumericSymbol");
|
|
708
|
+
function throwInvalidCharacter(char) {
|
|
709
|
+
throw new JSONRepairError(`Invalid character ${JSON.stringify(char)}`, i);
|
|
710
|
+
}
|
|
711
|
+
__name(throwInvalidCharacter, "throwInvalidCharacter");
|
|
712
|
+
function throwUnexpectedCharacter() {
|
|
713
|
+
throw new JSONRepairError(`Unexpected character ${JSON.stringify(text[i])}`, i);
|
|
714
|
+
}
|
|
715
|
+
__name(throwUnexpectedCharacter, "throwUnexpectedCharacter");
|
|
716
|
+
function throwUnexpectedEnd() {
|
|
717
|
+
throw new JSONRepairError("Unexpected end of json string", text.length);
|
|
718
|
+
}
|
|
719
|
+
__name(throwUnexpectedEnd, "throwUnexpectedEnd");
|
|
720
|
+
function throwObjectKeyExpected() {
|
|
721
|
+
throw new JSONRepairError("Object key expected", i);
|
|
722
|
+
}
|
|
723
|
+
__name(throwObjectKeyExpected, "throwObjectKeyExpected");
|
|
724
|
+
function throwColonExpected() {
|
|
725
|
+
throw new JSONRepairError("Colon expected", i);
|
|
726
|
+
}
|
|
727
|
+
__name(throwColonExpected, "throwColonExpected");
|
|
728
|
+
function throwInvalidUnicodeCharacter() {
|
|
729
|
+
const chars = text.slice(i, i + 6);
|
|
730
|
+
throw new JSONRepairError(`Invalid unicode character "${chars}"`, i);
|
|
731
|
+
}
|
|
732
|
+
__name(throwInvalidUnicodeCharacter, "throwInvalidUnicodeCharacter");
|
|
733
|
+
}
|
|
734
|
+
__name(jsonrepair, "jsonrepair");
|
|
735
|
+
function atEndOfBlockComment(text, i) {
|
|
736
|
+
return text[i] === "*" && text[i + 1] === "/";
|
|
737
|
+
}
|
|
738
|
+
__name(atEndOfBlockComment, "atEndOfBlockComment");
|
|
739
|
+
|
|
740
|
+
// packages/core/src/utils/safeJsonParse.ts
|
|
741
|
+
var debugLogger = createDebugLogger("JSON_PARSE");
|
|
742
|
+
function safeJsonParse(jsonString, fallbackValue = {}) {
|
|
743
|
+
if (!jsonString || typeof jsonString !== "string") {
|
|
744
|
+
return fallbackValue;
|
|
745
|
+
}
|
|
746
|
+
try {
|
|
747
|
+
return JSON.parse(jsonString);
|
|
748
|
+
} catch (error) {
|
|
749
|
+
try {
|
|
750
|
+
const repairedJson = jsonrepair(jsonString);
|
|
751
|
+
return JSON.parse(repairedJson);
|
|
752
|
+
} catch (repairError) {
|
|
753
|
+
debugLogger.error("Failed to parse JSON even with jsonrepair:", {
|
|
754
|
+
originalError: error,
|
|
755
|
+
repairError,
|
|
756
|
+
jsonString
|
|
757
|
+
});
|
|
758
|
+
return fallbackValue;
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
__name(safeJsonParse, "safeJsonParse");
|
|
763
|
+
|
|
764
|
+
// packages/core/src/utils/schemaConverter.ts
|
|
765
|
+
init_esbuild_shims();
|
|
766
|
+
function convertSchema(schema, mode = "auto") {
|
|
767
|
+
if (mode === "openapi_30") {
|
|
768
|
+
return toOpenAPI30(schema);
|
|
769
|
+
}
|
|
770
|
+
return schema;
|
|
771
|
+
}
|
|
772
|
+
__name(convertSchema, "convertSchema");
|
|
773
|
+
function toOpenAPI30(schema) {
|
|
774
|
+
const convert = /* @__PURE__ */ __name((obj) => {
|
|
775
|
+
if (typeof obj !== "object" || obj === null) {
|
|
776
|
+
return obj;
|
|
777
|
+
}
|
|
778
|
+
if (Array.isArray(obj)) {
|
|
779
|
+
return obj.map(convert);
|
|
780
|
+
}
|
|
781
|
+
const source = obj;
|
|
782
|
+
const target = {};
|
|
783
|
+
if (Array.isArray(source["type"])) {
|
|
784
|
+
const types = source["type"];
|
|
785
|
+
if (types.length === 2 && types.includes("null")) {
|
|
786
|
+
target["type"] = types.find((t) => t !== "null");
|
|
787
|
+
target["nullable"] = true;
|
|
788
|
+
} else {
|
|
789
|
+
target["type"] = types.find((t) => t !== "null") ?? types[0];
|
|
790
|
+
if (types.includes("null")) {
|
|
791
|
+
target["nullable"] = true;
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
} else if (source["type"] !== void 0) {
|
|
795
|
+
target["type"] = source["type"];
|
|
796
|
+
}
|
|
797
|
+
if (source["const"] !== void 0) {
|
|
798
|
+
target["enum"] = [source["const"]];
|
|
799
|
+
delete target["const"];
|
|
800
|
+
}
|
|
801
|
+
if (typeof source["exclusiveMinimum"] === "number") {
|
|
802
|
+
target["minimum"] = source["exclusiveMinimum"];
|
|
803
|
+
target["exclusiveMinimum"] = true;
|
|
804
|
+
}
|
|
805
|
+
if (typeof source["exclusiveMaximum"] === "number") {
|
|
806
|
+
target["maximum"] = source["exclusiveMaximum"];
|
|
807
|
+
target["exclusiveMaximum"] = true;
|
|
808
|
+
}
|
|
809
|
+
if (Array.isArray(source["items"])) {
|
|
810
|
+
delete target["items"];
|
|
811
|
+
} else if (typeof source["items"] === "object" && source["items"] !== null) {
|
|
812
|
+
target["items"] = convert(source["items"]);
|
|
813
|
+
}
|
|
814
|
+
if (Array.isArray(source["enum"])) {
|
|
815
|
+
target["enum"] = source["enum"].map(String);
|
|
816
|
+
}
|
|
817
|
+
for (const [key, value] of Object.entries(source)) {
|
|
818
|
+
if (key === "type" || key === "const" || key === "exclusiveMinimum" || key === "exclusiveMaximum" || key === "items" || key === "enum" || key === "$schema" || key === "$id" || key === "default" || // Optional: Gemini sometimes complains about defaults conflicting with types
|
|
819
|
+
key === "dependencies" || key === "patternProperties") {
|
|
820
|
+
continue;
|
|
821
|
+
}
|
|
822
|
+
target[key] = convert(value);
|
|
823
|
+
}
|
|
824
|
+
return target;
|
|
825
|
+
}, "convert");
|
|
826
|
+
return convert(schema);
|
|
827
|
+
}
|
|
828
|
+
__name(toOpenAPI30, "toOpenAPI30");
|
|
829
|
+
function relaxSchemaForFunctionCalling(schema) {
|
|
830
|
+
const relax = /* @__PURE__ */ __name((obj) => {
|
|
831
|
+
if (typeof obj !== "object" || obj === null) {
|
|
832
|
+
return obj;
|
|
833
|
+
}
|
|
834
|
+
if (Array.isArray(obj)) {
|
|
835
|
+
return obj.map(relax);
|
|
836
|
+
}
|
|
837
|
+
const source = obj;
|
|
838
|
+
const target = {};
|
|
839
|
+
const properties = source["properties"];
|
|
840
|
+
const required = Array.isArray(source["required"]) ? source["required"].filter(
|
|
841
|
+
(r) => typeof r === "string"
|
|
842
|
+
) : [];
|
|
843
|
+
const hasOptionalProperties = typeof properties === "object" && properties !== null && !Array.isArray(properties) && Object.keys(properties).some((key) => !required.includes(key));
|
|
844
|
+
for (const [key, value] of Object.entries(source)) {
|
|
845
|
+
if (key === "$schema" || key === "$id") {
|
|
846
|
+
continue;
|
|
847
|
+
}
|
|
848
|
+
if (key === "additionalProperties" && value === false && hasOptionalProperties) {
|
|
849
|
+
continue;
|
|
850
|
+
}
|
|
851
|
+
if ((key === "properties" || key === "$defs" || key === "definitions") && typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
852
|
+
const map = {};
|
|
853
|
+
for (const [mapKey, mapValue] of Object.entries(
|
|
854
|
+
value
|
|
855
|
+
)) {
|
|
856
|
+
map[mapKey] = relax(mapValue);
|
|
857
|
+
}
|
|
858
|
+
target[key] = map;
|
|
859
|
+
continue;
|
|
860
|
+
}
|
|
861
|
+
target[key] = relax(value);
|
|
862
|
+
}
|
|
863
|
+
return target;
|
|
864
|
+
}, "relax");
|
|
865
|
+
return relax(schema);
|
|
866
|
+
}
|
|
867
|
+
__name(relaxSchemaForFunctionCalling, "relaxSchemaForFunctionCalling");
|
|
868
|
+
|
|
869
|
+
// packages/core/src/telemetry/gen-ai-usage.ts
|
|
870
|
+
init_esbuild_shims();
|
|
871
|
+
var usageProvenance = /* @__PURE__ */ new WeakMap();
|
|
872
|
+
function setGenAiUsageProvenance(usage, provenance) {
|
|
873
|
+
usageProvenance.set(usage, provenance);
|
|
874
|
+
}
|
|
875
|
+
__name(setGenAiUsageProvenance, "setGenAiUsageProvenance");
|
|
876
|
+
function getGenAiUsageProvenance(usage) {
|
|
877
|
+
return usage ? usageProvenance.get(usage) : void 0;
|
|
878
|
+
}
|
|
879
|
+
__name(getGenAiUsageProvenance, "getGenAiUsageProvenance");
|
|
880
|
+
|
|
881
|
+
export {
|
|
882
|
+
safeJsonParse,
|
|
883
|
+
convertSchema,
|
|
884
|
+
relaxSchemaForFunctionCalling,
|
|
885
|
+
setGenAiUsageProvenance,
|
|
886
|
+
getGenAiUsageProvenance
|
|
887
|
+
};
|
|
888
|
+
/**
|
|
889
|
+
* @license
|
|
890
|
+
* Copyright 2025 Qwen
|
|
891
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
892
|
+
*/
|
|
893
|
+
/**
|
|
894
|
+
* @license
|
|
895
|
+
* Copyright 2025 Google LLC
|
|
896
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
897
|
+
*/
|
|
898
|
+
/**
|
|
899
|
+
* @license
|
|
900
|
+
* Copyright 2026 Qwen Team
|
|
901
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
902
|
+
*/
|