@herbertgao/pi-extensions 2026.11.6 → 2026.11.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (419) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +9 -9
  3. package/THIRD_PARTY_NOTICES.md +2 -2
  4. package/node_modules/@herbertgao/pi-impeccable/CHANGELOG.md +6 -0
  5. package/node_modules/@herbertgao/pi-impeccable/README.md +2 -2
  6. package/node_modules/@herbertgao/pi-impeccable/package.json +4 -4
  7. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/SKILL.md +1 -1
  8. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/VERSION +1 -1
  9. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/engine-checksums.txt +5 -5
  10. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser.js +71 -56
  11. package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
  12. package/node_modules/@herbertgao/pi-subagents/README.md +2 -2
  13. package/node_modules/@herbertgao/pi-subagents/package.json +4 -4
  14. package/node_modules/@herbertgao/pi-subagents/src/ui/conversation-viewer.ts +10 -6
  15. package/node_modules/@herbertgao/pi-subagents/src/ui/viewer-keys.ts +47 -4
  16. package/node_modules/@narumitw/pi-btw/CHANGELOG.md +12 -0
  17. package/node_modules/@narumitw/pi-btw/dist/chunks/{main-tree-picker-WHRN26NJ.ts → main-tree-picker-3PXJARQW.ts} +59 -53
  18. package/node_modules/@narumitw/pi-btw/dist/chunks/main-tree-picker-3PXJARQW.ts.map +7 -0
  19. package/node_modules/@narumitw/pi-btw/dist/index.ts +1 -1
  20. package/node_modules/@narumitw/pi-btw/docs/main-tree-snapshots.md +39 -0
  21. package/node_modules/@narumitw/pi-btw/docs/workflows.md +1 -0
  22. package/node_modules/@narumitw/pi-btw/package.json +1 -1
  23. package/node_modules/@narumitw/pi-btw/src/main-tree-picker.ts +73 -63
  24. package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts +1 -4
  25. package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts.map +1 -1
  26. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +5620 -2946
  27. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
  28. package/node_modules/@pi-plugins/fast-mode/package.json +11 -11
  29. package/node_modules/pi-commandcode-provider/CHANGELOG.md +5 -0
  30. package/node_modules/pi-commandcode-provider/README.md +1 -1
  31. package/node_modules/pi-commandcode-provider/package.json +1 -1
  32. package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +5 -4
  33. package/node_modules/pi-commandcode-provider/src/pricing.ts +8 -2
  34. package/node_modules/pi-lens/CHANGELOG-USER.md +12 -12
  35. package/node_modules/pi-lens/CHANGELOG.md +212 -0
  36. package/node_modules/pi-lens/README.md +1 -0
  37. package/node_modules/pi-lens/dist/{chunk-W4CUK5G6.js → chunk-2HWVG3IM.js} +2 -2
  38. package/node_modules/pi-lens/dist/{chunk-B2YUE6YD.js → chunk-3EIZMRXI.js} +11 -11
  39. package/node_modules/pi-lens/dist/{chunk-Y3EHLUPL.js → chunk-3MHY4BQY.js} +4 -4
  40. package/node_modules/pi-lens/dist/{chunk-IDCTDKIA.js → chunk-3PMLYGJN.js} +6 -6
  41. package/node_modules/pi-lens/dist/{chunk-VPFRU5IG.js → chunk-3QMLB4TI.js} +3 -3
  42. package/node_modules/pi-lens/dist/{chunk-NL5LSKVD.js → chunk-3R3Z54J7.js} +10 -4
  43. package/node_modules/pi-lens/dist/chunk-3VWEZ6H2.js +72 -0
  44. package/node_modules/pi-lens/dist/{chunk-YT2VR4SL.js → chunk-5EEWCJG7.js} +7 -7
  45. package/node_modules/pi-lens/dist/{chunk-4NCDHTFI.js → chunk-5FDUKJZO.js} +10 -10
  46. package/node_modules/pi-lens/dist/{chunk-QUQY3IME.js → chunk-5KLRCUDT.js} +9 -8
  47. package/node_modules/pi-lens/dist/{chunk-FOEPIX76.js → chunk-6EIV3H7O.js} +158 -61
  48. package/node_modules/pi-lens/dist/{chunk-GMC4ZGYR.js → chunk-6EXGCXM5.js} +5 -5
  49. package/node_modules/pi-lens/dist/{chunk-CTB5BAJI.js → chunk-6GWCYEP7.js} +17 -16
  50. package/node_modules/pi-lens/dist/{chunk-NBM7PNBP.js → chunk-6JLNZ6DP.js} +37 -26
  51. package/node_modules/pi-lens/dist/{chunk-ACRJ2GZ5.js → chunk-7424ANRU.js} +2 -2
  52. package/node_modules/pi-lens/dist/{chunk-TJQSYX3J.js → chunk-75TVYCQW.js} +6 -6
  53. package/node_modules/pi-lens/dist/{chunk-J6BR5XN2.js → chunk-7BEADGAZ.js} +3 -3
  54. package/node_modules/pi-lens/dist/chunk-7KWI5UHL.js +28 -0
  55. package/node_modules/pi-lens/dist/{chunk-GUGKKGG7.js → chunk-7M64NTAK.js} +3 -3
  56. package/node_modules/pi-lens/dist/{chunk-SKVNHCT5.js → chunk-7T64QA5D.js} +48 -43
  57. package/node_modules/pi-lens/dist/{chunk-YQA34KAF.js → chunk-7ZVEFWOE.js} +11 -11
  58. package/node_modules/pi-lens/dist/{chunk-SJQUWQR6.js → chunk-AAIVSSUU.js} +2 -2
  59. package/node_modules/pi-lens/dist/{chunk-6I44EDNQ.js → chunk-AD7JDEI6.js} +17 -15
  60. package/node_modules/pi-lens/dist/{chunk-3FRI5H4T.js → chunk-AGEQRJ5A.js} +24 -10
  61. package/node_modules/pi-lens/dist/{chunk-NPNFGYLV.js → chunk-AVBEPUCD.js} +19 -2
  62. package/node_modules/pi-lens/dist/{chunk-OTSTS7L2.js → chunk-AYDE7RFV.js} +34 -3
  63. package/node_modules/pi-lens/dist/{chunk-UOO4D2TK.js → chunk-AZXTLZHE.js} +34 -35
  64. package/node_modules/pi-lens/dist/{chunk-AWQWXSW4.js → chunk-B4FAFEBP.js} +7 -2
  65. package/node_modules/pi-lens/dist/{chunk-S3WFVG5P.js → chunk-BEIPWPVR.js} +137 -126
  66. package/node_modules/pi-lens/dist/{chunk-CZAWWXP6.js → chunk-BMMRLJA4.js} +7 -5
  67. package/node_modules/pi-lens/dist/{chunk-QWTHFFU6.js → chunk-C6V2DSZZ.js} +12 -12
  68. package/node_modules/pi-lens/dist/chunk-CIA7X2PZ.js +26 -0
  69. package/node_modules/pi-lens/dist/{chunk-ZD4KVFXI.js → chunk-D2ZYRI7M.js} +172 -3
  70. package/node_modules/pi-lens/dist/{chunk-F6FT6BVQ.js → chunk-D6ANA6YU.js} +34 -35
  71. package/node_modules/pi-lens/dist/{chunk-HILZE4BQ.js → chunk-D7OEGXDX.js} +396 -306
  72. package/node_modules/pi-lens/dist/{chunk-FCQSZQAT.js → chunk-DFAY7JUN.js} +14 -5
  73. package/node_modules/pi-lens/dist/{chunk-DOUAWKLO.js → chunk-DIIDMDZU.js} +12 -12
  74. package/node_modules/pi-lens/dist/{chunk-6MDM5MQT.js → chunk-DZSQXG66.js} +394 -162
  75. package/node_modules/pi-lens/dist/{chunk-QGITU23N.js → chunk-E3PNZDPH.js} +1 -1
  76. package/node_modules/pi-lens/dist/{chunk-QSCZAP24.js → chunk-E5SSUV2A.js} +4 -4
  77. package/node_modules/pi-lens/dist/{chunk-H65TYP6V.js → chunk-ET3DSSFZ.js} +37 -21
  78. package/node_modules/pi-lens/dist/chunk-F7AMFFVK.js +22 -0
  79. package/node_modules/pi-lens/dist/{chunk-4ITEFRDH.js → chunk-FDLGJFAE.js} +37 -145
  80. package/node_modules/pi-lens/dist/{chunk-XAFZJEXY.js → chunk-FVQKX5KI.js} +23 -23
  81. package/node_modules/pi-lens/dist/{chunk-CYUJB552.js → chunk-G3LR6V6N.js} +18 -12
  82. package/node_modules/pi-lens/dist/{chunk-ZOPXB2KK.js → chunk-GHATCG2A.js} +111 -107
  83. package/node_modules/pi-lens/dist/{chunk-XVB3Q2PG.js → chunk-HGEE5LDW.js} +3 -2
  84. package/node_modules/pi-lens/dist/{chunk-UNBRHPHJ.js → chunk-HJWF7CGW.js} +17 -15
  85. package/node_modules/pi-lens/dist/chunk-HRQTYU2T.js +355 -0
  86. package/node_modules/pi-lens/dist/{chunk-QUPYLQA4.js → chunk-HSTN27NR.js} +14 -9
  87. package/node_modules/pi-lens/dist/{chunk-YF4G5NN5.js → chunk-HWMNTQBJ.js} +2 -2
  88. package/node_modules/pi-lens/dist/{chunk-K6WIBVMK.js → chunk-HYDJUVOE.js} +8 -9
  89. package/node_modules/pi-lens/dist/{chunk-OPFNQBS5.js → chunk-HYR25MV3.js} +21 -25
  90. package/node_modules/pi-lens/dist/{chunk-MAD4QJTP.js → chunk-IC4L65U7.js} +21 -17
  91. package/node_modules/pi-lens/dist/{chunk-I32RSMH6.js → chunk-ILC2B7IJ.js} +11 -10
  92. package/node_modules/pi-lens/dist/{chunk-BGLS5SDN.js → chunk-IT7MFVGP.js} +2 -2
  93. package/node_modules/pi-lens/dist/{chunk-KDCIG23C.js → chunk-IZ36G463.js} +13 -9
  94. package/node_modules/pi-lens/dist/{chunk-ALIZWXHZ.js → chunk-JKAVKTMY.js} +9 -9
  95. package/node_modules/pi-lens/dist/{chunk-3HM4BUHR.js → chunk-JLMS7EMD.js} +16 -15
  96. package/node_modules/pi-lens/dist/{chunk-HSYFLOZY.js → chunk-JRSS6KM4.js} +3 -3
  97. package/node_modules/pi-lens/dist/{chunk-VCRVNLE7.js → chunk-K2GV34T2.js} +9 -1
  98. package/node_modules/pi-lens/dist/{chunk-KJ3AHOCK.js → chunk-K2LD6YNH.js} +10 -10
  99. package/node_modules/pi-lens/dist/chunk-KUDUKKQE.js +89 -0
  100. package/node_modules/pi-lens/dist/{chunk-7JX3RNG4.js → chunk-KXDQD34C.js} +1 -1
  101. package/node_modules/pi-lens/dist/{chunk-VGTBLTPN.js → chunk-LD7SXICE.js} +18 -66
  102. package/node_modules/pi-lens/dist/{chunk-UY745U35.js → chunk-ME6MF2N2.js} +1 -1
  103. package/node_modules/pi-lens/dist/{chunk-QHOTTC4A.js → chunk-MOEWCPMC.js} +2 -2
  104. package/node_modules/pi-lens/dist/{chunk-JZQGRARR.js → chunk-MV6ST2KT.js} +15 -12
  105. package/node_modules/pi-lens/dist/{chunk-QL37SGTS.js → chunk-NCDH2JB7.js} +18 -18
  106. package/node_modules/pi-lens/dist/{chunk-AON2QIJF.js → chunk-NRVWLTOY.js} +20 -17
  107. package/node_modules/pi-lens/dist/chunk-NZINZCHB.js +108 -0
  108. package/node_modules/pi-lens/dist/{chunk-A5TEJZGJ.js → chunk-O6LCSHHI.js} +1 -1
  109. package/node_modules/pi-lens/dist/{chunk-PTSA6QKL.js → chunk-OEPWTSUG.js} +8 -8
  110. package/node_modules/pi-lens/dist/{chunk-QMV2APEH.js → chunk-OF2YGDUE.js} +36 -36
  111. package/node_modules/pi-lens/dist/{chunk-GTTMQ6XB.js → chunk-OHEUOWYT.js} +1 -1
  112. package/node_modules/pi-lens/dist/{chunk-GVWIU7M7.js → chunk-ORYQGVC3.js} +41 -4
  113. package/node_modules/pi-lens/dist/{chunk-KSTQ4VXT.js → chunk-OVPR3GQ6.js} +10 -13
  114. package/node_modules/pi-lens/dist/{chunk-MN635QYA.js → chunk-OYXD2MOM.js} +3 -3
  115. package/node_modules/pi-lens/dist/{chunk-TN5CWX5D.js → chunk-PCREZ4HJ.js} +34 -35
  116. package/node_modules/pi-lens/dist/{chunk-SG2JQ2YP.js → chunk-PK3GDU4M.js} +1 -1
  117. package/node_modules/pi-lens/dist/{chunk-NE4EFHJX.js → chunk-PPYUBO6Y.js} +2 -2
  118. package/node_modules/pi-lens/dist/{chunk-DVRJBQOJ.js → chunk-PTJXMYRY.js} +19 -20
  119. package/node_modules/pi-lens/dist/{chunk-TYHOEX4V.js → chunk-PXGVB2CY.js} +36 -39
  120. package/node_modules/pi-lens/dist/{chunk-LT62P654.js → chunk-QJ4T73J5.js} +1 -1
  121. package/node_modules/pi-lens/dist/{chunk-2LVJQU3I.js → chunk-QY6J2FTK.js} +33 -29
  122. package/node_modules/pi-lens/dist/{chunk-ZZDVGCGG.js → chunk-R67WQ5RY.js} +9 -9
  123. package/node_modules/pi-lens/dist/{chunk-Q2VCKC3X.js → chunk-S6ZQFPOX.js} +11 -8
  124. package/node_modules/pi-lens/dist/{chunk-KFRDFAOE.js → chunk-SF7KSXB5.js} +7 -7
  125. package/node_modules/pi-lens/dist/{chunk-CZCAZVTD.js → chunk-SRXYSLMW.js} +2 -2
  126. package/node_modules/pi-lens/dist/{chunk-WS3UFJOU.js → chunk-SUIZOCSY.js} +3 -2
  127. package/node_modules/pi-lens/dist/{chunk-NUSXS6YB.js → chunk-T5EGSBM2.js} +4 -4
  128. package/node_modules/pi-lens/dist/{chunk-V7F7JHS5.js → chunk-T6PPK3T6.js} +563 -554
  129. package/node_modules/pi-lens/dist/chunk-TM3A3K7T.js +28 -0
  130. package/node_modules/pi-lens/dist/{chunk-RQRKIRFY.js → chunk-TOOXNL6M.js} +8 -8
  131. package/node_modules/pi-lens/dist/chunk-TS5EIWEF.js +25 -0
  132. package/node_modules/pi-lens/dist/chunk-VD7MQFEV.js +56 -0
  133. package/node_modules/pi-lens/dist/{chunk-2ADRLTM2.js → chunk-VU2PRGRI.js} +6 -35
  134. package/node_modules/pi-lens/dist/chunk-W6VLB6LL.js +145 -0
  135. package/node_modules/pi-lens/dist/{chunk-CB7PEVOJ.js → chunk-WLD6BGON.js} +176 -60
  136. package/node_modules/pi-lens/dist/{chunk-C6AODRNU.js → chunk-WTSQKJAR.js} +11 -10
  137. package/node_modules/pi-lens/dist/{chunk-46TQJSUE.js → chunk-X33QECRJ.js} +2 -2
  138. package/node_modules/pi-lens/dist/{chunk-B6HXETWY.js → chunk-Y7XMKBFP.js} +28 -26
  139. package/node_modules/pi-lens/dist/{chunk-TLWFZ66Y.js → chunk-YLHJWAQS.js} +4 -4
  140. package/node_modules/pi-lens/dist/{chunk-BRESRQBE.js → chunk-YLW26OHX.js} +8 -8
  141. package/node_modules/pi-lens/dist/{chunk-IL6PIV33.js → chunk-YTXFNCVN.js} +2 -2
  142. package/node_modules/pi-lens/dist/chunk-YULIERZW.js +27 -0
  143. package/node_modules/pi-lens/dist/chunk-Z2W5YJBW.js +25 -0
  144. package/node_modules/pi-lens/dist/{chunk-XPGH5O74.js → chunk-Z6WTLVUL.js} +30 -39
  145. package/node_modules/pi-lens/dist/{chunk-W7TY6HYX.js → chunk-ZRQMENT4.js} +5 -27
  146. package/node_modules/pi-lens/dist/{chunk-E4VXKTBR.js → chunk-ZWZD4TJ5.js} +163 -173
  147. package/node_modules/pi-lens/dist/index.js +6405 -4497
  148. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +17 -13
  149. package/node_modules/pi-lens/dist/mcp/cli.js +42 -43
  150. package/node_modules/pi-lens/dist/mcp/server.js +1520 -608
  151. package/node_modules/pi-lens/dist/mcp/worker.js +62 -61
  152. package/node_modules/pi-lens/dist/probes/installer.js +19 -18
  153. package/node_modules/pi-lens/docs/agent-guide.md +3 -1
  154. package/node_modules/pi-lens/docs/agent-tools.md +57 -13
  155. package/node_modules/pi-lens/docs/alignment-families.md +5 -1
  156. package/node_modules/pi-lens/docs/ci.md +120 -0
  157. package/node_modules/pi-lens/docs/configuration.md +24 -6
  158. package/node_modules/pi-lens/docs/custom-rules.md +1 -0
  159. package/node_modules/pi-lens/docs/defect-shapes.md +107 -71
  160. package/node_modules/pi-lens/docs/durable-store-audit-1202.md +1 -1
  161. package/node_modules/pi-lens/docs/engineering-principles.md +46 -12
  162. package/node_modules/pi-lens/docs/environment-variables.md +25 -2
  163. package/node_modules/pi-lens/docs/features.md +1 -1
  164. package/node_modules/pi-lens/docs/globalconfig.md +8 -1
  165. package/node_modules/pi-lens/docs/invariants/dispatch-runners.md +13 -0
  166. package/node_modules/pi-lens/docs/invariants/lsp-trust-exec.md +7 -0
  167. package/node_modules/pi-lens/docs/language-coverage.md +1 -1
  168. package/node_modules/pi-lens/docs/lsp-capability-matrix.md +15 -16
  169. package/node_modules/pi-lens/docs/lsp-idle-eviction.md +1 -1
  170. package/node_modules/pi-lens/docs/mcp.md +2 -1
  171. package/node_modules/pi-lens/docs/module-report-read-symbol.md +2 -2
  172. package/node_modules/pi-lens/docs/pi-lens-fixer.md +3 -2
  173. package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +1 -0
  174. package/node_modules/pi-lens/docs/pi-lens-monitor.md +4 -1
  175. package/node_modules/pi-lens/docs/pi-lens-release.md +19 -0
  176. package/node_modules/pi-lens/docs/pi-lens-reviewer.md +8 -2
  177. package/node_modules/pi-lens/docs/public-api-stability.md +41 -6
  178. package/node_modules/pi-lens/docs/rfcs/5138-query-surface.md +121 -0
  179. package/node_modules/pi-lens/docs/servercapabilities.md +1 -1
  180. package/node_modules/pi-lens/docs/settings.md +9 -0
  181. package/node_modules/pi-lens/docs/usage.md +1 -1
  182. package/node_modules/pi-lens/docs/word-index.md +9 -10
  183. package/node_modules/pi-lens/package.json +3 -3
  184. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/README.md +2 -0
  185. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/dont-call-system-c.yml +2 -1
  186. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/file-access-before-action-c.yml +2 -1
  187. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/file-stat-before-action-c.yml +2 -1
  188. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/insecure-hash-c.yml +2 -1
  189. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/libxml2-audit-parser-c.yml +2 -1
  190. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/null-library-function-c.yml +2 -1
  191. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/sizeof-this-c.yml +2 -1
  192. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/small-key-size-c.yml +2 -1
  193. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/world-writable-file-c.yml +2 -1
  194. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/dont-call-system-cpp.yml +2 -1
  195. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/file-access-before-action-cpp.yml +2 -1
  196. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/file-stat-before-action-cpp.yml +2 -1
  197. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/fix-format-security-error-cpp.yml +2 -1
  198. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/insecure-hash-cpp.yml +2 -1
  199. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/libxml2-audit-parser-cpp.yml +2 -1
  200. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/missing-nul-cpp-string-memcpy-cpp.yml +2 -1
  201. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/null-library-function-cpp.yml +2 -1
  202. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/return-c-str-cpp.yml +2 -1
  203. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/sizeof-this-cpp.yml +2 -1
  204. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/small-key-size-cpp.yml +2 -1
  205. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/std-return-data-cpp.yml +2 -1
  206. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/std-vector-invalidation-cpp.yml +2 -1
  207. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/string-view-temporary-string-cpp.yml +2 -1
  208. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/world-writable-file-cpp.yml +2 -1
  209. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/httponly-false-csharp.yml +2 -1
  210. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/insecure-binaryformatter-deserialization-csharp.yml +2 -1
  211. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-decode-without-verify-csharp.yml +2 -1
  212. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-hardcoded-secret-csharp.yml +2 -1
  213. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-tokenvalidationparameters-no-expiry-validation-csharp.yml +2 -1
  214. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/networkcredential-hardcoded-secret-python.yml +2 -1
  215. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/npgsqlconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
  216. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/oracleconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
  217. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/sqlconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
  218. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/stacktrace-disclosure-csharp.yml +2 -1
  219. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/use-ecb-mode-csharp.yml +2 -1
  220. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/avoid-bind-to-all-interfaces-go.yml +2 -1
  221. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/gorilla-cookie-store-hardcoded-session-key-go.yml +2 -1
  222. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/gorilla-csrf-hardcoded-auth-key-go.yml +2 -1
  223. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/grpc-client-insecure-connection-go.yml +2 -1
  224. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/jwt-go-none-algorithm-go.yml +2 -1
  225. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/missing-ssl-minversion-go.yml +2 -1
  226. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/openai-empty-secret-go.yml +2 -1
  227. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/openai-hardcoded-secret-go.yml +2 -1
  228. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/ssl-v3-is-insecure-go.yml +2 -1
  229. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/tls-with-insecure-cipher-go.yml +2 -1
  230. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/use-of-weak-rsa-key-go.yml +2 -1
  231. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/html/security/plaintext-http-link-html.yml +2 -1
  232. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cbc-padding-oracle-java.yml +2 -1
  233. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-httponly-false-java.yml +2 -1
  234. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-httponly-java.yml +2 -1
  235. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-samesite-java.yml +2 -1
  236. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-secure-flag-java.yml +2 -1
  237. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-secure-flag-false-java.yml +2 -1
  238. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/datanucleus-hardcoded-connection-password-java.yml +2 -1
  239. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/des-is-deprecated-java.yml +2 -1
  240. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/desede-is-deprecated-java.yml +2 -1
  241. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-disallow-doctype-decl-false-java.yml +2 -1
  242. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-external-general-entities-true-java.yml +2 -1
  243. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-external-parameter-entities-true-java.yml +2 -1
  244. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/drivermanager-hardcoded-secret-java.yml +2 -1
  245. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/ecb-cipher-java.yml +2 -1
  246. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/hardcoded-connection-password-java.yml +2 -1
  247. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/hardcoded-secret-in-credentials-java.yml +2 -1
  248. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/java-jwt-hardcoded-secret-java.yml +2 -1
  249. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/jedis-jedisclientconfig-hardcoded-password-java.yml +2 -1
  250. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/jedis-jedisfactory-hardcoded-password-java.yml +2 -1
  251. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/missing-httponly-java.yml +2 -1
  252. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/missing-secure-java.yml +2 -1
  253. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/no-null-cipher-java.yml +2 -1
  254. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/passwordauthentication-hardcoded-password-java.yml +2 -1
  255. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/rsa-no-padding-java.yml +2 -1
  256. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/simple-command-injection-direct-input-java.yml +2 -1
  257. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/system-setproperty-hardcoded-secret-java.yml +2 -1
  258. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/unencrypted-socket-java.yml +2 -1
  259. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-aes-ecb-java.yml +2 -1
  260. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-blowfish-java.yml +2 -1
  261. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-default-aes-java.yml +2 -1
  262. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-md5-digest-utils-java.yml +2 -1
  263. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-md5-java.yml +2 -1
  264. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-rc2-java.yml +2 -1
  265. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-rc4-java.yml +2 -1
  266. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-sha1-java.yml +2 -1
  267. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/weak-ssl-context-java.yml +2 -1
  268. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/detect-angular-sce-disabled-javascript.yml +2 -1
  269. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/express-jwt-hardcoded-secret-javascript.yml +2 -1
  270. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/express-session-hardcoded-secret-javascript.yml +2 -1
  271. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/jwt-simple-noverify-javascript.yml +2 -1
  272. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-rsa-weak-key-javascript.yml +2 -1
  273. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-sequelize-empty-password-argument-javascript.yml +2 -1
  274. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-sequelize-hardcoded-secret-argument-javascript.yml +2 -1
  275. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/des-is-deprecated-kotlin.yml +2 -1
  276. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/desede-is-deprecated-kotlin.yml +2 -1
  277. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/jwt-hardcode-kotlin.yml +2 -1
  278. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/rsa-no-padding-kotlin.yml +2 -1
  279. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/system-setproperty-hardcoded-secret-kotlin.yml +2 -1
  280. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/php/security/openssl-cbc-static-iv-php.yml +2 -1
  281. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/php/security/search-active-debug-php.yml +2 -1
  282. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/avoid-mktemp-python.yml +2 -1
  283. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/avoid_app_run_with_bad_host-python.yml +2 -1
  284. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/debug-enabled-python.yml +2 -1
  285. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/hashids-with-django-secret-python.yml +2 -1
  286. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/hashids-with-flask-secret-python.yml +2 -1
  287. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/insecure-cipher-algorithm-rc4-python.yml +2 -1
  288. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/jwt-python-hardcoded-secret-python.yml +2 -1
  289. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/openai-hardcoded-secret-python.yml +2 -1
  290. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-cassandra-empty-password-python.yml +2 -1
  291. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-cassandra-hardcoded-secret-python.yml +2 -1
  292. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-couchbase-empty-password-python.yml +2 -1
  293. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-couchbase-hardcoded-secret-python.yml +2 -1
  294. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-elasticsearch-hardcoded-bearer-auth-python.yml +2 -1
  295. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-ldap3-empty-password-python.yml +2 -1
  296. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-ldap3-hardcoded-secret-python.yml +2 -1
  297. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mariadb-empty-password-python.yml +2 -1
  298. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mariadb-hardcoded-secret-python.yml +2 -1
  299. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysql-empty-password-python.yml +2 -1
  300. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysql-hardcoded-secret-python.yml +2 -1
  301. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysqlclient-empty-password-python.yml +2 -1
  302. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysqlclient-hardcoded-secret-python.yml +2 -1
  303. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-neo4j-empty-password-python.yml +2 -1
  304. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-neo4j-hardcoded-secret-python.yml +2 -1
  305. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-mysql-empty-password-python.yml +2 -1
  306. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-mysql-hardcoded-secret-python.yml +2 -1
  307. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-pg-empty-password-python.yml +2 -1
  308. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-pg-hardcoded-secret-python.yml +2 -1
  309. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pg8000-empty-password-python.yml +2 -1
  310. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pg8000-hardcoded-secret-python.yml +2 -1
  311. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-psycopg2-empty-password-python.yml +2 -1
  312. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-psycopg2-hardcoded-secret-python.yml +2 -1
  313. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pyjwt-hardcoded-secret-python.yml +2 -1
  314. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymongo-empty-password-python.yml +2 -1
  315. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymongo-hardcoded-secret-python.yml +2 -1
  316. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymssql-empty-password-python.yml +2 -1
  317. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymssql-hardcoded-secret-python.yml +2 -1
  318. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymysql-empty-password-python.yml +2 -1
  319. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymysql-hardcoded-secret-python.yml +2 -1
  320. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-redis-empty-password-python.yml +2 -1
  321. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-redis-hardcoded-secret-python.yml +2 -1
  322. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-empty-password-python.yml +2 -1
  323. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-hardcoded-secret-python.yml +2 -1
  324. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-oauth-hardcoded-secret-python.yml +2 -1
  325. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-tormysql-empty-password-python.yml +2 -1
  326. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-tormysql-hardcoded-secret-python.yml +2 -1
  327. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-urllib3-hardcoded-secret-python.yml +2 -1
  328. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-webrepl-empty-password-python.yml +2 -1
  329. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-webrepl-hardcoded-secret-python.yml +2 -1
  330. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/force-ssl-false-ruby.yml +2 -1
  331. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/hardcoded-http-auth-in-controller-ruby.yml +2 -1
  332. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/hardcoded-secret-rsa-passphrase-ruby.yml +2 -1
  333. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/insufficient-rsa-key-size-ruby.yml +2 -1
  334. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-aws-sdk-hardcoded-secret-ruby.yml +2 -1
  335. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-cassandra-empty-password-ruby.yml +2 -1
  336. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-cassandra-hardcoded-secret-ruby.yml +2 -1
  337. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-excon-hardcoded-secret-ruby.yml +2 -1
  338. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-faraday-hardcoded-secret-ruby.yml +2 -1
  339. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mongo-empty-password-ruby.yml +2 -1
  340. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mongo-hardcoded-secret-ruby.yml +2 -1
  341. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mysql2-empty-password-ruby.yml +2 -1
  342. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mysql2-hardcoded-secret-ruby.yml +2 -1
  343. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-octokit-hardcoded-secret-ruby.yml +2 -1
  344. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-pg-empty-password-ruby.yml +2 -1
  345. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-pg-hardcoded-secret-ruby.yml +2 -1
  346. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-redis-empty-password-ruby.yml +2 -1
  347. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-redis-hardcoded-secret-ruby.yml +2 -1
  348. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/empty-password-rust.yml +2 -1
  349. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/hardcoded-password-rust.yml +2 -1
  350. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/postgres-empty-password-rust.yml +2 -1
  351. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/reqwest-accept-invalid-rust.yml +2 -1
  352. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/secrets-reqwest-hardcoded-auth-rust.yml +2 -1
  353. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/ssl-verify-none-rust.yml +2 -1
  354. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/tokio-postgres-empty-password-rust.yml +2 -1
  355. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/tokio-postgres-hardcoded-password-rust.yml +2 -1
  356. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/scala/security/jwt-scala-hardcode-scala.yml +2 -1
  357. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/scala/security/scala-jwt-hardcoded-secret-scala.yml +2 -1
  358. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/aes-hardcoded-secret-swift.yml +2 -1
  359. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/blowfish-hardcoded-secret-swift.yml +2 -1
  360. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/chacha20-hardcoded-secret-swift.yml +2 -1
  361. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/insecure-biometrics-swift.yml +2 -1
  362. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/rabbit-hardcoded-secret-swift.yml +2 -1
  363. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/detect-angular-sce-disabled-typescript.yml +2 -1
  364. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/express-session-hardcoded-secret-typescript.yml +2 -1
  365. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/jwt-simple-noverify-typescript.yml +2 -1
  366. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-rsa-weak-key-typescript.yml +2 -1
  367. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-sequelize-empty-password-argument-typescript.yml +2 -1
  368. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-sequelize-hardcoded-secret-argument-typescript.yml +2 -1
  369. package/node_modules/pi-lens/rules/ast-grep-rules/rule-schema.json +1 -1
  370. package/node_modules/pi-lens/rules/ast-grep-rules/rules/c-no-malloc-free.yml +13 -12
  371. package/node_modules/pi-lens/rules/ast-grep-rules/rules/cpp-no-malloc-free.yml +11 -10
  372. package/node_modules/pi-lens/rules/ast-grep-rules/rules/cpp-no-printf.yml +10 -9
  373. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-defer-func-call-antipattern.yml +14 -13
  374. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-no-fmt-println.yml +14 -13
  375. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-no-panic-in-lib.yml +20 -19
  376. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-no-underscore-func-name.yml +14 -13
  377. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-prefer-errors-is.yml +14 -13
  378. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-prefer-string-builder.yml +19 -18
  379. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-test-functions.yml +14 -13
  380. package/node_modules/pi-lens/rules/ast-grep-rules/rules/hyphenated-svg-attribute.yml +10 -9
  381. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-lateinit.yml +12 -11
  382. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-nullable-boolean.yml +11 -10
  383. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-println.yml +15 -14
  384. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-unnecessary-let.yml +10 -9
  385. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-unsafe-cast.yml +10 -9
  386. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-var.yml +11 -10
  387. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-prefer-data-class.yml +10 -9
  388. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-prefer-is-empty.yml +10 -9
  389. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-aws-access-key-literal.yml +1 -1
  390. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-compile-call.yml +13 -12
  391. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-flask-secret-key-literal.yml +1 -1
  392. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-hardcoded-password.yml +1 -1
  393. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-marshal-load.yml +12 -11
  394. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-python-sql-string-concat.yml +12 -11
  395. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-requests-verify-false.yml +13 -12
  396. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-secret-in-env-var-name.yml +1 -1
  397. package/node_modules/pi-lens/rules/ast-grep-rules/rules/python-optional-type.yml +9 -8
  398. package/node_modules/pi-lens/rules/ast-grep-rules/rules/reducible-list-comprehension.yml +8 -7
  399. package/node_modules/pi-lens/rules/ast-grep-rules/rules/ruby-detect-path-traversal.yml +14 -13
  400. package/node_modules/pi-lens/rules/ast-grep-rules/rules/ruby-symbol-to-proc-candidate.yml +8 -7
  401. package/node_modules/pi-lens/rules/ast-grep-rules/rules/rust-no-chars-enumerate.yml +9 -8
  402. package/node_modules/pi-lens/rules/ast-grep-rules/rules-disabled/gorm-unbounded-preload.yml +7 -6
  403. package/node_modules/pi-lens/rules/ast-grep-rules/rules-disabled/shadow-err-variable.yml +6 -5
  404. package/node_modules/pi-lens/scripts/analyze-pi-lens-logs.mjs +262 -3
  405. package/node_modules/pi-lens/scripts/lib/latency-log-phases.mjs +125 -0
  406. package/package.json +8 -8
  407. package/node_modules/@narumitw/pi-btw/dist/chunks/main-tree-picker-WHRN26NJ.ts.map +0 -7
  408. package/node_modules/pi-lens/dist/chunk-3QWVOBZJ.js +0 -73
  409. package/node_modules/pi-lens/dist/chunk-7WJ55KBN.js +0 -162
  410. package/node_modules/pi-lens/dist/chunk-BDR5MEZY.js +0 -25
  411. package/node_modules/pi-lens/dist/chunk-CKEQFGLT.js +0 -32
  412. package/node_modules/pi-lens/dist/chunk-DBS736MA.js +0 -57
  413. package/node_modules/pi-lens/dist/chunk-I74RQGKA.js +0 -88
  414. package/node_modules/pi-lens/dist/chunk-IK4YS3KC.js +0 -25
  415. package/node_modules/pi-lens/dist/chunk-JKOZ2Z4U.js +0 -20
  416. package/node_modules/pi-lens/dist/chunk-TQHOKMVZ.js +0 -28
  417. package/node_modules/pi-lens/dist/chunk-VS2L7QDI.js +0 -25
  418. package/node_modules/pi-lens/dist/chunk-WAA63ZJV.js +0 -140
  419. package/node_modules/pi-lens/dist/chunk-ZPFLHB3R.js +0 -28
