@herbertgao/pi-extensions 2026.11.6 → 2026.11.8
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/CHANGELOG.md +20 -0
- package/README.md +9 -9
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/node_modules/@herbertgao/pi-impeccable/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-impeccable/README.md +2 -2
- package/node_modules/@herbertgao/pi-impeccable/package.json +4 -4
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/SKILL.md +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/VERSION +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/engine-checksums.txt +5 -5
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser.js +71 -56
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-subagents/README.md +2 -2
- package/node_modules/@herbertgao/pi-subagents/package.json +4 -4
- package/node_modules/@herbertgao/pi-subagents/src/ui/conversation-viewer.ts +10 -6
- package/node_modules/@herbertgao/pi-subagents/src/ui/viewer-keys.ts +47 -4
- package/node_modules/@narumitw/pi-btw/CHANGELOG.md +12 -0
- package/node_modules/@narumitw/pi-btw/dist/chunks/{main-tree-picker-WHRN26NJ.ts → main-tree-picker-3PXJARQW.ts} +59 -53
- package/node_modules/@narumitw/pi-btw/dist/chunks/main-tree-picker-3PXJARQW.ts.map +7 -0
- package/node_modules/@narumitw/pi-btw/dist/index.ts +1 -1
- package/node_modules/@narumitw/pi-btw/docs/main-tree-snapshots.md +39 -0
- package/node_modules/@narumitw/pi-btw/docs/workflows.md +1 -0
- package/node_modules/@narumitw/pi-btw/package.json +1 -1
- package/node_modules/@narumitw/pi-btw/src/main-tree-picker.ts +73 -63
- package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts +1 -4
- package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts.map +1 -1
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +5620 -2946
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
- package/node_modules/@pi-plugins/fast-mode/package.json +11 -11
- package/node_modules/pi-commandcode-provider/CHANGELOG.md +5 -0
- package/node_modules/pi-commandcode-provider/README.md +1 -1
- package/node_modules/pi-commandcode-provider/package.json +1 -1
- package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +5 -4
- package/node_modules/pi-commandcode-provider/src/pricing.ts +8 -2
- package/node_modules/pi-lens/CHANGELOG-USER.md +12 -12
- package/node_modules/pi-lens/CHANGELOG.md +212 -0
- package/node_modules/pi-lens/README.md +1 -0
- package/node_modules/pi-lens/dist/{chunk-W4CUK5G6.js → chunk-2HWVG3IM.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-B2YUE6YD.js → chunk-3EIZMRXI.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-Y3EHLUPL.js → chunk-3MHY4BQY.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-IDCTDKIA.js → chunk-3PMLYGJN.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-VPFRU5IG.js → chunk-3QMLB4TI.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-NL5LSKVD.js → chunk-3R3Z54J7.js} +10 -4
- package/node_modules/pi-lens/dist/chunk-3VWEZ6H2.js +72 -0
- package/node_modules/pi-lens/dist/{chunk-YT2VR4SL.js → chunk-5EEWCJG7.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-4NCDHTFI.js → chunk-5FDUKJZO.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-QUQY3IME.js → chunk-5KLRCUDT.js} +9 -8
- package/node_modules/pi-lens/dist/{chunk-FOEPIX76.js → chunk-6EIV3H7O.js} +158 -61
- package/node_modules/pi-lens/dist/{chunk-GMC4ZGYR.js → chunk-6EXGCXM5.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-CTB5BAJI.js → chunk-6GWCYEP7.js} +17 -16
- package/node_modules/pi-lens/dist/{chunk-NBM7PNBP.js → chunk-6JLNZ6DP.js} +37 -26
- package/node_modules/pi-lens/dist/{chunk-ACRJ2GZ5.js → chunk-7424ANRU.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-TJQSYX3J.js → chunk-75TVYCQW.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-J6BR5XN2.js → chunk-7BEADGAZ.js} +3 -3
- package/node_modules/pi-lens/dist/chunk-7KWI5UHL.js +28 -0
- package/node_modules/pi-lens/dist/{chunk-GUGKKGG7.js → chunk-7M64NTAK.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-SKVNHCT5.js → chunk-7T64QA5D.js} +48 -43
- package/node_modules/pi-lens/dist/{chunk-YQA34KAF.js → chunk-7ZVEFWOE.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-SJQUWQR6.js → chunk-AAIVSSUU.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-6I44EDNQ.js → chunk-AD7JDEI6.js} +17 -15
- package/node_modules/pi-lens/dist/{chunk-3FRI5H4T.js → chunk-AGEQRJ5A.js} +24 -10
- package/node_modules/pi-lens/dist/{chunk-NPNFGYLV.js → chunk-AVBEPUCD.js} +19 -2
- package/node_modules/pi-lens/dist/{chunk-OTSTS7L2.js → chunk-AYDE7RFV.js} +34 -3
- package/node_modules/pi-lens/dist/{chunk-UOO4D2TK.js → chunk-AZXTLZHE.js} +34 -35
- package/node_modules/pi-lens/dist/{chunk-AWQWXSW4.js → chunk-B4FAFEBP.js} +7 -2
- package/node_modules/pi-lens/dist/{chunk-S3WFVG5P.js → chunk-BEIPWPVR.js} +137 -126
- package/node_modules/pi-lens/dist/{chunk-CZAWWXP6.js → chunk-BMMRLJA4.js} +7 -5
- package/node_modules/pi-lens/dist/{chunk-QWTHFFU6.js → chunk-C6V2DSZZ.js} +12 -12
- package/node_modules/pi-lens/dist/chunk-CIA7X2PZ.js +26 -0
- package/node_modules/pi-lens/dist/{chunk-ZD4KVFXI.js → chunk-D2ZYRI7M.js} +172 -3
- package/node_modules/pi-lens/dist/{chunk-F6FT6BVQ.js → chunk-D6ANA6YU.js} +34 -35
- package/node_modules/pi-lens/dist/{chunk-HILZE4BQ.js → chunk-D7OEGXDX.js} +396 -306
- package/node_modules/pi-lens/dist/{chunk-FCQSZQAT.js → chunk-DFAY7JUN.js} +14 -5
- package/node_modules/pi-lens/dist/{chunk-DOUAWKLO.js → chunk-DIIDMDZU.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-6MDM5MQT.js → chunk-DZSQXG66.js} +394 -162
- package/node_modules/pi-lens/dist/{chunk-QGITU23N.js → chunk-E3PNZDPH.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-QSCZAP24.js → chunk-E5SSUV2A.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-H65TYP6V.js → chunk-ET3DSSFZ.js} +37 -21
- package/node_modules/pi-lens/dist/chunk-F7AMFFVK.js +22 -0
- package/node_modules/pi-lens/dist/{chunk-4ITEFRDH.js → chunk-FDLGJFAE.js} +37 -145
- package/node_modules/pi-lens/dist/{chunk-XAFZJEXY.js → chunk-FVQKX5KI.js} +23 -23
- package/node_modules/pi-lens/dist/{chunk-CYUJB552.js → chunk-G3LR6V6N.js} +18 -12
- package/node_modules/pi-lens/dist/{chunk-ZOPXB2KK.js → chunk-GHATCG2A.js} +111 -107
- package/node_modules/pi-lens/dist/{chunk-XVB3Q2PG.js → chunk-HGEE5LDW.js} +3 -2
- package/node_modules/pi-lens/dist/{chunk-UNBRHPHJ.js → chunk-HJWF7CGW.js} +17 -15
- package/node_modules/pi-lens/dist/chunk-HRQTYU2T.js +355 -0
- package/node_modules/pi-lens/dist/{chunk-QUPYLQA4.js → chunk-HSTN27NR.js} +14 -9
- package/node_modules/pi-lens/dist/{chunk-YF4G5NN5.js → chunk-HWMNTQBJ.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-K6WIBVMK.js → chunk-HYDJUVOE.js} +8 -9
- package/node_modules/pi-lens/dist/{chunk-OPFNQBS5.js → chunk-HYR25MV3.js} +21 -25
- package/node_modules/pi-lens/dist/{chunk-MAD4QJTP.js → chunk-IC4L65U7.js} +21 -17
- package/node_modules/pi-lens/dist/{chunk-I32RSMH6.js → chunk-ILC2B7IJ.js} +11 -10
- package/node_modules/pi-lens/dist/{chunk-BGLS5SDN.js → chunk-IT7MFVGP.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-KDCIG23C.js → chunk-IZ36G463.js} +13 -9
- package/node_modules/pi-lens/dist/{chunk-ALIZWXHZ.js → chunk-JKAVKTMY.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-3HM4BUHR.js → chunk-JLMS7EMD.js} +16 -15
- package/node_modules/pi-lens/dist/{chunk-HSYFLOZY.js → chunk-JRSS6KM4.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-VCRVNLE7.js → chunk-K2GV34T2.js} +9 -1
- package/node_modules/pi-lens/dist/{chunk-KJ3AHOCK.js → chunk-K2LD6YNH.js} +10 -10
- package/node_modules/pi-lens/dist/chunk-KUDUKKQE.js +89 -0
- package/node_modules/pi-lens/dist/{chunk-7JX3RNG4.js → chunk-KXDQD34C.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-VGTBLTPN.js → chunk-LD7SXICE.js} +18 -66
- package/node_modules/pi-lens/dist/{chunk-UY745U35.js → chunk-ME6MF2N2.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-QHOTTC4A.js → chunk-MOEWCPMC.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-JZQGRARR.js → chunk-MV6ST2KT.js} +15 -12
- package/node_modules/pi-lens/dist/{chunk-QL37SGTS.js → chunk-NCDH2JB7.js} +18 -18
- package/node_modules/pi-lens/dist/{chunk-AON2QIJF.js → chunk-NRVWLTOY.js} +20 -17
- package/node_modules/pi-lens/dist/chunk-NZINZCHB.js +108 -0
- package/node_modules/pi-lens/dist/{chunk-A5TEJZGJ.js → chunk-O6LCSHHI.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-PTSA6QKL.js → chunk-OEPWTSUG.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-QMV2APEH.js → chunk-OF2YGDUE.js} +36 -36
- package/node_modules/pi-lens/dist/{chunk-GTTMQ6XB.js → chunk-OHEUOWYT.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-GVWIU7M7.js → chunk-ORYQGVC3.js} +41 -4
- package/node_modules/pi-lens/dist/{chunk-KSTQ4VXT.js → chunk-OVPR3GQ6.js} +10 -13
- package/node_modules/pi-lens/dist/{chunk-MN635QYA.js → chunk-OYXD2MOM.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-TN5CWX5D.js → chunk-PCREZ4HJ.js} +34 -35
- package/node_modules/pi-lens/dist/{chunk-SG2JQ2YP.js → chunk-PK3GDU4M.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-NE4EFHJX.js → chunk-PPYUBO6Y.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-DVRJBQOJ.js → chunk-PTJXMYRY.js} +19 -20
- package/node_modules/pi-lens/dist/{chunk-TYHOEX4V.js → chunk-PXGVB2CY.js} +36 -39
- package/node_modules/pi-lens/dist/{chunk-LT62P654.js → chunk-QJ4T73J5.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-2LVJQU3I.js → chunk-QY6J2FTK.js} +33 -29
- package/node_modules/pi-lens/dist/{chunk-ZZDVGCGG.js → chunk-R67WQ5RY.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-Q2VCKC3X.js → chunk-S6ZQFPOX.js} +11 -8
- package/node_modules/pi-lens/dist/{chunk-KFRDFAOE.js → chunk-SF7KSXB5.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-CZCAZVTD.js → chunk-SRXYSLMW.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-WS3UFJOU.js → chunk-SUIZOCSY.js} +3 -2
- package/node_modules/pi-lens/dist/{chunk-NUSXS6YB.js → chunk-T5EGSBM2.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-V7F7JHS5.js → chunk-T6PPK3T6.js} +563 -554
- package/node_modules/pi-lens/dist/chunk-TM3A3K7T.js +28 -0
- package/node_modules/pi-lens/dist/{chunk-RQRKIRFY.js → chunk-TOOXNL6M.js} +8 -8
- package/node_modules/pi-lens/dist/chunk-TS5EIWEF.js +25 -0
- package/node_modules/pi-lens/dist/chunk-VD7MQFEV.js +56 -0
- package/node_modules/pi-lens/dist/{chunk-2ADRLTM2.js → chunk-VU2PRGRI.js} +6 -35
- package/node_modules/pi-lens/dist/chunk-W6VLB6LL.js +145 -0
- package/node_modules/pi-lens/dist/{chunk-CB7PEVOJ.js → chunk-WLD6BGON.js} +176 -60
- package/node_modules/pi-lens/dist/{chunk-C6AODRNU.js → chunk-WTSQKJAR.js} +11 -10
- package/node_modules/pi-lens/dist/{chunk-46TQJSUE.js → chunk-X33QECRJ.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-B6HXETWY.js → chunk-Y7XMKBFP.js} +28 -26
- package/node_modules/pi-lens/dist/{chunk-TLWFZ66Y.js → chunk-YLHJWAQS.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-BRESRQBE.js → chunk-YLW26OHX.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-IL6PIV33.js → chunk-YTXFNCVN.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-YULIERZW.js +27 -0
- package/node_modules/pi-lens/dist/chunk-Z2W5YJBW.js +25 -0
- package/node_modules/pi-lens/dist/{chunk-XPGH5O74.js → chunk-Z6WTLVUL.js} +30 -39
- package/node_modules/pi-lens/dist/{chunk-W7TY6HYX.js → chunk-ZRQMENT4.js} +5 -27
- package/node_modules/pi-lens/dist/{chunk-E4VXKTBR.js → chunk-ZWZD4TJ5.js} +163 -173
- package/node_modules/pi-lens/dist/index.js +6405 -4497
- package/node_modules/pi-lens/dist/mcp/analyze-cli.js +17 -13
- package/node_modules/pi-lens/dist/mcp/cli.js +42 -43
- package/node_modules/pi-lens/dist/mcp/server.js +1520 -608
- package/node_modules/pi-lens/dist/mcp/worker.js +62 -61
- package/node_modules/pi-lens/dist/probes/installer.js +19 -18
- package/node_modules/pi-lens/docs/agent-guide.md +3 -1
- package/node_modules/pi-lens/docs/agent-tools.md +57 -13
- package/node_modules/pi-lens/docs/alignment-families.md +5 -1
- package/node_modules/pi-lens/docs/ci.md +120 -0
- package/node_modules/pi-lens/docs/configuration.md +24 -6
- package/node_modules/pi-lens/docs/custom-rules.md +1 -0
- package/node_modules/pi-lens/docs/defect-shapes.md +107 -71
- package/node_modules/pi-lens/docs/durable-store-audit-1202.md +1 -1
- package/node_modules/pi-lens/docs/engineering-principles.md +46 -12
- package/node_modules/pi-lens/docs/environment-variables.md +25 -2
- package/node_modules/pi-lens/docs/features.md +1 -1
- package/node_modules/pi-lens/docs/globalconfig.md +8 -1
- package/node_modules/pi-lens/docs/invariants/dispatch-runners.md +13 -0
- package/node_modules/pi-lens/docs/invariants/lsp-trust-exec.md +7 -0
- package/node_modules/pi-lens/docs/language-coverage.md +1 -1
- package/node_modules/pi-lens/docs/lsp-capability-matrix.md +15 -16
- package/node_modules/pi-lens/docs/lsp-idle-eviction.md +1 -1
- package/node_modules/pi-lens/docs/mcp.md +2 -1
- package/node_modules/pi-lens/docs/module-report-read-symbol.md +2 -2
- package/node_modules/pi-lens/docs/pi-lens-fixer.md +3 -2
- package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +1 -0
- package/node_modules/pi-lens/docs/pi-lens-monitor.md +4 -1
- package/node_modules/pi-lens/docs/pi-lens-release.md +19 -0
- package/node_modules/pi-lens/docs/pi-lens-reviewer.md +8 -2
- package/node_modules/pi-lens/docs/public-api-stability.md +41 -6
- package/node_modules/pi-lens/docs/rfcs/5138-query-surface.md +121 -0
- package/node_modules/pi-lens/docs/servercapabilities.md +1 -1
- package/node_modules/pi-lens/docs/settings.md +9 -0
- package/node_modules/pi-lens/docs/usage.md +1 -1
- package/node_modules/pi-lens/docs/word-index.md +9 -10
- package/node_modules/pi-lens/package.json +3 -3
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/README.md +2 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/dont-call-system-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/file-access-before-action-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/file-stat-before-action-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/insecure-hash-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/libxml2-audit-parser-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/null-library-function-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/sizeof-this-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/small-key-size-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/world-writable-file-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/dont-call-system-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/file-access-before-action-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/file-stat-before-action-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/fix-format-security-error-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/insecure-hash-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/libxml2-audit-parser-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/missing-nul-cpp-string-memcpy-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/null-library-function-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/return-c-str-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/sizeof-this-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/small-key-size-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/std-return-data-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/std-vector-invalidation-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/string-view-temporary-string-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/world-writable-file-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/httponly-false-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/insecure-binaryformatter-deserialization-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-decode-without-verify-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-hardcoded-secret-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-tokenvalidationparameters-no-expiry-validation-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/networkcredential-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/npgsqlconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/oracleconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/sqlconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/stacktrace-disclosure-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/use-ecb-mode-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/avoid-bind-to-all-interfaces-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/gorilla-cookie-store-hardcoded-session-key-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/gorilla-csrf-hardcoded-auth-key-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/grpc-client-insecure-connection-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/jwt-go-none-algorithm-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/missing-ssl-minversion-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/openai-empty-secret-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/openai-hardcoded-secret-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/ssl-v3-is-insecure-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/tls-with-insecure-cipher-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/use-of-weak-rsa-key-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/html/security/plaintext-http-link-html.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cbc-padding-oracle-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-httponly-false-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-httponly-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-samesite-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-secure-flag-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-secure-flag-false-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/datanucleus-hardcoded-connection-password-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/des-is-deprecated-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/desede-is-deprecated-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-disallow-doctype-decl-false-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-external-general-entities-true-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-external-parameter-entities-true-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/drivermanager-hardcoded-secret-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/ecb-cipher-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/hardcoded-connection-password-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/hardcoded-secret-in-credentials-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/java-jwt-hardcoded-secret-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/jedis-jedisclientconfig-hardcoded-password-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/jedis-jedisfactory-hardcoded-password-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/missing-httponly-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/missing-secure-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/no-null-cipher-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/passwordauthentication-hardcoded-password-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/rsa-no-padding-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/simple-command-injection-direct-input-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/system-setproperty-hardcoded-secret-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/unencrypted-socket-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-aes-ecb-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-blowfish-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-default-aes-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-md5-digest-utils-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-md5-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-rc2-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-rc4-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-sha1-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/weak-ssl-context-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/detect-angular-sce-disabled-javascript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/express-jwt-hardcoded-secret-javascript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/express-session-hardcoded-secret-javascript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/jwt-simple-noverify-javascript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-rsa-weak-key-javascript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-sequelize-empty-password-argument-javascript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-sequelize-hardcoded-secret-argument-javascript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/des-is-deprecated-kotlin.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/desede-is-deprecated-kotlin.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/jwt-hardcode-kotlin.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/rsa-no-padding-kotlin.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/system-setproperty-hardcoded-secret-kotlin.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/php/security/openssl-cbc-static-iv-php.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/php/security/search-active-debug-php.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/avoid-mktemp-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/avoid_app_run_with_bad_host-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/debug-enabled-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/hashids-with-django-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/hashids-with-flask-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/insecure-cipher-algorithm-rc4-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/jwt-python-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/openai-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-cassandra-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-cassandra-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-couchbase-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-couchbase-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-elasticsearch-hardcoded-bearer-auth-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-ldap3-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-ldap3-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mariadb-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mariadb-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysql-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysql-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysqlclient-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysqlclient-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-neo4j-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-neo4j-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-mysql-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-mysql-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-pg-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-pg-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pg8000-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pg8000-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-psycopg2-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-psycopg2-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pyjwt-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymongo-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymongo-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymssql-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymssql-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymysql-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymysql-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-redis-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-redis-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-oauth-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-tormysql-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-tormysql-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-urllib3-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-webrepl-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-webrepl-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/force-ssl-false-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/hardcoded-http-auth-in-controller-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/hardcoded-secret-rsa-passphrase-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/insufficient-rsa-key-size-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-aws-sdk-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-cassandra-empty-password-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-cassandra-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-excon-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-faraday-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mongo-empty-password-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mongo-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mysql2-empty-password-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mysql2-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-octokit-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-pg-empty-password-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-pg-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-redis-empty-password-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-redis-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/empty-password-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/hardcoded-password-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/postgres-empty-password-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/reqwest-accept-invalid-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/secrets-reqwest-hardcoded-auth-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/ssl-verify-none-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/tokio-postgres-empty-password-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/tokio-postgres-hardcoded-password-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/scala/security/jwt-scala-hardcode-scala.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/scala/security/scala-jwt-hardcoded-secret-scala.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/aes-hardcoded-secret-swift.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/blowfish-hardcoded-secret-swift.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/chacha20-hardcoded-secret-swift.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/insecure-biometrics-swift.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/rabbit-hardcoded-secret-swift.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/detect-angular-sce-disabled-typescript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/express-session-hardcoded-secret-typescript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/jwt-simple-noverify-typescript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-rsa-weak-key-typescript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-sequelize-empty-password-argument-typescript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-sequelize-hardcoded-secret-argument-typescript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-schema.json +1 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/c-no-malloc-free.yml +13 -12
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/cpp-no-malloc-free.yml +11 -10
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/cpp-no-printf.yml +10 -9
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-defer-func-call-antipattern.yml +14 -13
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-no-fmt-println.yml +14 -13
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-no-panic-in-lib.yml +20 -19
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-no-underscore-func-name.yml +14 -13
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-prefer-errors-is.yml +14 -13
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-prefer-string-builder.yml +19 -18
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-test-functions.yml +14 -13
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/hyphenated-svg-attribute.yml +10 -9
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-lateinit.yml +12 -11
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-nullable-boolean.yml +11 -10
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-println.yml +15 -14
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-unnecessary-let.yml +10 -9
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-unsafe-cast.yml +10 -9
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-var.yml +11 -10
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-prefer-data-class.yml +10 -9
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-prefer-is-empty.yml +10 -9
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-aws-access-key-literal.yml +1 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-compile-call.yml +13 -12
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-flask-secret-key-literal.yml +1 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-hardcoded-password.yml +1 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-marshal-load.yml +12 -11
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-python-sql-string-concat.yml +12 -11
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-requests-verify-false.yml +13 -12
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-secret-in-env-var-name.yml +1 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/python-optional-type.yml +9 -8
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/reducible-list-comprehension.yml +8 -7
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/ruby-detect-path-traversal.yml +14 -13
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/ruby-symbol-to-proc-candidate.yml +8 -7
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/rust-no-chars-enumerate.yml +9 -8
- package/node_modules/pi-lens/rules/ast-grep-rules/rules-disabled/gorm-unbounded-preload.yml +7 -6
- package/node_modules/pi-lens/rules/ast-grep-rules/rules-disabled/shadow-err-variable.yml +6 -5
- package/node_modules/pi-lens/scripts/analyze-pi-lens-logs.mjs +262 -3
- package/node_modules/pi-lens/scripts/lib/latency-log-phases.mjs +125 -0
- package/package.json +8 -8
- package/node_modules/@narumitw/pi-btw/dist/chunks/main-tree-picker-WHRN26NJ.ts.map +0 -7
- package/node_modules/pi-lens/dist/chunk-3QWVOBZJ.js +0 -73
- package/node_modules/pi-lens/dist/chunk-7WJ55KBN.js +0 -162
- package/node_modules/pi-lens/dist/chunk-BDR5MEZY.js +0 -25
- package/node_modules/pi-lens/dist/chunk-CKEQFGLT.js +0 -32
- package/node_modules/pi-lens/dist/chunk-DBS736MA.js +0 -57
- package/node_modules/pi-lens/dist/chunk-I74RQGKA.js +0 -88
- package/node_modules/pi-lens/dist/chunk-IK4YS3KC.js +0 -25
- package/node_modules/pi-lens/dist/chunk-JKOZ2Z4U.js +0 -20
- package/node_modules/pi-lens/dist/chunk-TQHOKMVZ.js +0 -28
- package/node_modules/pi-lens/dist/chunk-VS2L7QDI.js +0 -25
- package/node_modules/pi-lens/dist/chunk-WAA63ZJV.js +0 -140
- package/node_modules/pi-lens/dist/chunk-ZPFLHB3R.js +0 -28
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
createReadGuardEditBatchSummary,
|
|
4
|
+
displayedMessage,
|
|
4
5
|
findingIdentity,
|
|
5
6
|
getReadGuardCorrelationId,
|
|
6
7
|
logReadGuardEvent,
|
|
8
|
+
messageIsCutWhenDisplayed,
|
|
7
9
|
normalizeMessage,
|
|
8
10
|
sanitizeCorrelationId,
|
|
9
11
|
stableFindingId
|
|
10
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DFAY7JUN.js";
|
|
11
13
|
import {
|
|
12
14
|
mapWithConcurrency
|
|
13
15
|
} from "./chunk-XIMYZ3JA.js";
|
|
14
16
|
import {
|
|
17
|
+
canWriteAnalysisRoot,
|
|
15
18
|
classifyCascadeWaitTier,
|
|
16
19
|
classifyServerWaitTier,
|
|
17
20
|
declinesLooseFileRoot,
|
|
@@ -38,24 +41,24 @@ import {
|
|
|
38
41
|
resolveLspServerCwd,
|
|
39
42
|
serverTraits,
|
|
40
43
|
withLspProjectCodePermission
|
|
41
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-Z6WTLVUL.js";
|
|
42
45
|
import {
|
|
43
46
|
findLocalOpengrepConfig
|
|
44
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-PPYUBO6Y.js";
|
|
45
48
|
import {
|
|
46
49
|
emitBounded
|
|
47
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-5EEWCJG7.js";
|
|
48
51
|
import {
|
|
49
52
|
loadProjectSnapshot,
|
|
50
53
|
readJsonCache
|
|
51
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-YLW26OHX.js";
|
|
52
55
|
import {
|
|
53
56
|
acquireWorkspaceSweepHold,
|
|
54
57
|
configureLspServiceLifecycle,
|
|
55
58
|
getOwnedLspService,
|
|
56
59
|
peekOwnedLspService,
|
|
57
60
|
resetOwnedLspService
|
|
58
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-HGEE5LDW.js";
|
|
59
62
|
import {
|
|
60
63
|
RUNTIME_CONFIG,
|
|
61
64
|
collectForwardImportMtimes,
|
|
@@ -70,46 +73,31 @@ import {
|
|
|
70
73
|
lineTextAt,
|
|
71
74
|
pathBirthtimeMs,
|
|
72
75
|
scanDocumentContent
|
|
73
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-NCDH2JB7.js";
|
|
74
77
|
import {
|
|
75
78
|
js_yaml_default
|
|
76
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-E3PNZDPH.js";
|
|
77
80
|
import {
|
|
78
81
|
EXTENSION_TO_LSP_ID,
|
|
79
82
|
lspLanguageId,
|
|
80
83
|
resolveFilenameLanguage
|
|
81
|
-
} from "./chunk-
|
|
82
|
-
import {
|
|
83
|
-
HOOK_WALL_BUDGET_MS
|
|
84
|
-
} from "./chunk-CKEQFGLT.js";
|
|
84
|
+
} from "./chunk-AYDE7RFV.js";
|
|
85
85
|
import {
|
|
86
86
|
diagnosticsIpcPathForCwd,
|
|
87
87
|
requestWarmCodeActions,
|
|
88
88
|
requestWarmDiagnostics
|
|
89
|
-
} from "./chunk-
|
|
90
|
-
import {
|
|
91
|
-
CONTENT_HASH_MAX_BYTES,
|
|
92
|
-
hashContentBytes,
|
|
93
|
-
hashFileBytes,
|
|
94
|
-
stampContentBytes
|
|
95
|
-
} from "./chunk-W7TY6HYX.js";
|
|
96
|
-
import {
|
|
97
|
-
bounded,
|
|
98
|
-
untilAborted,
|
|
99
|
-
withDeadline,
|
|
100
|
-
withTimeout
|
|
101
|
-
} from "./chunk-WAA63ZJV.js";
|
|
89
|
+
} from "./chunk-HWMNTQBJ.js";
|
|
102
90
|
import {
|
|
103
91
|
findLocalZizmorConfig,
|
|
104
92
|
logSessionStart
|
|
105
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-NRVWLTOY.js";
|
|
106
94
|
import {
|
|
107
95
|
findLocalBinUpwards,
|
|
108
96
|
isProjectLocalBinPath
|
|
109
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-OVPR3GQ6.js";
|
|
110
98
|
import {
|
|
111
99
|
getLspCapableKinds
|
|
112
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-75TVYCQW.js";
|
|
113
101
|
import {
|
|
114
102
|
createGenerationMap,
|
|
115
103
|
createGenerationSource,
|
|
@@ -128,25 +116,37 @@ import {
|
|
|
128
116
|
sampleProcessTreeCpuPercent,
|
|
129
117
|
selectLivePeerInstances,
|
|
130
118
|
windowsExe
|
|
131
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-ET3DSSFZ.js";
|
|
132
120
|
import {
|
|
133
121
|
createSingleFlight
|
|
134
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-B4FAFEBP.js";
|
|
135
123
|
import {
|
|
136
124
|
SPECIAL_FILENAMES,
|
|
137
125
|
getLanguageId,
|
|
138
126
|
isJstsFactFile
|
|
139
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-SRXYSLMW.js";
|
|
140
128
|
import {
|
|
141
129
|
PathKeyedMap,
|
|
142
130
|
detectFileRole
|
|
143
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-6EIV3H7O.js";
|
|
132
|
+
import {
|
|
133
|
+
CONTENT_HASH_MAX_BYTES,
|
|
134
|
+
hashContentBytes,
|
|
135
|
+
hashFileBytes,
|
|
136
|
+
stampContentBytes
|
|
137
|
+
} from "./chunk-CIA7X2PZ.js";
|
|
144
138
|
import {
|
|
139
|
+
HOOK_WALL_BUDGET_MS,
|
|
145
140
|
assertInstallAllowed,
|
|
141
|
+
bounded,
|
|
146
142
|
isLspSpawnAllowedByTrust,
|
|
147
143
|
projectTrustDenialReason,
|
|
144
|
+
readAdoptedProjectTrust,
|
|
145
|
+
untilAborted,
|
|
146
|
+
withDeadline,
|
|
147
|
+
withTimeout,
|
|
148
148
|
writeFileAtomic
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-HRQTYU2T.js";
|
|
150
150
|
import {
|
|
151
151
|
compareOrdinal,
|
|
152
152
|
incrementDegradationCount,
|
|
@@ -154,7 +154,7 @@ import {
|
|
|
154
154
|
recordDegradation,
|
|
155
155
|
recordDegradationOnce,
|
|
156
156
|
truncateForLedger
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-AGEQRJ5A.js";
|
|
158
158
|
import {
|
|
159
159
|
freshnessFromMtime
|
|
160
160
|
} from "./chunk-S26LC76R.js";
|
|
@@ -163,13 +163,15 @@ import {
|
|
|
163
163
|
getGlobalPiLensLogDir,
|
|
164
164
|
getMaxLogSizeMB,
|
|
165
165
|
getProcessSingleton,
|
|
166
|
+
getTurnId,
|
|
166
167
|
isLspInstallDisabled,
|
|
167
168
|
isTestMode,
|
|
168
169
|
logLatency,
|
|
169
170
|
nextModuleEvaluationOrdinal,
|
|
171
|
+
nonNegativeIntEnv,
|
|
170
172
|
phaseFinished,
|
|
171
173
|
phaseStarted
|
|
172
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-K2GV34T2.js";
|
|
173
175
|
import {
|
|
174
176
|
BoundedFifoMap,
|
|
175
177
|
BoundedLruCache,
|
|
@@ -178,6 +180,7 @@ import {
|
|
|
178
180
|
isUnderDir,
|
|
179
181
|
isWindowsPath,
|
|
180
182
|
isWithinForm,
|
|
183
|
+
isWithinIdentity,
|
|
181
184
|
kernelPathIdentityAsync,
|
|
182
185
|
minimatch,
|
|
183
186
|
normalizeEphemeralMapKey,
|
|
@@ -192,7 +195,7 @@ import {
|
|
|
192
195
|
uriToDiskPath,
|
|
193
196
|
uriToPath,
|
|
194
197
|
walkUpDirs
|
|
195
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-WLD6BGON.js";
|
|
196
199
|
import {
|
|
197
200
|
__commonJS,
|
|
198
201
|
__require,
|
|
@@ -3619,7 +3622,7 @@ var require_main = __commonJS({
|
|
|
3619
3622
|
ril_1.default.install();
|
|
3620
3623
|
var path18 = __importStar(__require("path"));
|
|
3621
3624
|
var os3 = __importStar(__require("os"));
|
|
3622
|
-
var
|
|
3625
|
+
var fs13 = __importStar(__require("fs"));
|
|
3623
3626
|
var crypto_1 = __require("crypto");
|
|
3624
3627
|
var net_1 = __require("net");
|
|
3625
3628
|
var api_1 = require_api();
|
|
@@ -3760,7 +3763,7 @@ var require_main = __commonJS({
|
|
|
3760
3763
|
}
|
|
3761
3764
|
let randomLength = 32;
|
|
3762
3765
|
const fixedLength = "/lsp-.sock".length;
|
|
3763
|
-
const tmpDir =
|
|
3766
|
+
const tmpDir = fs13.realpathSync(XDG_RUNTIME_DIR ?? os3.tmpdir());
|
|
3764
3767
|
const limit = safeIpcPathLengths.get(process.platform);
|
|
3765
3768
|
if (limit !== void 0) {
|
|
3766
3769
|
randomLength = Math.min(limit - tmpDir.length - fixedLength, randomLength);
|
|
@@ -3873,7 +3876,7 @@ var CASCADE_DIAGNOSTICS_TTL_MS = 24e4;
|
|
|
3873
3876
|
|
|
3874
3877
|
// dist/clients/lsp/index.js
|
|
3875
3878
|
import * as nodeFs2 from "node:fs";
|
|
3876
|
-
import
|
|
3879
|
+
import fs12 from "node:fs/promises";
|
|
3877
3880
|
import os2 from "node:os";
|
|
3878
3881
|
import path17 from "node:path";
|
|
3879
3882
|
import { pathToFileURL as pathToFileURL3, URL as URL3 } from "node:url";
|
|
@@ -4052,7 +4055,7 @@ async function importTargetsToAnnounce(cwd, importers, onScope) {
|
|
|
4052
4055
|
reason: `resolved the imports of ${CREATED_IMPORT_SCAN_MAX_FILES} of ${importers.length} files in one diagnostics call`
|
|
4053
4056
|
});
|
|
4054
4057
|
}
|
|
4055
|
-
const { extractForwardImports } = await import("./chunk-
|
|
4058
|
+
const { extractForwardImports } = await import("./chunk-PTJXMYRY.js");
|
|
4056
4059
|
const targets = /* @__PURE__ */ new Set();
|
|
4057
4060
|
const reexports = /* @__PURE__ */ new Map();
|
|
4058
4061
|
let resolved2 = 0;
|
|
@@ -4535,6 +4538,21 @@ function configDisabledAuxiliaryLspServerIds(getFlag) {
|
|
|
4535
4538
|
function enabledOptInAuxiliaryLspServerIds(getFlag) {
|
|
4536
4539
|
return new Set(AUXILIARY_LSP_PROFILES.flatMap((p) => !p.enabledByDefault && isEnabledByConfiguration(p, getFlag) ? [p.serverId] : []));
|
|
4537
4540
|
}
|
|
4541
|
+
function auxiliaryServersNotRun(getFlag) {
|
|
4542
|
+
return /* @__PURE__ */ new Set([
|
|
4543
|
+
...configDisabledAuxiliaryLspServerIds(getFlag),
|
|
4544
|
+
...enabledOptInAuxiliaryLspServerIds(getFlag)
|
|
4545
|
+
]);
|
|
4546
|
+
}
|
|
4547
|
+
function auxiliaryNotRunSentences(notRunServerIds, switchedOffLabel = "Switched off, not run") {
|
|
4548
|
+
const ids = [...notRunServerIds];
|
|
4549
|
+
const switchedOff = ids.filter((id) => !isOptInAuxiliaryServerId(id));
|
|
4550
|
+
const optIn = ids.filter((id) => isOptInAuxiliaryServerId(id));
|
|
4551
|
+
return [
|
|
4552
|
+
...switchedOff.length > 0 ? [`${switchedOffLabel}: ${switchedOff.join(", ")}.`] : [],
|
|
4553
|
+
...optIn.length > 0 ? [`Opt-in, not run by this check: ${optIn.join(", ")}.`] : []
|
|
4554
|
+
];
|
|
4555
|
+
}
|
|
4538
4556
|
function isEnabledByConfiguration(profile, getFlag) {
|
|
4539
4557
|
if (!profile.enabledByDefault) {
|
|
4540
4558
|
return profile.optInFlag !== void 0 && getFlag(profile.optInFlag) === true;
|
|
@@ -4674,10 +4692,7 @@ var DRIFT_TRACK_CAP = 512;
|
|
|
4674
4692
|
var DEFAULT_DRIFT_CHECK_INTERVAL_MS = 1e4;
|
|
4675
4693
|
var SWEEP_KEY = "open-document-drift";
|
|
4676
4694
|
function driftCheckIntervalMs() {
|
|
4677
|
-
|
|
4678
|
-
if (!Number.isFinite(raw) || raw < 0)
|
|
4679
|
-
return DEFAULT_DRIFT_CHECK_INTERVAL_MS;
|
|
4680
|
-
return Math.floor(raw);
|
|
4695
|
+
return nonNegativeIntEnv("PI_LENS_LSP_DRIFT_CHECK_MS", DEFAULT_DRIFT_CHECK_INTERVAL_MS);
|
|
4681
4696
|
}
|
|
4682
4697
|
var DocumentDriftTracker = class {
|
|
4683
4698
|
/** Insertion-ordered; the sweep cursor walks it round-robin. */
|
|
@@ -5320,7 +5335,6 @@ function restoreLineEndings(text, ending) {
|
|
|
5320
5335
|
|
|
5321
5336
|
// dist/clients/partial-edit-apply.js
|
|
5322
5337
|
import { createHash as createHash3 } from "node:crypto";
|
|
5323
|
-
import * as fs3 from "node:fs";
|
|
5324
5338
|
var MAX_APPLIED_RECORDS_PER_FILE = 8;
|
|
5325
5339
|
var MAX_APPLIED_RECORD_FILES = 64;
|
|
5326
5340
|
function editPairDigest(oldText, newText) {
|
|
@@ -5378,7 +5392,7 @@ var PartialApplyRecordStore = class {
|
|
|
5378
5392
|
};
|
|
5379
5393
|
function hashFile(filePath) {
|
|
5380
5394
|
try {
|
|
5381
|
-
return
|
|
5395
|
+
return hashFileBytes(filePath);
|
|
5382
5396
|
} catch {
|
|
5383
5397
|
return void 0;
|
|
5384
5398
|
}
|
|
@@ -5386,10 +5400,10 @@ function hashFile(filePath) {
|
|
|
5386
5400
|
|
|
5387
5401
|
// dist/clients/read-guard.js
|
|
5388
5402
|
import { constants as bufferConstants } from "node:buffer";
|
|
5389
|
-
import * as
|
|
5403
|
+
import * as fs4 from "node:fs";
|
|
5390
5404
|
|
|
5391
5405
|
// dist/clients/file-time.js
|
|
5392
|
-
import * as
|
|
5406
|
+
import * as fs3 from "node:fs";
|
|
5393
5407
|
import * as path4 from "node:path";
|
|
5394
5408
|
var globalState = {
|
|
5395
5409
|
reads: /* @__PURE__ */ new Map()
|
|
@@ -5482,7 +5496,7 @@ var FileTimeError = class extends Error {
|
|
|
5482
5496
|
};
|
|
5483
5497
|
function createStamp(filePath) {
|
|
5484
5498
|
try {
|
|
5485
|
-
const stats =
|
|
5499
|
+
const stats = fs3.statSync(filePath);
|
|
5486
5500
|
return {
|
|
5487
5501
|
readAt: /* @__PURE__ */ new Date(),
|
|
5488
5502
|
mtime: stats.mtime.getTime(),
|
|
@@ -5717,7 +5731,7 @@ var READ_BINDING_MAX_BYTES = 4 * 1024 * 1024;
|
|
|
5717
5731
|
var ABSENT_SIZE = -1;
|
|
5718
5732
|
function observeAuthoredBytes(filePath, knownHash, authoredRanges) {
|
|
5719
5733
|
try {
|
|
5720
|
-
const stat3 =
|
|
5734
|
+
const stat3 = fs4.statSync(filePath);
|
|
5721
5735
|
const hash = knownHash !== void 0 ? knownHash : stat3.size <= READ_BINDING_MAX_BYTES ? hashFileBytes(filePath) : void 0;
|
|
5722
5736
|
return {
|
|
5723
5737
|
size: stat3.size,
|
|
@@ -5726,7 +5740,7 @@ function observeAuthoredBytes(filePath, knownHash, authoredRanges) {
|
|
|
5726
5740
|
...hash !== void 0 && { hash },
|
|
5727
5741
|
...authoredRanges !== void 0 && { authoredRanges },
|
|
5728
5742
|
...authoredRanges !== void 0 && {
|
|
5729
|
-
authoredLineCount: splitLines(
|
|
5743
|
+
authoredLineCount: splitLines(fs4.readFileSync(filePath, "utf-8")).length
|
|
5730
5744
|
}
|
|
5731
5745
|
};
|
|
5732
5746
|
} catch {
|
|
@@ -5758,7 +5772,7 @@ function isValidAuthoredRanges(value) {
|
|
|
5758
5772
|
function authoredBytesIntact(filePath, authored) {
|
|
5759
5773
|
let stat3;
|
|
5760
5774
|
try {
|
|
5761
|
-
stat3 =
|
|
5775
|
+
stat3 = fs4.statSync(filePath);
|
|
5762
5776
|
} catch {
|
|
5763
5777
|
return authored.size === ABSENT_SIZE;
|
|
5764
5778
|
}
|
|
@@ -5816,7 +5830,7 @@ var READ_GUARD_MAX_CHECKED_PATHS_PER_CALL = 128;
|
|
|
5816
5830
|
var READ_GUARD_IDLE_EVICT_MS_DEFAULT = 30 * 6e4;
|
|
5817
5831
|
function _currentContentMatchesBindingForTests(filePath, binding) {
|
|
5818
5832
|
try {
|
|
5819
|
-
const content =
|
|
5833
|
+
const content = fs4.readFileSync(filePath, "utf-8");
|
|
5820
5834
|
const boundContent = binding.fullFile ? content : splitLines(content).slice(binding.offset - 1, binding.offset - 1 + binding.limit).join("\n");
|
|
5821
5835
|
return hashContentBytes(Buffer.from(boundContent, "utf8")) === binding.hash;
|
|
5822
5836
|
} catch {
|
|
@@ -5884,8 +5898,8 @@ function scanFileLines(filePath, ranges, opts) {
|
|
|
5884
5898
|
const lines = /* @__PURE__ */ new Map();
|
|
5885
5899
|
let fd;
|
|
5886
5900
|
try {
|
|
5887
|
-
fd =
|
|
5888
|
-
const size =
|
|
5901
|
+
fd = fs4.openSync(filePath, "r");
|
|
5902
|
+
const size = fs4.fstatSync(fd).size;
|
|
5889
5903
|
if (size > SCAN_MAX_BYTES)
|
|
5890
5904
|
return overByteGate(filePath, size);
|
|
5891
5905
|
const byteBudget = size > 0 ? size : SCAN_MAX_BYTES + 1;
|
|
@@ -5896,7 +5910,7 @@ function scanFileLines(filePath, ranges, opts) {
|
|
|
5896
5910
|
let parts = [];
|
|
5897
5911
|
const keepLine = () => lines.set(lineNo, Buffer.concat(parts).toString("utf8"));
|
|
5898
5912
|
while (consumed < byteBudget && !done(lineNo)) {
|
|
5899
|
-
const n =
|
|
5913
|
+
const n = fs4.readSync(fd, chunk, 0, Math.min(chunk.length, byteBudget - consumed), null);
|
|
5900
5914
|
if (n === 0)
|
|
5901
5915
|
break;
|
|
5902
5916
|
consumed += n;
|
|
@@ -5952,7 +5966,7 @@ function scanFileLines(filePath, ranges, opts) {
|
|
|
5952
5966
|
return void 0;
|
|
5953
5967
|
} finally {
|
|
5954
5968
|
if (fd !== void 0)
|
|
5955
|
-
|
|
5969
|
+
fs4.closeSync(fd);
|
|
5956
5970
|
}
|
|
5957
5971
|
}
|
|
5958
5972
|
function overByteGate(filePath, bytes) {
|
|
@@ -5984,7 +5998,7 @@ function currentLinesMatchReadSnapshot(filePath, read, [startLine, endLine]) {
|
|
|
5984
5998
|
}
|
|
5985
5999
|
let lines;
|
|
5986
6000
|
try {
|
|
5987
|
-
lines = splitLines(
|
|
6001
|
+
lines = splitLines(fs4.readFileSync(filePath, "utf-8"));
|
|
5988
6002
|
} catch {
|
|
5989
6003
|
return {
|
|
5990
6004
|
checked: true,
|
|
@@ -6752,7 +6766,7 @@ Re-read the relevant section, then retry the edit using the current line range/c
|
|
|
6752
6766
|
*/
|
|
6753
6767
|
isNewFile(filePath) {
|
|
6754
6768
|
try {
|
|
6755
|
-
return !
|
|
6769
|
+
return !fs4.existsSync(filePath);
|
|
6756
6770
|
} catch {
|
|
6757
6771
|
return true;
|
|
6758
6772
|
}
|
|
@@ -7127,7 +7141,7 @@ Re-read the relevant section, then retry the edit using the current line range/c
|
|
|
7127
7141
|
if (!Array.isArray(records) || records.length === 0)
|
|
7128
7142
|
continue;
|
|
7129
7143
|
const filePath = this.key(rawPath);
|
|
7130
|
-
const exists =
|
|
7144
|
+
const exists = fs4.existsSync(filePath);
|
|
7131
7145
|
for (const read of records) {
|
|
7132
7146
|
const id = read?.toolCallId;
|
|
7133
7147
|
if (!exists || typeof id !== "string" || !onBranch.has(id)) {
|
|
@@ -7199,7 +7213,7 @@ Re-read the relevant section, then retry the edit using the current line range/c
|
|
|
7199
7213
|
const observed = observeAuthoredBytes(filePath, opts?.contentHash, nextRanges);
|
|
7200
7214
|
const { authoredRanges: _observedRanges, ...observedWithoutRanges } = observed;
|
|
7201
7215
|
const composedRanges = nextRanges !== void 0 && keeps && existing?.authoredRanges !== void 0 ? composeAuthoredRanges(existing, nextRanges, observed.authoredLineCount) : nextRanges;
|
|
7202
|
-
const toolCallId = opts?.toolCallId ?? existing?.toolCallId;
|
|
7216
|
+
const toolCallId = sanitizeCorrelationId(opts?.toolCallId) ?? existing?.toolCallId;
|
|
7203
7217
|
this.writtenThisSession.delete(filePath);
|
|
7204
7218
|
this.writtenThisSession.set(filePath, {
|
|
7205
7219
|
...observedWithoutRanges,
|
|
@@ -7223,7 +7237,7 @@ Re-read the relevant section, then retry the edit using the current line range/c
|
|
|
7223
7237
|
let evidence;
|
|
7224
7238
|
try {
|
|
7225
7239
|
evidence = writtenContent !== void 0 ? deliveredLineEvidence(writtenContent, 1) : {
|
|
7226
|
-
lineCount: splitLines(
|
|
7240
|
+
lineCount: splitLines(fs4.readFileSync(filePath, "utf-8")).length,
|
|
7227
7241
|
lineHashes: void 0
|
|
7228
7242
|
};
|
|
7229
7243
|
} catch {
|
|
@@ -7249,7 +7263,7 @@ Re-read the relevant section, then retry the edit using the current line range/c
|
|
|
7249
7263
|
canIgnoreStalenessByHashes(filePath, reads, touchedLines, editRanges) {
|
|
7250
7264
|
let lines;
|
|
7251
7265
|
try {
|
|
7252
|
-
lines = splitLines(
|
|
7266
|
+
lines = splitLines(fs4.readFileSync(filePath, "utf-8"));
|
|
7253
7267
|
} catch {
|
|
7254
7268
|
return false;
|
|
7255
7269
|
}
|
|
@@ -7389,7 +7403,7 @@ Re-read the relevant section, then retry the edit using the current line range/c
|
|
|
7389
7403
|
}
|
|
7390
7404
|
let lines;
|
|
7391
7405
|
try {
|
|
7392
|
-
lines = splitLines(
|
|
7406
|
+
lines = splitLines(fs4.readFileSync(filePath, "utf-8"));
|
|
7393
7407
|
} catch {
|
|
7394
7408
|
return void 0;
|
|
7395
7409
|
}
|
|
@@ -7597,6 +7611,7 @@ var ANSI_C_ESCAPES = new Map(Object.entries({
|
|
|
7597
7611
|
'"': 34,
|
|
7598
7612
|
"?": 63
|
|
7599
7613
|
}).map(([escape, value]) => [escape.charCodeAt(0), value]));
|
|
7614
|
+
var MOVE_CLUSTER_LETTERS = new Set("abdfilnprRsvx");
|
|
7600
7615
|
|
|
7601
7616
|
// dist/clients/opaque-mutation-scan.js
|
|
7602
7617
|
var OPAQUE_HASH_BUDGET_BYTES = 8 * 1024 * 1024;
|
|
@@ -8304,7 +8319,7 @@ function recordLspMutationOutcome(context, status) {
|
|
|
8304
8319
|
|
|
8305
8320
|
// dist/clients/lsp/diagnostic-binding.js
|
|
8306
8321
|
import { createHash as createHash4 } from "node:crypto";
|
|
8307
|
-
import * as
|
|
8322
|
+
import * as fs5 from "node:fs";
|
|
8308
8323
|
function resolveTouchVerdict(input) {
|
|
8309
8324
|
const unavailableIds = [...new Set(input.unavailablePrimaryServerIds ?? [])];
|
|
8310
8325
|
if (unavailableIds.length > 0) {
|
|
@@ -8406,7 +8421,7 @@ function createDiskBindingCache() {
|
|
|
8406
8421
|
return "unknown";
|
|
8407
8422
|
let stat3;
|
|
8408
8423
|
try {
|
|
8409
|
-
stat3 =
|
|
8424
|
+
stat3 = fs5.statSync(filePath);
|
|
8410
8425
|
} catch {
|
|
8411
8426
|
return "unknown";
|
|
8412
8427
|
}
|
|
@@ -8414,7 +8429,7 @@ function createDiskBindingCache() {
|
|
|
8414
8429
|
if (!cached || cached.mtimeMs !== stat3.mtimeMs || cached.size !== stat3.size) {
|
|
8415
8430
|
let diskHash;
|
|
8416
8431
|
try {
|
|
8417
|
-
diskHash = hashDiagnosticContent(
|
|
8432
|
+
diskHash = hashDiagnosticContent(fs5.readFileSync(filePath, "utf-8"));
|
|
8418
8433
|
} catch {
|
|
8419
8434
|
return "unknown";
|
|
8420
8435
|
}
|
|
@@ -8507,12 +8522,12 @@ async function runPerServerGroups(groups, concurrency, processGroup, signal) {
|
|
|
8507
8522
|
import path13 from "node:path";
|
|
8508
8523
|
|
|
8509
8524
|
// dist/clients/widget-state.js
|
|
8510
|
-
import { readFileSync as
|
|
8525
|
+
import { readFileSync as readFileSync6 } from "node:fs";
|
|
8511
8526
|
import { stat } from "node:fs/promises";
|
|
8512
8527
|
import { pathToFileURL } from "node:url";
|
|
8513
8528
|
|
|
8514
8529
|
// dist/clients/diagnostic-line-freshness.js
|
|
8515
|
-
import * as
|
|
8530
|
+
import * as fs6 from "node:fs";
|
|
8516
8531
|
|
|
8517
8532
|
// dist/clients/stale-marker.js
|
|
8518
8533
|
var STALE_LINE_MARKER = "[stale \u2014 re-run to confirm]";
|
|
@@ -8529,13 +8544,13 @@ function rememberInSharedCache(cache, filePath, entry) {
|
|
|
8529
8544
|
cache.set(filePath, entry);
|
|
8530
8545
|
}
|
|
8531
8546
|
function countNewlinesChunked(filePath, sizeBytes) {
|
|
8532
|
-
const fd =
|
|
8547
|
+
const fd = fs6.openSync(filePath, "r");
|
|
8533
8548
|
try {
|
|
8534
8549
|
const buffer = Buffer.allocUnsafe(Math.min(NEWLINE_SCAN_CHUNK_BYTES, sizeBytes) || 1);
|
|
8535
8550
|
let newlineCount = 0;
|
|
8536
8551
|
let position = 0;
|
|
8537
8552
|
while (position < sizeBytes) {
|
|
8538
|
-
const bytesRead =
|
|
8553
|
+
const bytesRead = fs6.readSync(fd, buffer, 0, buffer.length, position);
|
|
8539
8554
|
if (bytesRead <= 0)
|
|
8540
8555
|
break;
|
|
8541
8556
|
for (let i = 0; i < bytesRead; i++) {
|
|
@@ -8546,13 +8561,13 @@ function countNewlinesChunked(filePath, sizeBytes) {
|
|
|
8546
8561
|
}
|
|
8547
8562
|
return newlineCount;
|
|
8548
8563
|
} finally {
|
|
8549
|
-
|
|
8564
|
+
fs6.closeSync(fd);
|
|
8550
8565
|
}
|
|
8551
8566
|
}
|
|
8552
8567
|
function getCachedLineCount(filePath, cache = sharedLineCountCache) {
|
|
8553
8568
|
let stat3;
|
|
8554
8569
|
try {
|
|
8555
|
-
stat3 =
|
|
8570
|
+
stat3 = fs6.statSync(filePath);
|
|
8556
8571
|
} catch {
|
|
8557
8572
|
return void 0;
|
|
8558
8573
|
}
|
|
@@ -8607,7 +8622,7 @@ function demotePastEofDiagnostics(args) {
|
|
|
8607
8622
|
}
|
|
8608
8623
|
let sizeBytes;
|
|
8609
8624
|
try {
|
|
8610
|
-
sizeBytes =
|
|
8625
|
+
sizeBytes = fs6.statSync(args.filePath).size;
|
|
8611
8626
|
} catch {
|
|
8612
8627
|
sizeBytes = 0;
|
|
8613
8628
|
}
|
|
@@ -8637,8 +8652,8 @@ function resyncDocumentOnPastEof(filePath) {
|
|
|
8637
8652
|
void (async () => {
|
|
8638
8653
|
try {
|
|
8639
8654
|
const [{ getOwnedLspService: getOwnedLspService2 }, content] = await Promise.all([
|
|
8640
|
-
import("./chunk-
|
|
8641
|
-
|
|
8655
|
+
import("./chunk-OYXD2MOM.js"),
|
|
8656
|
+
fs6.promises.readFile(filePath, "utf-8")
|
|
8642
8657
|
]);
|
|
8643
8658
|
await getOwnedLspService2().openFile(filePath, content, { preserveDiagnostics: false });
|
|
8644
8659
|
} catch {
|
|
@@ -8735,7 +8750,7 @@ function inlineBlockerPlaces(blockers, filePath) {
|
|
|
8735
8750
|
}
|
|
8736
8751
|
|
|
8737
8752
|
// dist/clients/diagnostic-dispositions.js
|
|
8738
|
-
import * as
|
|
8753
|
+
import * as fs7 from "node:fs";
|
|
8739
8754
|
import * as path9 from "node:path";
|
|
8740
8755
|
|
|
8741
8756
|
// dist/clients/disposition-logger.js
|
|
@@ -8825,7 +8840,7 @@ function statePath(cwd) {
|
|
|
8825
8840
|
return path9.join(getProjectDataDir(cwd), "cache", "diagnostic-dispositions.json");
|
|
8826
8841
|
}
|
|
8827
8842
|
var stateCache = null;
|
|
8828
|
-
var dispositionStatSync =
|
|
8843
|
+
var dispositionStatSync = fs7.statSync;
|
|
8829
8844
|
function hasAnyDispositionMarks(cwd) {
|
|
8830
8845
|
return Boolean(readState(cwd).dispositions) || hasDeferredThisSession(cwd);
|
|
8831
8846
|
}
|
|
@@ -8839,7 +8854,7 @@ function hasStrictDispositionMarks(cwd) {
|
|
|
8839
8854
|
}
|
|
8840
8855
|
return false;
|
|
8841
8856
|
}
|
|
8842
|
-
var multiFileReadFileSync =
|
|
8857
|
+
var multiFileReadFileSync = fs7.readFileSync;
|
|
8843
8858
|
function readState(cwd) {
|
|
8844
8859
|
const p = statePath(cwd);
|
|
8845
8860
|
let stat3;
|
|
@@ -8864,7 +8879,7 @@ function readState(cwd) {
|
|
|
8864
8879
|
}
|
|
8865
8880
|
let state4;
|
|
8866
8881
|
try {
|
|
8867
|
-
const parsed = JSON.parse(
|
|
8882
|
+
const parsed = JSON.parse(fs7.readFileSync(p, "utf-8"));
|
|
8868
8883
|
state4 = parsed && typeof parsed === "object" ? parsed : {};
|
|
8869
8884
|
} catch {
|
|
8870
8885
|
state4 = {};
|
|
@@ -8884,6 +8899,36 @@ function getDisposition(cwd, anchor) {
|
|
|
8884
8899
|
function resetDeferredDispositions() {
|
|
8885
8900
|
deferredByCwd.clear();
|
|
8886
8901
|
}
|
|
8902
|
+
function displayFormAliases(candidates) {
|
|
8903
|
+
const cut = /* @__PURE__ */ new Map();
|
|
8904
|
+
const owners = /* @__PURE__ */ new Map();
|
|
8905
|
+
for (const candidate of candidates) {
|
|
8906
|
+
if (!messageIsCutWhenDisplayed(candidate.message))
|
|
8907
|
+
continue;
|
|
8908
|
+
const form = displayedMessage(candidate.message);
|
|
8909
|
+
cut.set(candidate, form);
|
|
8910
|
+
const key = normalizeMessage2(form);
|
|
8911
|
+
const owner = owners.get(key);
|
|
8912
|
+
const message = normalizeMessage2(candidate.message);
|
|
8913
|
+
if (owner === void 0)
|
|
8914
|
+
owners.set(key, /* @__PURE__ */ new Set([message]));
|
|
8915
|
+
else
|
|
8916
|
+
owner.add(message);
|
|
8917
|
+
}
|
|
8918
|
+
if (cut.size === 0)
|
|
8919
|
+
return /* @__PURE__ */ new Map();
|
|
8920
|
+
for (const candidate of candidates) {
|
|
8921
|
+
const message = normalizeMessage2(candidate.message);
|
|
8922
|
+
owners.get(message)?.add(message);
|
|
8923
|
+
}
|
|
8924
|
+
const aliases = /* @__PURE__ */ new Map();
|
|
8925
|
+
for (const [candidate, form] of cut) {
|
|
8926
|
+
if ((owners.get(normalizeMessage2(form))?.size ?? 0) === 1) {
|
|
8927
|
+
aliases.set(candidate, form);
|
|
8928
|
+
}
|
|
8929
|
+
}
|
|
8930
|
+
return aliases;
|
|
8931
|
+
}
|
|
8887
8932
|
function applyDispositions(diagnostics, cwd, filePath, content) {
|
|
8888
8933
|
if (!diagnostics.length)
|
|
8889
8934
|
return diagnostics;
|
|
@@ -8891,15 +8936,26 @@ function applyDispositions(diagnostics, cwd, filePath, content) {
|
|
|
8891
8936
|
if (nothingToApply(dispositions, cwd))
|
|
8892
8937
|
return diagnostics;
|
|
8893
8938
|
const deferred = deferredAnchorsFor(cwd);
|
|
8939
|
+
const aliases = displayFormAliases(diagnostics);
|
|
8894
8940
|
return diagnostics.filter((d) => {
|
|
8895
8941
|
const { strict, weak } = anchorsForDiagnostic(cwd, filePath, d, content);
|
|
8896
8942
|
const isBlocking2 = d.semantic === "blocking";
|
|
8897
|
-
|
|
8943
|
+
const alias = aliases.get(d);
|
|
8944
|
+
let aliasStrict;
|
|
8945
|
+
let aliasWeak;
|
|
8946
|
+
if (alias !== void 0) {
|
|
8947
|
+
const aliasAnchors = anchorsForDiagnostic(cwd, filePath, { ...d, message: alias }, content);
|
|
8948
|
+
aliasStrict = aliasAnchors.strict;
|
|
8949
|
+
if (!isBlocking2)
|
|
8950
|
+
aliasWeak = aliasAnchors.weak;
|
|
8951
|
+
}
|
|
8952
|
+
if (!isBlocking2 && (deferred?.has(weak) || aliasWeak !== void 0 && deferred?.has(aliasWeak))) {
|
|
8898
8953
|
return false;
|
|
8899
8954
|
}
|
|
8900
|
-
if (dispositions?.[strict]?.disposition === "false-positive")
|
|
8955
|
+
if (dispositions?.[strict]?.disposition === "false-positive" || aliasStrict !== void 0 && dispositions?.[aliasStrict]?.disposition === "false-positive") {
|
|
8901
8956
|
return false;
|
|
8902
|
-
|
|
8957
|
+
}
|
|
8958
|
+
if (!isBlocking2 && (dispositions?.[weak]?.disposition === "suppress" || aliasWeak !== void 0 && dispositions?.[aliasWeak]?.disposition === "suppress")) {
|
|
8903
8959
|
return false;
|
|
8904
8960
|
}
|
|
8905
8961
|
return true;
|
|
@@ -8931,6 +8987,52 @@ function applyWeakDispositions(diagnostics, cwd, filePath) {
|
|
|
8931
8987
|
});
|
|
8932
8988
|
}
|
|
8933
8989
|
function applyDispositionsMultiFile(diagnostics, cwd, filePathOf) {
|
|
8990
|
+
return filterPerFileGroup(diagnostics, cwd, filePathOf, (group, filePath) => {
|
|
8991
|
+
let content = "";
|
|
8992
|
+
try {
|
|
8993
|
+
content = multiFileReadFileSync(filePath, "utf-8");
|
|
8994
|
+
} catch {
|
|
8995
|
+
}
|
|
8996
|
+
return applyDispositions(group, cwd, filePath, content);
|
|
8997
|
+
});
|
|
8998
|
+
}
|
|
8999
|
+
function applyWeakDispositionsMultiFile(diagnostics, cwd, filePathOf) {
|
|
9000
|
+
return filterPerFileGroup(diagnostics, cwd, filePathOf, (group, filePath) => applyWeakDispositions(group, cwd, filePath));
|
|
9001
|
+
}
|
|
9002
|
+
function trustedCitedOwnerContent(anchor, cwd, read) {
|
|
9003
|
+
if (!isWithinIdentity(anchor, cwd))
|
|
9004
|
+
return void 0;
|
|
9005
|
+
return read();
|
|
9006
|
+
}
|
|
9007
|
+
function cachedAnchorMarks(input) {
|
|
9008
|
+
const { anchor, cwd, rows, cited, strictAnchors } = input;
|
|
9009
|
+
if (!cited && !strictAnchors)
|
|
9010
|
+
return { marks: "weak-only" };
|
|
9011
|
+
let stat3;
|
|
9012
|
+
try {
|
|
9013
|
+
stat3 = fs7.statSync(anchor);
|
|
9014
|
+
} catch {
|
|
9015
|
+
return cited ? { marks: "refused" } : { marks: "weak-only" };
|
|
9016
|
+
}
|
|
9017
|
+
let content;
|
|
9018
|
+
if (cited) {
|
|
9019
|
+
content = trustedCitedOwnerContent(anchor, cwd, () => input.readContent(anchor, stat3));
|
|
9020
|
+
if (content === void 0)
|
|
9021
|
+
return { marks: "refused" };
|
|
9022
|
+
}
|
|
9023
|
+
if (!strictAnchors)
|
|
9024
|
+
return { marks: "weak-only" };
|
|
9025
|
+
const referenceMs = rows.reduce((latest, row) => Math.max(latest, row.observedAt ?? 0), 0);
|
|
9026
|
+
if (referenceMs > 0 && freshnessFromMtime({ mtimeMs: stat3.mtimeMs, referenceMs }).verdict === "stale") {
|
|
9027
|
+
return { marks: "weak-only" };
|
|
9028
|
+
}
|
|
9029
|
+
content ??= input.readContent(anchor, stat3);
|
|
9030
|
+
if (content === void 0) {
|
|
9031
|
+
return { marks: "weak-only" };
|
|
9032
|
+
}
|
|
9033
|
+
return { marks: "strict", content };
|
|
9034
|
+
}
|
|
9035
|
+
function filterPerFileGroup(diagnostics, cwd, filePathOf, applyGroup) {
|
|
8934
9036
|
if (!diagnostics.length)
|
|
8935
9037
|
return diagnostics;
|
|
8936
9038
|
const dispositions = readState(cwd).dispositions;
|
|
@@ -8947,12 +9049,7 @@ function applyDispositionsMultiFile(diagnostics, cwd, filePathOf) {
|
|
|
8947
9049
|
}
|
|
8948
9050
|
const kept = /* @__PURE__ */ new Set();
|
|
8949
9051
|
for (const [filePath, group] of groups) {
|
|
8950
|
-
|
|
8951
|
-
try {
|
|
8952
|
-
content = multiFileReadFileSync(filePath, "utf-8");
|
|
8953
|
-
} catch {
|
|
8954
|
-
}
|
|
8955
|
-
for (const d of applyDispositions(group, cwd, filePath, content)) {
|
|
9052
|
+
for (const d of applyGroup(group, filePath)) {
|
|
8956
9053
|
kept.add(d);
|
|
8957
9054
|
}
|
|
8958
9055
|
}
|
|
@@ -8960,11 +9057,11 @@ function applyDispositionsMultiFile(diagnostics, cwd, filePathOf) {
|
|
|
8960
9057
|
}
|
|
8961
9058
|
|
|
8962
9059
|
// dist/clients/session-state-store.js
|
|
8963
|
-
import { promises as
|
|
9060
|
+
import { promises as fs8 } from "node:fs";
|
|
8964
9061
|
async function dropStaleFiles(widget, savedAt) {
|
|
8965
9062
|
const checked = await Promise.all(widget.files.map(async (file) => {
|
|
8966
9063
|
try {
|
|
8967
|
-
const st = await
|
|
9064
|
+
const st = await fs8.stat(file.filePath);
|
|
8968
9065
|
return freshnessFromMtime({
|
|
8969
9066
|
mtimeMs: st.mtimeMs,
|
|
8970
9067
|
referenceMs: savedAt,
|
|
@@ -9113,7 +9210,7 @@ function reconcileWidgetDisposition(cwd, target, _disposition, content) {
|
|
|
9113
9210
|
let source = content ?? target.content;
|
|
9114
9211
|
if (source === void 0) {
|
|
9115
9212
|
try {
|
|
9116
|
-
source =
|
|
9213
|
+
source = readFileSync6(target.filePath, "utf8");
|
|
9117
9214
|
} catch {
|
|
9118
9215
|
recordDegradationOnce({
|
|
9119
9216
|
kind: "widget-disposition-reconcile-fallback",
|
|
@@ -9123,13 +9220,58 @@ function reconcileWidgetDisposition(cwd, target, _disposition, content) {
|
|
|
9123
9220
|
source = "";
|
|
9124
9221
|
}
|
|
9125
9222
|
}
|
|
9126
|
-
const
|
|
9223
|
+
const groups = /* @__PURE__ */ new Map();
|
|
9224
|
+
for (const diagnostic of current) {
|
|
9225
|
+
const anchor = diagnostic.citedFile ?? target.filePath;
|
|
9226
|
+
const group = groups.get(anchor);
|
|
9227
|
+
if (group)
|
|
9228
|
+
group.push(diagnostic);
|
|
9229
|
+
else
|
|
9230
|
+
groups.set(anchor, [diagnostic]);
|
|
9231
|
+
}
|
|
9232
|
+
const citedMarks = /* @__PURE__ */ new Map();
|
|
9233
|
+
const citedAnchorMarks = (anchor, group) => {
|
|
9234
|
+
const hit = citedMarks.get(anchor);
|
|
9235
|
+
if (hit)
|
|
9236
|
+
return hit;
|
|
9237
|
+
const decision = cachedAnchorMarks({
|
|
9238
|
+
cwd,
|
|
9239
|
+
anchor,
|
|
9240
|
+
rows: group,
|
|
9241
|
+
cited: true,
|
|
9242
|
+
strictAnchors: true,
|
|
9243
|
+
// Best-effort like `applyDispositionsMultiFile`'s read, and through
|
|
9244
|
+
// this module's own reader so an anchor whose bytes cannot be had
|
|
9245
|
+
// still leaves its bounded `widget-mark-anchor-unreadable` record.
|
|
9246
|
+
readContent: (filePath) => readContentOrUndefined(filePath)
|
|
9247
|
+
});
|
|
9248
|
+
citedMarks.set(anchor, decision);
|
|
9249
|
+
return decision;
|
|
9250
|
+
};
|
|
9251
|
+
const active = /* @__PURE__ */ new Set();
|
|
9252
|
+
for (const [anchor, group] of groups) {
|
|
9253
|
+
if (anchor === target.filePath) {
|
|
9254
|
+
for (const d of applyDispositions(group, cwd, anchor, source)) {
|
|
9255
|
+
active.add(d);
|
|
9256
|
+
}
|
|
9257
|
+
continue;
|
|
9258
|
+
}
|
|
9259
|
+
const decision = citedAnchorMarks(anchor, group);
|
|
9260
|
+
const anchorContent = decision.marks === "strict" ? decision.content : "";
|
|
9261
|
+
for (const d of applyDispositions(group, cwd, anchor, anchorContent)) {
|
|
9262
|
+
active.add(d);
|
|
9263
|
+
}
|
|
9264
|
+
}
|
|
9127
9265
|
const normalized = current.flatMap((diagnostic) => {
|
|
9128
|
-
const
|
|
9129
|
-
const
|
|
9266
|
+
const anchor = diagnostic.citedFile ?? target.filePath;
|
|
9267
|
+
const decision = anchor === target.filePath ? void 0 : citedMarks.get(anchor);
|
|
9268
|
+
const refused = decision?.marks === "refused";
|
|
9269
|
+
const anchorContent = decision === void 0 ? source : decision.marks === "strict" ? decision.content : "";
|
|
9270
|
+
const { strict, weak } = anchorsForDiagnostic(cwd, anchor, diagnostic, anchorContent);
|
|
9271
|
+
const entry = refused ? void 0 : getDisposition(cwd, strict) ?? getDisposition(cwd, weak);
|
|
9130
9272
|
if (!active.has(diagnostic) && (entry?.disposition === "false-positive" || entry?.disposition === "suppress")) {
|
|
9131
9273
|
const { anchorSpan: _previousSpan, ...base } = diagnostic;
|
|
9132
|
-
const span = entry.disposition === "false-positive" ? strictAnchorSpan(
|
|
9274
|
+
const span = entry.disposition === "false-positive" ? strictAnchorSpan(anchorContent, diagnostic.line) : void 0;
|
|
9133
9275
|
return [
|
|
9134
9276
|
{
|
|
9135
9277
|
...base,
|
|
@@ -9198,6 +9340,7 @@ function exportWidgetState() {
|
|
|
9198
9340
|
...rec.uncheckedReason !== void 0 && {
|
|
9199
9341
|
uncheckedReason: rec.uncheckedReason
|
|
9200
9342
|
},
|
|
9343
|
+
...rec.uncheckedInapplicable && { uncheckedInapplicable: true },
|
|
9201
9344
|
touchedAt: rec.touchedAt
|
|
9202
9345
|
}))
|
|
9203
9346
|
};
|
|
@@ -9232,7 +9375,10 @@ function importWidgetState(state4) {
|
|
|
9232
9375
|
diagnosticCounts: countDiagnostics(migratedAllDiagnostics),
|
|
9233
9376
|
hasFinalDiagnosticsSnapshot: f.hasFinalDiagnosticsSnapshot ?? false,
|
|
9234
9377
|
...typeof f.uncheckedReason === "string" && {
|
|
9235
|
-
uncheckedReason: f.uncheckedReason
|
|
9378
|
+
uncheckedReason: f.uncheckedReason,
|
|
9379
|
+
...f.uncheckedInapplicable === true && {
|
|
9380
|
+
uncheckedInapplicable: true
|
|
9381
|
+
}
|
|
9236
9382
|
},
|
|
9237
9383
|
touchedAt: recordTouchedAt
|
|
9238
9384
|
});
|
|
@@ -9319,10 +9465,16 @@ function recordDiagnostics(filePath, diagnostics, writeIndex, observedAt, unchec
|
|
|
9319
9465
|
const observedTs = observedAt ?? Date.now();
|
|
9320
9466
|
const rec = getOrCreate(filePath, key);
|
|
9321
9467
|
commitDiagnostics(rec, filePath, normalizeDiagnostics(filePath, diagnostics, observedTs), observedTs, key);
|
|
9322
|
-
if (unchecked === void 0)
|
|
9468
|
+
if (unchecked === void 0) {
|
|
9323
9469
|
delete rec.uncheckedReason;
|
|
9324
|
-
|
|
9325
|
-
|
|
9470
|
+
delete rec.uncheckedInapplicable;
|
|
9471
|
+
} else {
|
|
9472
|
+
rec.uncheckedReason = unchecked.reason;
|
|
9473
|
+
if (unchecked.inapplicable)
|
|
9474
|
+
rec.uncheckedInapplicable = true;
|
|
9475
|
+
else
|
|
9476
|
+
delete rec.uncheckedInapplicable;
|
|
9477
|
+
}
|
|
9326
9478
|
return true;
|
|
9327
9479
|
}
|
|
9328
9480
|
function normalizeDiagnostics(filePath, diagnostics, observedTs) {
|
|
@@ -9345,7 +9497,7 @@ function normalizeDiagnostics(filePath, diagnostics, observedTs) {
|
|
|
9345
9497
|
var retentionIdentity = findingIdentity;
|
|
9346
9498
|
function readContentOrUndefined(filePath) {
|
|
9347
9499
|
try {
|
|
9348
|
-
return
|
|
9500
|
+
return readFileSync6(filePath, "utf8");
|
|
9349
9501
|
} catch {
|
|
9350
9502
|
recordDegradationOnce({
|
|
9351
9503
|
kind: "widget-mark-anchor-unreadable",
|
|
@@ -9668,6 +9820,12 @@ function getFileDiagnosticSummaries() {
|
|
|
9668
9820
|
warnings: rec.diagnosticCounts.warnings,
|
|
9669
9821
|
advisories: countAdvisories(live),
|
|
9670
9822
|
hasFinalSnapshot: rec.hasFinalDiagnosticsSnapshot,
|
|
9823
|
+
...rec.uncheckedReason !== void 0 && {
|
|
9824
|
+
uncheckedReason: rec.uncheckedReason
|
|
9825
|
+
},
|
|
9826
|
+
...rec.uncheckedInapplicable === true && {
|
|
9827
|
+
uncheckedInapplicable: true
|
|
9828
|
+
},
|
|
9671
9829
|
diagnostics: live.map((d) => ({ ...d }))
|
|
9672
9830
|
};
|
|
9673
9831
|
});
|
|
@@ -9873,8 +10031,8 @@ async function raceToCompletion(promises3, shouldComplete, options = { timeoutMs
|
|
|
9873
10031
|
}
|
|
9874
10032
|
|
|
9875
10033
|
// dist/clients/lsp/edits.js
|
|
9876
|
-
import
|
|
9877
|
-
import { readFileSync as
|
|
10034
|
+
import fs9 from "node:fs/promises";
|
|
10035
|
+
import { readFileSync as readFileSync7, realpathSync, statSync as statSync7 } from "node:fs";
|
|
9878
10036
|
import path10 from "node:path";
|
|
9879
10037
|
import { URL as URL2 } from "node:url";
|
|
9880
10038
|
|
|
@@ -9901,7 +10059,44 @@ function convertCharacterOffset(encoding, lineText, utf16Character) {
|
|
|
9901
10059
|
return [...prefix].length;
|
|
9902
10060
|
}
|
|
9903
10061
|
|
|
10062
|
+
// dist/clients/write-source-file.js
|
|
10063
|
+
function refuseOutOfRootWrites(filePaths, sessionRoot, writer3) {
|
|
10064
|
+
return filePaths.filter((filePath) => {
|
|
10065
|
+
const mode = resolveAnalysisRoot(filePath, sessionRoot);
|
|
10066
|
+
if (canWriteAnalysisRoot(mode))
|
|
10067
|
+
return false;
|
|
10068
|
+
recordDegradationOnce({
|
|
10069
|
+
kind: "adopted-root-writer-skipped",
|
|
10070
|
+
subject: `${filePath}:${writer3}`,
|
|
10071
|
+
reason: `${writer3} refused: the file's identity is outside the session's writable roots (${mode})`,
|
|
10072
|
+
metadata: { writer: writer3, mode }
|
|
10073
|
+
});
|
|
10074
|
+
return true;
|
|
10075
|
+
});
|
|
10076
|
+
}
|
|
10077
|
+
async function writeSourceFile(target, write) {
|
|
10078
|
+
const exit = await withHostFileMutationQueues(target.filePaths, async () => {
|
|
10079
|
+
try {
|
|
10080
|
+
return { ok: true, value: await write() };
|
|
10081
|
+
} catch (error) {
|
|
10082
|
+
return { ok: false, error };
|
|
10083
|
+
}
|
|
10084
|
+
});
|
|
10085
|
+
await target.record(exit);
|
|
10086
|
+
if (!exit.ok)
|
|
10087
|
+
throw exit.error;
|
|
10088
|
+
return exit.value;
|
|
10089
|
+
}
|
|
10090
|
+
|
|
9904
10091
|
// dist/clients/lsp/edits.js
|
|
10092
|
+
var WorkspaceEditRefusedError = class extends Error {
|
|
10093
|
+
paths;
|
|
10094
|
+
constructor(paths) {
|
|
10095
|
+
super(`workspace edit refused: ${paths.join(", ")} ${paths.length === 1 ? "is" : "are"} outside the session's writable roots`);
|
|
10096
|
+
this.paths = paths;
|
|
10097
|
+
this.name = "WorkspaceEditRefusedError";
|
|
10098
|
+
}
|
|
10099
|
+
};
|
|
9905
10100
|
var StaleWorkspaceEditContentError = class extends Error {
|
|
9906
10101
|
};
|
|
9907
10102
|
function refuseStaleWorkspaceEdit(filePath, why) {
|
|
@@ -10304,7 +10499,7 @@ function captureRenameExpectedContent(edit, cwd, requestedAtMs, readTrackedSend,
|
|
|
10304
10499
|
let mtimeMs;
|
|
10305
10500
|
try {
|
|
10306
10501
|
realPath = realpathSync.native(diskPath);
|
|
10307
|
-
content =
|
|
10502
|
+
content = readFileSync7(realPath, "utf-8");
|
|
10308
10503
|
mtimeMs = statSync7(realPath).mtimeMs;
|
|
10309
10504
|
} catch {
|
|
10310
10505
|
continue;
|
|
@@ -10494,7 +10689,7 @@ function summarizeWorkspaceEdit(edit, cwd) {
|
|
|
10494
10689
|
}
|
|
10495
10690
|
async function lstatOrMissing(filePath) {
|
|
10496
10691
|
try {
|
|
10497
|
-
return await
|
|
10692
|
+
return await fs9.lstat(filePath);
|
|
10498
10693
|
} catch (err) {
|
|
10499
10694
|
if (err.code === "ENOENT")
|
|
10500
10695
|
return void 0;
|
|
@@ -10506,7 +10701,7 @@ function isSameFsIdentity(a, b) {
|
|
|
10506
10701
|
}
|
|
10507
10702
|
async function bigintLstatOrMissing(filePath) {
|
|
10508
10703
|
try {
|
|
10509
|
-
return await
|
|
10704
|
+
return await fs9.lstat(filePath, { bigint: true });
|
|
10510
10705
|
} catch (err) {
|
|
10511
10706
|
if (err.code === "ENOENT")
|
|
10512
10707
|
return void 0;
|
|
@@ -10626,7 +10821,7 @@ async function preflightWorkspaceEdit(planned, cwd, options) {
|
|
|
10626
10821
|
const physicalPath = resolveVirtualPath(filePath);
|
|
10627
10822
|
if (!physicalPath)
|
|
10628
10823
|
throw new Error(`text edit target does not exist: ${filePath}`);
|
|
10629
|
-
const content = await
|
|
10824
|
+
const content = await fs9.readFile(physicalPath, "utf-8");
|
|
10630
10825
|
const expected = options.expectedContent?.get(await realpathOrResolveAsync(physicalPath));
|
|
10631
10826
|
if (expected !== void 0 && expected !== content) {
|
|
10632
10827
|
refuseStaleWorkspaceEdit(filePath, "the file changed after the edit was computed from it");
|
|
@@ -10782,10 +10977,22 @@ async function applyWorkspaceEdit(edit, cwd, options = {}) {
|
|
|
10782
10977
|
operationCounts,
|
|
10783
10978
|
fileDetails
|
|
10784
10979
|
});
|
|
10980
|
+
const queuePaths = plannedDiskPaths(planned);
|
|
10981
|
+
const target = {
|
|
10982
|
+
filePaths: queuePaths,
|
|
10983
|
+
record: async (exit) => {
|
|
10984
|
+
await announceResourceOperations(resourceChanges, options.watchedFileSink);
|
|
10985
|
+
if (options.mutationContext && options.observe !== false) {
|
|
10986
|
+
recordLspMutation(options.mutationContext, {
|
|
10987
|
+
results: [makeResult()],
|
|
10988
|
+
status: !exit.ok ? "failed" : appliedOperationTotal > 0 ? "success" : "skipped"
|
|
10989
|
+
});
|
|
10990
|
+
}
|
|
10991
|
+
}
|
|
10992
|
+
};
|
|
10785
10993
|
try {
|
|
10786
|
-
const queuePaths = plannedDiskPaths(planned);
|
|
10787
10994
|
const queueStart = Date.now();
|
|
10788
|
-
await
|
|
10995
|
+
await writeSourceFile(target, async () => {
|
|
10789
10996
|
logLatency({
|
|
10790
10997
|
type: "phase",
|
|
10791
10998
|
filePath: cwd,
|
|
@@ -10794,6 +11001,9 @@ async function applyWorkspaceEdit(edit, cwd, options = {}) {
|
|
|
10794
11001
|
metadata: { paths: queuePaths.length }
|
|
10795
11002
|
});
|
|
10796
11003
|
prepared = await preflightWorkspaceEdit(planned, cwd, options);
|
|
11004
|
+
const refused = refuseOutOfRootWrites(queuePaths, options.sessionRoot ?? options.mutationContext?.runtime?.projectRoot ?? cwd, "lsp-edit");
|
|
11005
|
+
if (refused.length > 0)
|
|
11006
|
+
throw new WorkspaceEditRefusedError(refused);
|
|
10797
11007
|
for (const op of planned) {
|
|
10798
11008
|
const size = operationSize(op);
|
|
10799
11009
|
if (op.kind === "text")
|
|
@@ -10815,14 +11025,14 @@ async function applyWorkspaceEdit(edit, cwd, options = {}) {
|
|
|
10815
11025
|
skipOperation(op);
|
|
10816
11026
|
continue;
|
|
10817
11027
|
}
|
|
10818
|
-
const content = await
|
|
11028
|
+
const content = await fs9.readFile(diskPath, "utf-8");
|
|
10819
11029
|
const updated = applyTextEditsToString(content, edits, "utf-16");
|
|
10820
11030
|
const changesLineCount = edits.some((edit2) => {
|
|
10821
11031
|
const removedLines = edit2.range.end.line - edit2.range.start.line;
|
|
10822
11032
|
const insertedLines = (edit2.newText.match(/\r\n|\r|\n/g) ?? []).length;
|
|
10823
11033
|
return removedLines !== insertedLines;
|
|
10824
11034
|
});
|
|
10825
|
-
await
|
|
11035
|
+
await fs9.writeFile(diskPath, updated, "utf-8");
|
|
10826
11036
|
const start = Math.min(...edits.map((item) => item.range.start.line + 1));
|
|
10827
11037
|
const end = Math.max(...edits.map((item) => item.range.end.line + (item.range.end.character === 0 && item.range.end.line > item.range.start.line ? 0 : 1)));
|
|
10828
11038
|
touchedFiles.add(filePath);
|
|
@@ -10841,11 +11051,11 @@ async function applyWorkspaceEdit(edit, cwd, options = {}) {
|
|
|
10841
11051
|
} else if (op.kind === "create") {
|
|
10842
11052
|
const filePath = uriToPath(op.uri);
|
|
10843
11053
|
const diskPath = uriToDiskPath(op.uri);
|
|
10844
|
-
await
|
|
11054
|
+
await fs9.mkdir(path10.dirname(diskPath), { recursive: true });
|
|
10845
11055
|
if (op.options?.overwrite)
|
|
10846
|
-
await
|
|
11056
|
+
await fs9.writeFile(diskPath, "", "utf-8");
|
|
10847
11057
|
else
|
|
10848
|
-
await
|
|
11058
|
+
await fs9.writeFile(diskPath, "", { flag: "wx" });
|
|
10849
11059
|
resourceChanges.push({ filePath: diskPath, type: FILE_CREATED });
|
|
10850
11060
|
touchedFiles.add(filePath);
|
|
10851
11061
|
fileDetails.push({
|
|
@@ -10861,10 +11071,10 @@ async function applyWorkspaceEdit(edit, cwd, options = {}) {
|
|
|
10861
11071
|
const newPath = uriToPath(op.newUri);
|
|
10862
11072
|
const oldDisk = uriToDiskPath(op.oldUri);
|
|
10863
11073
|
const newDisk = uriToDiskPath(op.newUri);
|
|
10864
|
-
await
|
|
11074
|
+
await fs9.mkdir(path10.dirname(newDisk), { recursive: true });
|
|
10865
11075
|
if (op.options?.overwrite)
|
|
10866
|
-
await
|
|
10867
|
-
await
|
|
11076
|
+
await fs9.rm(newDisk, { recursive: true, force: true });
|
|
11077
|
+
await fs9.rename(oldDisk, newDisk);
|
|
10868
11078
|
resourceChanges.push({ filePath: oldDisk, type: FILE_DELETED }, { filePath: newDisk, type: FILE_CREATED });
|
|
10869
11079
|
touchedFiles.add(oldPath);
|
|
10870
11080
|
touchedFiles.add(newPath);
|
|
@@ -10884,7 +11094,7 @@ async function applyWorkspaceEdit(edit, cwd, options = {}) {
|
|
|
10884
11094
|
} else {
|
|
10885
11095
|
const filePath = uriToPath(op.uri);
|
|
10886
11096
|
const diskPath = uriToDiskPath(op.uri);
|
|
10887
|
-
await
|
|
11097
|
+
await fs9.rm(diskPath, {
|
|
10888
11098
|
recursive: op.options?.recursive === true,
|
|
10889
11099
|
force: false
|
|
10890
11100
|
});
|
|
@@ -10902,14 +11112,7 @@ async function applyWorkspaceEdit(edit, cwd, options = {}) {
|
|
|
10902
11112
|
}
|
|
10903
11113
|
});
|
|
10904
11114
|
} catch (err) {
|
|
10905
|
-
await announceResourceOperations(resourceChanges, options.watchedFileSink);
|
|
10906
11115
|
const partial = makeResult();
|
|
10907
|
-
if (options.mutationContext && options.observe !== false) {
|
|
10908
|
-
recordLspMutation(options.mutationContext, {
|
|
10909
|
-
results: [partial],
|
|
10910
|
-
status: "failed"
|
|
10911
|
-
});
|
|
10912
|
-
}
|
|
10913
11116
|
const already = [...touchedFiles];
|
|
10914
11117
|
if (already.length > 0) {
|
|
10915
11118
|
const alreadyList = already.map((f) => ` \u2022 ${relativeToCwd(f, cwd)}`).join("\n");
|
|
@@ -10921,15 +11124,7 @@ Cause: ${err instanceof Error ? err.message : String(err)}`);
|
|
|
10921
11124
|
}
|
|
10922
11125
|
throw err;
|
|
10923
11126
|
}
|
|
10924
|
-
|
|
10925
|
-
const applied = makeResult();
|
|
10926
|
-
if (options.mutationContext && options.observe !== false) {
|
|
10927
|
-
recordLspMutation(options.mutationContext, {
|
|
10928
|
-
results: [applied],
|
|
10929
|
-
status: appliedOperationTotal > 0 ? "success" : "skipped"
|
|
10930
|
-
});
|
|
10931
|
-
}
|
|
10932
|
-
return applied;
|
|
11127
|
+
return makeResult();
|
|
10933
11128
|
}
|
|
10934
11129
|
|
|
10935
11130
|
// dist/clients/lsp/sync-kind.js
|
|
@@ -11122,7 +11317,7 @@ async function attemptTsserverSyncDiagnostics(file, svc) {
|
|
|
11122
11317
|
}
|
|
11123
11318
|
|
|
11124
11319
|
// dist/clients/lsp/workspace-diagnostics-cache.js
|
|
11125
|
-
import * as
|
|
11320
|
+
import * as fs10 from "node:fs";
|
|
11126
11321
|
import * as path12 from "node:path";
|
|
11127
11322
|
|
|
11128
11323
|
// dist/clients/reverse-deps.js
|
|
@@ -11314,7 +11509,7 @@ function loadWorkspaceDiagnosticsCache(cwd) {
|
|
|
11314
11509
|
}
|
|
11315
11510
|
function saveWorkspaceDiagnosticsCache(cwd, cache) {
|
|
11316
11511
|
const filePath = cachePath(cwd);
|
|
11317
|
-
|
|
11512
|
+
fs10.mkdirSync(path12.dirname(filePath), { recursive: true });
|
|
11318
11513
|
writeFileAtomic(filePath, JSON.stringify(cache, null, 2), {
|
|
11319
11514
|
bestEffort: false
|
|
11320
11515
|
});
|
|
@@ -11348,7 +11543,7 @@ function classifyWorkspaceDiagnosticsCacheExpiry(entry, now, sessionStartedAt, f
|
|
|
11348
11543
|
function isEntryFresh(filePath, entry, getImports) {
|
|
11349
11544
|
let ownStat;
|
|
11350
11545
|
try {
|
|
11351
|
-
ownStat =
|
|
11546
|
+
ownStat = fs10.statSync(filePath);
|
|
11352
11547
|
} catch {
|
|
11353
11548
|
return false;
|
|
11354
11549
|
}
|
|
@@ -11372,7 +11567,7 @@ function isEntryFresh(filePath, entry, getImports) {
|
|
|
11372
11567
|
for (const dep of imports) {
|
|
11373
11568
|
let mtimeMs;
|
|
11374
11569
|
try {
|
|
11375
|
-
mtimeMs =
|
|
11570
|
+
mtimeMs = fs10.statSync(dep).mtimeMs;
|
|
11376
11571
|
} catch {
|
|
11377
11572
|
return false;
|
|
11378
11573
|
}
|
|
@@ -12488,7 +12683,9 @@ function setupIncomingHandlers(state4, initialization, onDiagnosticsPublished) {
|
|
|
12488
12683
|
type: "phase",
|
|
12489
12684
|
phase: "lsp_empty_first_publish_held",
|
|
12490
12685
|
filePath: normalizedPath,
|
|
12491
|
-
|
|
12686
|
+
// Time from didOpen to the server's first publish: an age, not
|
|
12687
|
+
// work this row did (#5379).
|
|
12688
|
+
ageMs: Math.max(0, publishReceivedAt - (state4.documentOpenedAt.get(normalizedPath) ?? publishReceivedAt)),
|
|
12492
12689
|
metadata: {
|
|
12493
12690
|
serverId: state4.serverId,
|
|
12494
12691
|
emptyFirstPublish: "indexing",
|
|
@@ -12576,7 +12773,9 @@ function setupIncomingHandlers(state4, initialization, onDiagnosticsPublished) {
|
|
|
12576
12773
|
type: "phase",
|
|
12577
12774
|
phase: "lsp_empty_first_publish_held",
|
|
12578
12775
|
filePath: normalizedPath,
|
|
12579
|
-
|
|
12776
|
+
// Time from didOpen to the server's first publish: an age, not work
|
|
12777
|
+
// this row did (#5379).
|
|
12778
|
+
ageMs: Math.max(0, publishReceivedAt - (state4.documentOpenedAt.get(normalizedPath) ?? publishReceivedAt)),
|
|
12580
12779
|
metadata: {
|
|
12581
12780
|
serverId: state4.serverId,
|
|
12582
12781
|
emptyFirstPublish: strategy.emptyFirstPublish,
|
|
@@ -15170,6 +15369,7 @@ var ClientRegistry = class {
|
|
|
15170
15369
|
clientSpawnGate = Promise.resolve();
|
|
15171
15370
|
/** True after shutdown() has been called; blocks new operations */
|
|
15172
15371
|
isDestroyed = false;
|
|
15372
|
+
trustShutdown = new AbortController();
|
|
15173
15373
|
/**
|
|
15174
15374
|
* #850: teardown completion for every singleton generation retired before
|
|
15175
15375
|
* this service was published. Only replacement services receive one; direct
|
|
@@ -15191,6 +15391,8 @@ var ClientRegistry = class {
|
|
|
15191
15391
|
/** The first step of `LSPService.shutdown`: block new operations. */
|
|
15192
15392
|
markDestroyed() {
|
|
15193
15393
|
this.isDestroyed = true;
|
|
15394
|
+
this.trustShutdown.abort();
|
|
15395
|
+
this.adoptedTrust.clear();
|
|
15194
15396
|
}
|
|
15195
15397
|
/** The notify-stall demotion's breaker cooldown (`LSPService.demoteForNotifyStall`). */
|
|
15196
15398
|
coolDown(key, cooldownMs) {
|
|
@@ -15767,17 +15969,34 @@ var ClientRegistry = class {
|
|
|
15767
15969
|
return false;
|
|
15768
15970
|
return !isLspInstallDisabled();
|
|
15769
15971
|
}
|
|
15770
|
-
/**
|
|
15771
|
-
|
|
15772
|
-
|
|
15972
|
+
/** Per-turn reads belong to this registry, never to a workspace store. */
|
|
15973
|
+
adoptedTrustTurn;
|
|
15974
|
+
adoptedTrust = /* @__PURE__ */ new Map();
|
|
15975
|
+
trustForAdoptedRoot(root) {
|
|
15976
|
+
const turn = getTurnId();
|
|
15977
|
+
if (turn === "turn:0")
|
|
15978
|
+
return readAdoptedProjectTrust(root, this.trustShutdown.signal);
|
|
15979
|
+
if (this.adoptedTrustTurn !== turn) {
|
|
15980
|
+
this.adoptedTrust.clear();
|
|
15981
|
+
this.adoptedTrustTurn = turn;
|
|
15982
|
+
}
|
|
15983
|
+
const key = normalizeMapKey(root);
|
|
15984
|
+
const prior = this.adoptedTrust.get(key);
|
|
15985
|
+
if (prior)
|
|
15986
|
+
return prior;
|
|
15987
|
+
const pending2 = readAdoptedProjectTrust(root, this.trustShutdown.signal);
|
|
15988
|
+
this.adoptedTrust.set(key, pending2);
|
|
15989
|
+
return pending2;
|
|
15990
|
+
}
|
|
15773
15991
|
async spawnClient(server, root, key, filePath, allowInstall) {
|
|
15992
|
+
const adopted = this.analysisRootModeForFile(filePath) === "adopted";
|
|
15774
15993
|
try {
|
|
15775
15994
|
if (server.executesProjectCode === true) {
|
|
15776
15995
|
refuseUntrustedLspExecution({
|
|
15777
15996
|
kind: "project-code-server",
|
|
15778
15997
|
serverId: server.id,
|
|
15779
15998
|
root
|
|
15780
|
-
});
|
|
15999
|
+
}, adopted ? await this.trustForAdoptedRoot(root) : void 0);
|
|
15781
16000
|
}
|
|
15782
16001
|
} catch (error) {
|
|
15783
16002
|
logSessionStart(`lsp spawn ${server.id}: refused \u2014 ${error instanceof Error ? error.message : String(error)}`);
|
|
@@ -16167,7 +16386,7 @@ function auxWaitBudgetMs(serverId, isCold, configuredCeilingMs, declaredWaitMs)
|
|
|
16167
16386
|
import * as path16 from "node:path";
|
|
16168
16387
|
|
|
16169
16388
|
// dist/clients/lsp/environment-gap.js
|
|
16170
|
-
import * as
|
|
16389
|
+
import * as fs11 from "node:fs";
|
|
16171
16390
|
import { isBuiltin } from "node:module";
|
|
16172
16391
|
import * as path15 from "node:path";
|
|
16173
16392
|
var ENVIRONMENT_GAP_MARKER = "no dependency install resolved for this workspace";
|
|
@@ -16231,7 +16450,7 @@ function declaredPackageNames(startDir) {
|
|
|
16231
16450
|
maxDepth: ENV_NODE_MODULES_WALK_MAX_LEVELS
|
|
16232
16451
|
})) {
|
|
16233
16452
|
try {
|
|
16234
|
-
const manifest = JSON.parse(
|
|
16453
|
+
const manifest = JSON.parse(fs11.readFileSync(path15.join(dir, "package.json"), "utf8"));
|
|
16235
16454
|
for (const field of DECLARING_FIELDS) {
|
|
16236
16455
|
const declared = manifest[field];
|
|
16237
16456
|
if (typeof declared !== "object" || declared === null)
|
|
@@ -16272,7 +16491,7 @@ function environmentGapKind(diagnostic) {
|
|
|
16272
16491
|
const name = MISSING_NAME.exec(message)?.[1];
|
|
16273
16492
|
return name !== void 0 && NODE_GLOBALS.has(name) ? { code } : void 0;
|
|
16274
16493
|
}
|
|
16275
|
-
function hasResolvableNodeModules(startDir, stat3 = (candidate) =>
|
|
16494
|
+
function hasResolvableNodeModules(startDir, stat3 = (candidate) => fs11.statSync(candidate)) {
|
|
16276
16495
|
let last;
|
|
16277
16496
|
for (const dir of walkUpDirs(startDir, {
|
|
16278
16497
|
maxDepth: ENV_NODE_MODULES_WALK_MAX_LEVELS
|
|
@@ -16493,7 +16712,7 @@ function createLazyImport(load) {
|
|
|
16493
16712
|
}
|
|
16494
16713
|
|
|
16495
16714
|
// dist/clients/lsp-lazy.js
|
|
16496
|
-
var lazyLsp = createLazyImport(() => import("./chunk-
|
|
16715
|
+
var lazyLsp = createLazyImport(() => import("./chunk-3VWEZ6H2.js"));
|
|
16497
16716
|
function warmLspService() {
|
|
16498
16717
|
return lazyLsp.get();
|
|
16499
16718
|
}
|
|
@@ -16611,8 +16830,8 @@ function destinationUriPreservingSpelling(oldUri, oldFilePath, newFilePath) {
|
|
|
16611
16830
|
}
|
|
16612
16831
|
}
|
|
16613
16832
|
var NOTIFY_BACKPRESSURE_BROKEN_AFTER = 3;
|
|
16614
|
-
var NAV_CLIENT_WAIT_TIMEOUT_MS =
|
|
16615
|
-
var TOUCH_DEBOUNCE_MS =
|
|
16833
|
+
var NAV_CLIENT_WAIT_TIMEOUT_MS = nonNegativeIntEnv("PI_LENS_LSP_NAV_CLIENT_WAIT_MS", 1500) || 1500;
|
|
16834
|
+
var TOUCH_DEBOUNCE_MS = nonNegativeIntEnv("PI_LENS_LSP_TOUCH_DEBOUNCE_MS", 1500);
|
|
16616
16835
|
var RECENT_TOUCH_CAP = 800;
|
|
16617
16836
|
var SCOPED_DEPENDENCY_TOUCH_MAX = 32;
|
|
16618
16837
|
var RENAME_NOTIFY_TIMEOUT_MS = Math.max(50, Number.parseInt(process.env.PI_LENS_LSP_RENAME_NOTIFY_TIMEOUT_MS ?? "1500", 10) || 1500);
|
|
@@ -16672,9 +16891,9 @@ function readTsserverSyncGraceMs() {
|
|
|
16672
16891
|
return parsed;
|
|
16673
16892
|
}
|
|
16674
16893
|
var MAX_TOUCH_CANDIDATES = 8;
|
|
16675
|
-
var DIAGNOSTICS_SEMANTIC_SETTLE_THRESHOLD_MS =
|
|
16676
|
-
var DIAGNOSTICS_SEMANTIC_SETTLE_WAIT_MS =
|
|
16677
|
-
var EARLY_UNBLOCK_GRACE_MS =
|
|
16894
|
+
var DIAGNOSTICS_SEMANTIC_SETTLE_THRESHOLD_MS = nonNegativeIntEnv("PI_LENS_LSP_DIAGNOSTICS_SEMANTIC_THRESHOLD_MS", 250);
|
|
16895
|
+
var DIAGNOSTICS_SEMANTIC_SETTLE_WAIT_MS = nonNegativeIntEnv("PI_LENS_LSP_DIAGNOSTICS_SEMANTIC_SETTLE_MS", 400);
|
|
16896
|
+
var EARLY_UNBLOCK_GRACE_MS = nonNegativeIntEnv("PI_LENS_LSP_EARLY_UNBLOCK_GRACE_MS", 400);
|
|
16678
16897
|
function unansweredPrimaries(spawned, resolvedPrimaryRoots, filePath) {
|
|
16679
16898
|
const { disabledServerIds, fallbackServerIds } = disabledPrimaries(filePath);
|
|
16680
16899
|
const standIns = new Set(fallbackServerIds);
|
|
@@ -17433,7 +17652,8 @@ var LSPService = class _LSPService {
|
|
|
17433
17652
|
logNotifyStallCpuBusy(key, entry, filePath, outstandingMs, verdict, extra = {}) {
|
|
17434
17653
|
emitBounded("lsp_notify_stall_cpu_busy", `${key}:${normalizeMapKey(filePath)}`, {
|
|
17435
17654
|
type: "phase",
|
|
17436
|
-
|
|
17655
|
+
// A still-outstanding write's age at a stall sample (#5379).
|
|
17656
|
+
ageMs: outstandingMs,
|
|
17437
17657
|
metadata: {
|
|
17438
17658
|
serverId: entry.info.id,
|
|
17439
17659
|
clientKey: key,
|
|
@@ -18721,7 +18941,7 @@ var LSPService = class _LSPService {
|
|
|
18721
18941
|
const readStamp = performance.now();
|
|
18722
18942
|
let content;
|
|
18723
18943
|
try {
|
|
18724
|
-
content = await
|
|
18944
|
+
content = await fs12.readFile(filePath, "utf8");
|
|
18725
18945
|
} catch {
|
|
18726
18946
|
continue;
|
|
18727
18947
|
}
|
|
@@ -18891,7 +19111,8 @@ var LSPService = class _LSPService {
|
|
|
18891
19111
|
type: "phase",
|
|
18892
19112
|
phase: "lsp_document_drift",
|
|
18893
19113
|
filePath: event.filePath,
|
|
18894
|
-
|
|
19114
|
+
// An AGE (now minus the document's last sync), not a span (#5379).
|
|
19115
|
+
ageMs: event.driftAgeMs,
|
|
18895
19116
|
metadata: {
|
|
18896
19117
|
disposition: event.disposition,
|
|
18897
19118
|
driftAgeMs: event.driftAgeMs,
|
|
@@ -19215,7 +19436,9 @@ var LSPService = class _LSPService {
|
|
|
19215
19436
|
type: "phase",
|
|
19216
19437
|
phase: "lsp_notify_resync_deferred",
|
|
19217
19438
|
filePath: normalizedPath,
|
|
19218
|
-
|
|
19439
|
+
// The age of ANOTHER writer's outstanding write, not time this
|
|
19440
|
+
// caller spent (#5379).
|
|
19441
|
+
ageMs: claim.outstandingMs,
|
|
19219
19442
|
metadata: {
|
|
19220
19443
|
serverId: entry.info.id,
|
|
19221
19444
|
source,
|
|
@@ -20369,13 +20592,14 @@ var LSPService = class _LSPService {
|
|
|
20369
20592
|
};
|
|
20370
20593
|
});
|
|
20371
20594
|
const graceMs = diagnosticsMode === "document" ? 0 : EARLY_UNBLOCK_GRACE_MS;
|
|
20595
|
+
const earlyUnblockOn = diagnosticsMode === "document" || EARLY_UNBLOCK_GRACE_MS > 0;
|
|
20372
20596
|
const diagDescriptors = spawned.map((entry) => {
|
|
20373
20597
|
if (!isAuxiliary(entry.info))
|
|
20374
20598
|
return { role: entry.info.role };
|
|
20375
20599
|
const strategy = getStrategy(entry.info.id, entry.client.getLaunchVariant?.());
|
|
20376
20600
|
return { role: entry.info.role, budgetMs: strategy.aggregateWaitMs };
|
|
20377
20601
|
});
|
|
20378
|
-
const perServer = await raceToCompletion(clientWaits, (results) => results.some((r) => r.diagnosticCount > 0 || getStrategy(r.serverId, r.launchVariant).seedFirstPush), {
|
|
20602
|
+
const perServer = await raceToCompletion(clientWaits, (results) => earlyUnblockOn && results.some((r) => r.diagnosticCount > 0 || getStrategy(r.serverId, r.launchVariant).seedFirstPush), {
|
|
20379
20603
|
timeoutMs: Math.max(...spawned.map((entry) => getStrategy(entry.info.id, entry.client.getLaunchVariant?.()).aggregateWaitMs)),
|
|
20380
20604
|
graceMs,
|
|
20381
20605
|
descriptors: diagDescriptors,
|
|
@@ -21038,7 +21262,7 @@ var LSPService = class _LSPService {
|
|
|
21038
21262
|
status: "failed"
|
|
21039
21263
|
});
|
|
21040
21264
|
}
|
|
21041
|
-
const content = await
|
|
21265
|
+
const content = await fs12.readFile(oldFilePath, "utf-8");
|
|
21042
21266
|
const languageId = getLanguageId2(oldFilePath) ?? "plaintext";
|
|
21043
21267
|
const resyncFailures = [];
|
|
21044
21268
|
await Promise.all(openDocuments.map(async ({ serverId, client }) => {
|
|
@@ -21512,7 +21736,7 @@ var LSPService = class _LSPService {
|
|
|
21512
21736
|
await Promise.all(openImports.slice(0, SCOPED_DEPENDENCY_TOUCH_MAX).map(async (dependency) => {
|
|
21513
21737
|
let content;
|
|
21514
21738
|
try {
|
|
21515
|
-
content = await
|
|
21739
|
+
content = await fs12.readFile(dependency, "utf8");
|
|
21516
21740
|
} catch {
|
|
21517
21741
|
return;
|
|
21518
21742
|
}
|
|
@@ -21746,7 +21970,9 @@ var LSPService = class _LSPService {
|
|
|
21746
21970
|
type: "phase",
|
|
21747
21971
|
phase: "lsp_workspace_diagnostics_progress",
|
|
21748
21972
|
filePath: root,
|
|
21749
|
-
|
|
21973
|
+
// Cumulative elapsed at a heartbeat: the sweep has not finished, so
|
|
21974
|
+
// it is an age (#5379); the completed sweep logs the span.
|
|
21975
|
+
ageMs: Date.now() - startedAt,
|
|
21750
21976
|
metadata: {
|
|
21751
21977
|
completed,
|
|
21752
21978
|
total: files2.length,
|
|
@@ -22284,7 +22510,8 @@ export {
|
|
|
22284
22510
|
isOptInAuxiliaryServerId,
|
|
22285
22511
|
enabledAuxiliaryLspServerIds,
|
|
22286
22512
|
configDisabledAuxiliaryLspServerIds,
|
|
22287
|
-
|
|
22513
|
+
auxiliaryServersNotRun,
|
|
22514
|
+
auxiliaryNotRunSentences,
|
|
22288
22515
|
findAuxiliaryProfileForSource,
|
|
22289
22516
|
dropExcludedServers,
|
|
22290
22517
|
applyAuxiliarySuppressions,
|
|
@@ -22353,6 +22580,9 @@ export {
|
|
|
22353
22580
|
applyDispositions,
|
|
22354
22581
|
applyWeakDispositions,
|
|
22355
22582
|
applyDispositionsMultiFile,
|
|
22583
|
+
applyWeakDispositionsMultiFile,
|
|
22584
|
+
trustedCitedOwnerContent,
|
|
22585
|
+
cachedAnchorMarks,
|
|
22356
22586
|
isBlocking,
|
|
22357
22587
|
setSessionLanguages,
|
|
22358
22588
|
recordRunner,
|
|
@@ -22372,6 +22602,8 @@ export {
|
|
|
22372
22602
|
getSuppressedDiagnostics,
|
|
22373
22603
|
countRetainedSuppressedRows,
|
|
22374
22604
|
retireWidgetCitedRows,
|
|
22605
|
+
refuseOutOfRootWrites,
|
|
22606
|
+
writeSourceFile,
|
|
22375
22607
|
captureRenameExpectedContent,
|
|
22376
22608
|
summarizeWorkspaceEdit,
|
|
22377
22609
|
applyWorkspaceEdit,
|