pi-lens 4.4.9 → 4.4.11
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 +262 -0
- package/README.md +2 -0
- package/dist/{chunk-7YTRG6YW.js → chunk-2SD2CGVH.js} +2 -2
- package/dist/{chunk-CDFJF5YD.js → chunk-34RXPR7M.js} +1 -1
- package/dist/{chunk-XO756WE5.js → chunk-3C6ZZAB2.js} +34 -27
- package/dist/{chunk-MKPDIAZH.js → chunk-3HZ6MNB2.js} +1 -1
- package/dist/{chunk-RNXOWDM6.js → chunk-3NVGBFJS.js} +6 -6
- package/dist/{chunk-DGKFWQK4.js → chunk-3QCI3V6C.js} +11 -11
- package/dist/{chunk-NL5LSKVD.js → chunk-3R3Z54J7.js} +10 -4
- package/dist/{chunk-PIIUNJIT.js → chunk-43KD3PPM.js} +1 -1
- package/dist/{chunk-LAHHGNAY.js → chunk-4HNBY7S7.js} +20 -19
- package/dist/chunk-4WWPDMRA.js +22 -0
- package/dist/{chunk-L7O774U7.js → chunk-532X3OCZ.js} +116 -22
- package/dist/{chunk-ZVCDHYWZ.js → chunk-5RLEDUUE.js} +9 -9
- package/dist/{chunk-5YSEQHJN.js → chunk-5YTDZ5WP.js} +3 -3
- package/dist/{chunk-X5BJ3G2P.js → chunk-6EIV3H7O.js} +158 -61
- package/dist/{chunk-KV6GQOGN.js → chunk-6K4X7IIF.js} +164 -172
- package/dist/{chunk-HYSKJMZK.js → chunk-6RXMQYNU.js} +3 -3
- package/dist/{chunk-7UTSNTWM.js → chunk-6XNVY3FW.js} +10 -10
- package/dist/{chunk-ACRJ2GZ5.js → chunk-7424ANRU.js} +2 -2
- package/dist/{chunk-JUZ67QZQ.js → chunk-A4HKPAEN.js} +8 -8
- package/dist/{chunk-EKNYSXFB.js → chunk-AFNPNHJV.js} +8 -8
- package/dist/{chunk-W5E72HJA.js → chunk-AGEQRJ5A.js} +37 -11
- package/dist/{chunk-4ENEJHF4.js → chunk-AJ62EQIQ.js} +15 -14
- package/dist/{chunk-VWLSU3XV.js → chunk-AOQKQWZU.js} +14 -5
- package/dist/{chunk-CJS6WE66.js → chunk-AVOUHMCS.js} +111 -107
- package/dist/{chunk-WTB4GKMH.js → chunk-AYDE7RFV.js} +45 -5
- package/dist/{chunk-AWQWXSW4.js → chunk-B4FAFEBP.js} +7 -2
- package/dist/{chunk-SLSMJPEF.js → chunk-B4K6OSLL.js} +49 -42
- package/dist/{chunk-CM6BDY4E.js → chunk-BBJXIZ3X.js} +3 -3
- package/dist/chunk-BJDB7PXU.js +25 -0
- package/dist/{chunk-TOE2RRCS.js → chunk-BLL4VYGZ.js} +1 -1
- package/dist/{chunk-THYHUIDR.js → chunk-BMMRLJA4.js} +7 -5
- package/dist/{chunk-LWOM6LVS.js → chunk-BN36MQW5.js} +35 -34
- package/dist/{chunk-ZCQBNPRH.js → chunk-C2REOMPO.js} +2 -2
- package/dist/{chunk-T5QSLSMM.js → chunk-C4ICGFEO.js} +23 -23
- package/dist/chunk-CIA7X2PZ.js +26 -0
- package/dist/{chunk-VO4JFPTV.js → chunk-D5L7Q57Z.js} +2 -2
- package/dist/{chunk-YOXCCJDF.js → chunk-DBAHJFBU.js} +70 -64
- package/dist/{chunk-TMNUTMT5.js → chunk-DNB4ZQGN.js} +59 -22
- package/dist/chunk-DPDA3ILA.js +108 -0
- package/dist/{chunk-QGITU23N.js → chunk-E3PNZDPH.js} +1 -1
- package/dist/{chunk-QVBOXT3L.js → chunk-E6Z3CJT2.js} +13 -9
- package/dist/{chunk-ZDMFGACN.js → chunk-ECYUBKYX.js} +588 -566
- package/dist/chunk-F37CCZUA.js +27 -0
- package/dist/{chunk-E65WJVI5.js → chunk-FVEEEEIM.js} +10 -13
- package/dist/{chunk-F6BEQWAK.js → chunk-GL6J5R34.js} +5 -5
- package/dist/{chunk-5GEYJJHG.js → chunk-GTNO6F6K.js} +11 -10
- package/dist/{chunk-NMUSOZ2D.js → chunk-HASJPQBC.js} +10 -10
- package/dist/{chunk-XVB3Q2PG.js → chunk-HGEE5LDW.js} +3 -2
- package/dist/{chunk-XKFO2SZV.js → chunk-HIUVHRLM.js} +35 -34
- package/dist/{chunk-PRHYIA6X.js → chunk-HTUG7ZFK.js} +8 -8
- package/dist/{chunk-HEA3EM23.js → chunk-IBEYUBCM.js} +9 -9
- package/dist/{chunk-WSSLVMDA.js → chunk-IJ55MYO6.js} +15 -12
- package/dist/{chunk-MRLH4MYU.js → chunk-IT7MFVGP.js} +2 -2
- package/dist/{chunk-MQ4PPCJB.js → chunk-ITAPXBIB.js} +42 -43
- package/dist/{chunk-RNJFRXEN.js → chunk-JSQK5DH3.js} +4 -4
- package/dist/{chunk-VCRVNLE7.js → chunk-K2GV34T2.js} +9 -1
- package/dist/{chunk-3NPWO5UO.js → chunk-KBSC5Z3G.js} +9 -8
- package/dist/{chunk-PXQ45SGD.js → chunk-KDGKKK7A.js} +2 -2
- package/dist/{chunk-SIQHOB6P.js → chunk-KDMJ2DJD.js} +11 -11
- package/dist/{chunk-RTFMDIKV.js → chunk-KNP4ENFT.js} +1 -1
- package/dist/chunk-KX4DF6XX.js +25 -0
- package/dist/{chunk-ZZN74OGD.js → chunk-LHCDWFDB.js} +37 -144
- package/dist/{chunk-N5CEGQPG.js → chunk-LHU6NG5Z.js} +16 -15
- package/dist/{chunk-G22UNQID.js → chunk-LIDFFCZZ.js} +17 -15
- package/dist/{chunk-NOWH2VA2.js → chunk-LPM6NKVI.js} +7 -7
- package/dist/{chunk-KXMJLOZF.js → chunk-LXE7JAMV.js} +37 -26
- package/dist/{chunk-47UCC4MM.js → chunk-ME6MF2N2.js} +1 -1
- package/dist/{chunk-V67D6TMU.js → chunk-NLRKB32C.js} +7 -7
- package/dist/{chunk-2VZ3VN3N.js → chunk-NQFXN5U7.js} +2 -2
- package/dist/{chunk-IILEH3ZC.js → chunk-NR4KQOXZ.js} +14 -9
- package/dist/{chunk-UXTQ3QPD.js → chunk-NWK7KKNO.js} +4 -4
- package/dist/{chunk-ZMMHHXSW.js → chunk-O6LCSHHI.js} +2 -1
- package/dist/{chunk-ZZSJAR76.js → chunk-OC4ZGVMH.js} +33 -17
- package/dist/{chunk-L6WBJGQS.js → chunk-OP5BMZKK.js} +3 -3
- package/dist/{chunk-MN635QYA.js → chunk-OYXD2MOM.js} +3 -3
- package/dist/{chunk-OSEKJEUU.js → chunk-PSUXESQ5.js} +41 -4
- package/dist/{chunk-6GPB3JLL.js → chunk-QAM2Q3VO.js} +3 -3
- package/dist/{chunk-OUYAUXAT.js → chunk-QBUSONNE.js} +518 -191
- package/dist/{chunk-PBZNYHMM.js → chunk-QDZ3ZZMY.js} +18 -66
- package/dist/{chunk-LT62P654.js → chunk-QJ4T73J5.js} +1 -1
- package/dist/{chunk-XLAI7UYY.js → chunk-QUZYRDT6.js} +12 -12
- package/dist/{chunk-QP33NKYC.js → chunk-R2UF54ON.js} +17 -15
- package/dist/{chunk-V2WDBOLZ.js → chunk-R2VUZZPJ.js} +11 -10
- package/dist/chunk-R5BNSOIV.js +29 -0
- package/dist/chunk-RV5VX2XW.js +29 -0
- package/dist/{chunk-FGNSESAC.js → chunk-SQBDX6IO.js} +12 -12
- package/dist/{chunk-CZCAZVTD.js → chunk-SRXYSLMW.js} +2 -2
- package/dist/{chunk-J3Q2NYJR.js → chunk-SUIZOCSY.js} +3 -2
- package/dist/{chunk-NUSXS6YB.js → chunk-T5EGSBM2.js} +4 -4
- package/dist/{chunk-FRUBVFXV.js → chunk-TBE4OLPA.js} +37 -35
- package/dist/{chunk-GQTQUNCG.js → chunk-TPMBNWHO.js} +28 -26
- package/dist/{chunk-IICERRFF.js → chunk-TRYOYWWU.js} +18 -12
- package/dist/{chunk-3HTZDY3C.js → chunk-TTGDTNSN.js} +6 -6
- package/dist/{chunk-NCLO6E6N.js → chunk-UELHWF5I.js} +139 -135
- package/dist/chunk-UG4YLCJ5.js +58 -0
- package/dist/chunk-UQ6OZYTO.js +91 -0
- package/dist/{chunk-L4Y3ROKQ.js → chunk-UY3WWW5R.js} +4 -4
- package/dist/chunk-V7IPIAE5.js +74 -0
- package/dist/{chunk-C3YRO3EU.js → chunk-VDMF7Q2P.js} +10 -10
- package/dist/{chunk-N56BNAA6.js → chunk-VI3BJMZO.js} +35 -34
- package/dist/{chunk-EY6LY2HO.js → chunk-VTXJAO5R.js} +34 -35
- package/dist/chunk-W6VLB6LL.js +145 -0
- package/dist/{chunk-AACN5GNE.js → chunk-WBXCIRVI.js} +21 -2
- package/dist/{chunk-CB7PEVOJ.js → chunk-WLD6BGON.js} +176 -60
- package/dist/{chunk-ZPM7ZIFL.js → chunk-WMCAEP2K.js} +11 -8
- package/dist/{chunk-H3BVMK47.js → chunk-WXMUGUZV.js} +21 -25
- package/dist/{chunk-QB7T2PHK.js → chunk-X33QECRJ.js} +4 -2
- package/dist/{chunk-7R5GZIA6.js → chunk-YUF4DRYB.js} +399 -308
- package/dist/{chunk-HSOBIN22.js → chunk-YVPB5YGO.js} +2 -2
- package/dist/{chunk-W7TY6HYX.js → chunk-ZRQMENT4.js} +5 -27
- package/dist/index.js +6100 -4440
- package/dist/mcp/analyze-cli.js +17 -11
- package/dist/mcp/cli.js +43 -42
- package/dist/mcp/server.js +1534 -623
- package/dist/mcp/worker.js +62 -59
- package/dist/probes/installer.js +19 -18
- package/docs/agent-guide.md +5 -2
- package/docs/agent-tools.md +17 -4
- package/docs/alignment-families.md +5 -1
- package/docs/ci.md +120 -0
- package/docs/configuration.md +30 -7
- package/docs/custom-rules.md +1 -0
- package/docs/defect-shapes.md +122 -72
- 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 +12 -2
- package/docs/globalconfig.md +13 -0
- package/docs/invariants/dispatch-runners.md +13 -0
- package/docs/invariants/language-config.md +9 -1
- package/docs/language-coverage.md +67 -1
- package/docs/lsp-capability-matrix.md +68 -23
- package/docs/lsp-idle-eviction.md +17 -13
- package/docs/module-report-read-symbol.md +2 -2
- package/docs/pi-lens-fixer.md +11 -8
- package/docs/pi-lens-merge-policy.md +6 -1
- package/docs/pi-lens-monitor.md +4 -1
- package/docs/pi-lens-release.md +22 -2
- package/docs/pi-lens-reviewer.md +60 -13
- 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 +16 -4
- package/docs/usage.md +1 -0
- package/docs/word-index.md +9 -10
- package/package.json +4 -4
- 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/download-grammars.js +10 -0
- package/scripts/grammars.lock.json +7 -0
- package/scripts/lib/latency-log-phases.mjs +125 -0
- package/vendor/grammars/tree-sitter-groovy.wasm +0 -0
- package/dist/chunk-H6FLQ5NW.js +0 -28
- package/dist/chunk-KR5VGMVT.js +0 -25
- package/dist/chunk-Q6JQKWPK.js +0 -25
- package/dist/chunk-QJJKOHLH.js +0 -57
- package/dist/chunk-TGQDAG4B.js +0 -88
- package/dist/chunk-TYHPVE5H.js +0 -25
- package/dist/chunk-UAKO2M6B.js +0 -73
- package/dist/chunk-UC5AXW5Z.js +0 -20
- package/dist/chunk-UTJP6WOS.js +0 -28
|
@@ -12,8 +12,10 @@ import {
|
|
|
12
12
|
reportConfigReadFailure,
|
|
13
13
|
reportPiLensConfigRecords,
|
|
14
14
|
resolveOnePiLensConfigDocument,
|
|
15
|
+
spawnAbortScope,
|
|
16
|
+
spawnCooldownScope,
|
|
15
17
|
warnIgnoredConfigOnce
|
|
16
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6EIV3H7O.js";
|
|
17
19
|
import {
|
|
18
20
|
CANONICAL_GLOBAL_CONFIG_FILE,
|
|
19
21
|
FRESHNESS_CADENCE_MS,
|
|
@@ -23,7 +25,7 @@ import {
|
|
|
23
25
|
errorClassName,
|
|
24
26
|
getPiLensGlobalConfigPath,
|
|
25
27
|
getProductionGlobalConfigResolution
|
|
26
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-3R3Z54J7.js";
|
|
27
29
|
import {
|
|
28
30
|
DEFAULT_MAX_OUTPUT_BYTES,
|
|
29
31
|
createBoundedOutputSink,
|
|
@@ -31,7 +33,7 @@ import {
|
|
|
31
33
|
truncatedByOutputCap,
|
|
32
34
|
writeFileAtomic,
|
|
33
35
|
writeFileAtomicAsync
|
|
34
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-43KD3PPM.js";
|
|
35
37
|
import {
|
|
36
38
|
GLOBAL_NON_FLAG_CONFIG_SECTIONS,
|
|
37
39
|
LENS_FLAGS,
|
|
@@ -48,13 +50,13 @@ import {
|
|
|
48
50
|
readToolConfig,
|
|
49
51
|
recordDegradation,
|
|
50
52
|
recordDegradationOnce
|
|
51
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-AGEQRJ5A.js";
|
|
52
54
|
import {
|
|
53
55
|
getProcessSingleton,
|
|
54
56
|
isToolInstallDisabled,
|
|
55
57
|
logLatency,
|
|
56
58
|
machineStateDir
|
|
57
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-K2GV34T2.js";
|
|
58
60
|
import {
|
|
59
61
|
STAGE_TMP_PATTERN,
|
|
60
62
|
stagePathFor,
|
|
@@ -83,7 +85,7 @@ import {
|
|
|
83
85
|
toPosix,
|
|
84
86
|
toProjectRelativePath,
|
|
85
87
|
walkUpDirs
|
|
86
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-WLD6BGON.js";
|
|
87
89
|
import {
|
|
88
90
|
__commonJS,
|
|
89
91
|
__require,
|
|
@@ -848,7 +850,6 @@ var require_pidusage = __commonJS({
|
|
|
848
850
|
});
|
|
849
851
|
|
|
850
852
|
// dist/clients/safe-spawn.js
|
|
851
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
852
853
|
import { spawn, spawnSync } from "node:child_process";
|
|
853
854
|
import * as fs9 from "node:fs";
|
|
854
855
|
import * as path12 from "node:path";
|
|
@@ -2057,7 +2058,7 @@ function cooldownKey(command) {
|
|
|
2057
2058
|
return path6.basename(command).replace(/\.[^.]+$/, "").toLowerCase();
|
|
2058
2059
|
}
|
|
2059
2060
|
function noteSpawnTimeout(input) {
|
|
2060
|
-
const key = cooldownKey(input.command);
|
|
2061
|
+
const key = cooldownKey(input.subject ?? input.command);
|
|
2061
2062
|
timedOutByCommand.set(key, {
|
|
2062
2063
|
tool: input.tool,
|
|
2063
2064
|
command: input.command,
|
|
@@ -2073,6 +2074,7 @@ function noteSpawnTimeout(input) {
|
|
|
2073
2074
|
status: "cooldown_armed",
|
|
2074
2075
|
metadata: {
|
|
2075
2076
|
command: input.command,
|
|
2077
|
+
...input.subject !== void 0 && { subject: input.subject },
|
|
2076
2078
|
wrapperKind: wrapperKindOf(input.command),
|
|
2077
2079
|
timeoutPhase: input.phase,
|
|
2078
2080
|
...input.durationMs !== void 0 && {
|
|
@@ -2210,6 +2212,8 @@ function globalCanonicalLocation() {
|
|
|
2210
2212
|
}
|
|
2211
2213
|
return location;
|
|
2212
2214
|
}
|
|
2215
|
+
var LSP_QUERY_MAX_FILE_LINES_MIN = 5e3;
|
|
2216
|
+
var LSP_QUERY_MAX_FILE_LINES_MAX = 4e4;
|
|
2213
2217
|
function warnInvalidGlobalConfigOnce(configPath, reason, code) {
|
|
2214
2218
|
warnIgnoredConfigOnce({
|
|
2215
2219
|
subsystem: "lens-config",
|
|
@@ -2329,6 +2333,15 @@ function loadPiLensGlobalConfig(configPath) {
|
|
|
2329
2333
|
if (startupConfig.mode !== void 0 || startupConfig.scans !== void 0)
|
|
2330
2334
|
config.startup = startupConfig;
|
|
2331
2335
|
}
|
|
2336
|
+
const lspSection = asConfigObject(raw.lsp);
|
|
2337
|
+
if (lspSection && "queryMaxFileLines" in lspSection) {
|
|
2338
|
+
const lines = lspSection.queryMaxFileLines;
|
|
2339
|
+
if (typeof lines === "number" && Number.isInteger(lines) && lines >= LSP_QUERY_MAX_FILE_LINES_MIN && lines <= LSP_QUERY_MAX_FILE_LINES_MAX) {
|
|
2340
|
+
config.lsp = { ...config.lsp, queryMaxFileLines: lines };
|
|
2341
|
+
} else {
|
|
2342
|
+
warnInvalid(`lsp.queryMaxFileLines must be a whole number from ${LSP_QUERY_MAX_FILE_LINES_MIN} to ${LSP_QUERY_MAX_FILE_LINES_MAX}; ignored`, "PILENS_CFG_0005");
|
|
2343
|
+
}
|
|
2344
|
+
}
|
|
2332
2345
|
const dispatch = asConfigObject(raw.dispatch);
|
|
2333
2346
|
if (dispatch) {
|
|
2334
2347
|
const floor = dispatch.runnerTimeoutFloorMs;
|
|
@@ -2406,6 +2419,9 @@ function loadPiLensGlobalConfig(configPath) {
|
|
|
2406
2419
|
function getGlobalIgnorePatterns(configPath) {
|
|
2407
2420
|
return loadPiLensGlobalConfig(configPath)?.ignore ?? [];
|
|
2408
2421
|
}
|
|
2422
|
+
function getGlobalLspQueryMaxFileLines(configPath) {
|
|
2423
|
+
return loadPiLensGlobalConfig(configPath)?.lsp?.queryMaxFileLines;
|
|
2424
|
+
}
|
|
2409
2425
|
function resolvePiLensFlagWithSource(name, value, config, projectConfig, editedFilePath, projectRoot) {
|
|
2410
2426
|
const spec = getLensFlagSpec(name);
|
|
2411
2427
|
if (spec?.env && process.env[spec.env] === "1") {
|
|
@@ -3298,6 +3314,12 @@ function getKnipIgnorePatterns() {
|
|
|
3298
3314
|
"**/tests/**"
|
|
3299
3315
|
];
|
|
3300
3316
|
}
|
|
3317
|
+
function resolveWriteResult(before, after, run, okStatuses = [0]) {
|
|
3318
|
+
return {
|
|
3319
|
+
changed: after !== void 0 && before !== after,
|
|
3320
|
+
success: !run.error && run.status !== null && okStatuses.includes(run.status)
|
|
3321
|
+
};
|
|
3322
|
+
}
|
|
3301
3323
|
function isTestFile(filePath) {
|
|
3302
3324
|
if (detectFileRole(filePath) === "test")
|
|
3303
3325
|
return true;
|
|
@@ -3972,12 +3994,6 @@ async function removeLspChildNow(pid, expectedMarker) {
|
|
|
3972
3994
|
await writeRegistryAsync(file);
|
|
3973
3995
|
});
|
|
3974
3996
|
}
|
|
3975
|
-
function rootsOverlap(a, b) {
|
|
3976
|
-
if (a === b)
|
|
3977
|
-
return true;
|
|
3978
|
-
const [shorter, longer] = a.length < b.length ? [a, b] : [b, a];
|
|
3979
|
-
return longer.startsWith(shorter.endsWith("/") ? shorter : `${shorter}/`);
|
|
3980
|
-
}
|
|
3981
3997
|
function selectLivePeerInstances(entries, root, now = Date.now(), isPidAlive = realIsPidAlive, match = "exact") {
|
|
3982
3998
|
const normalizedRoot = normalizeFilePath(root);
|
|
3983
3999
|
return entries.filter((entry) => entry.pid !== process.pid && // #2130: a host serves a SET of roots. Matching only
|
|
@@ -3985,7 +4001,11 @@ function selectLivePeerInstances(entries, root, now = Date.now(), isPidAlive = r
|
|
|
3985
4001
|
// working in the same checkout under its second root read as "no
|
|
3986
4002
|
// peer" — and the shared-checkout guard then allowed the destructive
|
|
3987
4003
|
// command it exists to block.
|
|
3988
|
-
getInstanceRoots(entry).some((entryRoot) => match === "exact" ? entryRoot === normalizedRoot :
|
|
4004
|
+
getInstanceRoots(entry).some((entryRoot) => match === "exact" ? entryRoot === normalizedRoot : (
|
|
4005
|
+
// Same directory, or one contains the other, on segment
|
|
4006
|
+
// boundaries: `/repo-backup` never matches `/repo`.
|
|
4007
|
+
isWithinForm(entryRoot, normalizedRoot) || isWithinForm(normalizedRoot, entryRoot)
|
|
4008
|
+
)) && isPidAlive(entry.pid) && Number.isFinite(Date.parse(entry.heartbeatAt)) && now - Date.parse(entry.heartbeatAt) <= STALE_HEARTBEAT_MS).sort((a, b) => Date.parse(a.startedAt) - Date.parse(b.startedAt));
|
|
3989
4009
|
}
|
|
3990
4010
|
function computeResourceFootprint(instances, isPidAlive) {
|
|
3991
4011
|
const liveInstances = isPidAlive ? instances.filter((instance) => isPidAlive(instance.pid)) : instances;
|
|
@@ -4307,7 +4327,12 @@ async function sampleProcesses(pids) {
|
|
|
4307
4327
|
return await sampleProcessesWindows(valid);
|
|
4308
4328
|
}
|
|
4309
4329
|
try {
|
|
4310
|
-
const stats = await (0, import_pidusage.default)(valid)
|
|
4330
|
+
const stats = await (0, import_pidusage.default)(valid).catch((err) => {
|
|
4331
|
+
if (err instanceof Error && err.message === "No matching pid found") {
|
|
4332
|
+
return {};
|
|
4333
|
+
}
|
|
4334
|
+
throw err;
|
|
4335
|
+
});
|
|
4311
4336
|
for (const pid of valid) {
|
|
4312
4337
|
const stat = stats[String(pid)];
|
|
4313
4338
|
if (!stat)
|
|
@@ -4787,7 +4812,7 @@ function setAmbientAbortSignal(signal) {
|
|
|
4787
4812
|
ambientAbortSignal = signal;
|
|
4788
4813
|
}
|
|
4789
4814
|
function getAmbientAbortSignal() {
|
|
4790
|
-
return ambientAbortSignal;
|
|
4815
|
+
return spawnAbortScope.getStore() ?? ambientAbortSignal;
|
|
4791
4816
|
}
|
|
4792
4817
|
function cmdEscapeArg(arg) {
|
|
4793
4818
|
if (!/[\s"&|<>^()]/.test(arg))
|
|
@@ -5169,15 +5194,15 @@ function resetUtf8ConsoleCodePageStateForTests() {
|
|
|
5169
5194
|
var EXIT_PIPE_IDLE_GRACE_MS = 100;
|
|
5170
5195
|
var EXIT_PIPE_IDLE_MAX_WAIT_MS = 2e3;
|
|
5171
5196
|
var SPAWN_SAMPLER_TEARDOWN_GRACE_MS = 5e3;
|
|
5172
|
-
var spawnAbortScope = new AsyncLocalStorage();
|
|
5173
5197
|
async function safeSpawnAsync(command, args, options) {
|
|
5174
5198
|
const configuredTimeout = options?.timeout !== void 0 && Number.isFinite(options.timeout) && options.timeout >= 0 ? options.timeout : 3e4;
|
|
5175
5199
|
const deadlineRemaining = options?.deadlineAt !== void 0 && Number.isFinite(options.deadlineAt) ? options.deadlineAt - Date.now() : Number.POSITIVE_INFINITY;
|
|
5176
5200
|
const timeout = Math.max(0, Math.min(configuredTimeout, deadlineRemaining));
|
|
5177
5201
|
const callerSignal = options?.signal ?? (options?.ignoreAmbientSignal ? void 0 : ambientAbortSignal);
|
|
5178
|
-
const scopedSignal = spawnAbortScope.getStore();
|
|
5202
|
+
const scopedSignal = options?.ignoreAmbientSignal ? void 0 : spawnAbortScope.getStore();
|
|
5179
5203
|
const abortSignal = scopedSignal && callerSignal ? AbortSignal.any([scopedSignal, callerSignal]) : scopedSignal ?? callerSignal;
|
|
5180
|
-
|
|
5204
|
+
const cooldown = options?.cooldown ?? (options?.ignoreAmbientSignal ? void 0 : spawnCooldownScope.getStore());
|
|
5205
|
+
const result = await new Promise((resolve7) => {
|
|
5181
5206
|
if (abortSignal?.aborted) {
|
|
5182
5207
|
const cause = new Error("Spawn aborted before start");
|
|
5183
5208
|
resolve7({
|
|
@@ -5789,6 +5814,17 @@ async function safeSpawnAsync(command, args, options) {
|
|
|
5789
5814
|
}
|
|
5790
5815
|
});
|
|
5791
5816
|
});
|
|
5817
|
+
if (cooldown && result.failure === "timeout" && timeout === configuredTimeout) {
|
|
5818
|
+
noteSpawnTimeout({
|
|
5819
|
+
tool: cooldown.tool,
|
|
5820
|
+
command,
|
|
5821
|
+
subject: cooldown.subject,
|
|
5822
|
+
phase: cooldown.phase,
|
|
5823
|
+
durationMs: timeout,
|
|
5824
|
+
...result.timeoutTeardown && { teardown: result.timeoutTeardown }
|
|
5825
|
+
});
|
|
5826
|
+
}
|
|
5827
|
+
return result;
|
|
5792
5828
|
}
|
|
5793
5829
|
async function isCommandAvailableAsync(command) {
|
|
5794
5830
|
const finder = process.platform === "win32" ? "where" : "which";
|
|
@@ -5905,7 +5941,6 @@ function findCommand(command) {
|
|
|
5905
5941
|
}
|
|
5906
5942
|
|
|
5907
5943
|
export {
|
|
5908
|
-
noteSpawnTimeout,
|
|
5909
5944
|
isInSpawnTimeoutCooldown,
|
|
5910
5945
|
resetSpawnTimeoutCooldowns,
|
|
5911
5946
|
createGitIdentityResolver,
|
|
@@ -5971,7 +6006,6 @@ export {
|
|
|
5971
6006
|
trustScopedEnvironment,
|
|
5972
6007
|
resolveSearchPathCommand,
|
|
5973
6008
|
resetUtf8ConsoleCodePageStateForTests,
|
|
5974
|
-
spawnAbortScope,
|
|
5975
6009
|
safeSpawnAsync,
|
|
5976
6010
|
isCommandAvailableAsync,
|
|
5977
6011
|
findCommandAsync,
|
|
@@ -5979,7 +6013,9 @@ export {
|
|
|
5979
6013
|
findCommand,
|
|
5980
6014
|
collectUntrackedIgnoredIds,
|
|
5981
6015
|
collectTrackedFiles,
|
|
6016
|
+
LSP_QUERY_MAX_FILE_LINES_MAX,
|
|
5982
6017
|
loadPiLensGlobalConfig,
|
|
6018
|
+
getGlobalLspQueryMaxFileLines,
|
|
5983
6019
|
resolvePiLensFlag,
|
|
5984
6020
|
ephemeralStagingRoot,
|
|
5985
6021
|
isEphemeralCheckoutRoot,
|
|
@@ -6000,5 +6036,6 @@ export {
|
|
|
6000
6036
|
isExcludedDirName,
|
|
6001
6037
|
getExcludedDirGlobs,
|
|
6002
6038
|
getKnipIgnorePatterns,
|
|
6039
|
+
resolveWriteResult,
|
|
6003
6040
|
isTestFile
|
|
6004
6041
|
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
formatToolFailure
|
|
4
|
+
} from "./chunk-LHCDWFDB.js";
|
|
5
|
+
import {
|
|
6
|
+
scannerReportParentDir
|
|
7
|
+
} from "./chunk-QJ4T73J5.js";
|
|
8
|
+
import {
|
|
9
|
+
LEDGER_FIELD_MAX
|
|
10
|
+
} from "./chunk-AGEQRJ5A.js";
|
|
11
|
+
|
|
12
|
+
// dist/clients/report-scan.js
|
|
13
|
+
import * as fs from "node:fs";
|
|
14
|
+
import * as path from "node:path";
|
|
15
|
+
function parseReportJson(toolName, raw) {
|
|
16
|
+
try {
|
|
17
|
+
return JSON.parse(raw);
|
|
18
|
+
} catch (err) {
|
|
19
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
20
|
+
throw new Error(`unreadable ${toolName} report: ${message}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async function runReportScan(toolName, spec) {
|
|
24
|
+
const scannedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
25
|
+
const outDir = fs.mkdtempSync(path.join(scannerReportParentDir(), `pi-lens-${toolName}-`));
|
|
26
|
+
const reportPath = path.join(outDir, `${toolName}-report.json`);
|
|
27
|
+
const failed = (failure) => {
|
|
28
|
+
spec.recordFailure?.(failure);
|
|
29
|
+
return spec.fail(failure);
|
|
30
|
+
};
|
|
31
|
+
try {
|
|
32
|
+
const result = await spec.spawn({ outDir, reportPath });
|
|
33
|
+
if (result.error) {
|
|
34
|
+
const message = result.error.message;
|
|
35
|
+
spec.log?.(`Scan error: ${message}`);
|
|
36
|
+
return failed({
|
|
37
|
+
outcome: "spawn-error",
|
|
38
|
+
scannedAt,
|
|
39
|
+
status: result.status,
|
|
40
|
+
signal: result.signal,
|
|
41
|
+
stderr: result.stderr ?? "",
|
|
42
|
+
errorMessage: message,
|
|
43
|
+
...result.failure ? { spawnFailure: result.failure } : {},
|
|
44
|
+
summary: message.slice(0, LEDGER_FIELD_MAX)
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const stderr = result.stderr ?? "";
|
|
48
|
+
if (!fs.existsSync(reportPath)) {
|
|
49
|
+
if (result.status !== 0) {
|
|
50
|
+
const reason = formatToolFailure({
|
|
51
|
+
tool: toolName,
|
|
52
|
+
status: result.status,
|
|
53
|
+
// A null exit with a signal is only explainable by the signal, and
|
|
54
|
+
// the four report scanners now say it the same way (#5411).
|
|
55
|
+
signal: result.signal ?? null,
|
|
56
|
+
stderr,
|
|
57
|
+
reportMissing: true,
|
|
58
|
+
...spec.failureFields ? { fields: spec.failureFields() } : {}
|
|
59
|
+
});
|
|
60
|
+
spec.log?.(reason);
|
|
61
|
+
return failed({
|
|
62
|
+
outcome: "no-report",
|
|
63
|
+
scannedAt,
|
|
64
|
+
status: result.status,
|
|
65
|
+
signal: result.signal,
|
|
66
|
+
stderr,
|
|
67
|
+
summary: reason
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return spec.fail({
|
|
71
|
+
outcome: "no-report",
|
|
72
|
+
scannedAt,
|
|
73
|
+
status: result.status,
|
|
74
|
+
signal: result.signal,
|
|
75
|
+
stderr,
|
|
76
|
+
success: true,
|
|
77
|
+
summary: stderr.trim().split("\n")[0] || "no report produced"
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return await spec.parse(fs.readFileSync(reportPath, "utf-8"), scannedAt, {
|
|
81
|
+
status: result.status,
|
|
82
|
+
signal: result.signal
|
|
83
|
+
});
|
|
84
|
+
} catch (err) {
|
|
85
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
86
|
+
spec.log?.(`Scan error: ${message}`);
|
|
87
|
+
const failure = {
|
|
88
|
+
outcome: "crashed",
|
|
89
|
+
scannedAt,
|
|
90
|
+
status: null,
|
|
91
|
+
signal: void 0,
|
|
92
|
+
stderr: "",
|
|
93
|
+
summary: message.slice(0, LEDGER_FIELD_MAX)
|
|
94
|
+
};
|
|
95
|
+
spec.recordFailure?.(failure);
|
|
96
|
+
return spec.fail(failure);
|
|
97
|
+
} finally {
|
|
98
|
+
try {
|
|
99
|
+
fs.rmSync(outDir, { recursive: true, force: true });
|
|
100
|
+
} catch {
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
parseReportJson,
|
|
107
|
+
runReportScan
|
|
108
|
+
};
|
|
@@ -4,37 +4,41 @@ import {
|
|
|
4
4
|
discoverManagedTool,
|
|
5
5
|
getManagedToolEnvironment,
|
|
6
6
|
resolveAvailableOrInstall
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UELHWF5I.js";
|
|
8
8
|
import {
|
|
9
9
|
mapWithConcurrency
|
|
10
10
|
} from "./chunk-XIMYZ3JA.js";
|
|
11
11
|
import {
|
|
12
12
|
findNodeToolBinary
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FVEEEEIM.js";
|
|
14
14
|
import {
|
|
15
15
|
getIsolatedNpxSpawnOptions
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-OP5BMZKK.js";
|
|
17
17
|
import {
|
|
18
18
|
createAvailabilityLatch
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WBXCIRVI.js";
|
|
20
20
|
import {
|
|
21
21
|
safeSpawnAsync
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-DNB4ZQGN.js";
|
|
23
|
+
import {
|
|
24
|
+
isDeclarationFile
|
|
25
|
+
} from "./chunk-6EIV3H7O.js";
|
|
23
26
|
import {
|
|
24
27
|
compareOrdinal,
|
|
25
28
|
createSubsystemLogger,
|
|
26
29
|
recordDegradationOnce
|
|
27
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-AGEQRJ5A.js";
|
|
28
31
|
import {
|
|
29
32
|
isFullyQualified,
|
|
30
33
|
isUnderDir
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-WLD6BGON.js";
|
|
32
35
|
|
|
33
36
|
// dist/clients/dependency-checker.js
|
|
34
37
|
import * as fs from "node:fs";
|
|
35
38
|
import * as path from "node:path";
|
|
39
|
+
var MADGE_EXTENSIONS = ["ts", "tsx", "js", "jsx", "mjs", "cjs"];
|
|
36
40
|
function buildMadgeArgs(target, projectRoot) {
|
|
37
|
-
const args = ["--circular", "--extensions", "
|
|
41
|
+
const args = ["--circular", "--extensions", MADGE_EXTENSIONS.join(",")];
|
|
38
42
|
const tsConfig = path.join(projectRoot, "tsconfig.json");
|
|
39
43
|
if (fs.existsSync(tsConfig)) {
|
|
40
44
|
args.push("--ts-config", tsConfig);
|
|
@@ -642,7 +646,7 @@ var DependencyChecker = class _DependencyChecker {
|
|
|
642
646
|
return { circular: [], count: 0 };
|
|
643
647
|
}
|
|
644
648
|
const entries = fs.readdirSync(projectRoot);
|
|
645
|
-
const hasSourceFiles = entries.some((e) =>
|
|
649
|
+
const hasSourceFiles = entries.some((e) => MADGE_EXTENSIONS.includes(path.extname(e).slice(1)) && !isDeclarationFile(e));
|
|
646
650
|
if (!hasSourceFiles) {
|
|
647
651
|
return { circular: [], count: 0 };
|
|
648
652
|
}
|