@@ -1,48 +1,54 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  getScratchTreeDirNames
4
- } from "./chunk-SJQUWQR6.js";
4
+ } from "./chunk-AAIVSSUU.js";
5
5
  import {
6
6
  SecurityScanClient
7
- } from "./chunk-VGTBLTPN.js";
8
- import "./chunk-4ITEFRDH.js";
7
+ } from "./chunk-LD7SXICE.js";
9
8
  import {
10
- resolveOpengrepConfig
11
- } from "./chunk-NE4EFHJX.js";
9
+ runReportScan
10
+ } from "./chunk-NZINZCHB.js";
11
+ import "./chunk-FDLGJFAE.js";
12
12
  import {
13
- scannerReportParentDir
14
- } from "./chunk-LT62P654.js";
13
+ resolveOpengrepConfig
14
+ } from "./chunk-PPYUBO6Y.js";
15
+ import "./chunk-QJ4T73J5.js";
15
16
  import {
16
17
  stripPackRuleIdPrefix
17
- } from "./chunk-SG2JQ2YP.js";
18
- import "./chunk-VPFRU5IG.js";
19
- import "./chunk-NPNFGYLV.js";
18
+ } from "./chunk-PK3GDU4M.js";
19
+ import "./chunk-W6VLB6LL.js";
20
+ import "./chunk-3QMLB4TI.js";
21
+ import "./chunk-AVBEPUCD.js";
20
22
  import {
21
23
  safeSpawnAsync
22
- } from "./chunk-H65TYP6V.js";
23
- import "./chunk-AWQWXSW4.js";
24
- import "./chunk-FOEPIX76.js";
25
- import "./chunk-NL5LSKVD.js";
26
- import "./chunk-7WJ55KBN.js";
24
+ } from "./chunk-ET3DSSFZ.js";
25
+ import "./chunk-B4FAFEBP.js";
26
+ import "./chunk-6EIV3H7O.js";
27
+ import "./chunk-3R3Z54J7.js";
28
+ import "./chunk-HRQTYU2T.js";
27
29
  import {
30
+ LEDGER_FIELD_MAX,
28
31
  recordDegradationOnce
29
- } from "./chunk-3FRI5H4T.js";
32
+ } from "./chunk-AGEQRJ5A.js";
30
33
  import "./chunk-S26LC76R.js";
