pi-lens 4.4.3 → 4.4.5

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 (185) hide show
  1. package/CHANGELOG.md +721 -0
  2. package/README.md +25 -3
  3. package/config/dependency-cruiser-eager-allowlist.json +1 -0
  4. package/dist/chunk-22Y2BM7H.js +23 -0
  5. package/dist/{chunk-WU567RSC.js → chunk-27VWVB23.js} +16 -14
  6. package/dist/{chunk-FLKWCIZH.js → chunk-2FYKETQJ.js} +10 -6
  7. package/dist/{chunk-MQLUAEOC.js → chunk-2LDMXL2M.js} +2 -2
  8. package/dist/{chunk-YSZNHOBY.js → chunk-2SDHYHHO.js} +17 -17
  9. package/dist/chunk-2Y6OJRSI.js +38 -0
  10. package/dist/chunk-3SNDVPOR.js +507 -0
  11. package/dist/{chunk-EJIUXPBX.js → chunk-3WCEHYOI.js} +1 -1
  12. package/dist/chunk-44X7VIKR.js +73 -0
  13. package/dist/{chunk-Q7DUK4LX.js → chunk-4FHUGDKU.js} +16 -14
  14. package/dist/{chunk-H6MF6EVN.js → chunk-4ODSZ35Z.js} +1498 -534
  15. package/dist/{chunk-ZGDGW2V3.js → chunk-4U7GDSZQ.js} +2 -2
  16. package/dist/chunk-54NIOJJZ.js +25 -0
  17. package/dist/{chunk-ZWFS3OEF.js → chunk-5DKE4HGX.js} +38 -37
  18. package/dist/{chunk-VRZP76YM.js → chunk-5LRUKYFA.js} +34 -4
  19. package/dist/{chunk-QOBUHWHX.js → chunk-63NMUNYP.js} +12 -16
  20. package/dist/{chunk-VWCXW2E7.js → chunk-6XSESGWD.js} +13 -6
  21. package/dist/{chunk-QGQ5CCCG.js → chunk-72J27ICO.js} +2 -3
  22. package/dist/{chunk-CSHFH5IN.js → chunk-7FLRUH6B.js} +1 -1
  23. package/dist/chunk-7IYC4ENJ.js +297 -0
  24. package/dist/chunk-7WWQAW5P.js +30 -0
  25. package/dist/{chunk-EU63SDCG.js → chunk-7ZS7MC24.js} +885 -451
  26. package/dist/{chunk-KBG47GHP.js → chunk-AHWA4AKM.js} +18 -12
  27. package/dist/{chunk-FMSO6RDZ.js → chunk-AI3GP74G.js} +17 -19
  28. package/dist/chunk-APFJKOP6.js +67 -0
  29. package/dist/{chunk-RXCOMYPY.js → chunk-ASRAO7KG.js} +31 -33
  30. package/dist/{chunk-BW5KFIQC.js → chunk-AWQWXSW4.js} +1 -0
  31. package/dist/{chunk-QILIYSJF.js → chunk-CG5V25HX.js} +1 -1
  32. package/dist/chunk-CKEQFGLT.js +32 -0
  33. package/dist/{chunk-RPLINGVB.js → chunk-COOUUC5W.js} +6 -6
  34. package/dist/{chunk-GBPP5P7X.js → chunk-CPZ5JJW6.js} +4 -4
  35. package/dist/{chunk-OCAGUNBC.js → chunk-DS2USX5G.js} +13 -15
  36. package/dist/chunk-EA2ZRG44.js +27 -0
  37. package/dist/{chunk-ZHFZWTZV.js → chunk-EDMLIW6W.js} +13 -14
  38. package/dist/{chunk-2EECBNC5.js → chunk-EIKRZ32J.js} +75 -0
  39. package/dist/chunk-EKNWOL2I.js +27 -0
  40. package/dist/{chunk-CMMHNUZ2.js → chunk-ELZRSR5N.js} +65 -43
  41. package/dist/{chunk-BKE7E7TC.js → chunk-EN5AM7PX.js} +11 -12
  42. package/dist/{chunk-N2H3ZPZY.js → chunk-EWXXLS26.js} +227 -24
  43. package/dist/chunk-EX4EXBW7.js +37 -0
  44. package/dist/{chunk-YYOIQFRS.js → chunk-EXVXBSGN.js} +130 -52
  45. package/dist/{chunk-6GFRNVYR.js → chunk-F7BO6FWH.js} +12 -13
  46. package/dist/chunk-FEDWAYDS.js +2485 -0
  47. package/dist/{chunk-JAU72XNY.js → chunk-FWZRGGGY.js} +73 -9
  48. package/dist/{chunk-GXW6K4YJ.js → chunk-G224FADB.js} +1 -1
  49. package/dist/chunk-G5UCJFT7.js +26 -0
  50. package/dist/{chunk-67WMNWEE.js → chunk-GLW3YDZZ.js} +22 -13
  51. package/dist/{chunk-724UL2TJ.js → chunk-GTDSYEA2.js} +72 -39
  52. package/dist/{chunk-PHDMFAKM.js → chunk-GYRZ72R4.js} +10 -4
  53. package/dist/chunk-HYVXA3BB.js +49 -0
  54. package/dist/{chunk-SAEFPSB6.js → chunk-IEBJF3PN.js} +23 -15
  55. package/dist/chunk-IJYGIDF4.js +186 -0
  56. package/dist/{chunk-ACXEQZOU.js → chunk-IL7K66ZQ.js} +101 -109
  57. package/dist/{chunk-ZXYDQ3TZ.js → chunk-JWOVP5BL.js} +50 -19
  58. package/dist/{chunk-OXXKQCSV.js → chunk-K2GUZ4DN.js} +4 -4
  59. package/dist/{chunk-AW7R2GWG.js → chunk-K4SZB56V.js} +39 -39
  60. package/dist/{chunk-WOA4LN2R.js → chunk-KCBRHV5E.js} +3 -3
  61. package/dist/{chunk-3W7IEVVL.js → chunk-KFXCL4OV.js} +47 -45
  62. package/dist/{chunk-2BBLFX75.js → chunk-KJJAVH3X.js} +81 -15
  63. package/dist/{chunk-VCHXCQFG.js → chunk-KPVLQHCZ.js} +4 -6
  64. package/dist/{chunk-P7266HLM.js → chunk-KX56K73G.js} +10 -13
  65. package/dist/{chunk-VSSBEUFT.js → chunk-LMCTHJ2H.js} +19 -19
  66. package/dist/{chunk-IBGIOBEE.js → chunk-MEFLGBCS.js} +69 -8
  67. package/dist/{chunk-TYM6OUIT.js → chunk-MKPCELNI.js} +17 -17
  68. package/dist/{chunk-XTMJ7XDT.js → chunk-N3PLNNCW.js} +1 -1
  69. package/dist/chunk-N5FBM25N.js +22 -0
  70. package/dist/{chunk-CHOW74WE.js → chunk-NFNVDDGB.js} +7 -12
  71. package/dist/{chunk-52FUZI6K.js → chunk-NLIVE7L6.js} +2 -30
  72. package/dist/{chunk-SS36ZX4J.js → chunk-OMJ3OFBJ.js} +6 -6
  73. package/dist/{chunk-4W4VLAPJ.js → chunk-OZNCKLOX.js} +13 -14
  74. package/dist/chunk-P5XUGPIX.js +31 -0
  75. package/dist/{chunk-5UCAH366.js → chunk-PJXNTPB2.js} +253 -33
  76. package/dist/chunk-PKOXJIVT.js +88 -0
  77. package/dist/{chunk-6C7JWPCP.js → chunk-PP2A5V2T.js} +27 -26
  78. package/dist/{chunk-L3BLXZG7.js → chunk-Q42LJANT.js} +31 -70
  79. package/dist/{chunk-AB3YYG6N.js → chunk-Q4BKKOVC.js} +8 -8
  80. package/dist/{chunk-3EFKIGZN.js → chunk-QT66NEYN.js} +4 -4
  81. package/dist/{chunk-3VPVG5SU.js → chunk-RCHO5W7M.js} +19 -18
  82. package/dist/{chunk-77M37OKR.js → chunk-RG3MXTRI.js} +7 -7
  83. package/dist/chunk-RG7OODGM.js +57 -0
  84. package/dist/{chunk-T6CPIZNT.js → chunk-RU34BA4D.js} +44 -39
  85. package/dist/{chunk-JMYYOTQG.js → chunk-S26LC76R.js} +13 -1
  86. package/dist/{chunk-5NGR67U5.js → chunk-S55TEC7I.js} +33 -5
  87. package/dist/{chunk-M6HSLBWY.js → chunk-SJHC3BCZ.js} +7956 -8047
  88. package/dist/{chunk-XCJN5IJU.js → chunk-SNEUMLM7.js} +4 -4
  89. package/dist/{chunk-UZ3TUTRV.js → chunk-T4NGVFYI.js} +2 -2
  90. package/dist/{chunk-2VUQMUMT.js → chunk-THEXI2QO.js} +49 -43
  91. package/dist/{chunk-R3PCY3YS.js → chunk-TL2TCJYL.js} +15 -16
  92. package/dist/{chunk-C34ZXZ7O.js → chunk-TPYYEDP5.js} +838 -352
  93. package/dist/{chunk-AOHZU2BM.js → chunk-TVZRLTG6.js} +8 -1
  94. package/dist/{chunk-XMSXXAHW.js → chunk-UCVMSOXF.js} +2 -2
  95. package/dist/chunk-UL5SXQVX.js +32 -0
  96. package/dist/{chunk-GAEGEPOC.js → chunk-UO66IMVP.js} +2 -2
  97. package/dist/{chunk-N3X6Q4YT.js → chunk-UVY4TOJH.js} +3 -3
  98. package/dist/{chunk-2CD5RS6M.js → chunk-VIDEKABZ.js} +23 -2
  99. package/dist/{chunk-JSQFTSC6.js → chunk-VITFDI3O.js} +13 -14
  100. package/dist/{chunk-YIUAVF7E.js → chunk-VUAVE3QC.js} +42 -42
  101. package/dist/{chunk-QOZXJ4NA.js → chunk-WUY4BZEP.js} +21 -20
  102. package/dist/{chunk-VCO24T4L.js → chunk-X3UTCXAA.js} +43 -53
  103. package/dist/chunk-XHDBJODR.js +45 -0
  104. package/dist/{chunk-MXGY6KPT.js → chunk-XHLK33VM.js} +28 -21
  105. package/dist/{chunk-RWWYJ623.js → chunk-XI34NWDI.js} +2 -2
  106. package/dist/{chunk-QQNQ7SJW.js → chunk-XWFIHYCH.js} +12 -4
  107. package/dist/{chunk-6SDEP3AJ.js → chunk-Y2TPADJR.js} +10 -11
  108. package/dist/{chunk-MRXKYPCS.js → chunk-Y5KTA2OB.js} +17 -17
  109. package/dist/{chunk-7DYBLXYA.js → chunk-YKVDBNPO.js} +11 -5
  110. package/dist/{chunk-2B73ZPOK.js → chunk-YSDPVDFC.js} +3 -3
  111. package/dist/chunk-YWNO5Q4R.js +44 -0
  112. package/dist/{chunk-QHJ6DQ2R.js → chunk-YWWG4AQA.js} +165 -32
  113. package/dist/{chunk-3JNKMP3B.js → chunk-YXDCRUKQ.js} +4 -4
  114. package/dist/{chunk-UXGETRP4.js → chunk-YXGRRORB.js} +16 -17
  115. package/dist/{chunk-SQ4TVJBR.js → chunk-ZAPSUBLU.js} +13 -7
  116. package/dist/{chunk-76MWC2K6.js → chunk-ZPJM7DID.js} +90 -97
  117. package/dist/{chunk-XVF2VVXP.js → chunk-ZSUX7KEM.js} +16 -15
  118. package/dist/index.js +31038 -20893
  119. package/dist/mcp/analyze-cli.js +11 -11
  120. package/dist/mcp/cli.js +47 -43
  121. package/dist/mcp/server.js +2188 -906
  122. package/dist/mcp/worker.js +66 -63
  123. package/dist/probes/installer.js +21 -23
  124. package/dist/workers/project-snapshot-persist-worker.js +28 -9
  125. package/dist/workers/review-graph-persist-worker.js +1 -1
  126. package/docs/adr/0010-trace-validation-session-lifecycle.md +390 -0
  127. package/docs/adr/README.md +1 -0
  128. package/docs/ast-grep_rules_catalog.md +5 -3
  129. package/docs/configuration.md +20 -0
  130. package/docs/engineering-principles.md +44 -0
  131. package/docs/environment-variables.md +20 -0
  132. package/docs/features.md +16 -1
  133. package/docs/globalconfig.md +37 -8
  134. package/docs/lsp-capability-matrix.md +105 -12
  135. package/docs/lsp-idle-eviction.md +44 -36
  136. package/docs/pi-lens-fixer.md +139 -14
  137. package/docs/pi-lens-investigator.md +14 -0
  138. package/docs/pi-lens-merge-policy.md +120 -17
  139. package/docs/pi-lens-monitor.md +71 -9
  140. package/docs/pi-lens-retro.md +6 -3
  141. package/docs/pi-lens-reviewer.md +160 -5
  142. package/docs/pi-lens-subagent.md +29 -14
  143. package/docs/release-qa-baseline.md +21 -7
  144. package/docs/servercapabilities.md +53 -63
  145. package/docs/settings.md +9 -5
  146. package/docs/subagent-compat.md +1 -1
  147. package/docs/usage.md +1 -0
  148. package/package.json +9 -5
  149. package/rules/ast-grep-rules/rule-tests/no-return-value-in-generator-test.yml +17 -0
  150. package/rules/ast-grep-rules/rule-tests/no-sql-in-code-execute-js-test.yml +86 -0
  151. package/rules/ast-grep-rules/rule-tests/no-sql-in-code-execute-test.yml +86 -0
  152. package/rules/ast-grep-rules/rule-tests/unchecked-numeric-parse-python-test.yml +15 -0
  153. package/rules/ast-grep-rules/rules/no-return-value-in-generator.yml +9 -4
  154. package/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +119 -0
  155. package/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +119 -0
  156. package/rules/ast-grep-rules/rules/unchecked-numeric-parse-python.yml +13 -2
  157. package/rules/rule-catalog.json +25 -1
  158. package/scripts/analyze-pi-lens-logs.mjs +15 -5
  159. package/scripts/download-grammars.js +40 -7
  160. package/scripts/lib/is-main-module.mjs +27 -0
  161. package/scripts/lib/latency-log-phases.mjs +95 -0
  162. package/scripts/lib/scratch-home-env.mjs +21 -0
  163. package/scripts/rpc-load-check.mjs +568 -81
  164. package/scripts/warm-loader-cache.mjs +2 -5
  165. package/dist/chunk-23WOO7TX.js +0 -23
  166. package/dist/chunk-3YN6V5TV.js +0 -85
  167. package/dist/chunk-466Z26MG.js +0 -30
  168. package/dist/chunk-4UNXBNE2.js +0 -24
  169. package/dist/chunk-6STA6Z7I.js +0 -47
  170. package/dist/chunk-ABBOA7UD.js +0 -157
  171. package/dist/chunk-BRGDSBJE.js +0 -28
  172. package/dist/chunk-EC47DWFA.js +0 -56
  173. package/dist/chunk-FCSOVF55.js +0 -273
  174. package/dist/chunk-IZSHAIJ7.js +0 -26
  175. package/dist/chunk-KDERNTCQ.js +0 -28
  176. package/dist/chunk-KSX3TXSZ.js +0 -69
  177. package/dist/chunk-LOP6GRPH.js +0 -31
  178. package/dist/chunk-PNQDPDRC.js +0 -184
  179. package/dist/chunk-UOPVJQ4N.js +0 -103
  180. package/dist/chunk-XAGLWMJ4.js +0 -51
  181. package/dist/chunk-XIJZVPD5.js +0 -39
  182. package/dist/chunk-Z3CCVDUB.js +0 -76
  183. package/dist/chunk-Z527N6YQ.js +0 -28
  184. package/dist/chunk-ZANLILYD.js +0 -79
  185. /package/dist/{chunk-FC4RP4I2.js → chunk-6HWVI6MI.js} +0 -0
