pi-lens 4.4.10 → 4.4.12
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-USER.md +12 -12
- package/CHANGELOG.md +212 -0
- package/README.md +1 -0
- package/dist/{chunk-W4CUK5G6.js → chunk-2HWVG3IM.js} +2 -2
- package/dist/{chunk-B2YUE6YD.js → chunk-3EIZMRXI.js} +11 -11
- package/dist/{chunk-Y3EHLUPL.js → chunk-3MHY4BQY.js} +4 -4
- package/dist/{chunk-IDCTDKIA.js → chunk-3PMLYGJN.js} +6 -6
- package/dist/{chunk-VPFRU5IG.js → chunk-3QMLB4TI.js} +3 -3
- package/dist/{chunk-NL5LSKVD.js → chunk-3R3Z54J7.js} +10 -4
- package/dist/chunk-3VWEZ6H2.js +72 -0
- package/dist/{chunk-YT2VR4SL.js → chunk-5EEWCJG7.js} +7 -7
- package/dist/{chunk-4NCDHTFI.js → chunk-5FDUKJZO.js} +10 -10
- package/dist/{chunk-QUQY3IME.js → chunk-5KLRCUDT.js} +9 -8
- package/dist/{chunk-FOEPIX76.js → chunk-6EIV3H7O.js} +158 -61
- package/dist/{chunk-GMC4ZGYR.js → chunk-6EXGCXM5.js} +5 -5
- package/dist/{chunk-CTB5BAJI.js → chunk-6GWCYEP7.js} +17 -16
- package/dist/{chunk-NBM7PNBP.js → chunk-6JLNZ6DP.js} +37 -26
- package/dist/{chunk-ACRJ2GZ5.js → chunk-7424ANRU.js} +2 -2
- package/dist/{chunk-TJQSYX3J.js → chunk-75TVYCQW.js} +6 -6
- package/dist/{chunk-J6BR5XN2.js → chunk-7BEADGAZ.js} +3 -3
- package/dist/chunk-7KWI5UHL.js +28 -0
- package/dist/{chunk-GUGKKGG7.js → chunk-7M64NTAK.js} +3 -3
- package/dist/{chunk-SKVNHCT5.js → chunk-7T64QA5D.js} +48 -43
- package/dist/{chunk-YQA34KAF.js → chunk-7ZVEFWOE.js} +11 -11
- package/dist/{chunk-SJQUWQR6.js → chunk-AAIVSSUU.js} +2 -2
- package/dist/{chunk-6I44EDNQ.js → chunk-AD7JDEI6.js} +17 -15
- package/dist/{chunk-3FRI5H4T.js → chunk-AGEQRJ5A.js} +24 -10
- package/dist/{chunk-NPNFGYLV.js → chunk-AVBEPUCD.js} +19 -2
- package/dist/{chunk-OTSTS7L2.js → chunk-AYDE7RFV.js} +34 -3
- package/dist/{chunk-UOO4D2TK.js → chunk-AZXTLZHE.js} +34 -35
- package/dist/{chunk-AWQWXSW4.js → chunk-B4FAFEBP.js} +7 -2
- package/dist/{chunk-S3WFVG5P.js → chunk-BEIPWPVR.js} +137 -126
- package/dist/{chunk-CZAWWXP6.js → chunk-BMMRLJA4.js} +7 -5
- package/dist/{chunk-QWTHFFU6.js → chunk-C6V2DSZZ.js} +12 -12
- package/dist/chunk-CIA7X2PZ.js +26 -0
- package/dist/{chunk-ZD4KVFXI.js → chunk-D2ZYRI7M.js} +172 -3
- package/dist/{chunk-F6FT6BVQ.js → chunk-D6ANA6YU.js} +34 -35
- package/dist/{chunk-HILZE4BQ.js → chunk-D7OEGXDX.js} +396 -306
- package/dist/{chunk-FCQSZQAT.js → chunk-DFAY7JUN.js} +14 -5
- package/dist/{chunk-DOUAWKLO.js → chunk-DIIDMDZU.js} +12 -12
- package/dist/{chunk-6MDM5MQT.js → chunk-DZSQXG66.js} +394 -162
- package/dist/{chunk-QGITU23N.js → chunk-E3PNZDPH.js} +1 -1
- package/dist/{chunk-QSCZAP24.js → chunk-E5SSUV2A.js} +4 -4
- package/dist/{chunk-H65TYP6V.js → chunk-ET3DSSFZ.js} +37 -21
- package/dist/chunk-F7AMFFVK.js +22 -0
- package/dist/{chunk-4ITEFRDH.js → chunk-FDLGJFAE.js} +37 -145
- package/dist/{chunk-XAFZJEXY.js → chunk-FVQKX5KI.js} +23 -23
- package/dist/{chunk-CYUJB552.js → chunk-G3LR6V6N.js} +18 -12
- package/dist/{chunk-ZOPXB2KK.js → chunk-GHATCG2A.js} +111 -107
- package/dist/{chunk-XVB3Q2PG.js → chunk-HGEE5LDW.js} +3 -2
- package/dist/{chunk-UNBRHPHJ.js → chunk-HJWF7CGW.js} +17 -15
- package/dist/chunk-HRQTYU2T.js +355 -0
- package/dist/{chunk-QUPYLQA4.js → chunk-HSTN27NR.js} +14 -9
- package/dist/{chunk-YF4G5NN5.js → chunk-HWMNTQBJ.js} +2 -2
- package/dist/{chunk-K6WIBVMK.js → chunk-HYDJUVOE.js} +8 -9
- package/dist/{chunk-OPFNQBS5.js → chunk-HYR25MV3.js} +21 -25
- package/dist/{chunk-MAD4QJTP.js → chunk-IC4L65U7.js} +21 -17
- package/dist/{chunk-I32RSMH6.js → chunk-ILC2B7IJ.js} +11 -10
- package/dist/{chunk-BGLS5SDN.js → chunk-IT7MFVGP.js} +2 -2
- package/dist/{chunk-KDCIG23C.js → chunk-IZ36G463.js} +13 -9
- package/dist/{chunk-ALIZWXHZ.js → chunk-JKAVKTMY.js} +9 -9
- package/dist/{chunk-3HM4BUHR.js → chunk-JLMS7EMD.js} +16 -15
- package/dist/{chunk-HSYFLOZY.js → chunk-JRSS6KM4.js} +3 -3
- package/dist/{chunk-VCRVNLE7.js → chunk-K2GV34T2.js} +9 -1
- package/dist/{chunk-KJ3AHOCK.js → chunk-K2LD6YNH.js} +10 -10
- package/dist/chunk-KUDUKKQE.js +89 -0
- package/dist/{chunk-7JX3RNG4.js → chunk-KXDQD34C.js} +1 -1
- package/dist/{chunk-VGTBLTPN.js → chunk-LD7SXICE.js} +18 -66
- package/dist/{chunk-UY745U35.js → chunk-ME6MF2N2.js} +1 -1
- package/dist/{chunk-QHOTTC4A.js → chunk-MOEWCPMC.js} +2 -2
- package/dist/{chunk-JZQGRARR.js → chunk-MV6ST2KT.js} +15 -12
- package/dist/{chunk-QL37SGTS.js → chunk-NCDH2JB7.js} +18 -18
- package/dist/{chunk-AON2QIJF.js → chunk-NRVWLTOY.js} +20 -17
- package/dist/chunk-NZINZCHB.js +108 -0
- package/dist/{chunk-A5TEJZGJ.js → chunk-O6LCSHHI.js} +1 -1
- package/dist/{chunk-PTSA6QKL.js → chunk-OEPWTSUG.js} +8 -8
- package/dist/{chunk-QMV2APEH.js → chunk-OF2YGDUE.js} +36 -36
- package/dist/{chunk-GTTMQ6XB.js → chunk-OHEUOWYT.js} +1 -1
- package/dist/{chunk-GVWIU7M7.js → chunk-ORYQGVC3.js} +41 -4
- package/dist/{chunk-KSTQ4VXT.js → chunk-OVPR3GQ6.js} +10 -13
- package/dist/{chunk-MN635QYA.js → chunk-OYXD2MOM.js} +3 -3
- package/dist/{chunk-TN5CWX5D.js → chunk-PCREZ4HJ.js} +34 -35
- package/dist/{chunk-SG2JQ2YP.js → chunk-PK3GDU4M.js} +1 -1
- package/dist/{chunk-NE4EFHJX.js → chunk-PPYUBO6Y.js} +2 -2
- package/dist/{chunk-DVRJBQOJ.js → chunk-PTJXMYRY.js} +19 -20
- package/dist/{chunk-TYHOEX4V.js → chunk-PXGVB2CY.js} +36 -39
- package/dist/{chunk-LT62P654.js → chunk-QJ4T73J5.js} +1 -1
- package/dist/{chunk-2LVJQU3I.js → chunk-QY6J2FTK.js} +33 -29
- package/dist/{chunk-ZZDVGCGG.js → chunk-R67WQ5RY.js} +9 -9
- package/dist/{chunk-Q2VCKC3X.js → chunk-S6ZQFPOX.js} +11 -8
- package/dist/{chunk-KFRDFAOE.js → chunk-SF7KSXB5.js} +7 -7
- package/dist/{chunk-CZCAZVTD.js → chunk-SRXYSLMW.js} +2 -2
- package/dist/{chunk-WS3UFJOU.js → chunk-SUIZOCSY.js} +3 -2
- package/dist/{chunk-NUSXS6YB.js → chunk-T5EGSBM2.js} +4 -4
- package/dist/{chunk-V7F7JHS5.js → chunk-T6PPK3T6.js} +563 -554
- package/dist/chunk-TM3A3K7T.js +28 -0
- package/dist/{chunk-RQRKIRFY.js → chunk-TOOXNL6M.js} +8 -8
- package/dist/chunk-TS5EIWEF.js +25 -0
- package/dist/chunk-VD7MQFEV.js +56 -0
- package/dist/{chunk-2ADRLTM2.js → chunk-VU2PRGRI.js} +6 -35
- package/dist/chunk-W6VLB6LL.js +145 -0
- package/dist/{chunk-CB7PEVOJ.js → chunk-WLD6BGON.js} +176 -60
- package/dist/{chunk-C6AODRNU.js → chunk-WTSQKJAR.js} +11 -10
- package/dist/{chunk-46TQJSUE.js → chunk-X33QECRJ.js} +2 -2
- package/dist/{chunk-B6HXETWY.js → chunk-Y7XMKBFP.js} +28 -26
- package/dist/{chunk-TLWFZ66Y.js → chunk-YLHJWAQS.js} +4 -4
- package/dist/{chunk-BRESRQBE.js → chunk-YLW26OHX.js} +8 -8
- package/dist/{chunk-IL6PIV33.js → chunk-YTXFNCVN.js} +2 -2
- package/dist/chunk-YULIERZW.js +27 -0
- package/dist/chunk-Z2W5YJBW.js +25 -0
- package/dist/{chunk-XPGH5O74.js → chunk-Z6WTLVUL.js} +30 -39
- package/dist/{chunk-W7TY6HYX.js → chunk-ZRQMENT4.js} +5 -27
- package/dist/{chunk-E4VXKTBR.js → chunk-ZWZD4TJ5.js} +163 -173
- package/dist/index.js +6405 -4497
- package/dist/mcp/analyze-cli.js +17 -13
- package/dist/mcp/cli.js +42 -43
- package/dist/mcp/server.js +1520 -608
- package/dist/mcp/worker.js +62 -61
- package/dist/probes/installer.js +19 -18
- package/docs/agent-guide.md +3 -1
- package/docs/agent-tools.md +57 -13
- package/docs/alignment-families.md +5 -1
- package/docs/ci.md +120 -0
- package/docs/configuration.md +24 -6
- package/docs/custom-rules.md +1 -0
- package/docs/defect-shapes.md +107 -71
- package/docs/durable-store-audit-1202.md +1 -1
- package/docs/engineering-principles.md +46 -12
- package/docs/environment-variables.md +25 -2
- package/docs/features.md +1 -1
- package/docs/globalconfig.md +8 -1
- package/docs/invariants/dispatch-runners.md +13 -0
- package/docs/invariants/lsp-trust-exec.md +7 -0
- package/docs/language-coverage.md +1 -1
- package/docs/lsp-capability-matrix.md +15 -16
- package/docs/lsp-idle-eviction.md +1 -1
- package/docs/mcp.md +2 -1
- package/docs/module-report-read-symbol.md +2 -2
- package/docs/pi-lens-fixer.md +3 -2
- package/docs/pi-lens-merge-policy.md +1 -0
- package/docs/pi-lens-monitor.md +4 -1
- package/docs/pi-lens-release.md +19 -0
- package/docs/pi-lens-reviewer.md +8 -2
- package/docs/public-api-stability.md +41 -6
- package/docs/rfcs/5138-query-surface.md +121 -0
- package/docs/servercapabilities.md +1 -1
- package/docs/settings.md +9 -0
- package/docs/usage.md +1 -1
- package/docs/word-index.md +9 -10
- package/package.json +3 -3
- package/rules/ast-grep-rules/coderabbit/README.md +2 -0
- package/rules/ast-grep-rules/coderabbit/rules/c/security/dont-call-system-c.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/c/security/file-access-before-action-c.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/c/security/file-stat-before-action-c.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/c/security/insecure-hash-c.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/c/security/libxml2-audit-parser-c.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/c/security/null-library-function-c.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/c/security/sizeof-this-c.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/c/security/small-key-size-c.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/c/security/world-writable-file-c.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/cpp/security/dont-call-system-cpp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/cpp/security/file-access-before-action-cpp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/cpp/security/file-stat-before-action-cpp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/cpp/security/fix-format-security-error-cpp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/cpp/security/insecure-hash-cpp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/cpp/security/libxml2-audit-parser-cpp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/cpp/security/missing-nul-cpp-string-memcpy-cpp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/cpp/security/null-library-function-cpp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/cpp/security/return-c-str-cpp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/cpp/security/sizeof-this-cpp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/cpp/security/small-key-size-cpp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/cpp/security/std-return-data-cpp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/cpp/security/std-vector-invalidation-cpp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/cpp/security/string-view-temporary-string-cpp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/cpp/security/world-writable-file-cpp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/csharp/security/httponly-false-csharp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/csharp/security/insecure-binaryformatter-deserialization-csharp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-decode-without-verify-csharp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-hardcoded-secret-csharp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-tokenvalidationparameters-no-expiry-validation-csharp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/csharp/security/networkcredential-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/csharp/security/npgsqlconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/csharp/security/oracleconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/csharp/security/sqlconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/csharp/security/stacktrace-disclosure-csharp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/csharp/security/use-ecb-mode-csharp.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/go/security/avoid-bind-to-all-interfaces-go.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/go/security/gorilla-cookie-store-hardcoded-session-key-go.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/go/security/gorilla-csrf-hardcoded-auth-key-go.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/go/security/grpc-client-insecure-connection-go.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/go/security/jwt-go-none-algorithm-go.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/go/security/missing-ssl-minversion-go.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/go/security/openai-empty-secret-go.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/go/security/openai-hardcoded-secret-go.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/go/security/ssl-v3-is-insecure-go.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/go/security/tls-with-insecure-cipher-go.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/go/security/use-of-weak-rsa-key-go.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/html/security/plaintext-http-link-html.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/cbc-padding-oracle-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-httponly-false-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-httponly-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-samesite-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-secure-flag-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-secure-flag-false-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/datanucleus-hardcoded-connection-password-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/des-is-deprecated-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/desede-is-deprecated-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-disallow-doctype-decl-false-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-external-general-entities-true-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-external-parameter-entities-true-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/drivermanager-hardcoded-secret-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/ecb-cipher-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/hardcoded-connection-password-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/hardcoded-secret-in-credentials-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/java-jwt-hardcoded-secret-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/jedis-jedisclientconfig-hardcoded-password-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/jedis-jedisfactory-hardcoded-password-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/missing-httponly-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/missing-secure-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/no-null-cipher-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/passwordauthentication-hardcoded-password-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/rsa-no-padding-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/simple-command-injection-direct-input-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/system-setproperty-hardcoded-secret-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/unencrypted-socket-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-aes-ecb-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-blowfish-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-default-aes-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-md5-digest-utils-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-md5-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-rc2-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-rc4-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-sha1-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/java/security/weak-ssl-context-java.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/javascript/security/detect-angular-sce-disabled-javascript.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/javascript/security/express-jwt-hardcoded-secret-javascript.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/javascript/security/express-session-hardcoded-secret-javascript.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/javascript/security/jwt-simple-noverify-javascript.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-rsa-weak-key-javascript.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-sequelize-empty-password-argument-javascript.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-sequelize-hardcoded-secret-argument-javascript.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/kotlin/security/des-is-deprecated-kotlin.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/kotlin/security/desede-is-deprecated-kotlin.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/kotlin/security/jwt-hardcode-kotlin.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/kotlin/security/rsa-no-padding-kotlin.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/kotlin/security/system-setproperty-hardcoded-secret-kotlin.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/php/security/openssl-cbc-static-iv-php.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/php/security/search-active-debug-php.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/avoid-mktemp-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/avoid_app_run_with_bad_host-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/debug-enabled-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/hashids-with-django-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/hashids-with-flask-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/insecure-cipher-algorithm-rc4-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/jwt-python-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/openai-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-cassandra-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-cassandra-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-couchbase-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-couchbase-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-elasticsearch-hardcoded-bearer-auth-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-ldap3-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-ldap3-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-mariadb-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-mariadb-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysql-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysql-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysqlclient-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysqlclient-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-neo4j-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-neo4j-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-mysql-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-mysql-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-pg-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-pg-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pg8000-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pg8000-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-psycopg2-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-psycopg2-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pyjwt-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymongo-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymongo-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymssql-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymssql-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymysql-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymysql-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-redis-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-redis-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-oauth-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-tormysql-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-tormysql-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-urllib3-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-webrepl-empty-password-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/python/security/python-webrepl-hardcoded-secret-python.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/force-ssl-false-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/hardcoded-http-auth-in-controller-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/hardcoded-secret-rsa-passphrase-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/insufficient-rsa-key-size-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-aws-sdk-hardcoded-secret-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-cassandra-empty-password-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-cassandra-hardcoded-secret-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-excon-hardcoded-secret-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-faraday-hardcoded-secret-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mongo-empty-password-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mongo-hardcoded-secret-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mysql2-empty-password-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mysql2-hardcoded-secret-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-octokit-hardcoded-secret-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-pg-empty-password-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-pg-hardcoded-secret-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-redis-empty-password-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-redis-hardcoded-secret-ruby.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/rust/security/empty-password-rust.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/rust/security/hardcoded-password-rust.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/rust/security/postgres-empty-password-rust.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/rust/security/reqwest-accept-invalid-rust.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/rust/security/secrets-reqwest-hardcoded-auth-rust.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/rust/security/ssl-verify-none-rust.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/rust/security/tokio-postgres-empty-password-rust.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/rust/security/tokio-postgres-hardcoded-password-rust.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/scala/security/jwt-scala-hardcode-scala.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/scala/security/scala-jwt-hardcoded-secret-scala.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/swift/security/aes-hardcoded-secret-swift.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/swift/security/blowfish-hardcoded-secret-swift.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/swift/security/chacha20-hardcoded-secret-swift.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/swift/security/insecure-biometrics-swift.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/swift/security/rabbit-hardcoded-secret-swift.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/typescript/security/detect-angular-sce-disabled-typescript.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/typescript/security/express-session-hardcoded-secret-typescript.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/typescript/security/jwt-simple-noverify-typescript.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-rsa-weak-key-typescript.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-sequelize-empty-password-argument-typescript.yml +2 -1
- package/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-sequelize-hardcoded-secret-argument-typescript.yml +2 -1
- package/rules/ast-grep-rules/rule-schema.json +1 -1
- package/rules/ast-grep-rules/rules/c-no-malloc-free.yml +13 -12
- package/rules/ast-grep-rules/rules/cpp-no-malloc-free.yml +11 -10
- package/rules/ast-grep-rules/rules/cpp-no-printf.yml +10 -9
- package/rules/ast-grep-rules/rules/go-defer-func-call-antipattern.yml +14 -13
- package/rules/ast-grep-rules/rules/go-no-fmt-println.yml +14 -13
- package/rules/ast-grep-rules/rules/go-no-panic-in-lib.yml +20 -19
- package/rules/ast-grep-rules/rules/go-no-underscore-func-name.yml +14 -13
- package/rules/ast-grep-rules/rules/go-prefer-errors-is.yml +14 -13
- package/rules/ast-grep-rules/rules/go-prefer-string-builder.yml +19 -18
- package/rules/ast-grep-rules/rules/go-test-functions.yml +14 -13
- package/rules/ast-grep-rules/rules/hyphenated-svg-attribute.yml +10 -9
- package/rules/ast-grep-rules/rules/kotlin-no-lateinit.yml +12 -11
- package/rules/ast-grep-rules/rules/kotlin-no-nullable-boolean.yml +11 -10
- package/rules/ast-grep-rules/rules/kotlin-no-println.yml +15 -14
- package/rules/ast-grep-rules/rules/kotlin-no-unnecessary-let.yml +10 -9
- package/rules/ast-grep-rules/rules/kotlin-no-unsafe-cast.yml +10 -9
- package/rules/ast-grep-rules/rules/kotlin-no-var.yml +11 -10
- package/rules/ast-grep-rules/rules/kotlin-prefer-data-class.yml +10 -9
- package/rules/ast-grep-rules/rules/kotlin-prefer-is-empty.yml +10 -9
- package/rules/ast-grep-rules/rules/no-aws-access-key-literal.yml +1 -1
- package/rules/ast-grep-rules/rules/no-compile-call.yml +13 -12
- package/rules/ast-grep-rules/rules/no-flask-secret-key-literal.yml +1 -1
- package/rules/ast-grep-rules/rules/no-hardcoded-password.yml +1 -1
- package/rules/ast-grep-rules/rules/no-marshal-load.yml +12 -11
- package/rules/ast-grep-rules/rules/no-python-sql-string-concat.yml +12 -11
- package/rules/ast-grep-rules/rules/no-requests-verify-false.yml +13 -12
- package/rules/ast-grep-rules/rules/no-secret-in-env-var-name.yml +1 -1
- package/rules/ast-grep-rules/rules/python-optional-type.yml +9 -8
- package/rules/ast-grep-rules/rules/reducible-list-comprehension.yml +8 -7
- package/rules/ast-grep-rules/rules/ruby-detect-path-traversal.yml +14 -13
- package/rules/ast-grep-rules/rules/ruby-symbol-to-proc-candidate.yml +8 -7
- package/rules/ast-grep-rules/rules/rust-no-chars-enumerate.yml +9 -8
- package/rules/ast-grep-rules/rules-disabled/gorm-unbounded-preload.yml +7 -6
- package/rules/ast-grep-rules/rules-disabled/shadow-err-variable.yml +6 -5
- package/scripts/analyze-pi-lens-logs.mjs +262 -3
- package/scripts/lib/latency-log-phases.mjs +125 -0
- package/dist/chunk-3QWVOBZJ.js +0 -73
- package/dist/chunk-7WJ55KBN.js +0 -162
- package/dist/chunk-BDR5MEZY.js +0 -25
- package/dist/chunk-CKEQFGLT.js +0 -32
- package/dist/chunk-DBS736MA.js +0 -57
- package/dist/chunk-I74RQGKA.js +0 -88
- package/dist/chunk-IK4YS3KC.js +0 -25
- package/dist/chunk-JKOZ2Z4U.js +0 -20
- package/dist/chunk-TQHOKMVZ.js +0 -28
- package/dist/chunk-VS2L7QDI.js +0 -25
- package/dist/chunk-WAA63ZJV.js +0 -140
- package/dist/chunk-ZPFLHB3R.js +0 -28
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
findPiLensConfigMarkerInDir,
|
|
15
15
|
getPiLensGlobalConfigPath,
|
|
16
16
|
isResolvedGlobalConfigPath
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3R3Z54J7.js";
|
|
18
18
|
import {
|
|
19
19
|
DEGRADATION_ENTRIES_PER_KIND,
|
|
20
20
|
GLOBAL_NON_FLAG_CONFIG_SECTIONS,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
readFlagConfigValue,
|
|
33
33
|
readToolConfig,
|
|
34
34
|
recordDegradationOnce
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-AGEQRJ5A.js";
|
|
36
36
|
import {
|
|
37
37
|
CONFIG_SCHEMA_ANCHOR_KEY,
|
|
38
38
|
CONFIG_SCHEMA_ID,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
import {
|
|
44
44
|
redactSecrets,
|
|
45
45
|
toPositiveFinite
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-K2GV34T2.js";
|
|
47
47
|
import {
|
|
48
48
|
BoundedFifoMap,
|
|
49
49
|
BoundedLruCache,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
realpathOrResolve,
|
|
54
54
|
toPosix,
|
|
55
55
|
walkUpDirs
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-WLD6BGON.js";
|
|
57
57
|
|
|
58
58
|
// dist/clients/generated-artifacts.js
|
|
59
59
|
import * as fs from "node:fs";
|
|
@@ -379,6 +379,11 @@ var PathKeyedMap = class {
|
|
|
379
379
|
}
|
|
380
380
|
};
|
|
381
381
|
|
|
382
|
+
// dist/clients/spawn-abort-scope.js
|
|
383
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
384
|
+
var spawnAbortScope = new AsyncLocalStorage();
|
|
385
|
+
var spawnCooldownScope = new AsyncLocalStorage();
|
|
386
|
+
|
|
382
387
|
// dist/clients/user-notify.js
|
|
383
388
|
var notifierGetter;
|
|
384
389
|
function notifyUserDegradation(message, level = "warning", options) {
|
|
@@ -1744,6 +1749,7 @@ function collectDocuments(dir, locations, tier, onReadError) {
|
|
|
1744
1749
|
}
|
|
1745
1750
|
return documents;
|
|
1746
1751
|
}
|
|
1752
|
+
var CANONICAL_PROJECT_CONFIG_LOCATIONS = PROJECT_CONFIG_LOCATIONS.filter((location) => !location.legacy);
|
|
1747
1753
|
function collectPiLensConfigDocuments(options) {
|
|
1748
1754
|
const documents = [];
|
|
1749
1755
|
const { globalDir, onReadError } = options;
|
|
@@ -1770,10 +1776,11 @@ function collectPiLensConfigDocuments(options) {
|
|
|
1770
1776
|
}
|
|
1771
1777
|
}
|
|
1772
1778
|
if (options.cwd !== void 0) {
|
|
1773
|
-
const dirs = configSearchDirs(options.cwd, options.homeDir ?? os.homedir()).reverse();
|
|
1779
|
+
const dirs = configSearchDirs(options.cwd, options.homeDir ?? os.homedir(), options.stopAtGitRoot === true).reverse();
|
|
1780
|
+
const locations = options.excludeLegacyProjectDocuments ? CANONICAL_PROJECT_CONFIG_LOCATIONS : PROJECT_CONFIG_LOCATIONS;
|
|
1774
1781
|
const bearing = dirs.map((dir) => ({
|
|
1775
1782
|
dir,
|
|
1776
|
-
found: collectDocuments(dir,
|
|
1783
|
+
found: collectDocuments(dir, locations, "project", onReadError)
|
|
1777
1784
|
})).filter((entry) => entry.found.length > 0);
|
|
1778
1785
|
bearing.forEach((entry, index) => {
|
|
1779
1786
|
const tier = index === 0 ? "project" : "nested-project";
|
|
@@ -2109,6 +2116,9 @@ function replayConfigNotices(entry) {
|
|
|
2109
2116
|
}
|
|
2110
2117
|
function loadPiLensProjectConfig(startDir, preloadedInfo) {
|
|
2111
2118
|
const entry = discoveryEntryFor(startDir);
|
|
2119
|
+
if (layeredReadApplies(entry)) {
|
|
2120
|
+
return loadLayeredProjectConfig(entry, path3.resolve(startDir));
|
|
2121
|
+
}
|
|
2112
2122
|
const configInfo = preloadedInfo ?? freshInfoFor(entry);
|
|
2113
2123
|
const selectedLegacyPath = configInfo?.path;
|
|
2114
2124
|
reportPiLensConfigRecords(entry.legacyRecords.filter((record4) => record4.file !== selectedLegacyPath));
|
|
@@ -2116,6 +2126,59 @@ function loadPiLensProjectConfig(startDir, preloadedInfo) {
|
|
|
2116
2126
|
return EMPTY_PROJECT_CONFIG;
|
|
2117
2127
|
return loadCachedConfigFile(configInfo);
|
|
2118
2128
|
}
|
|
2129
|
+
function layeredReadApplies(entry) {
|
|
2130
|
+
if (entry.canonicalSources.length === 0)
|
|
2131
|
+
return false;
|
|
2132
|
+
if (entry.canonicalSources.length >= 2)
|
|
2133
|
+
return true;
|
|
2134
|
+
const only = entry.canonicalSources[0];
|
|
2135
|
+
return only !== void 0 && entry.info?.path !== only.path;
|
|
2136
|
+
}
|
|
2137
|
+
function loadLayeredProjectConfig(entry, startDir) {
|
|
2138
|
+
reportPiLensConfigRecords(entry.legacyRecords);
|
|
2139
|
+
const cached = entry.layered;
|
|
2140
|
+
if (cached && cached.sources.length > 0 && fileStampsStillFresh(cached.sources)) {
|
|
2141
|
+
replayConfigNotices(cached);
|
|
2142
|
+
return cached.config;
|
|
2143
|
+
}
|
|
2144
|
+
const resolution = resolvePiLensConfig({
|
|
2145
|
+
cwd: startDir,
|
|
2146
|
+
excludeLegacyProjectDocuments: true,
|
|
2147
|
+
stopAtGitRoot: true,
|
|
2148
|
+
onReadError: reportConfigReadFailure
|
|
2149
|
+
});
|
|
2150
|
+
if (resolution.documents.length === 0) {
|
|
2151
|
+
return EMPTY_PROJECT_CONFIG;
|
|
2152
|
+
}
|
|
2153
|
+
const nearest = resolution.documents[resolution.documents.length - 1];
|
|
2154
|
+
if (nearest === void 0)
|
|
2155
|
+
return EMPTY_PROJECT_CONFIG;
|
|
2156
|
+
const parsed = parseLayeredProjectConfig(resolution, nearest.file);
|
|
2157
|
+
const sources = resolution.documents.map((document) => {
|
|
2158
|
+
const stat = safeFileStat(document.file);
|
|
2159
|
+
return {
|
|
2160
|
+
path: document.file,
|
|
2161
|
+
mtimeMs: stat?.mtimeMs ?? -1,
|
|
2162
|
+
size: stat?.size ?? -1
|
|
2163
|
+
};
|
|
2164
|
+
});
|
|
2165
|
+
entry.layered = {
|
|
2166
|
+
sources,
|
|
2167
|
+
config: parsed.config,
|
|
2168
|
+
records: parsed.records,
|
|
2169
|
+
ignored: parsed.ignored
|
|
2170
|
+
};
|
|
2171
|
+
replayConfigNotices(entry.layered);
|
|
2172
|
+
return parsed.config;
|
|
2173
|
+
}
|
|
2174
|
+
function parseLayeredProjectConfig(resolution, configPath) {
|
|
2175
|
+
const { note, records: ignoredRecords } = ignoredRecordCollector(configPath, "project");
|
|
2176
|
+
return {
|
|
2177
|
+
config: parseProjectConfigFields(resolution.value, note, resolution.value, configPath),
|
|
2178
|
+
records: resolution.records,
|
|
2179
|
+
ignored: ignoredRecords()
|
|
2180
|
+
};
|
|
2181
|
+
}
|
|
2119
2182
|
function findPiLensConfigInDir(dir) {
|
|
2120
2183
|
const marker = findPiLensConfigMarkerInDir(dir);
|
|
2121
2184
|
if (!marker)
|
|
@@ -2186,10 +2249,13 @@ function discoveryCacheStillFresh(entry) {
|
|
|
2186
2249
|
if (!dirMtimesStillFresh(entry.dirMtimes)) {
|
|
2187
2250
|
return false;
|
|
2188
2251
|
}
|
|
2189
|
-
if (
|
|
2252
|
+
if (Date.now() - entry.checkedAtMs >= FRESHNESS_CADENCE_MS) {
|
|
2190
2253
|
return false;
|
|
2191
2254
|
}
|
|
2192
|
-
return entry.legacySources
|
|
2255
|
+
return fileStampsStillFresh(entry.legacySources);
|
|
2256
|
+
}
|
|
2257
|
+
function fileStampsStillFresh(sources) {
|
|
2258
|
+
return sources.every((source) => {
|
|
2193
2259
|
const stat = safeFileStat(source.path);
|
|
2194
2260
|
return stat?.isFile() === true && stat.mtimeMs === source.mtimeMs && stat.size === source.size;
|
|
2195
2261
|
});
|
|
@@ -2199,9 +2265,23 @@ function discoverPiLensProjectConfig(startDir) {
|
|
|
2199
2265
|
const dirMtimes = [];
|
|
2200
2266
|
const legacyDocuments = [];
|
|
2201
2267
|
const legacySources = [];
|
|
2268
|
+
const canonicalSources = [];
|
|
2202
2269
|
let info;
|
|
2203
|
-
|
|
2270
|
+
const searchDirs = configSearchDirs(startDir);
|
|
2271
|
+
const layeredDirCount = configSearchDirs(startDir, void 0, true).length;
|
|
2272
|
+
for (const [dirIndex, dir] of searchDirs.entries()) {
|
|
2204
2273
|
dirMtimes.push({ dir, mtimeMs: safeDirMtimeMs(dir) });
|
|
2274
|
+
const canonicalCandidate = path3.join(dir, CANONICAL_PROJECT_CONFIG_FILE);
|
|
2275
|
+
if (dirIndex < layeredDirCount && !isResolvedGlobalConfigPath(canonicalCandidate)) {
|
|
2276
|
+
const canonicalStat = safeFileStat(canonicalCandidate);
|
|
2277
|
+
if (canonicalStat?.isFile()) {
|
|
2278
|
+
canonicalSources.push({
|
|
2279
|
+
path: canonicalCandidate,
|
|
2280
|
+
mtimeMs: canonicalStat.mtimeMs,
|
|
2281
|
+
size: canonicalStat.size
|
|
2282
|
+
});
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2205
2285
|
if (!info) {
|
|
2206
2286
|
for (const name of PROJECT_CONFIG_BASENAMES) {
|
|
2207
2287
|
const candidate = path3.join(dir, name);
|
|
@@ -2254,9 +2334,10 @@ function discoverPiLensProjectConfig(startDir) {
|
|
|
2254
2334
|
}
|
|
2255
2335
|
return {
|
|
2256
2336
|
info,
|
|
2257
|
-
dirMtimes: bearingDirMtimes(dirMtimes, info),
|
|
2337
|
+
dirMtimes: bearingDirMtimes(dirMtimes, info, canonicalSources),
|
|
2258
2338
|
legacyRecords: legacyDeprecationRecords(legacyDocuments),
|
|
2259
2339
|
legacySources,
|
|
2340
|
+
canonicalSources,
|
|
2260
2341
|
checkedAtMs: Date.now()
|
|
2261
2342
|
};
|
|
2262
2343
|
}
|
|
@@ -2267,11 +2348,21 @@ function legacyDeprecationRecords(documents) {
|
|
|
2267
2348
|
tier: document.tier
|
|
2268
2349
|
}));
|
|
2269
2350
|
}
|
|
2270
|
-
function bearingDirMtimes(dirMtimes, info) {
|
|
2351
|
+
function bearingDirMtimes(dirMtimes, info, canonicalSources) {
|
|
2352
|
+
let end = -1;
|
|
2271
2353
|
if (info) {
|
|
2272
2354
|
const bearing = dirMtimes.findIndex((entry) => entry.dir === info.dir);
|
|
2273
|
-
|
|
2355
|
+
if (bearing >= 0)
|
|
2356
|
+
end = bearing;
|
|
2357
|
+
}
|
|
2358
|
+
const outermost = canonicalSources[canonicalSources.length - 1];
|
|
2359
|
+
if (outermost !== void 0) {
|
|
2360
|
+
const outerIndex = dirMtimes.findIndex((entry) => entry.dir === path3.dirname(outermost.path));
|
|
2361
|
+
if (outerIndex > end)
|
|
2362
|
+
end = outerIndex;
|
|
2274
2363
|
}
|
|
2364
|
+
if (end >= 0)
|
|
2365
|
+
return dirMtimes.slice(0, end + 1);
|
|
2275
2366
|
return dirMtimes.slice(0, 1);
|
|
2276
2367
|
}
|
|
2277
2368
|
function parseRulePolicyList(note, ruleId, key, value) {
|
|
@@ -2309,44 +2400,7 @@ function parseRulePathList(note, ruleId, value) {
|
|
|
2309
2400
|
return paths;
|
|
2310
2401
|
}
|
|
2311
2402
|
var NO_RECORDS = [];
|
|
2312
|
-
function
|
|
2313
|
-
const { note, records: ignoredRecords } = ignoredRecordCollector(configPath, "project");
|
|
2314
|
-
const outcome = readConfigDocument(configPath);
|
|
2315
|
-
if (outcome.status === "error") {
|
|
2316
|
-
note({ parseError: outcome.error, sourceText: outcome.sourceText }, "PILENS_CFG_0001");
|
|
2317
|
-
return {
|
|
2318
|
-
config: EMPTY_PROJECT_CONFIG,
|
|
2319
|
-
records: NO_RECORDS,
|
|
2320
|
-
ignored: ignoredRecords()
|
|
2321
|
-
};
|
|
2322
|
-
}
|
|
2323
|
-
if (outcome.status === "missing") {
|
|
2324
|
-
return {
|
|
2325
|
-
config: EMPTY_PROJECT_CONFIG,
|
|
2326
|
-
records: NO_RECORDS,
|
|
2327
|
-
ignored: NO_RECORDS
|
|
2328
|
-
};
|
|
2329
|
-
}
|
|
2330
|
-
if (!outcome.value || typeof outcome.value !== "object" || Array.isArray(outcome.value)) {
|
|
2331
|
-
note("top-level value must be an object", "PILENS_CFG_0001");
|
|
2332
|
-
return {
|
|
2333
|
-
config: EMPTY_PROJECT_CONFIG,
|
|
2334
|
-
records: NO_RECORDS,
|
|
2335
|
-
ignored: ignoredRecords()
|
|
2336
|
-
};
|
|
2337
|
-
}
|
|
2338
|
-
const resolved = resolveOnePiLensConfigDocument({
|
|
2339
|
-
tier: "project",
|
|
2340
|
-
file: configPath,
|
|
2341
|
-
location: projectLocationFor(configPath),
|
|
2342
|
-
value: outcome.value
|
|
2343
|
-
});
|
|
2344
|
-
const raw = resolved.value;
|
|
2345
|
-
const rawProject = outcome.value;
|
|
2346
|
-
const obj = {
|
|
2347
|
-
...resolved.value,
|
|
2348
|
-
...rawProject.rules !== void 0 ? { rules: rawProject.rules } : {}
|
|
2349
|
-
};
|
|
2403
|
+
function parseProjectConfigFields(obj, note, raw, configPath) {
|
|
2350
2404
|
const ignore = Array.isArray(obj.ignore) ? obj.ignore.filter((p) => typeof p === "string") : [];
|
|
2351
2405
|
const mutations = {};
|
|
2352
2406
|
for (const spec of PROJECT_SCOPED_LENS_FLAGS) {
|
|
@@ -2493,17 +2547,58 @@ function parseConfigFile(configPath) {
|
|
|
2493
2547
|
warnUnhonoredKey(configKey, true);
|
|
2494
2548
|
}
|
|
2495
2549
|
return {
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2550
|
+
...toolConfig === void 0 ? {} : { tools: toolConfig },
|
|
2551
|
+
...startup === void 0 ? {} : { startup },
|
|
2552
|
+
ignore,
|
|
2553
|
+
rules,
|
|
2554
|
+
...mutations,
|
|
2555
|
+
maxProjectFiles,
|
|
2556
|
+
reviewGraph,
|
|
2557
|
+
raw,
|
|
2558
|
+
configPath
|
|
2559
|
+
};
|
|
2560
|
+
}
|
|
2561
|
+
function parseConfigFile(configPath) {
|
|
2562
|
+
const { note, records: ignoredRecords } = ignoredRecordCollector(configPath, "project");
|
|
2563
|
+
const outcome = readConfigDocument(configPath);
|
|
2564
|
+
if (outcome.status === "error") {
|
|
2565
|
+
note({ parseError: outcome.error, sourceText: outcome.sourceText }, "PILENS_CFG_0001");
|
|
2566
|
+
return {
|
|
2567
|
+
config: EMPTY_PROJECT_CONFIG,
|
|
2568
|
+
records: NO_RECORDS,
|
|
2569
|
+
ignored: ignoredRecords()
|
|
2570
|
+
};
|
|
2571
|
+
}
|
|
2572
|
+
if (outcome.status === "missing") {
|
|
2573
|
+
return {
|
|
2574
|
+
config: EMPTY_PROJECT_CONFIG,
|
|
2575
|
+
records: NO_RECORDS,
|
|
2576
|
+
ignored: NO_RECORDS
|
|
2577
|
+
};
|
|
2578
|
+
}
|
|
2579
|
+
if (!outcome.value || typeof outcome.value !== "object" || Array.isArray(outcome.value)) {
|
|
2580
|
+
note("top-level value must be an object", "PILENS_CFG_0001");
|
|
2581
|
+
return {
|
|
2582
|
+
config: EMPTY_PROJECT_CONFIG,
|
|
2583
|
+
records: NO_RECORDS,
|
|
2584
|
+
ignored: ignoredRecords()
|
|
2585
|
+
};
|
|
2586
|
+
}
|
|
2587
|
+
const resolved = resolveOnePiLensConfigDocument({
|
|
2588
|
+
tier: "project",
|
|
2589
|
+
file: configPath,
|
|
2590
|
+
location: projectLocationFor(configPath),
|
|
2591
|
+
value: outcome.value
|
|
2592
|
+
});
|
|
2593
|
+
const raw = resolved.value;
|
|
2594
|
+
const rawProject = outcome.value;
|
|
2595
|
+
const obj = {
|
|
2596
|
+
...resolved.value,
|
|
2597
|
+
...rawProject.rules !== void 0 ? { rules: rawProject.rules } : {}
|
|
2598
|
+
};
|
|
2599
|
+
const config = parseProjectConfigFields(obj, note, raw, configPath);
|
|
2600
|
+
return {
|
|
2601
|
+
config,
|
|
2507
2602
|
records: resolved.records.filter((record4) => !record4.key.startsWith("/rules/")),
|
|
2508
2603
|
ignored: ignoredRecords()
|
|
2509
2604
|
};
|
|
@@ -2516,6 +2611,8 @@ export {
|
|
|
2516
2611
|
isTestFileName,
|
|
2517
2612
|
detectFileRole,
|
|
2518
2613
|
PathKeyedMap,
|
|
2614
|
+
spawnAbortScope,
|
|
2615
|
+
spawnCooldownScope,
|
|
2519
2616
|
notifyUserDegradation,
|
|
2520
2617
|
warnIgnoredConfigOnce,
|
|
2521
2618
|
isRepoTier,
|
|
@@ -2,20 +2,20 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
classifyProbeFailure,
|
|
4
4
|
installRetryDelayMs
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-AVBEPUCD.js";
|
|
6
6
|
import {
|
|
7
7
|
safeSpawnAsync
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ET3DSSFZ.js";
|
|
9
9
|
import {
|
|
10
10
|
assertInstallAllowed
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HRQTYU2T.js";
|
|
12
12
|
import {
|
|
13
13
|
logExtension,
|
|
14
14
|
recordDegradationOnce
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AGEQRJ5A.js";
|
|
16
16
|
import {
|
|
17
17
|
isToolInstallDisabled
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-K2GV34T2.js";
|
|
19
19
|
|
|
20
20
|
// dist/clients/dispatch/runners/utils/lazy-installer.js
|
|
21
21
|
var LAZY_INSTALL_SPECS = {
|
|
@@ -5,33 +5,34 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
getUserRuleRoot,
|
|
7
7
|
ruleCorpusFingerprintForCycle
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7M64NTAK.js";
|
|
9
9
|
import {
|
|
10
10
|
getPackageRoot,
|
|
11
11
|
js_yaml_default,
|
|
12
12
|
resolvePackagePath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-E3PNZDPH.js";
|
|
14
14
|
import {
|
|
15
15
|
EXTENSION_TO_GRAMMAR
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
withTimeout
|
|
19
|
-
} from "./chunk-WAA63ZJV.js";
|
|
16
|
+
} from "./chunk-AYDE7RFV.js";
|
|
20
17
|
import {
|
|
21
18
|
transientRetryDelayMs
|
|
22
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-AVBEPUCD.js";
|
|
23
20
|
import {
|
|
24
21
|
getProjectIgnoreMatcher,
|
|
25
22
|
isExcludedDirName
|
|
26
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ET3DSSFZ.js";
|
|
27
24
|
import {
|
|
28
25
|
notifyUserDegradation
|
|
29
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6EIV3H7O.js";
|
|
27
|
+
import {
|
|
28
|
+
hashContentBytes
|
|
29
|
+
} from "./chunk-CIA7X2PZ.js";
|
|
30
30
|
import {
|
|
31
31
|
assertInstallAllowed,
|
|
32
32
|
getProjectTrustGeneration,
|
|
33
|
+
withTimeout,
|
|
33
34
|
writeFileAtomic
|
|
34
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-HRQTYU2T.js";
|
|
35
36
|
import {
|
|
36
37
|
compareOrdinal,
|
|
37
38
|
escapeRegExp,
|
|
@@ -39,21 +40,22 @@ import {
|
|
|
39
40
|
incrementDegradationCount,
|
|
40
41
|
recordDegradation,
|
|
41
42
|
recordDegradationOnce
|
|
42
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-AGEQRJ5A.js";
|
|
43
44
|
import {
|
|
44
45
|
createNdjsonLogger,
|
|
45
46
|
getGlobalPiLensLogDir,
|
|
46
47
|
getMaxLogSizeMB,
|
|
47
48
|
isTestMode,
|
|
48
49
|
logLatency
|
|
49
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-K2GV34T2.js";
|
|
50
51
|
import {
|
|
51
52
|
BoundedFifoMap,
|
|
52
53
|
normalizeFilePath,
|
|
53
54
|
normalizeLoggedPath,
|
|
55
|
+
relativeInside,
|
|
54
56
|
toPosix,
|
|
55
57
|
walkUpDirs
|
|
56
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-WLD6BGON.js";
|
|
57
59
|
|
|
58
60
|
// dist/clients/tree-sitter-logger.js
|
|
59
61
|
import * as path from "node:path";
|
|
@@ -144,7 +146,6 @@ function loadWebTreeSitter() {
|
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
// dist/clients/grammar-source.js
|
|
147
|
-
import { createHash } from "node:crypto";
|
|
148
149
|
import * as fs from "node:fs";
|
|
149
150
|
import * as path2 from "node:path";
|
|
150
151
|
var TREE_SITTER_WASMS_VERSION = "0.1.13";
|
|
@@ -314,7 +315,7 @@ function loadGrammarManifest() {
|
|
|
314
315
|
return manifest;
|
|
315
316
|
}
|
|
316
317
|
function sha256Hex(data) {
|
|
317
|
-
return `sha256:${
|
|
318
|
+
return `sha256:${hashContentBytes(data)}`;
|
|
318
319
|
}
|
|
319
320
|
function pinnedGrammarHash(filename) {
|
|
320
321
|
return loadGrammarManifest()?.grammars[filename];
|
|
@@ -1591,7 +1592,7 @@ function computeRuleFilesFingerprint(ruleFiles) {
|
|
|
1591
1592
|
continue;
|
|
1592
1593
|
const stat = fs4.statSync(resolved);
|
|
1593
1594
|
hash.update(`${file}:${stat.mtimeMs}:${stat.size}`);
|
|
1594
|
-
if (
|
|
1595
|
+
if (relativeInside(BUNDLED_QUERIES_ROOT, resolved) === void 0) {
|
|
1595
1596
|
hash.update(fs4.readFileSync(resolved));
|
|
1596
1597
|
}
|
|
1597
1598
|
}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
getWordIndexMaxFilesDerived
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IT7MFVGP.js";
|
|
5
|
+
import {
|
|
6
|
+
resolveLanguageScope
|
|
7
|
+
} from "./chunk-AYDE7RFV.js";
|
|
5
8
|
import {
|
|
6
9
|
createSingleFlight
|
|
7
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-B4FAFEBP.js";
|
|
8
11
|
import {
|
|
9
12
|
createDeadline,
|
|
10
13
|
forEachCooperatively,
|
|
11
14
|
yieldIfOverBudget
|
|
12
15
|
} from "./chunk-QYF5S6P6.js";
|
|
13
|
-
import {
|
|
14
|
-
KIND_EXTENSIONS,
|
|
15
|
-
SPECIAL_FILENAMES
|
|
16
|
-
} from "./chunk-CZCAZVTD.js";
|
|
17
16
|
import {
|
|
18
17
|
PathKeyedMap,
|
|
19
18
|
isTestFileName
|
|
20
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6EIV3H7O.js";
|
|
21
20
|
import {
|
|
22
21
|
incrementDegradationCount
|
|
23
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-AGEQRJ5A.js";
|
|
24
23
|
import {
|
|
25
24
|
createNdjsonLogger,
|
|
26
25
|
getGlobalPiLensLogDir,
|
|
27
26
|
getMaxLogSizeMB,
|
|
28
27
|
isTestMode,
|
|
29
|
-
logLatency
|
|
30
|
-
|
|
28
|
+
logLatency,
|
|
29
|
+
nonNegativeIntEnv
|
|
30
|
+
} from "./chunk-K2GV34T2.js";
|
|
31
31
|
import {
|
|
32
32
|
isAtOrAboveHomeDir,
|
|
33
33
|
normalizeEphemeralMapKey,
|
|
34
34
|
normalizeFilePath,
|
|
35
35
|
realpathOrResolve
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-WLD6BGON.js";
|
|
37
37
|
|
|
38
38
|
// dist/clients/word-index.js
|
|
39
39
|
import * as fs from "node:fs";
|
|
@@ -860,7 +860,7 @@ async function updateWordIndexDocumentAsyncUnsafe(index, doc, shouldContinue) {
|
|
|
860
860
|
}
|
|
861
861
|
var WORD_INDEX_MAX_BYTES = 512 * 1024;
|
|
862
862
|
async function collectWordIndexDocs(root, shouldContinue = () => true, preflightFiles) {
|
|
863
|
-
const { collectSourceFilesAsync } = await import("./chunk-
|
|
863
|
+
const { collectSourceFilesAsync } = await import("./chunk-K2LD6YNH.js");
|
|
864
864
|
const maxFiles = preflightFiles?.length ?? getWordIndexMaxFilesDerived(root);
|
|
865
865
|
const files = preflightFiles ? preflightFiles.map((file) => file.path) : await collectSourceFilesAsync(root, {
|
|
866
866
|
maxFiles,
|
|
@@ -910,7 +910,7 @@ async function refreshWordIndexIncrementally(index, root, shouldContinue = () =>
|
|
|
910
910
|
timings: { sourceWalkMs: 0, statWalkMs: 0, refreshReadsMs: 0 }
|
|
911
911
|
};
|
|
912
912
|
}
|
|
913
|
-
const { collectSourceFilesAsync } = await import("./chunk-
|
|
913
|
+
const { collectSourceFilesAsync } = await import("./chunk-K2LD6YNH.js");
|
|
914
914
|
const maxFiles = getWordIndexMaxFilesDerived(root);
|
|
915
915
|
const sourceWalkStartMs = Date.now();
|
|
916
916
|
const walked = await collectSourceFilesAsync(root, {
|
|
@@ -1099,14 +1099,14 @@ function parseWordIndexQuery(query) {
|
|
|
1099
1099
|
return { terms: termParts.join(" "), filters };
|
|
1100
1100
|
}
|
|
1101
1101
|
function resolveLangMatcher(value) {
|
|
1102
|
-
const
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
const
|
|
1109
|
-
return
|
|
1102
|
+
const scope = resolveLanguageScope(value, { includeKindExtensions: true });
|
|
1103
|
+
if ("refusal" in scope)
|
|
1104
|
+
throw new WordIndexQueryError(scope.refusal);
|
|
1105
|
+
return scope.matches;
|
|
1106
|
+
}
|
|
1107
|
+
function isEmptyWordIndexQuery(query) {
|
|
1108
|
+
const parsed = parseWordIndexQuery(query);
|
|
1109
|
+
return parsed.filters.length === 0 && tokenizeLine(parsed.terms).length === 0;
|
|
1110
1110
|
}
|
|
1111
1111
|
function normalizeExtFilterValue(value) {
|
|
1112
1112
|
return `.${value.replace(/^\.+/, "").toLowerCase()}`;
|
|
@@ -1176,11 +1176,19 @@ function searchWordIndex(index, query, options = {}) {
|
|
|
1176
1176
|
const queryFilter = buildWordIndexQueryFilter(parsedQuery.filters);
|
|
1177
1177
|
const combinedFilter = combineFileFilters(fileFilter, queryFilter);
|
|
1178
1178
|
const queryTokens = [...new Set(tokenizeLine(parsedQuery.terms))];
|
|
1179
|
-
|
|
1179
|
+
const hasScope = combinedFilter !== void 0;
|
|
1180
|
+
if (queryTokens.length === 0 && !hasScope)
|
|
1180
1181
|
return [];
|
|
1181
1182
|
const docCount = index.docCount || 1;
|
|
1182
1183
|
const avgDocLength = index.totalTokens / docCount || 1;
|
|
1183
1184
|
const scores = /* @__PURE__ */ new Map();
|
|
1185
|
+
if (queryTokens.length === 0) {
|
|
1186
|
+
for (const file of index.docLengths.keys()) {
|
|
1187
|
+
if (combinedFilter && !combinedFilter(file))
|
|
1188
|
+
continue;
|
|
1189
|
+
scores.set(file, { score: 1, hits: 0, lines: /* @__PURE__ */ new Set() });
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1184
1192
|
for (const token of queryTokens) {
|
|
1185
1193
|
const posting = index.postings.get(token);
|
|
1186
1194
|
if (!posting)
|
|
@@ -1221,6 +1229,7 @@ function searchWordIndex(index, query, options = {}) {
|
|
|
1221
1229
|
}
|
|
1222
1230
|
}
|
|
1223
1231
|
const results = [];
|
|
1232
|
+
const kind = queryTokens.length === 0 ? "file" : "symbol";
|
|
1224
1233
|
for (const [file, entry] of scores) {
|
|
1225
1234
|
let score = entry.score;
|
|
1226
1235
|
if (demoteTestVendor && isTestOrVendor(file))
|
|
@@ -1234,6 +1243,7 @@ function searchWordIndex(index, query, options = {}) {
|
|
|
1234
1243
|
results.push({
|
|
1235
1244
|
file,
|
|
1236
1245
|
score,
|
|
1246
|
+
kind,
|
|
1237
1247
|
hits: entry.hits,
|
|
1238
1248
|
lines: [...entry.lines].sort((a, b) => a - b)
|
|
1239
1249
|
});
|
|
@@ -1752,7 +1762,7 @@ function triggerBackgroundWordIndexBuild(cwd, dbg, options = {}) {
|
|
|
1752
1762
|
void (async () => {
|
|
1753
1763
|
const startMs = Date.now();
|
|
1754
1764
|
try {
|
|
1755
|
-
const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-
|
|
1765
|
+
const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-MV6ST2KT.js");
|
|
1756
1766
|
const docs = await collectWordIndexDocs(key);
|
|
1757
1767
|
const index = await buildWordIndexAsync(docs);
|
|
1758
1768
|
const existing = loadProjectSnapshot(key);
|
|
@@ -1801,8 +1811,7 @@ function triggerBackgroundWordIndexBuild(cwd, dbg, options = {}) {
|
|
|
1801
1811
|
}
|
|
1802
1812
|
var WORD_INDEX_PERSIST_DEBOUNCE_MS_DEFAULT = 1500;
|
|
1803
1813
|
function wordIndexPersistDebounceMs() {
|
|
1804
|
-
|
|
1805
|
-
return Number.isFinite(raw) && raw >= 0 ? raw : WORD_INDEX_PERSIST_DEBOUNCE_MS_DEFAULT;
|
|
1814
|
+
return nonNegativeIntEnv("PI_LENS_WORD_INDEX_PERSIST_DEBOUNCE_MS", WORD_INDEX_PERSIST_DEBOUNCE_MS_DEFAULT);
|
|
1806
1815
|
}
|
|
1807
1816
|
var wordIndexPersistScheduler;
|
|
1808
1817
|
function getWordIndexPersistScheduler() {
|
|
@@ -1819,7 +1828,7 @@ function getWordIndexPersistScheduler() {
|
|
|
1819
1828
|
async function writeWordIndexSnapshot(cwd, index, dbg) {
|
|
1820
1829
|
const persistStartedAt = Date.now();
|
|
1821
1830
|
try {
|
|
1822
|
-
const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-
|
|
1831
|
+
const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-MV6ST2KT.js");
|
|
1823
1832
|
const existing = loadProjectSnapshot(cwd);
|
|
1824
1833
|
const snapshot = existing ?? {
|
|
1825
1834
|
version: PROJECT_SNAPSHOT_VERSION,
|
|
@@ -1899,6 +1908,7 @@ export {
|
|
|
1899
1908
|
refreshWordIndexIncrementally,
|
|
1900
1909
|
WordIndexQueryError,
|
|
1901
1910
|
parseWordIndexQuery,
|
|
1911
|
+
isEmptyWordIndexQuery,
|
|
1902
1912
|
buildWordIndexQueryFilter,
|
|
1903
1913
|
searchWordIndex,
|
|
1904
1914
|
centralityFromReverseDeps,
|
|
@@ -1914,6 +1924,7 @@ export {
|
|
|
1914
1924
|
getWordIndexBuildStatus,
|
|
1915
1925
|
_resetWordIndexBuildGuardForTests,
|
|
1916
1926
|
triggerBackgroundWordIndexBuild,
|
|
1927
|
+
wordIndexPersistDebounceMs,
|
|
1917
1928
|
scheduleWordIndexPersist,
|
|
1918
1929
|
flushWordIndexPersistsForTests
|
|
1919
1930
|
};
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
findGoverningTsconfigDir,
|
|
4
4
|
getDirectoryMarkers,
|
|
5
5
|
registerWorkspaceTopologyReset
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3R3Z54J7.js";
|
|
7
7
|
import {
|
|
8
8
|
BoundedLruCache
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WLD6BGON.js";
|
|
10
10
|
|
|
11
11
|
// dist/clients/review-graph/tsconfig-paths.js
|
|
12
12
|
import * as fs from "node:fs";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
getSourceFiles
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KXDQD34C.js";
|
|
5
5
|
import {
|
|
6
6
|
readDirEntriesSafe,
|
|
7
7
|
shouldRecurseIntoDir
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YTXFNCVN.js";
|
|
9
9
|
import {
|
|
10
10
|
getProjectIgnoreMatcher
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ET3DSSFZ.js";
|
|
12
12
|
import {
|
|
13
13
|
CODE_KINDS,
|
|
14
14
|
DOTNET_CSHARP_ROOT_MARKERS,
|
|
@@ -17,18 +17,18 @@ import {
|
|
|
17
17
|
LEAN_ROOT_MARKERS,
|
|
18
18
|
TERRAGRUNT_FILENAMES,
|
|
19
19
|
detectFileKind
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-SRXYSLMW.js";
|
|
21
21
|
import {
|
|
22
22
|
findNearestDirWithAnyBasename,
|
|
23
23
|
registerWorkspaceTopologyReset
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-3R3Z54J7.js";
|
|
25
25
|
import {
|
|
26
26
|
BoundedLruCache,
|
|
27
27
|
direntsHaveMarkerGlobMatch,
|
|
28
28
|
isUnderDir,
|
|
29
29
|
normalizeMapKey,
|
|
30
30
|
realpathOrResolve
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-WLD6BGON.js";
|
|
32
32
|
|
|
33
33
|
// dist/clients/language-profile.js
|
|
34
34
|
import * as fs from "node:fs";
|