31
- import "./chunk-VCRVNLE7.js";
34
+ import "./chunk-K2GV34T2.js";
32
35
  import "./chunk-LJDODBBZ.js";
33
36
  import {
34
37
  realpathOrResolve
35
- } from "./chunk-CB7PEVOJ.js";
38
+ } from "./chunk-WLD6BGON.js";
36
39
  import "./chunk-NXL4FFQQ.js";
37
40
 
38
41
  // dist/clients/opengrep-client.js
39
- import * as fs from "node:fs";
40
42
  import * as path from "node:path";
41
- import { mkdtempSync } from "node:fs";
42
43
  var EMPTY_RESULT = {
43
44
  success: false,
44
45
  findings: []
45
46
  };
47
+ var OPENGREP_FAILURE_REASONS = {
48
+ "spawn-error": "spawn-failed",
49
+ "no-report": "no-report",
50
+ crashed: "crashed"
51
+ };
46
52
  var SCAN_TIMEOUT_MS = 18e4;
47
53
  var OpengrepClient = class _OpengrepClient extends SecurityScanClient {
48
54
  constructor(verbose = false) {
@@ -82,15 +88,12 @@ var OpengrepClient = class _OpengrepClient extends SecurityScanClient {
82
88
  }
83
89
  return this.dedupeScan(targetDir, () => this.runScan(targetDir));
84
90
  }
85
- async runScan(cwd) {
86
- const scannedAt = (/* @__PURE__ */ new Date()).toISOString();
91
+ runScan(cwd) {
87
92
  const bin = this.binaryPath ?? "opengrep";
88
93
  const resolved = _OpengrepClient.resolveConfig(cwd);
89
94
  const packPath = resolved.source === "pack" ? resolved.configArg : void 0;
90
- const outDir = mkdtempSync(path.join(scannerReportParentDir(), "pi-lens-opengrep-"));
91
- const reportPath = path.join(outDir, "opengrep-report.json");
92
- try {
93
- const result = await safeSpawnAsync(bin, [
95
+ return runReportScan("opengrep", {
96
+ spawn: ({ reportPath }) => safeSpawnAsync(bin, [
94
97
  "scan",
95
98
  "--config",
96
99
  resolved.configArg ?? "auto",
@@ -117,90 +120,91 @@ var OpengrepClient = class _OpengrepClient extends SecurityScanClient {
117
120
  pattern
118
121
  ]),
119
122
  cwd
120
- ], { cwd, timeout: SCAN_TIMEOUT_MS });
121
- if (result.error) {
122
- this.log(`Scan error: ${result.error.message}`);
123
- const reason = `${result.failure ?? "spawn-failed"}: ${result.error.message}`;
124
- this.recordRefusal(cwd, reason, result.status);
123
+ ], { cwd, timeout: SCAN_TIMEOUT_MS }),
124
+ // The report's own content is the verdict, whatever the exit status
125
+ // (#5411: the policy `runReportScan` gives gitleaks and trivy): opengrep
126
+ // runs with `--no-error`, and an error that matters is in the report's
127
+ // `errors`, which `readOpengrepReport` refuses or marks partial.
128
+ parse: (raw, scannedAt, run) => {
129
+ const report = readOpengrepReport(raw);
130
+ if (report.verdict === "refused") {
131
+ this.recordRefusal(cwd, report.reason, run.status);
132
+ return {
133
+ ...EMPTY_RESULT,
134
+ scannedAt,
135
+ reason: "refused",
136
+ summary: report.reason.slice(0, LEDGER_FIELD_MAX)
137
+ };
138
+ }
139
+ if (report.partial) {
140
+ recordDegradationOnce({
141
+ kind: "opengrep-partial-scan",
142
+ subject: cwd,
143
+ reason: report.partial.reason,
144
+ metadata: { status: run.status }
145
+ });
146
+ }
125
147
  return {
126
- ...EMPTY_RESULT,
127
- scannedAt,
128
- reason: "spawn-failed",
129
- summary: reason.slice(0, 200)
148
+ success: true,
149
+ // A warning-level partial report with no scanned paths proves that
150
+ // the producer went cold. A complete empty report still proves a
151
+ // genuine scan, so it is still "analysed" for the render layer's
152
+ // analysed-and-found-nothing state (#2970) — but it carries no
153
+ // FILE-level authority, which `analyzedFiles: []` below is what
154
+ // says.
155
+ analyzed: !report.partial || report.scanned.length > 0,
156
+ // #2962: the set is ALWAYS carried, empty included. "This producer
157
+ // declared its coverage and it was zero files" and "this producer
158
+ // declares no coverage at all" are different facts; dropping the
159
+ // empty array collapses them into the second, and the second is
160
+ // what hands a zero-file scan whole-root retirement authority
161
+ // downstream (`runnerRetirementDecision`, tools/lens-diagnostics.ts).
162
+ analyzedFiles: report.scanned.map((file) => realpathOrResolve(path.resolve(cwd, file))),
163
+ ...report.partial ? { partial: true } : {},
164
+ ...report.partial ? { summary: report.partial.reason } : {},
165
+ ...report.partial && report.scanned.length === 0 ? { reason: "partial-no-paths" } : {},
166
+ // The cached pack is loaded from a path, so Opengrep prefixes its rule
167
+ // ids with it; report the registry-form id instead.
168
+ findings: packPath ? report.findings.map((finding) => ({
169
+ ...finding,
170
+ checkId: stripPackRuleIdPrefix(finding.checkId, packPath)
171
+ })) : report.findings,
172
+ scannedAt
130
173
  };
131
- }
132
- if (!fs.existsSync(reportPath)) {
133
- const reason = (result.stderr ?? "").trim().split("\n")[0] || "no report produced";
134
- this.recordRefusal(cwd, reason, result.status);
135
- return {
136
- ...EMPTY_RESULT,
137
- scannedAt,
138
- reason: "no-report",
139
- summary: reason
140
- };
141
- }
142
- const raw = fs.readFileSync(reportPath, "utf-8");
143
- const report = readOpengrepReport(raw);
144
- if (report.verdict === "refused" || result.status !== 0) {
145
- const reason = report.verdict === "refused" ? report.reason : `opengrep exited with status ${result.status}`;
146
- this.recordRefusal(cwd, reason, result.status);
147
- return {
148
- ...EMPTY_RESULT,
149
- scannedAt,
150
- reason: "refused",
151
- summary: reason.slice(0, 200)
152
- };
153
- }
154
- if (report.partial) {
155
- recordDegradationOnce({
156
- kind: "opengrep-partial-scan",
157
- subject: cwd,
158
- reason: report.partial.reason,
159
- metadata: { status: result.status }
160
- });
161
- }
162
- return {
174
+ },
175
+ fail: (failure) => failure.success ? {
176
+ // A zero exit that wrote no report is an empty run, and it claims
177
+ // no coverage: `analyzed: false` and an empty declared set, so the
178
+ // render layer shows `opengrep — not run (<summary>)` and a zero-file
179
+ // scan never carries whole-root retirement authority (#2962).
163
180
  success: true,
164
- // A warning-level partial report with no scanned paths proves that
165
- // the producer went cold. A complete empty report still proves a
166
- // genuine scan, so it is still "analysed" for the render layer's
167
- // analysed-and-found-nothing state (#2970) — but it carries no
168
- // FILE-level authority, which `analyzedFiles: []` below is what
169
- // says.
170
- analyzed: !report.partial || report.scanned.length > 0,
171
- // #2962: the set is ALWAYS carried, empty included. "This producer
172
- // declared its coverage and it was zero files" and "this producer
173
- // declares no coverage at all" are different facts; dropping the
174
- // empty array collapses them into the second, and the second is
175
- // what hands a zero-file scan whole-root retirement authority
176
- // downstream (`runnerRetirementDecision`, tools/lens-diagnostics.ts).
177
- analyzedFiles: report.scanned.map((file) => realpathOrResolve(path.resolve(cwd, file))),
178
- ...report.partial ? { partial: true } : {},
179
- ...report.partial ? { summary: report.partial.reason } : {},
180
- ...report.partial && report.scanned.length === 0 ? { reason: "partial-no-paths" } : {},
181
- // The cached pack is loaded from a path, so Opengrep prefixes its rule
182
- // ids with it; report the registry-form id instead.
183
- findings: packPath ? report.findings.map((finding) => ({
184
- ...finding,
185
- checkId: stripPackRuleIdPrefix(finding.checkId, packPath)
186
- })) : report.findings,
187
- scannedAt
188
- };
189
- } catch (err) {
190
- const reason = err instanceof Error ? err.message : String(err);
191
- this.recordRefusal(cwd, reason, void 0);
192
- return {
193
- ...EMPTY_RESULT,
194
- scannedAt,
195
- reason: "crashed",
196
- summary: reason.slice(0, 200)
197
- };
198
- } finally {
199
- try {
200
- fs.rmSync(outDir, { recursive: true, force: true });
201
- } catch {
202
- }
203
- }
181
+ analyzed: false,
182
+ analyzedFiles: [],
183
+ findings: [],
184
+ scannedAt: failure.scannedAt,
185
+ summary: failure.summary
186
+ } : {
187
+ success: false,
188
+ findings: [],
189
+ scannedAt: failure.scannedAt,
190
+ reason: OPENGREP_FAILURE_REASONS[failure.outcome],
191
+ summary: this.failureReason(failure)
192
+ },
193
+ recordFailure: (failure) => this.recordRefusal(cwd, this.failureReason(failure), failure.status),
194
+ log: this.log
195
+ });
196
+ }
197
+ /**
198
+ * opengrep's reason for a scan that never reached its parse: the spawn
199
+ * classification beside the spawn error's message when the child never ran,
200
+ * and the lifecycle's own `formatToolFailure` reason (#1816) for every other
201
+ * cell. The result's `summary` and the `opengrep-scan-refused` row carry the
202
+ * same string, so both read it from here.
203
+ */
204
+ failureReason(failure) {
205
+ if (failure.outcome !== "spawn-error")
206
+ return failure.summary;
207
+ return `${failure.spawnFailure ?? "spawn-failed"}: ${failure.errorMessage ?? ""}`.slice(0, LEDGER_FIELD_MAX);
204
208
  }
205
209
  recordRefusal(cwd, reason, status) {
206
210
  recordDegradationOnce({
@@ -2,7 +2,7 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
2
2
  import {
3
3
  getProcessSingleton,
4
4
  logLatency
5
- } from "./chunk-VCRVNLE7.js";
5
+ } from "./chunk-K2GV34T2.js";
6
6
 
7
7
  // dist/clients/lsp/workspace-sweep-hold.js
8
8
  var SWEEP_IDLE_SAFETY_MARGIN_MS = 6e4;
@@ -44,7 +44,8 @@ function reapStaleHolds() {
44
44
  type: "phase",
45
45
  phase: "lsp_workspace_sweep_hold_force_released",
46
46
  filePath: "",
47
- durationMs: ageMs,
47
+ // The hold's age at the reap, not work anyone did (#5379).
48
+ ageMs,
48
49
  metadata: { holdId, maxHoldAgeMs: maxAgeMs }
49
50
  });
50
51
  }
@@ -11,23 +11,25 @@ import {
11
11
  shouldScanTrivy,
12
12
  trivyEvidenceFiles,
13
13
  worktreeSkipDirs
14
- } from "./chunk-OPFNQBS5.js";
15
- import "./chunk-SJQUWQR6.js";
16
- import "./chunk-VGTBLTPN.js";
17
- import "./chunk-4ITEFRDH.js";
18
- import "./chunk-LT62P654.js";
19
- import "./chunk-VPFRU5IG.js";
20
- import "./chunk-NPNFGYLV.js";
21
- import "./chunk-H65TYP6V.js";
22
- import "./chunk-AWQWXSW4.js";
23
- import "./chunk-FOEPIX76.js";
24
- import "./chunk-NL5LSKVD.js";
25
- import "./chunk-7WJ55KBN.js";
26
- import "./chunk-3FRI5H4T.js";
14
+ } from "./chunk-HYR25MV3.js";
15
+ import "./chunk-AAIVSSUU.js";
16
+ import "./chunk-LD7SXICE.js";
17
+ import "./chunk-NZINZCHB.js";
18
+ import "./chunk-FDLGJFAE.js";
19
+ import "./chunk-QJ4T73J5.js";
20
+ import "./chunk-W6VLB6LL.js";
21
+ import "./chunk-3QMLB4TI.js";
22
+ import "./chunk-AVBEPUCD.js";
23
+ import "./chunk-ET3DSSFZ.js";
24
+ import "./chunk-B4FAFEBP.js";
25
+ import "./chunk-6EIV3H7O.js";
26
+ import "./chunk-3R3Z54J7.js";
27
+ import "./chunk-HRQTYU2T.js";
28
+ import "./chunk-AGEQRJ5A.js";
27
29
  import "./chunk-S26LC76R.js";