@@ -6,58 +6,61 @@ server's `initialize` handshake. Generated by `node scripts/server-capabilities.
6
6
  absent on the generating host are listed under *Unavailable* — run in a
7
7
  provisioned environment (the nightly) to capture those rows.
8
8
 
9
- _Last generated: 2026-10-10 on linux; 29 servers captured, 19 unavailable._
9
+ _Last generated: 2026-10-25 on linux; 41 servers captured, 9 unavailable._
10
10
 
11
11
  ## Diagnostic mode + navigation/edit operations
12
12
 
13
- Legend: ✓ advertised, · not. **mode** = document diagnostics (`pull` = `textDocument/diagnostic`, else push-only); **ws-pull** = advertises `workspace/diagnostic` (one project-wide pull — the #387 Item 2 fast path); **save** = `textDocumentSync.save` (#3407): `save` gets `textDocument/didSave`, `save+text` gets it with the document text (`includeText`), · declares none, ? not captured. **def**=definition, **tDef**=typeDefinition, **decl**=declaration, **ref**=references, **hov**=hover, **sig**=signatureHelp, **dSym**=documentSymbol, **wSym**=workspaceSymbol, **cAct**=codeAction, **rnm**=rename, **impl**=implementation, **cHir**=callHierarchy; **cmds** = executeCommand allowlist size.
13
+ Legend: ✓ advertised, · not. **mode** = document diagnostics (`pull` = `textDocument/diagnostic`, else push-only); **ws-pull** = advertises `workspace/diagnostic` (one project-wide pull — the #387 Item 2 fast path); **save** = `textDocumentSync.save` (#3407): `save` gets `textDocument/didSave`, `save+text` gets it with the document text (`includeText`), · declares none, ? not captured. **def**=definition, **tDef**=typeDefinition, **decl**=declaration, **ref**=references, **hov**=hover, **sig**=signatureHelp, **dSym**=documentSymbol, **wSym**=workspaceSymbol, **cAct**=codeAction, **rnm**=rename, **impl**=implementation, **cHir**=callHierarchy, **dCre**=didCreateFiles; **cmds** = executeCommand allowlist size.
14
14
 
15
- | server | mode | ws-pull | save | def | tDef | decl | ref | hov | sig | dSym | wSym | cAct | rnm | impl | cHir | cmds |
16
- |---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17
- | ast-grep | push-only | · | · | · | · | · | · | ✓ | · | · | · | ✓ | · | · | · | 1 |
18
- | bash | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | · | · | 0 |
19
- | clojure | push-only | · | save+text | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 62 |
20
- | cmake | push-only | · | save | · | · | · | · | ✓ | · | · | · | · | · | · | · | 0 |
21
- | cpp | push-only | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 3 |
22
- | csharp | pull | ✓ | save+text | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 0 |
23
- | css | pull | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | 0 |
24
- | cue | push-only | · | save | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | 1 |
25
- | dart | push-only | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 18 |
26
- | deno | pull | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 2 |
27
- | docker | push-only | · | · | ✓ | · | · | · | ✓ | ✓ | ✓ | · | · | ✓ | · | · | 0 |
28
- | docker-official | push-only | · | · | ✓ | · | · | · | ✓ | · | ✓ | · | ✓ | ✓ | · | · | 1 |
29
- | emmylua | pull | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | · | · | · | 4 |
30
- | expert | push-only | · | save | ✓ | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | · | · | · | 2 |
31
- | fish | push-only | · | save+text | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 23 |
32
- | fsharp | push-only | · | save+text | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 0 |
33
- | gleam | push-only | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | · | ✓ | ✓ | · | · | 0 |
34
- | go | push-only | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 47 |
35
- | html | pull | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | · | · | ✓ | · | · | 0 |
36
- | json | pull | · | · | · | · | · | · | ✓ | · | ✓ | · | ✓ | · | · | · | 0 |
37
- | kotlin | push-only | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 1 |
38
- | lua | push-only | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 6 |
39
- | marksman | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | · | · | 0 |
40
- | opengrep | push-only | · | save | · | · | · | · | ✓ | · | · | · | ✓ | · | · | · | 2 |
41
- | php | push-only | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | · | 0 |
42
- | powershell | push-only | · | save+text | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 0 |
43
- | prisma | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | 0 |
44
- | python | push-only | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | ✓ | 0 |
45
- | python-jedi | push-only | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 0 |
46
- | ruby | pull | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 0 |
47
- | rust | pull | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 0 |
48
- | svelte | pull | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 0 |
49
- | terraform | push-only | · | save | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | 7 |
50
- | tinymist | push-only | · | save | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 29 |
51
- | toml | push-only | · | · | · | · | · | · | ✓ | · | ✓ | · | · | ✓ | · | · | 0 |
52
- | typescript | push-only | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 8 |
53
- | typos | push-only | · | · | · | · | · | · | · | · | · | · | ✓ | · | · | · | 1 |
54
- | vue | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | 0 |
55
- | yaml | push-only | · | · | ✓ | · | · | · | ✓ | · | ✓ | · | ✓ | ✓ | · | · | 1 |
56
- | zig | push-only | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 0 |
57
- | zizmor | push-only | · | · | · | · | · | · | · | · | · | · | · | · | · | · | 0 |
15
+ | server | mode | ws-pull | save | def | tDef | decl | ref | hov | sig | dSym | wSym | cAct | rnm | impl | cHir | dCre | cmds |
16
+ |---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17
+ | ast-grep | push-only | · | · | · | · | · | · | ✓ | · | · | · | ✓ | · | · | · | · | 1 |
18
+ | bash | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | · | · | · | 0 |
19
+ | clojure | push-only | · | save+text | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 64 |
20
+ | cmake | push-only | · | save | · | · | · | · | ✓ | · | · | · | · | · | · | · | · | 0 |
21
+ | cpp | push-only | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 3 |
22
+ | csharp | pull | ✓ | save+text | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 0 |
23
+ | css | pull | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | · | 0 |
24
+ | cue | push-only | · | save | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | · | 1 |
25
+ | dart | push-only | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 18 |
26
+ | deno | pull | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 2 |
27
+ | docker | push-only | · | · | ✓ | · | · | · | ✓ | ✓ | ✓ | · | · | ✓ | · | · | · | 0 |
28
+ | docker-official | push-only | · | · | ✓ | · | · | · | ✓ | · | ✓ | · | ✓ | ✓ | · | · | · | 1 |
29
+ | emmylua | pull | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | · | · | · | · | 4 |
30
+ | expert | push-only | · | save | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | ✓ | ✓ | · | 2 |
31
+ | fish | push-only | · | save+text | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 23 |
32
+ | fsharp | push-only | · | save+text | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 0 |
33
+ | gleam | push-only | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | · | ✓ | ✓ | · | · | · | 0 |
34
+ | go | push-only | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 50 |
35
+ | html | pull | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | · | · | ✓ | · | · | · | 0 |
36
+ | json | pull | · | · | · | · | · | · | ✓ | · | ✓ | · | ✓ | · | · | · | · | 0 |
37
+ | kotlin | push-only | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | 1 |
38
+ | lua | push-only | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 6 |
39
+ | marksman | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | · | · | ✓ | 0 |
40
+ | opengrep | push-only | · | save | · | · | · | · | ✓ | · | · | · | ✓ | · | · | · | ✓ | 2 |
41
+ | php | push-only | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | · | · | 0 |
42
+ | powershell | push-only | · | save+text | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | 0 |
43
+ | prisma | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | · | 0 |
44
+ | python | push-only | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | ✓ | · | 0 |
45
+ | python-jedi | push-only | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | 0 |
46
+ | ruby | pull | · | · | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | 0 |
47
+ | rust | pull | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 0 |
48
+ | svelte | pull | · | save | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | 0 |
49
+ | terraform | push-only | · | save | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | · | 7 |
50
+ | tinymist | push-only | · | save | ✓ | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | 29 |
51
+ | toml | push-only | · | · | · | · | · | · | ✓ | · | ✓ | · | · | ✓ | · | · | · | 0 |
52
+ | typescript | push-only | · | · | ✓ | ✓ | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | 8 |
53
+ | typos | push-only | · | · | · | · | · | · | · | · | · | · | ✓ | · | · | · | · | 1 |
54
+ | vue | push-only | · | · | ✓ | · | · | ✓ | ✓ | · | ✓ | · | ✓ | ✓ | · | · | · | 0 |
55
+ | yaml | push-only | · | · | ✓ | · | · | · | ✓ | · | ✓ | · | ✓ | ✓ | · | · | · | 1 |
56
+ | zig | push-only | · | save | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | · | · | · | 0 |
57
+ | zizmor | push-only | · | · | · | · | · | · | · | · | · | · | · | · | · | · | · | 0 |
58
58
 
59
59
  ## Raw advertised capability keys
60
60
 
61
+ Top-level keys of each server's `ServerCapabilities` — the full advertised
62
+ surface, including providers pi-lens does not yet consume.
63
+
61
64
  - **ast-grep**: codeActionProvider, executeCommandProvider, hoverProvider, textDocumentSync
62
65
  - **bash**: codeActionProvider, completionProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentSymbolProvider, hoverProvider, referencesProvider, renameProvider, textDocumentSync, workspaceSymbolProvider
63
66
  - **clojure**: callHierarchyProvider, codeActionProvider, codeLensProvider, completionProvider, declarationProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentRangeFormattingProvider, documentSymbolProvider, executeCommandProvider, experimental, foldingRangeProvider, hoverProvider, implementationProvider, linkedEditingRangeProvider, referencesProvider, renameProvider, selectionRangeProvider, semanticTokensProvider, signatureHelpProvider, textDocumentSync, workspace, workspaceSymbolProvider
@@ -71,7 +74,7 @@ Legend: ✓ advertised, · not. **mode** = document diagnostics (`pull` = `textD
71
74
  - **docker**: codeActionProvider, completionProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentLinkProvider, documentOnTypeFormattingProvider, documentRangeFormattingProvider, documentSymbolProvider, foldingRangeProvider, hoverProvider, renameProvider, signatureHelpProvider, textDocumentSync
72
75
  - **docker-official**: codeActionProvider, completionProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentLinkProvider, documentSymbolProvider, executeCommandProvider, hoverProvider, inlayHintProvider, inlineCompletionProvider, renameProvider, semanticTokensProvider, textDocumentSync
73
76
  - **emmylua**: codeActionProvider, definitionProvider, diagnosticProvider, documentSymbolProvider, executeCommandProvider, hoverProvider, referencesProvider, textDocumentSync, workspaceSymbolProvider
74
- - **expert**: codeActionProvider, codeLensProvider, completionProvider, definitionProvider, documentFormattingProvider, documentSymbolProvider, executeCommandProvider, experimental, hoverProvider, referencesProvider, textDocumentSync, workspace, workspaceSymbolProvider
77
+ - **expert**: callHierarchyProvider, codeActionProvider, codeLensProvider, completionProvider, declarationProvider, definitionProvider, documentFormattingProvider, documentSymbolProvider, executeCommandProvider, experimental, foldingRangeProvider, hoverProvider, implementationProvider, referencesProvider, selectionRangeProvider, signatureHelpProvider, textDocumentSync, workspace, workspaceSymbolProvider
75
78
  - **fish**: codeActionProvider, completionProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentOnTypeFormattingProvider, documentRangeFormattingProvider, documentSymbolProvider, executeCommandProvider, foldingRangeProvider, hoverProvider, implementationProvider, inlayHintProvider, referencesProvider, renameProvider, selectionRangeProvider, semanticTokensProvider, signatureHelpProvider, textDocumentSync, workspace, workspaceSymbolProvider
76
79
  - **fsharp**: callHierarchyProvider, codeActionProvider, codeLensProvider, completionProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentRangeFormattingProvider, documentSymbolProvider, foldingRangeProvider, hoverProvider, implementationProvider, inlayHintProvider, referencesProvider, renameProvider, selectionRangeProvider, semanticTokensProvider, signatureHelpProvider, textDocumentSync, typeDefinitionProvider, workspaceSymbolProvider
77
80
  - **gleam**: codeActionProvider, completionProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentSymbolProvider, foldingRangeProvider, hoverProvider, referencesProvider, renameProvider, signatureHelpProvider, textDocumentSync, typeDefinitionProvider, workspace
@@ -97,16 +100,13 @@ Legend: ✓ advertised, · not. **mode** = document diagnostics (`pull` = `textD
97
100
  - **typos**: codeActionProvider, executeCommandProvider, positionEncoding, textDocumentSync, workspace
98
101
  - **vue**: codeActionProvider, colorProvider, completionProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentLinkProvider, documentOnTypeFormattingProvider, documentRangeFormattingProvider, documentSymbolProvider, experimental, foldingRangeProvider, hoverProvider, inlayHintProvider, linkedEditingRangeProvider, referencesProvider, renameProvider, selectionRangeProvider, semanticTokensProvider, textDocumentSync, workspace
99
102
  - **yaml**: codeActionProvider, codeLensProvider, completionProvider, definitionProvider, documentFormattingProvider, documentLinkProvider, documentOnTypeFormattingProvider, documentRangeFormattingProvider, documentSymbolProvider, executeCommandProvider, foldingRangeProvider, hoverProvider, renameProvider, selectionRangeProvider, textDocumentSync, workspace
100
- - **zig**: codeActionProvider, colorProvider, completionProvider, declarationProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentRangeFormattingProvider, documentSymbolProvider, foldingRangeProvider, hoverProvider, implementationProvider, inlayHintProvider, positionEncoding, referencesProvider, renameProvider, selectionRangeProvider, semanticTokensProvider, signatureHelpProvider, textDocumentSync, typeDefinitionProvider, workspace, workspaceSymbolProvider
103
+ - **zig**: codeActionProvider, colorProvider, completionProvider, declarationProvider, definitionProvider, documentFormattingProvider, documentHighlightProvider, documentRangeFormattingProvider, documentSymbolProvider, foldingRangeProvider, hoverProvider, inlayHintProvider, positionEncoding, referencesProvider, renameProvider, selectionRangeProvider, semanticTokensProvider, signatureHelpProvider, textDocumentSync, typeDefinitionProvider, workspace, workspaceSymbolProvider
101
104
  - **zizmor**: textDocumentSync
102
- Top-level keys of each server's `ServerCapabilities` — the full advertised
103
- surface, including providers pi-lens does not yet consume.
104
-
105
105
 
106
106
  ## Advertised executeCommand allowlists
107
107
 
108
108
  - **ast-grep** (1): ast-grep.applyAllFixes
109
- - **clojure** (62): add-import-to-namespace, add-missing-import, add-missing-libspec, add-require-suggestion, as-to-refer, backward, backward-barf, backward-select, backward-slurp, change-coll, clean-ns, cond->if-refactor, create-function, create-test, cursor-info, cycle-coll, cycle-keyword-auto-resolve, cycle-privacy, demote-fn, destructure-keys, drag-backward, drag-forward, drag-param-backward, drag-param-forward, expand-let, extract-function, extract-to-def, forward, forward-barf, forward-select, forward-slurp, get-in-all, get-in-less, get-in-more, get-in-none, if->cond-refactor, inline-function, inline-symbol, introduce-let, kill-sexp, …
109
+ - **clojure** (64): add-import-to-namespace, add-missing-import, add-missing-libspec, add-require-suggestion, as-to-refer, backward, backward-barf, backward-select, backward-slurp, change-coll, clean-ns, cond->if-refactor, create-function, create-test, cursor-info, cycle-coll, cycle-keyword-auto-resolve, cycle-namespaced-map, cycle-privacy, demote-fn, destructure-keys, drag-backward, drag-forward, drag-param-backward, drag-param-forward, expand-let, extract-function, extract-to-def, forward, forward-barf, forward-select, forward-slurp, get-in-all, get-in-less, get-in-more, get-in-none, if->cond-refactor, inline-function, inline-symbol, introduce-let, …
110
110
  - **cpp** (3): clangd.applyFix, clangd.applyRename, clangd.applyTweak
111
111
  - **cue** (1): cuelsp.externalvalidate
112
112
  - **dart** (18): dart.edit.codeAction.apply, dart.edit.fixAll, dart.edit.fixAllInWorkspace, dart.edit.fixAllInWorkspace.preview, dart.edit.organizeImports, dart.edit.sendWorkspaceEdit, dart.edit.sortMembers, dart.logAction, dart.refactor.add_constructor_name, dart.refactor.convert_all_formal_parameters_to_named, dart.refactor.convert_selected_formal_parameters_to_named, dart.refactor.move_selected_formal_parameters_left, dart.refactor.move_top_level_to_file, dart.refactor.remove_constructor_name, dart.refactor.remove_import_prefix, dart.refactor_add.import_prefix, refactor.perform, refactor.validate
@@ -115,7 +115,7 @@ surface, including providers pi-lens does not yet consume.
115
115
  - **emmylua** (4): fake.applyEdit, fake.applyEditDeferred, fake.doThing, fake.releaseDeferredApplyEdit
116
116
  - **expert** (2): Reindex, connectionDetails
117
117
  - **fish** (23): fish-lsp.checkHealth, fish-lsp.createTheme, fish-lsp.execute, fish-lsp.executeBuffer, fish-lsp.executeLine, fish-lsp.executeRange, fish-lsp.fixAll, fish-lsp.generateEnvVariables, fish-lsp.selectQuickFixPosition, fish-lsp.showEnvVariables, fish-lsp.showInfo, fish-lsp.showReferences, fish-lsp.showStatusDocs, fish-lsp.showWorkspaceMessage, fish-lsp.toggleSingleWorkspaceSupport, fish-lsp.updateWorkspace, quickfix.delete, quickfix.disable, quickfix.fix, quickfix.fixAll, refactor.extract, refactor.rewrite, source.rename
118
- - **go** (47): gopls.add_dependency, gopls.add_import, gopls.add_telemetry_counters, gopls.add_test, gopls.apply_fix, gopls.assembly, gopls.change_signature, gopls.check_upgrades, gopls.client_open_url, gopls.diagnose_files, gopls.doc, gopls.edit_go_directive, gopls.extract_to_new_file, gopls.fetch_vulncheck_result, gopls.free_symbols, gopls.gc_details, gopls.generate, gopls.go_get_package, gopls.implement_interface, gopls.list_imports, gopls.list_known_packages, gopls.lsp, gopls.maybe_prompt_for_telemetry, gopls.mem_stats, gopls.modify_tags, gopls.modules, gopls.move_type, gopls.package_symbols, gopls.packages, gopls.regenerate_cgo, gopls.remove_dependency, gopls.reset_go_mod_diagnostics, gopls.run_go_work_command, gopls.run_govulncheck, gopls.run_tests, gopls.scan_imports, gopls.split_package, gopls.start_debugging, gopls.start_profile, gopls.stop_profile, …
118
+ - **go** (50): gopls.add_dependency, gopls.add_import, gopls.add_telemetry_counters, gopls.add_test, gopls.apply_fix, gopls.assembly, gopls.change_signature, gopls.check_upgrades, gopls.client_open_url, gopls.diagnose_files, gopls.doc, gopls.dragon_slayer, gopls.edit_go_directive, gopls.extract_to_new_file, gopls.fetch_vulncheck_result, gopls.free_symbols, gopls.gc_details, gopls.generate, gopls.go_get_package, gopls.implement_interface, gopls.list_imports, gopls.list_known_packages, gopls.lsp, gopls.maybe_prompt_for_telemetry, gopls.mem_stats, gopls.modify_tags, gopls.modules, gopls.move_declaration, gopls.move_type, gopls.package_symbols, gopls.packages, gopls.regenerate_cgo, gopls.remove_dependency, gopls.reset_go_mod_diagnostics, gopls.resolve_target, gopls.run_go_work_command, gopls.run_govulncheck, gopls.run_tests, gopls.scan_imports, gopls.split_package, …
119
119
  - **kotlin** (1): convertJavaToKotlin
120
120
  - **lua** (6): lua.autoRequire, lua.getConfig, lua.jsonToLua, lua.removeSpace, lua.setConfig, lua.solve
121
121
  - **opengrep** (2): semgrep/autofix, semgrep/ignore
@@ -130,22 +130,12 @@ surface, including providers pi-lens does not yet consume.
130
130
  Toolchain/binary not installed here, so capabilities weren't captured
131
131
  (many are the toolchain-gated family tracked in #241):
132
132
 
133
- - @prisma/language-server
134
- - @vue/language-server
135
- - bash-language-server
136
133
  - elixir-ls
137
- - fake custom lua server
138
- - fish-lsp
139
134
  - haskell-language-server
140
- - intelephense
141
135
  - jdtls
142
136
  - jdtls + lombok javaagent
137
+ - lake serve (Lean 4)
143
138
  - nixd
144
139
  - ocamllsp
145
- - pyright
146
140
  - shuck
147
141
  - sourcekit-lsp
148
- - svelte-language-server
149
- - vscode-css-language-server
150
- - vscode-html-language-server
151
- - yaml-language-server
package/docs/settings.md CHANGED
@@ -79,6 +79,7 @@ column is the effective behavior when nothing is set.
79
79
  | `--no-opengrep` | `opengrep.enabled` | global | Opengrep scanner **on** |
80
80
  | `--no-read-guard` | `readGuard.enabled` | global | read-before-edit monitor **on** |
81
81
  | `--no-lens-context` | `contextInjection.enabled` | global | context injection **on** |
82
+ | `--lens-retain-injections` | `contextInjection.retain` | global | **off** |
82
83
  | `--lens-turn-summary` | `turnSummary.enabled` | global | **off** |
83
84
  | `--lens-actionable-warnings` | `actionableWarnings.enabled` | global | **off** |
84
85
  | `--lens-actionable-warning-actions` | `actionableWarnings.includeLspCodeActions` | global | **off** |
@@ -88,7 +89,7 @@ column is the effective behavior when nothing is set.
88
89
  | `--lens-compact-lsp-status` | `ui.compactLspStatus` | global | **off** (footer lists the active server names) |
89
90
  | `--lens-hide-lsp-status` | `ui.hideLspStatus` | global | **off** (footer publishes the `pi-lens-lsp` status; outranks `ui.compactLspStatus` when both are set) |
90
91
  | `--lens-compact-widget` | `ui.compactWidget` | global | **off** (widget stacks file rows, suppressed count and blocker details below its summary header; **on** renders only that header — languages + totals, plus the `LSP↑` chip while servers are spawning) |
91
- | `--no-lazy-tools` | `tools.lazy` | global | lazy tools **on** (five situational tools start inactive) |
92
+ | `--no-lazy-tools` | `tools.lazy` | global | `true`: the five situational tools start inactive on every model (`"auto"` only on a model that keeps mid-conversation system messages, `false` never) |
92
93
  | `--no-tool=<name>` | `tools.<name>.enabled` | project | every lens tool **on** |
93
94
  | `--lens-turn-end-madge` | `turnEnd.madge.enabled` | global | **off** (madge runs at session start, not per turn) |
94
95
  | `--no-knip` | `knip.enabled` | project | knip analyzer **on** |
@@ -99,10 +100,13 @@ column is the effective behavior when nothing is set.
99
100
  | `--no-dead-code` | `deadCode.enabled` | project | dead-code analyzer **on** |
100
101
  | `--no-complexity` | `complexity.enabled` | project | complexity analyzer **on** |
101
102
 
102
- `--no-lazy-tools` keeps every pi-lens tool active for the whole session, so the
103
- advertised tool list never changes. The `pi_lens_activate_tools` loader stays
104
- registered and keeps its usual description; under this flag the tools it names
105
- are already active, so calling it is a no-op.
103
+ `--no-lazy-tools` (or `tools.lazy: false`) keeps every pi-lens tool active for
104
+ the whole session, so the advertised tool list never changes. The opt-in
105
+ `"auto"` decides per model, at session start and on a model switch only; see
106
+ [globalconfig.md](globalconfig.md#startup-controls) for the rule, why `true`
107
+ stays the default, and the precedence over `tools.<name>.enabled`. The `pi_lens_activate_tools` loader
108
+ stays registered and keeps its usual description; when the tools it names are
109
+ already active, calling it is a no-op.
106
110
 
107
111
  The `tools.<name>.enabled` population covers every model-facing pi and MCP
108
112
  tool. The loader `pi_lens_activate_tools` and MCP lifecycle tools
@@ -111,7 +111,7 @@ mechanism `.github/workflows/install-smoke.yml` already uses) and drives
111
111
  needed, matching `scripts/rpc-load-check.mjs`'s no-model-required design.
112
112
 
113
113
  **Every invocation sets `PI_LENS_STARTUP_MODE=full`.** pi-lens's
114
- cold-start-quick optimization (see AGENTS.md "Session-start critical path")
114
+ cold-start-quick optimization (see HISTORY.md "Session-start critical path")
115
115
  forces the *first* `session_start` of any process onto the fast "quick"
116
116
  path regardless of `--print` — that path returns before the subagent-light
117
117
  -mode check (and the heavyweight-scan skip it gates) ever runs. This was
package/docs/usage.md CHANGED
@@ -110,6 +110,7 @@ pi --lens-guard # Block git commit/push when unresolved blockers exist
110
110
  pi --lens-checkout-guard # Decline git commands that rewrite the working tree while another live pi-lens session shares this dirty checkout (experimental)
111
111
  pi --no-opengrep # Disable the Opengrep security scanner (default-on auxiliary LSP)
112
112
  pi --no-read-guard # Disable the read-before-edit behavior monitor
113
+ pi --lens-retain-injections # Re-send injected findings unchanged in later requests, for exact-prefix (local) prompt caches
113
114
  pi --lens-turn-summary # Persist a per-turn summary of diagnostics, autofixes, and autoformats
114
115
  pi --lens-compact-tool-line # Render tool results as one compact, theme-aware line (closes #1327)
115
116
  pi --lens-compact-lsp-status # Collapse the footer LSP status to one state glyph instead of the server names (refs #3099)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-lens",
3
- "version": "4.4.3",
3
+ "version": "4.4.5",
4
4
  "type": "module",
5
5
  "description": "Real-time code feedback for pi — LSP, linters, formatters, type-checking, structural analysis & booboo",
6
6
  "repository": {
@@ -20,10 +20,11 @@
20
20
  "prepare": "npm run build:dist && node scripts/download-grammars.js --core --dest grammars && node scripts/setup-git-hooks.mjs && node scripts/stamp-package-lock.mjs && node scripts/warm-loader-cache.mjs",
21
21
  "prepack": "node scripts/strip-dev-deps-for-pack.mjs --strip",
22
22
  "postpack": "node scripts/strip-dev-deps-for-pack.mjs --restore",
23
- "lint": "tsc --project tsconfig.json && npm run lint:js && npm run lint:js:tests",
23
+ "lint": "tsc --project tsconfig.json && npm run lint:js && npm run lint:js:tests && npm run lint:js:promises",
24
24
  "lint:js": "oxlint --deny-warnings --import-plugin --promise-plugin -D block-scoped-var -D import/default -D import/namespace -D import/no-absolute-path -D import/no-empty-named-blocks -D import/no-named-as-default -D import/no-self-import -D no-extend-native -D no-extra-bind -D no-implied-eval -D no-new -D no-unexpected-multiline -D no-useless-constructor -D oxc/approx-constant -D oxc/misrefactored-assign-op -D oxc/no-accumulating-spread -D oxc/no-async-endpoint-handlers -D oxc/no-this-in-exported-function -D promise/no-callback-in-promise -D promise/no-multiple-resolved -D promise/no-new-statics -D promise/valid-params -D typescript/no-confusing-non-null-assertion -D typescript/no-extraneous-class -D typescript/no-unnecessary-type-constraint -D typescript/no-unsafe-enum-comparison -D unicorn/no-accessor-recursion -D unicorn/no-array-fill-with-reference-type -D unicorn/no-confusing-array-with -D unicorn/no-instanceof-builtins -D unicorn/prefer-array-flat-map -D unicorn/require-module-specifiers --ignore-pattern \"tests/**/*.ts\" --ignore-pattern \"tests/**/*.tsx\" --ignore-pattern \"**/*.d.mts\" --ignore-pattern \"tests/fixtures/autofix-smoke/**\" --ignore-pattern \"tests/fixtures/format-smoke/**\" --ignore-pattern \"tests/fixtures/tool-smoke/**\" --ignore-pattern \"tests/fixtures/call-graph/javascript/**\" --ignore-pattern \"tests/fixtures/function-facts/javascript-parameter.js\" .",
25
25
  "lint:js:advisory": "node scripts/lint-js-advisory.mjs --deny-warnings --format unix -D correctness -D suspicious -D perf --import-plugin --promise-plugin --type-aware -A no-underscore-dangle -A no-await-in-loop -A unicorn/no-array-sort -A unicorn/consistent-function-scoping -A promise/no-promise-in-callback -A no-useless-call -A import/no-unassigned-import -A no-unmodified-loop-condition --ignore-pattern \"**/*.d.mts\" --ignore-pattern \"tests/fixtures/autofix-smoke/**\" --ignore-pattern \"tests/fixtures/format-smoke/**\" --ignore-pattern \"tests/fixtures/tool-smoke/**\" --ignore-pattern \"tests/fixtures/call-graph/javascript/**\" --ignore-pattern \"tests/fixtures/function-facts/javascript-parameter.js\" .",
26
26
  "lint:js:tests": "node scripts/lint-js-advisory.mjs --deny-warnings --format unix --type-aware -A correctness -A suspicious -A perf --ignore-pattern \"tests/fixtures/**\" tests",
27
+ "lint:js:promises": "node scripts/lint-js-advisory.mjs --deny-warnings --format unix --type-aware -A all -D typescript/await-thenable -D typescript/no-floating-promises -D typescript/no-misused-promises clients mcp tools index.ts",
27
28
  "depcruise:check": "depcruise --validate --config .dependency-cruiser.cjs --ignore-known .dependency-cruiser-known-violations.json --output-type err index.ts \"clients/**/*.ts\"",
28
29
  "fmt": "oxfmt",
29
30
  "fmt:check": "oxfmt --check",
@@ -113,6 +114,9 @@
113
114
  "scripts/analyze-pi-lens-logs.mjs",
114
115
  "scripts/install-selftest.mjs",
115
116
  "scripts/lib/host-provided-deps.mjs",
117
+ "scripts/lib/is-main-module.mjs",
118
+ "scripts/lib/latency-log-phases.mjs",
119
+ "scripts/lib/scratch-home-env.mjs",
116
120
  "scripts/lib/skills-predicate.mjs",
117
121
  "scripts/lib/web-tree-sitter-dir.mjs",
118
122
  "scripts/lib/warm-loader-cache.mjs",
@@ -124,8 +128,8 @@
124
128
  "banner.png"
125
129
  ],
126
130
  "dependencies": {
127
- "@ast-grep/cli": "0.45.3",
128
- "@ast-grep/napi": "^0.45.0",
131
+ "@ast-grep/cli": "0.51.0",
132
+ "@ast-grep/napi": "^0.51.0",
129
133
  "js-yaml": "^5.2.2",
130
134
  "minimatch": "^10.2.6",
131
135
  "pidusage": "^4.0.1",
@@ -160,7 +164,7 @@
160
164
  ]
161
165
  },
162
166
  "allowScripts": {
163
- "@ast-grep/cli@0.45.3": true,
167
+ "@ast-grep/cli@0.51.0": true,
164
168
  "@google/genai@2.21.0": true,
165
169
  "esbuild@0.28.2": true,
166
170
  "fsevents@2.3.3": false,
@@ -17,6 +17,17 @@ valid:
17
17
  def handler():
18
18
  return 42
19
19
  yield
20
+ - |
21
+ # #4840: the yield belongs to the lambda, not to make().
22
+ def make():
23
+ f = lambda: (yield)
24
+ return f
25
+ - |
26
+ # #1806 shape: the only yield is in a nested def; return 2 is not a generator return.
27
+ def outer():
28
+ def inner():
29
+ yield 1
30
+ return 2
20
31
  invalid:
21
32
  - |
22
33
  def gen():
@@ -32,3 +43,9 @@ invalid:
32
43
  yield 1
33
44
  return 99
34
45
  return inner_gen
46
+ - |
47
+ # #4840: a lambda elsewhere in a real generator does not hide its yield.
48
+ def gen():
49
+ key = lambda x: x
50
+ yield key(1)
51
+ return 2
@@ -0,0 +1,86 @@
1
+ id: no-sql-in-code-execute-js
2
+ valid:
3
+ # `.query` belongs to `no-sql-in-code`; this rule holds the `.execute` arms.
4
+ - 'db.query("SELECT * FROM users WHERE id = " + id)'
5
+ # Constant SQL, the parameterized idiom, and a literal-only concatenation.
6
+ - 'db.execute("SELECT * FROM users")'
7
+ - 'db.execute("SELECT * FROM users WHERE id = ?", [id])'
8
+ - 'db.execute("SELECT * FROM " + "users")'
9
+ - 'db.execute(sql`SELECT * FROM users WHERE id = ${id}`)'
10
+ # The callee-name shapes #2909 reported: `execute` is also a task method.
11
+ - 'runner.execute("delete " + id)'
12
+ - 'queue.execute(`update ${id}`)'
13
+ - 'command.execute("update " + name)'
14
+ - 'task.execute("updated " + name)'
15
+ # Only the first argument is read.
16
+ - 'db.execute("id = " + id, "DELETE FROM t")'
17
+ - 'ui.execute("Please select an item from " + list)'
18
+ - 'ui.execute("Item " + n + " selected from list")'
19
+ - 'job.execute("update " + id, { set: true })'
20
+ - 'menu.execute("select " + item, { from: x })'
21
+ # `SELECT` and `WITH` are whole words.
22
+ - 'job.execute("selected from " + source)'
23
+ - 'ui.execute("Within the select list " + id)'
24
+ - 'ui.execute("Item " + n + " select from list")'
25
+ # \N is not an escape; JavaScript reads it as N.
26
+ - 'runner.execute("\NSELECT * FROM " + source)'
27
+ - 'runner.execute("-- note\NSELECT * FROM " + source)'
28
+ # A template with no substitution is constant SQL.
29
+ - 'db.execute(`SELECT * FROM users`)'
30
+ # The first argument must open with a quote or backtick.
31
+ - 'db.execute(update + " SET x = 1")'
32
+ # An escaped tab does not end a -- comment.
33
+ - 'db.execute("-- c\tSELECT * FROM t WHERE id = " + id)'
34
+ invalid:
35
+ - 'db.execute("SELECT * FROM users WHERE id = " + id)'
36
+ - 'db.execute("DELETE FROM sessions WHERE token = " + token, [])'
37
+ - 'db.execute(`SELECT * FROM users WHERE id = ${id}`)'
38
+ - 'db.execute("UPDATE users SET name = ''" + n + "''")'
39
+ - 'db.execute("DELETE FROM t WHERE id = " + id)'
40
+ - 'db.execute("SELECT*FROM t WHERE id=" + id)'
41
+ - 'db.execute(`SELECT pg_sleep(${n})`)'
42
+ - 'db.execute("INSERT INTO t (a) VALUES (''" + a + "'')")'
43
+ - |-
44
+ db.execute(`
45
+ SELECT *
46
+ FROM users
47
+ WHERE id = ${id}
48
+ `)
49
+ - 'db.execute("CREATE OR REPLACE VIEW v AS SELECT * FROM " + t)'
50
+ - 'db.execute("DROP TABLE " + table)'
51
+ - 'db.execute("ALTER TABLE " + table + " ADD COLUMN x int")'
52
+ - 'db.execute("GRANT SELECT ON " + table + " TO app")'
53
+ - 'db.execute("REVOKE ALL ON " + table + " FROM app")'
54
+ - 'db.execute("WITH u AS (SELECT * FROM users) SELECT * FROM u WHERE id = " + id)'
55
+ - 'db.execute("MERGE INTO t USING s ON t.id = " + id)'
56
+ - 'db.execute("TRUNCATE TABLE " + table)'
57
+ - 'db.execute("REPLACE INTO t VALUES (" + v + ")")'
58
+ - 'db.execute("/* by id */ SELECT * FROM t WHERE id = " + id)'
59
+ - |-
60
+ db.execute(`-- one user
61
+ SELECT * FROM users WHERE id = ${id}`)
62
+ - "db.execute('SELECT * FROM t WHERE id = ' + id)"
63
+ - 'db?.execute("SELECT * FROM t WHERE id = " + id)'
64
+ - 'db?.execute("DELETE FROM t WHERE id = " + id, [])'
65
+ # Escape sequences as written in source, not real whitespace.
66
+ - 'db.execute("\nSELECT * FROM users WHERE id = " + id)'
67
+ - 'db.execute("\tDELETE FROM t WHERE id = " + id)'
68
+ - 'db.execute("\r\nUPDATE users SET a = " + a)'
69
+ - 'db.execute("-- user lookup\nSELECT * FROM users WHERE id = " + id)'
70
+ - 'db.execute("-- c\rSELECT * FROM t WHERE id = " + id)'
71
+ # A comment before the first argument is a named child of `arguments`.
72
+ - |-
73
+ db.execute(
74
+ // by id
75
+ `SELECT * FROM users WHERE id = ${id}`)
76
+ - 'db.execute(/* by id */ "SELECT * FROM users WHERE id = " + id)'
77
+ # Not SQL, but it matches the sibling's `SELECT ... ${` arm;
78
+ # ts_sql_injection_sink flags the same template.
79
+ - 'queue.execute(`select ${id}`)'
80
+ # Statement-shaped English that the alternation still accepts (#4804
81
+ # review): pinned so a later narrowing has a red row to work against.
82
+ - 'acl.execute("grant " + role)'
83
+ - 'search.execute("create index " + field)'
84
+ - 'config.execute("merge into " + base)'
85
+ - 'runner.execute("delete from " + cacheKey)'
86
+ - 'ui.execute("select " + label + " from the list")'
@@ -0,0 +1,86 @@
1
+ id: no-sql-in-code-execute
2
+ valid:
3
+ # `.query` belongs to `no-sql-in-code`; this rule holds the `.execute` arms.
4
+ - 'db.query("SELECT * FROM users WHERE id = " + id)'
5
+ # Constant SQL, the parameterized idiom, and a literal-only concatenation.
6
+ - 'db.execute("SELECT * FROM users")'
7
+ - 'db.execute("SELECT * FROM users WHERE id = ?", [id])'
8
+ - 'db.execute("SELECT * FROM " + "users")'
9
+ - 'db.execute(sql`SELECT * FROM users WHERE id = ${id}`)'
10
+ # The callee-name shapes #2909 reported: `execute` is also a task method.
11
+ - 'runner.execute("delete " + id)'
12
+ - 'queue.execute(`update ${id}`)'
13
+ - 'command.execute("update " + name)'
14
+ - 'task.execute("updated " + name)'
15
+ # Only the first argument is read.
16
+ - 'db.execute("id = " + id, "DELETE FROM t")'
17
+ - 'ui.execute("Please select an item from " + list)'
18
+ - 'ui.execute("Item " + n + " selected from list")'
19
+ - 'job.execute("update " + id, { set: true })'
20
+ - 'menu.execute("select " + item, { from: x })'
21
+ # `SELECT` and `WITH` are whole words.
22
+ - 'job.execute("selected from " + source)'
23
+ - 'ui.execute("Within the select list " + id)'
24
+ - 'ui.execute("Item " + n + " select from list")'
25
+ # \N is not an escape; JavaScript reads it as N.
26
+ - 'runner.execute("\NSELECT * FROM " + source)'
27
+ - 'runner.execute("-- note\NSELECT * FROM " + source)'
28
+ # A template with no substitution is constant SQL.
29
+ - 'db.execute(`SELECT * FROM users`)'
30
+ # The first argument must open with a quote or backtick.
31
+ - 'db.execute(update + " SET x = 1")'
32
+ # An escaped tab does not end a -- comment.
33
+ - 'db.execute("-- c\tSELECT * FROM t WHERE id = " + id)'
34
+ invalid:
35
+ - 'db.execute("SELECT * FROM users WHERE id = " + id)'
36
+ - 'db.execute("DELETE FROM sessions WHERE token = " + token, [])'
37
+ - 'db.execute(`SELECT * FROM users WHERE id = ${id}`)'
38
+ - 'db.execute("UPDATE users SET name = ''" + n + "''")'
39
+ - 'db.execute("DELETE FROM t WHERE id = " + id)'
40
+ - 'db.execute("SELECT*FROM t WHERE id=" + id)'
41
+ - 'db.execute(`SELECT pg_sleep(${n})`)'
42
+ - 'db.execute("INSERT INTO t (a) VALUES (''" + a + "'')")'
43
+ - |-
44
+ db.execute(`
45
+ SELECT *
46
+ FROM users
47
+ WHERE id = ${id}
48
+ `)
49
+ - 'db.execute("CREATE OR REPLACE VIEW v AS SELECT * FROM " + t)'
50
+ - 'db.execute("DROP TABLE " + table)'
51
+ - 'db.execute("ALTER TABLE " + table + " ADD COLUMN x int")'
52
+ - 'db.execute("GRANT SELECT ON " + table + " TO app")'
53
+ - 'db.execute("REVOKE ALL ON " + table + " FROM app")'
54
+ - 'db.execute("WITH u AS (SELECT * FROM users) SELECT * FROM u WHERE id = " + id)'
55
+ - 'db.execute("MERGE INTO t USING s ON t.id = " + id)'
56
+ - 'db.execute("TRUNCATE TABLE " + table)'
57
+ - 'db.execute("REPLACE INTO t VALUES (" + v + ")")'
58
+ - 'db.execute("/* by id */ SELECT * FROM t WHERE id = " + id)'
59
+ - |-
60
+ db.execute(`-- one user
61
+ SELECT * FROM users WHERE id = ${id}`)
62
+ - "db.execute('SELECT * FROM t WHERE id = ' + id)"
63
+ - 'db?.execute("SELECT * FROM t WHERE id = " + id)'
64
+ - 'db?.execute("DELETE FROM t WHERE id = " + id, [])'
65
+ # Escape sequences as written in source, not real whitespace.
66
+ - 'db.execute("\nSELECT * FROM users WHERE id = " + id)'
67
+ - 'db.execute("\tDELETE FROM t WHERE id = " + id)'
68
+ - 'db.execute("\r\nUPDATE users SET a = " + a)'
69
+ - 'db.execute("-- user lookup\nSELECT * FROM users WHERE id = " + id)'
70
+ - 'db.execute("-- c\rSELECT * FROM t WHERE id = " + id)'
71
+ # A comment before the first argument is a named child of `arguments`.
72
+ - |-
73
+ db.execute(
74
+ // by id
75
+ `SELECT * FROM users WHERE id = ${id}`)
76
+ - 'db.execute(/* by id */ "SELECT * FROM users WHERE id = " + id)'
77
+ # Not SQL, but it matches the sibling's `SELECT ... ${` arm;
78
+ # ts_sql_injection_sink flags the same template.
79
+ - 'queue.execute(`select ${id}`)'
80
+ # Statement-shaped English that the alternation still accepts (#4804
81
+ # review): pinned so a later narrowing has a red row to work against.
82
+ - 'acl.execute("grant " + role)'
83
+ - 'search.execute("create index " + field)'
84
+ - 'config.execute("merge into " + base)'
85
+ - 'runner.execute("delete from " + cacheKey)'
86
+ - 'ui.execute("select " + label + " from the list")'
@@ -12,7 +12,22 @@ valid:
12
12
  g = int(s)
13
13
  except ValueError:
14
14
  pass
15
+ - |
16
+ # #4840: round() and len() already return numbers.
17
+ a = float(round(v, 3))
18
+ b = int(len(xs))
19
+ - |
20
+ # #4841 review F4: abs(), sum() and ord() raise TypeError, never ValueError,
21
+ # and return a number otherwise.
22
+ c = int(abs(v))
23
+ d = float(sum(xs))
24
+ e = int(ord(ch))
15
25
  invalid:
16
26
  - 'int("42")'
17
27
  - 'float("3.14")'
18
28
  - 'int(user_input)'
29
+ - 'int(s.strip())'
30
+ - 'float(round_trip(s))'
31
+ - |
32
+ # min() and max() return their argument's type, so a string can reach int().
33
+ int(min(parts))
@@ -12,9 +12,10 @@ note: |
12
12
 
13
13
  The rule matches a `function_definition` that contains BOTH a
14
14
  `yield` node AND a `return_statement` with a value (`return\s+\S`).
15
- Each `has:` uses `stopBy: {kind: function_definition}` (not the
16
- plain `stopBy: end` this rule shipped with originally) — it needs
17
- to search past the `block` wrapper (the function body isn't a
15
+ Each `has:` stops at a nested `function_definition` (not the
16
+ plain `stopBy: end` this rule shipped with originally); the `yield`
17
+ clause also stops at a `lambda`, since `lambda: (yield)` is its own
18
+ generator (#4840). The search has to go past the `block` wrapper (the function body isn't a
18
19
  direct child of `function_definition`), but must NOT cross into a
19
20
  nested `function_definition`. A bare `stopBy: end` searches every
20
21
  descendant regardless of depth, so a `yield` in an outer
@@ -38,8 +39,12 @@ rule:
38
39
  - kind: function_definition
39
40
  - has:
40
41
  kind: yield
42
+ # A nested def or a generator lambda (`lambda: (yield)`) is its own
43
+ # generator; its yield does not make the enclosing function one (#4840).
41
44
  stopBy:
42
- kind: function_definition
45
+ any:
46
+ - kind: function_definition
47
+ - kind: lambda
43
48
  - has:
44
49
  kind: return_statement
45
50
  regex: 'return\s+\S'