28
- import "./chunk-VCRVNLE7.js";
30
+ import "./chunk-K2GV34T2.js";
29
31
  import "./chunk-LJDODBBZ.js";
30
- import "./chunk-CB7PEVOJ.js";
32
+ import "./chunk-WLD6BGON.js";
31
33
  import "./chunk-NXL4FFQQ.js";
32
34
  export {
33
35
  TrivyClient,
@@ -0,0 +1,355 @@
1
+ import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
+ import {
3
+ logExtension,
4
+ recordDegradation,
5
+ recordDegradationOnce
6
+ } from "./chunk-AGEQRJ5A.js";
7
+ import {
8
+ stagePathFor
9
+ } from "./chunk-LJDODBBZ.js";
10
+
11
+ // dist/clients/deadline-utils.js
12
+ function combineAbortSignals(...signals) {
13
+ const live = signals.filter((s) => s !== void 0);
14
+ if (live.length <= 1)
15
+ return live[0];
16
+ if (typeof AbortSignal.any === "function")
17
+ return AbortSignal.any(live);
18
+ const controller = new AbortController();
19
+ for (const s of live) {
20
+ if (s.aborted) {
21
+ controller.abort(s.reason);
22
+ break;
23
+ }
24
+ s.addEventListener("abort", () => controller.abort(s.reason), {
25
+ once: true
26
+ });
27
+ }
28
+ return controller.signal;
29
+ }
30
+ function untilAborted(work, signal, aborted) {
31
+ if (!signal)
32
+ return work;
33
+ if (signal.aborted)
34
+ return Promise.race([work, Promise.resolve(aborted)]);
35
+ let onAbort;
36
+ const abortedPromise = new Promise((resolve) => {
37
+ onAbort = () => resolve(aborted);
38
+ signal.addEventListener("abort", onAbort, { once: true });
39
+ });
40
+ return Promise.race([work, abortedPromise]).finally(() => {
41
+ if (onAbort)
42
+ signal.removeEventListener("abort", onAbort);
43
+ });
44
+ }
45
+ function withDeadline(promise, options) {
46
+ const onTimeout = options.onTimeout ?? "reject";
47
+ const onReject = options.onReject ?? "propagate";
48
+ const ms = options.ms ?? (options.deadlineAt !== void 0 ? options.deadlineAt - Date.now() : 0);
49
+ if (ms <= 0) {
50
+ promise.catch(() => {
51
+ });
52
+ return onTimeout === "undefined" ? Promise.resolve(void 0) : Promise.reject(new Error(`Timeout after ${Math.max(0, ms)}ms`));
53
+ }
54
+ const base = onReject === "undefined" ? promise.catch(() => void 0) : promise;
55
+ if (onReject === "propagate")
56
+ promise.catch(() => {
57
+ });
58
+ let timer;
59
+ const timeoutPromise = new Promise((resolve, reject) => {
60
+ timer = setTimeout(() => {
61
+ if (onTimeout === "undefined")
62
+ resolve(void 0);
63
+ else
64
+ reject(new Error(`Timeout after ${ms}ms`));
65
+ }, ms);
66
+ });
67
+ return Promise.race([base, timeoutPromise]).finally(() => {
68
+ if (timer)
69
+ clearTimeout(timer);
70
+ });
71
+ }
72
+ function withTimeout(promise, timeoutMs) {
73
+ return withDeadline(promise, { ms: timeoutMs });
74
+ }
75
+ function withBudget(promise, budgetMs) {
76
+ return withDeadline(promise, { ms: budgetMs, onTimeout: "undefined" });
77
+ }
78
+ var BOUND_ABORTED = /* @__PURE__ */ Symbol("pi-lens/bounded/aborted");
79
+ async function bounded(promise, options) {
80
+ const { signal, shutdownSignal, hook, label } = options;
81
+ const ms = Number.isFinite(options.ms) ? Math.max(0, options.ms) : 0;
82
+ const startedAt = Date.now();
83
+ const boxed = promise.then((value) => ({ value }));
84
+ void boxed.catch(() => {
85
+ });
86
+ let cause;
87
+ let timer;
88
+ let onCallerAbort;
89
+ let onShutdownAbort;
90
+ const abandoned = new Promise((resolve) => {
91
+ const fire = (reason) => {
92
+ cause ??= reason;
93
+ resolve(BOUND_ABORTED);
94
+ };
95
+ if (signal?.aborted)
96
+ return fire("caller-abort");
97
+ if (shutdownSignal?.aborted)
98
+ return fire("shutdown");
99
+ if (ms <= 0)
100
+ return fire("deadline");
101
+ timer = setTimeout(() => fire("deadline"), ms);
102
+ timer.unref?.();
103
+ onCallerAbort = () => fire("caller-abort");
104
+ signal?.addEventListener("abort", onCallerAbort, { once: true });
105
+ if (shutdownSignal) {
106
+ onShutdownAbort = () => fire("shutdown");
107
+ shutdownSignal.addEventListener("abort", onShutdownAbort, {
108
+ once: true
109
+ });
110
+ }
111
+ });
112
+ try {
113
+ const settled = await Promise.race([boxed, abandoned]);
114
+ if (settled !== BOUND_ABORTED)
115
+ return settled.value;
116
+ const elapsedMs = Date.now() - startedAt;
117
+ const fired = cause ?? "deadline";
118
+ if (fired === "deadline" || fired === "shutdown") {
119
+ recordDegradationOnce({
120
+ kind: fired === "deadline" ? "hook-await-exceeded" : "hook-await-abandoned",
121
+ subject: `${hook}:${label}`,
122
+ reason: fired === "deadline" ? `exceeded ${ms}ms budget after ${elapsedMs}ms` : `abandoned after ${elapsedMs}ms: session is shutting down (budget ${ms}ms)`,
123
+ metadata: { hook, label, budgetMs: ms, elapsedMs, cause: fired }
124
+ });
125
+ }
126
+ return void 0;
127
+ } finally {
128
+ if (timer !== void 0)
129
+ clearTimeout(timer);
130
+ if (onCallerAbort)
131
+ signal?.removeEventListener("abort", onCallerAbort);
132
+ if (onShutdownAbort) {
133
+ shutdownSignal?.removeEventListener("abort", onShutdownAbort);
134
+ }
135
+ }
136
+ }
137
+
138
+ // dist/clients/hook-budgets.js
139
+ var HOOK_WALL_BUDGET_MS = Object.freeze({
140
+ /** Visible startup work; the user is watching a progress line. */
141
+ session_start: 5e3,
142
+ /** Pure bookkeeping — nothing here may await (#2523 contract). */
143
+ turn_start: 0,
144
+ /** Measured p50 3687 ms / p90 14246 ms today. The gap IS the issue. */
145
+ turn_end: 3e3,
146
+ /** Measured p90 10043 ms today, from one unbounded pipeline re-entry. */
147
+ agent_end: 1e3,
148
+ /** The designated place for settled-time sweeps; the widest non-edit budget. */
149
+ agent_settled: 1e4,
150
+ /** Read/Grep/Glob/Bash: must never await analyzer bootstrap (AC5). */
151
+ tool_result_read_only: 500,
152
+ /** The ONLY path the contract lets block the host, and only this long. */
153
+ tool_result_edit: 1e4,
154
+ /** Replacement teardown is synchronous so its successor ordering is preserved (#3881). */
155
+ session_shutdown: 0,
156
+ /** The maintainer amendment permits quit-only sink draining before process exit (#2523). */
157
+ session_shutdown_quit: 500,
158
+ /** Synchronous message contribution; the host is blocked on the answer. */
159
+ context: 0,
160
+ /** Fork bookkeeping; the session is being replaced under it. */
161
+ session_before_fork: 0
162
+ });
163
+ var HOOK_BUDGET_KEYS = Object.keys(HOOK_WALL_BUDGET_MS);
164
+
165
+ // dist/clients/project-trust.js
166
+ var trustState = "unknown";
167
+ var installRefusalWarnings = /* @__PURE__ */ new Set();
168
+ var INSTALL_REFUSAL_WARNING_CAP = 200;
169
+ var trustGeneration = 0;
170
+ function getProjectTrustGeneration() {
171
+ return trustGeneration;
172
+ }
173
+ function latchProjectTrustState(next) {
174
+ if (next === trustState)
175
+ return;
176
+ trustState = next;
177
+ installRefusalWarnings.clear();
178
+ trustGeneration += 1;
179
+ }
180
+ function setProjectTrustState(next) {
181
+ const previous = trustState;
182
+ latchProjectTrustState(next);
183
+ if (previous !== next) {
184
+ logExtension({
185
+ subsystem: "project-trust",
186
+ level: "debug",
187
+ message: `project trust state transitioned: ${previous} -> ${next}`,
188
+ metadata: { previous, next }
189
+ });
190
+ }
191
+ }
192
+ function getProjectTrustState() {
193
+ return trustState;
194
+ }
195
+ function isToolInstallAllowedByTrust() {
196
+ return trustState !== "untrusted";
197
+ }
198
+ function assertInstallAllowed(context) {
199
+ if (isToolInstallAllowedByTrust())
200
+ return true;
201
+ recordDegradation({
202
+ kind: "trust-refusal",
203
+ subject: context,
204
+ reason: projectTrustDenialReason() ?? "project trust denied"
205
+ });
206
+ if (!installRefusalWarnings.has(context)) {
207
+ if (installRefusalWarnings.size >= INSTALL_REFUSAL_WARNING_CAP) {
208
+ installRefusalWarnings.clear();
209
+ }
210
+ installRefusalWarnings.add(context);
211
+ logExtension({
212
+ subsystem: "project-trust",
213
+ level: "warn",
214
+ message: `install/materialization blocked: ${context}`,
215
+ metadata: { context, trustState }
216
+ });
217
+ }
218
+ return false;
219
+ }
220
+ function isLspSpawnAllowedByTrust() {
221
+ return trustState !== "untrusted";
222
+ }
223
+ function projectTrustDenialReason() {
224
+ return trustState === "untrusted" ? "project is not trusted (host isProjectTrusted() === false)" : void 0;
225
+ }
226
+ var loadProjectTrustSdk;
227
+ async function readAdoptedProjectTrust(root, shutdownSignal) {
228
+ if (!loadProjectTrustSdk)
229
+ return getProjectTrustState();
230
+ try {
231
+ const sdk = await bounded(loadProjectTrustSdk(), {
232
+ ms: HOOK_WALL_BUDGET_MS.tool_result_read_only,
233
+ signal: void 0,
234
+ ...shutdownSignal ? { shutdownSignal } : {},
235
+ hook: "off_hook",
236
+ label: "adopted-project-trust-sdk"
237
+ });
238
+ if (!sdk?.ProjectTrustStore || !sdk.getAgentDir || !sdk.hasTrustRequiringProjectResources || !sdk.SettingsManager) {
239
+ throw new Error("host SDK lacks adopted project trust exports");
240
+ }
241
+ const agentDir = sdk.getAgentDir();
242
+ const saved = new sdk.ProjectTrustStore(agentDir).get(root);
243
+ const trusted = !sdk.hasTrustRequiringProjectResources(root) ? saved ?? true : saved ?? sdk.SettingsManager.create(agentDir, agentDir, {
244
+ projectTrusted: false
245
+ }).getGlobalSettings().defaultProjectTrust === "always";
246
+ return trusted ? "trusted" : "untrusted";
247
+ } catch (trustErr) {
248
+ recordDegradationOnce({
249
+ kind: "lsp-registry-decision",
250
+ subject: `adopted-trust:${root}`,
251
+ reason: `adopted project trust unavailable: ${String(trustErr)}`
252
+ });
253
+ return "untrusted";
254
+ }
255
+ }
256
+
257
+ // dist/clients/atomic-write.js
258
+ import * as fs from "node:fs";
259
+ function writeFileAtomic(targetPath, data, options) {
260
+ const bestEffort = options?.bestEffort ?? true;
261
+ const tmpPath = stagePathFor(targetPath);
262
+ try {
263
+ fs.writeFileSync(tmpPath, data, {
264
+ encoding: typeof data === "string" ? "utf-8" : void 0,
265
+ mode: options?.mode
266
+ });
267
+ fs.renameSync(tmpPath, targetPath);
268
+ } catch (err) {
269
+ try {
270
+ fs.rmSync(tmpPath, { force: true });
271
+ } catch {
272
+ }
273
+ if (!bestEffort)
274
+ throw err;
275
+ }
276
+ }
277
+ async function writeFileAtomicAsync(targetPath, data, options) {
278
+ const bestEffort = options?.bestEffort ?? true;
279
+ const tmpPath = stagePathFor(targetPath);
280
+ try {
281
+ await fs.promises.writeFile(tmpPath, data, {
282
+ encoding: typeof data === "string" ? "utf-8" : void 0,
283
+ mode: options?.mode
284
+ });
285
+ await fs.promises.rename(tmpPath, targetPath);
286
+ } catch (err) {
287
+ try {
288
+ await fs.promises.rm(tmpPath, { force: true });
289
+ } catch {
290
+ }
291
+ if (!bestEffort)
292
+ throw err;
293
+ }
294
+ }
295
+
296
+ // dist/clients/spawn-output-cap.js
297
+ var DEFAULT_MAX_OUTPUT_BYTES = 32 * 1024 * 1024;
298
+ function createBoundedOutputSink(maxBytes = DEFAULT_MAX_OUTPUT_BYTES) {
299
+ let text = "";
300
+ let retained = 0;
301
+ let truncated = false;
302
+ let observed = 0;
303
+ return {
304
+ append(chunk) {
305
+ const part = typeof chunk === "string" ? chunk : chunk.toString();
306
+ const bytes = Buffer.byteLength(part);
307
+ observed += bytes;
308
+ if (retained + bytes <= maxBytes) {
309
+ retained += bytes;
310
+ text += part;
311
+ return;
312
+ }
313
+ truncated = true;
314
+ },
315
+ get text() {
316
+ return text;
317
+ },
318
+ get truncated() {
319
+ return truncated;
320
+ },
321
+ get observedBytes() {
322
+ return observed;
323
+ }
324
+ };
325
+ }
326
+ function truncatedByOutputCap(result) {
327
+ return result.outputTruncated === true && result.failure !== "timeout" && result.failure !== "aborted";
328
+ }
329
+ function killedForOutputCap(result) {
330
+ return result.killedForOutputCap === true && result.failure !== "timeout" && result.failure !== "aborted";
331
+ }
332
+
333
+ export {
334
+ combineAbortSignals,
335
+ untilAborted,
336
+ withDeadline,
337
+ withTimeout,
338
+ withBudget,
339
+ bounded,
340
+ HOOK_WALL_BUDGET_MS,
341
+ getProjectTrustGeneration,
342
+ setProjectTrustState,
343
+ getProjectTrustState,
344
+ isToolInstallAllowedByTrust,
345
+ assertInstallAllowed,
346
+ isLspSpawnAllowedByTrust,
347
+ projectTrustDenialReason,
348
+ readAdoptedProjectTrust,
349
+ writeFileAtomic,
350
+ writeFileAtomicAsync,
351
+ DEFAULT_MAX_OUTPUT_BYTES,
352
+ createBoundedOutputSink,
353
+ truncatedByOutputCap,
354
+ killedForOutputCap
355
+ };