pi-lens 4.5.1 → 4.5.2

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 (139) hide show
  1. package/CHANGELOG-USER.md +6 -6
  2. package/CHANGELOG.md +121 -0
  3. package/README.md +9 -2
  4. package/dist/{chunk-ZVQUYCBU.js → chunk-2ERVW2UF.js} +161 -100
  5. package/dist/{chunk-AFSG6YUB.js → chunk-2K7BUOKS.js} +13 -13
  6. package/dist/{chunk-BJGWP4UX.js → chunk-3JJ4OAJI.js} +10 -10
  7. package/dist/{chunk-GIK6VUCY.js → chunk-3UHGSUVL.js} +1 -1
  8. package/dist/{chunk-EKQDQPX6.js → chunk-463WN3VP.js} +1 -1
  9. package/dist/{chunk-F7BFIENK.js → chunk-4X3ML2UQ.js} +29 -32
  10. package/dist/{chunk-7JMEPY6P.js → chunk-5BI5YP57.js} +10 -10
  11. package/dist/{chunk-MKW7ZUTT.js → chunk-5Z4XLUFF.js} +3 -3
  12. package/dist/{chunk-NIZKGBOU.js → chunk-62AJH3IN.js} +12 -14
  13. package/dist/{chunk-4GLSO2EM.js → chunk-6F34GMP7.js} +12 -12
  14. package/dist/{chunk-35UJUF27.js → chunk-6LIUVGOR.js} +13 -3
  15. package/dist/{chunk-WJ7GY5WJ.js → chunk-6REF4GCO.js} +1 -1
  16. package/dist/{chunk-HFIFEH46.js → chunk-7KRR24GO.js} +3 -3
  17. package/dist/{chunk-WAK2AXQQ.js → chunk-7OMOMBEQ.js} +9 -9
  18. package/dist/{chunk-S7KUDW73.js → chunk-7ZFXICNN.js} +15 -15
  19. package/dist/{chunk-VEF3GFOL.js → chunk-ABKRQVOY.js} +28 -52
  20. package/dist/{chunk-Y2LIOCA7.js → chunk-ANSLRJBG.js} +1 -1
  21. package/dist/{chunk-ARTCVE6I.js → chunk-AWMFBPGJ.js} +9 -9
  22. package/dist/{chunk-H6DNTQ4V.js → chunk-BG7KHGNX.js} +2 -2
  23. package/dist/{chunk-FD4LJQ6Y.js → chunk-BK2R2223.js} +10 -8
  24. package/dist/{chunk-TWAQFMLW.js → chunk-BXXC6KRR.js} +31 -34
  25. package/dist/{chunk-S247BOH2.js → chunk-CKJS2AUI.js} +4 -4
  26. package/dist/{chunk-GNK2IHVG.js → chunk-COGU5KQJ.js} +15 -15
  27. package/dist/{chunk-P7EV5ISR.js → chunk-CQNXALZJ.js} +12 -6
  28. package/dist/{chunk-IO6P3NBP.js → chunk-CSZESDPP.js} +1 -1
  29. package/dist/chunk-CZ5TCJPB.js +98 -0
  30. package/dist/{chunk-DLGJYQML.js → chunk-D2LFEA5U.js} +9 -2
  31. package/dist/chunk-D3KLF5CD.js +50 -0
  32. package/dist/{chunk-W2JPGW7Q.js → chunk-ENJ2M76Y.js} +20 -20
  33. package/dist/{chunk-2DWNYVUN.js → chunk-EQKF6BAK.js} +3 -3
  34. package/dist/{chunk-KIQSNH3F.js → chunk-F2SAP2FM.js} +38 -45
  35. package/dist/{chunk-BYIEU4E4.js → chunk-F6QAJXQV.js} +2 -2
  36. package/dist/chunk-GR2QDWH5.js +25 -0
  37. package/dist/{chunk-T2D2WWP6.js → chunk-GVE5VZYQ.js} +5 -5
  38. package/dist/{chunk-HMXWZUQW.js → chunk-GWZZOJD2.js} +1 -1
  39. package/dist/chunk-GZS6VPIE.js +27 -0
  40. package/dist/chunk-H4B4SC7I.js +71 -0
  41. package/dist/{chunk-2RQREVGO.js → chunk-HA6TUJOE.js} +1 -1
  42. package/dist/{chunk-NAACKIKT.js → chunk-HKPJTI47.js} +2 -2
  43. package/dist/{chunk-NHHS5T52.js → chunk-HPKC55MA.js} +1 -1
  44. package/dist/{chunk-B2QO7GHY.js → chunk-I65CQLCG.js} +1 -1
  45. package/dist/{chunk-BQ72NQQM.js → chunk-IDKLWVKY.js} +11 -11
  46. package/dist/chunk-IUM2Q7NF.js +25 -0
  47. package/dist/{chunk-PVV27TOX.js → chunk-J24IS3KZ.js} +5 -5
  48. package/dist/{chunk-DKXIUGNA.js → chunk-J2DAHH4T.js} +2 -2
  49. package/dist/{chunk-CDAJQBKJ.js → chunk-JBDZVOFL.js} +11 -11
  50. package/dist/{chunk-T7KHGEJ5.js → chunk-JC6NFC57.js} +3 -3
  51. package/dist/{chunk-BWGNVM33.js → chunk-JTHEUTW7.js} +11 -11
  52. package/dist/{chunk-WWZLT6AM.js → chunk-JWW3ODBN.js} +2 -2
  53. package/dist/{chunk-Q32RJDYC.js → chunk-K3ZIYLHT.js} +4 -4
  54. package/dist/{chunk-LDPY22FS.js → chunk-KDPZA2UE.js} +2 -3
  55. package/dist/{chunk-YIEHUKX2.js → chunk-KMY2OU4T.js} +489 -285
  56. package/dist/{chunk-WH6O4IFD.js → chunk-KQF7VT26.js} +10 -10
  57. package/dist/{chunk-OG3UCAHV.js → chunk-KVGA7X76.js} +3 -3
  58. package/dist/{chunk-TABDCX35.js → chunk-KW7O72AK.js} +2 -2
  59. package/dist/{chunk-AOEVZXR6.js → chunk-LEQTVRSV.js} +9 -9
  60. package/dist/{chunk-7BWPQZHE.js → chunk-LKPSBM6S.js} +3 -3
  61. package/dist/{chunk-WA6U2URH.js → chunk-LKW2HFSZ.js} +6 -6
  62. package/dist/{chunk-M3QGXGY4.js → chunk-LURFD4HD.js} +624 -97
  63. package/dist/{chunk-2YQ5LI7R.js → chunk-M6ELTECW.js} +4 -4
  64. package/dist/{chunk-OHTHVILU.js → chunk-MGVVYYKW.js} +12 -12
  65. package/dist/{chunk-W2YHHNY3.js → chunk-MQBKGRSB.js} +7 -7
  66. package/dist/{chunk-MET776XM.js → chunk-MVG2ZEAO.js} +6 -6
  67. package/dist/{chunk-2XALJI2K.js → chunk-MY4XNNTX.js} +39 -41
  68. package/dist/{chunk-GFCPPCNR.js → chunk-N4AJVFRF.js} +11 -11
  69. package/dist/{chunk-UARVPNAU.js → chunk-OFKKMXWM.js} +31 -36
  70. package/dist/{chunk-DHFJS2I4.js → chunk-OFZE4ANN.js} +8 -8
  71. package/dist/chunk-OLXBUTJR.js +61 -0
  72. package/dist/{chunk-SJ2SR432.js → chunk-OZGEHOSG.js} +38 -17
  73. package/dist/{chunk-6MDWNZ7E.js → chunk-PKGOROPQ.js} +40 -2
  74. package/dist/{chunk-3IWMNN2S.js → chunk-Q6D5QKRG.js} +17 -17
  75. package/dist/{chunk-JGCBMCCS.js → chunk-QECLJFHI.js} +12 -17
  76. package/dist/{chunk-KXKM2DFP.js → chunk-QJA33VD5.js} +4 -4
  77. package/dist/{chunk-YV7XVYSJ.js → chunk-R5XVJ6AN.js} +11 -11
  78. package/dist/{chunk-62PIU4TO.js → chunk-REZL4OM4.js} +1 -1
  79. package/dist/{chunk-NNDZ7DOP.js → chunk-RK5RBREN.js} +74 -107
  80. package/dist/chunk-RP5ZQTHO.js +86 -0
  81. package/dist/{chunk-HKRESBMC.js → chunk-RURPX2YV.js} +23 -23
  82. package/dist/chunk-TB5MGZLS.js +53 -0
  83. package/dist/chunk-TC63XRYP.js +27 -0
  84. package/dist/chunk-TJOYHAXJ.js +69 -0
  85. package/dist/{chunk-NZ7NSKIW.js → chunk-TRXKDCBP.js} +13 -13
  86. package/dist/{chunk-7WAQ3K26.js → chunk-TTK37D7R.js} +22 -23
  87. package/dist/{chunk-ALTHJUZO.js → chunk-UH3QHLR5.js} +2 -2
  88. package/dist/{chunk-6MZLS6CK.js → chunk-UNTJJ7GN.js} +7 -7
  89. package/dist/{chunk-XRLZ75YY.js → chunk-UPAFSETJ.js} +54 -59
  90. package/dist/{chunk-N2U644ZW.js → chunk-UX75PTQW.js} +50 -17
  91. package/dist/{chunk-EXHSWN3P.js → chunk-V353PYMK.js} +423 -233
  92. package/dist/{chunk-SL4G67AP.js → chunk-V4TFQY5G.js} +2 -2
  93. package/dist/{chunk-YOMLAKU6.js → chunk-VC3W54G3.js} +289 -138
  94. package/dist/{chunk-KSQJBGRO.js → chunk-VSBCJVPC.js} +5 -5
  95. package/dist/{chunk-EBXCYEII.js → chunk-WAQQGXVV.js} +3 -3
  96. package/dist/{chunk-7ORBRDFY.js → chunk-WLEVWR7Y.js} +2 -2
  97. package/dist/{chunk-Q4UQNTLB.js → chunk-WPMPVP5I.js} +4 -4
  98. package/dist/{chunk-TQKWR5AZ.js → chunk-WXNLFOC2.js} +7 -7
  99. package/dist/{chunk-HOWHAKXO.js → chunk-Y3ZNOZZS.js} +6 -6
  100. package/dist/{chunk-DNJJVKJZ.js → chunk-YL6JQTWC.js} +29 -32
  101. package/dist/{chunk-HUWW77QY.js → chunk-YVE5Q2UU.js} +86 -217
  102. package/dist/{chunk-25CAONWT.js → chunk-YZNARDMM.js} +12 -9
  103. package/dist/{chunk-HERQPNY6.js → chunk-ZDWNFZJ2.js} +8 -8
  104. package/dist/{chunk-MKQFSW2Q.js → chunk-ZEUF7BIN.js} +2 -2
  105. package/dist/{chunk-AB26NAHA.js → chunk-ZIF4WLWR.js} +45 -25
  106. package/dist/{chunk-6MWX2J5H.js → chunk-ZSPVF7KI.js} +227 -24
  107. package/dist/{chunk-QQGZY2BR.js → chunk-ZX6OKBVO.js} +2 -2
  108. package/dist/index.js +6455 -5243
  109. package/dist/mcp/analyze-cli.js +8 -8
  110. package/dist/mcp/cli.js +39 -41
  111. package/dist/mcp/server.js +870 -559
  112. package/dist/mcp/worker.js +68 -59
  113. package/dist/probes/installer.js +19 -20
  114. package/docs/configuration.md +24 -10
  115. package/docs/defect-shapes.md +18 -2
  116. package/docs/environment-variables.md +18 -9
  117. package/docs/globalconfig.md +16 -0
  118. package/docs/invariants/dispatch-runners.md +7 -0
  119. package/docs/invariants/lsp-trust-exec.md +33 -3
  120. package/docs/lsp-capability-matrix.md +23 -10
  121. package/docs/lsp-idle-eviction.md +8 -3
  122. package/docs/release-qa-baseline.md +22 -17
  123. package/docs/servercapabilities.md +1 -1
  124. package/docs/settings.md +9 -2
  125. package/docs/tools.md +1 -1
  126. package/package.json +3 -3
  127. package/dist/chunk-3UTDLQWO.js +0 -88
  128. package/dist/chunk-3Z7Z3B7V.js +0 -27
  129. package/dist/chunk-4E4OCW3L.js +0 -38
  130. package/dist/chunk-5HVDD7IA.js +0 -17
  131. package/dist/chunk-BKJ6WZKP.js +0 -255
  132. package/dist/chunk-D3UQWOCB.js +0 -46
  133. package/dist/chunk-EH6EHFW2.js +0 -73
  134. package/dist/chunk-J7VNGHLN.js +0 -69
  135. package/dist/chunk-L3Q72QGQ.js +0 -25
  136. package/dist/chunk-TFSBHRL2.js +0 -25
  137. package/dist/chunk-UWBD3JMH.js +0 -56
  138. package/dist/chunk-XWWFESYZ.js +0 -27
  139. package/dist/chunk-XZSXSM4K.js +0 -27
@@ -148,17 +148,21 @@ extension lists one any other way, and a narrower pi-tui range turned a raw
148
148
  `npm i` with a current pi-tui at the top level into a hard ERESOLVE while
149
149
  `pi install` (which runs `--legacy-peer-deps`) showed users nothing.
150
150
 
151
- The window pi-lens actually supports is therefore not in `package.json`. It is
152
- `PI_HOST_SUPPORTED_RANGE` in `.github/workflows/install-smoke.yml` (the
153
- newest-in-range lane reads it, bounded above so `"*"` can never mean
154
- `@latest`), and `tests/packaging.test.ts` pins it against the hosts this
155
- matrix has passed on. A newer host enters the window in ONE change: run this
156
- matrix on it, add it to that test's verified list, and move the workflow's
157
- ceiling together. P1 is one verified host per minor line from 0.86 onward;
158
- 0.86–1.5 are in-window, and every minor line below 0.86 falls outside the
159
- window entirely, so none needs a dedicated host. A ceiling past an unrun
160
- minor still claims that minor, so the verified-minor ratchet names the admitted
161
- lines explicitly.
151
+ The window pi-lens actually supports is therefore not in `package.json`, and it
152
+ has no hand-kept ceiling (#5749, maintainer decision 2026-11-22). Its lower end
153
+ is `PI_HOST_FLOOR_VERSION` in `.github/workflows/install-smoke.yml`; its upper
154
+ end is always the newest stable pi, the npm dist-tag `latest`. The gating
155
+ newest-in-range lane resolves that tag on every run and installs it (no
156
+ prerelease; if the registry cannot answer, the lane fails closed and never
157
+ falls back to an older host), so a new pi release is exercised by a gating lane
158
+ without anyone bumping a range. `tests/packaging.test.ts` derives the window
159
+ from the floor and pins it against the hosts this matrix has passed on. A
160
+ release-QA run on a newer host extends the `Verified hosts` table below: the
161
+ table is evidence about a host, no longer a gate on the lane.
162
+ P1 is one verified host per minor line from 0.86 onward; 0.86 onward are in-window,
163
+ and every minor line below 0.86 falls outside the window entirely, so none needs
164
+ a dedicated host. A minor line above the newest verified one is inside the window
165
+ and tested by the gating lane, but not release-QA verified until its row lands.
162
166
 
163
167
  The floor is 0.86.1 (#4688, maintainer decision 2026-10-20). 0.80–0.85 are
164
168
  out of the window: since #4644 pi-lens injects context only from a `context`
@@ -171,12 +175,13 @@ the old hosts; a real 0.80.10 session delivered the staged guidance at
171
175
 
172
176
  ### Verified hosts
173
177
 
174
- The certified policy is `>=0.86.1 <1.6.0`, and this table is the whole verified
175
- set: `tests/packaging.test.ts` fails when it and `PI_HOST_SUPPORTED_RANGE`
176
- disagree. Each listed minor line through 1.4 has a release-QA witness; 1.5 was
177
- certified by maintainer decision on 2026-11-02, with its witness blocked by
178
- the lane npm guard. The workflow ceiling
179
- and `tests/packaging.test.ts` list are updated together.
178
+ The certified policy is `>=0.86.1`, with no upper end (the newest stable pi is
179
+ inside the window the day it ships, #5749), and this table is the whole verified set:
180
+ `tests/packaging.test.ts` fails when it and the workflow's floor disagree. Each
181
+ listed minor line through 1.4 has a release-QA witness; 1.5 was certified by
182
+ maintainer decision on 2026-11-02, with its witness blocked by the lane npm
183
+ guard. Add a host here, together with that test's list, after release-QA has
184
+ run on it.
180
185
 
181
186
  | host | date | pi-lens commit | result |
182
187
  | --- | --- | --- | --- |
@@ -6,7 +6,7 @@ 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-11-15 on linux; 41 servers captured, 9 unavailable._
9
+ _Last generated: 2026-11-21 on linux; 42 servers captured, 9 unavailable._
10
10
 
11
11
  ## Diagnostic mode + navigation/edit operations
12
12
 
package/docs/settings.md CHANGED
@@ -48,7 +48,12 @@ For a single toggle, highest priority first:
48
48
  project-scoped keys only: the three mutation controls (`format.enabled`,
49
49
  `autofix.enabled`, `actionableWarnings.autoFix.enabled`) and the per-tool
50
50
  switches `tools.<name>.enabled` (`tools.lazy` itself stays global-only). In a
51
- monorepo the closest config to the edited file wins.
51
+ monorepo the closest config to the edited file wins for the three mutation
52
+ controls. The per-tool switches are read once per session from the
53
+ repository's `.pi-lens.json` files at your working directory, up to the git
54
+ root, so a package's own file does not switch a tool off or on. A repository
55
+ with no `.pi-lens.json` of its own still inherits the nearest one above it,
56
+ whole: the git-root limit applies to layered reads, not to that fallback.
52
57
  4. **Global `~/.pi-lens/config.json`**.
53
58
  5. **Built-in default**.
54
59
 
@@ -160,6 +165,8 @@ add a denial but never re-enable one. See
160
165
  | --- | --- | --- | --- |
161
166
  | `ignore` | global + project | `[]` | Gitignore-style globs excluded from every scan |
162
167
  | `widget.visible` | global | `true` | Whether the diagnostics widget shows at session start |
168
+ | `widget.position` | global | `"belowEditor"` | `"aboveEditor"` or `"belowEditor"`: where the widget draws relative to the input box |
169
+ | `widget.hideWhenClean` | global | `false` | Hide the widget 5 s after it first shows `✓ clean`. See [globalconfig](globalconfig.md#widget-position-and-hiding) |
163
170
  | `dispatch.runnerTimeoutFloorMs` | global | none (no floor) | Minimum wall-clock budget per dispatch runner |
164
171
  | `lsp.queryMaxFileLines` | global | `5000` | Line limit of the explicit single-file `lens_diagnostics source=lsp` query only; a whole number from `5000` to `40000` (suggested `20000`). See [globalconfig](globalconfig.md#explicit-diagnostics-query-line-limit) |
165
172
  | `dispatch.disabledRunners` | global + project | `[]` | Dispatch runner ids that never run (for example `["dotnet-build"]`). A denial: the union of every tier, so a project can add but never re-enable. Unknown ids are dropped with a warning. See [configuration](configuration.md#dispatchdisabledrunners--turning-a-dispatch-runner-off) |
@@ -182,7 +189,7 @@ add a denial but never re-enable one. See
182
189
  User-level. The file is selected by the [global-location table](configuration.md#global-config-location)
183
190
  and applies to **every** project. It honors **all** flag keys from the
184
191
  table above plus the non-flag global knobs (`ignore`, `widget.visible`,
185
- `dispatch.runnerTimeoutFloorMs`, `dispatch.disabledRunners`, `format.mode`,
192
+ `widget.position`, `widget.hideWhenClean`, `dispatch.runnerTimeoutFloorMs`, `dispatch.disabledRunners`, `format.mode`,
186
193
  `actionableWarnings.autoFix.maxFixes`, `lsp.queryMaxFileLines`). On Windows the path is
187
194
  `%USERPROFILE%\.pi-lens\config.json`.
188
195
 
package/docs/tools.md CHANGED
@@ -4,7 +4,7 @@ pi-lens registers the following slash commands with the pi host:
4
4
 
5
5
  - `/lens-toggle` — toggle pi-lens on/off for the current session without restarting
6
6
  - `/lens-context-toggle` — toggle automatic context injection on/off for the session (tools/LSP/read-guard/formatting stay active)
7
- - `/lens-widget-toggle` — show/hide the pi-lens diagnostics widget below the editor
7
+ - `/lens-widget-toggle` — show/hide the pi-lens diagnostics widget
8
8
  - `/lens-health` — runtime health, latency, and diagnostic telemetry, including
9
9
  bounded per-session degradation counts (trust refusals, LSP breakers,
10
10
  formatter skips/failures, idle evictions, WASM aborts, timeout tallies, and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-lens",
3
- "version": "4.5.1",
3
+ "version": "4.5.2",
4
4
  "type": "module",
5
5
  "description": "Real-time code feedback for pi — LSP, linters, formatters, type-checking, structural analysis & booboo",
6
6
  "repository": {
@@ -131,7 +131,7 @@
131
131
  "banner.png"
132
132
  ],
133
133
  "dependencies": {
134
- "@ast-grep/cli": "0.51.1",
134
+ "@ast-grep/cli": "0.51.2",
135
135
  "@ast-grep/napi": "^0.51.0",
136
136
  "js-yaml": "^5.2.2",
137
137
  "minimatch": "^11.0.4",
@@ -168,7 +168,7 @@
168
168
  ]
169
169
  },
170
170
  "allowScripts": {
171
- "@ast-grep/cli@0.51.1": true,
171
+ "@ast-grep/cli@0.51.2": true,
172
172
  "@google/genai@2.21.0": true,
173
173
  "esbuild@0.28.2": true,
174
174
  "fsevents@2.3.3": false,
@@ -1,88 +0,0 @@
1
- import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
- import {
3
- _getWarmWordIndexCacheStateForTests,
4
- _resetWarmWordIndexCacheForTests,
5
- acquireWarmWordIndex,
6
- analyzeFile,
7
- summarizeWarningTiers
8
- } from "./chunk-ZVQUYCBU.js";
9
- import "./chunk-BKJ6WZKP.js";
10
- import "./chunk-2RQREVGO.js";
11
- import "./chunk-T7KHGEJ5.js";
12
- import "./chunk-7ORBRDFY.js";
13
- import "./chunk-W2YHHNY3.js";
14
- import "./chunk-OG3UCAHV.js";
15
- import "./chunk-FD4LJQ6Y.js";
16
- import "./chunk-HFIFEH46.js";
17
- import "./chunk-QQGZY2BR.js";
18
- import "./chunk-ALTHJUZO.js";
19
- import "./chunk-S247BOH2.js";
20
- import "./chunk-JGCBMCCS.js";
21
- import "./chunk-NNDZ7DOP.js";
22
- import "./chunk-Q32RJDYC.js";
23
- import "./chunk-2YQ5LI7R.js";
24
- import "./chunk-Y2LIOCA7.js";
25
- import "./chunk-IO6P3NBP.js";
26
- import "./chunk-W2JPGW7Q.js";
27
- import "./chunk-3MED75HT.js";
28
- import "./chunk-PKLB2XJL.js";
29
- import "./chunk-EXHSWN3P.js";
30
- import "./chunk-35UJUF27.js";
31
- import "./chunk-XIMYZ3JA.js";
32
- import "./chunk-YIEHUKX2.js";
33
- import "./chunk-J7VNGHLN.js";
34
- import "./chunk-AB26NAHA.js";
35
- import "./chunk-5HVDD7IA.js";
36
- import "./chunk-B2QO7GHY.js";
37
- import "./chunk-5W3R6LFT.js";
38
- import "./chunk-S7KUDW73.js";
39
- import "./chunk-KSQJBGRO.js";
40
- import "./chunk-H6DNTQ4V.js";
41
- import "./chunk-4GLSO2EM.js";
42
- import "./chunk-Z54ZSOBZ.js";
43
- import "./chunk-2DWNYVUN.js";
44
- import "./chunk-6HWVI6MI.js";
45
- import "./chunk-HMXWZUQW.js";
46
- import "./chunk-MET776XM.js";
47
- import "./chunk-BQ72NQQM.js";
48
- import "./chunk-BYIEU4E4.js";
49
- import "./chunk-NAACKIKT.js";
50
- import "./chunk-6MDWNZ7E.js";
51
- import "./chunk-2APSZHHI.js";
52
- import "./chunk-62PIU4TO.js";
53
- import "./chunk-2BEMIWEW.js";
54
- import "./chunk-IJYGIDF4.js";
55
- import "./chunk-YOMLAKU6.js";
56
- import "./chunk-T2D2WWP6.js";
57
- import "./chunk-25CAONWT.js";
58
- import "./chunk-WWZLT6AM.js";
59
- import "./chunk-DKXIUGNA.js";
60
- import "./chunk-LDPY22FS.js";
61
- import "./chunk-HOWHAKXO.js";
62
- import "./chunk-WJ7GY5WJ.js";
63
- import "./chunk-WA6U2URH.js";
64
- import "./chunk-TABDCX35.js";
65
- import "./chunk-TQWRH25U.js";
66
- import "./chunk-UYXV5NIS.js";
67
- import "./chunk-M3QGXGY4.js";
68
- import "./chunk-GIK6VUCY.js";
69
- import "./chunk-QYF5S6P6.js";
70
- import "./chunk-N2U644ZW.js";
71
- import "./chunk-SL4G67AP.js";
72
- import "./chunk-DLGJYQML.js";
73
- import "./chunk-CIA7X2PZ.js";
74
- import "./chunk-EKQDQPX6.js";
75
- import "./chunk-P7EV5ISR.js";
76
- import "./chunk-S26LC76R.js";
77
- import "./chunk-HUWW77QY.js";
78
- import "./chunk-LJDODBBZ.js";
79
- import "./chunk-NHHS5T52.js";
80
- import "./chunk-6MWX2J5H.js";
81
- import "./chunk-NXL4FFQQ.js";
82
- export {
83
- _getWarmWordIndexCacheStateForTests,
84
- _resetWarmWordIndexCacheForTests,
85
- acquireWarmWordIndex,
86
- analyzeFile,
87
- summarizeWarningTiers
88
- };
@@ -1,27 +0,0 @@
1
- import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
- import {
3
- GovulncheckClient,
4
- parseGovulncheckJson
5
- } from "./chunk-DHFJS2I4.js";
6
- import "./chunk-FD4LJQ6Y.js";
7
- import "./chunk-HFIFEH46.js";
8
- import "./chunk-QQGZY2BR.js";
9
- import "./chunk-5HVDD7IA.js";
10
- import "./chunk-2APSZHHI.js";
11
- import "./chunk-WWZLT6AM.js";
12
- import "./chunk-LDPY22FS.js";
13
- import "./chunk-M3QGXGY4.js";
14
- import "./chunk-GIK6VUCY.js";
15
- import "./chunk-N2U644ZW.js";
16
- import "./chunk-DLGJYQML.js";
17
- import "./chunk-EKQDQPX6.js";
18
- import "./chunk-P7EV5ISR.js";
19
- import "./chunk-S26LC76R.js";
20
- import "./chunk-HUWW77QY.js";
21
- import "./chunk-LJDODBBZ.js";
22
- import "./chunk-6MWX2J5H.js";
23
- import "./chunk-NXL4FFQQ.js";
24
- export {
25
- GovulncheckClient,
26
- parseGovulncheckJson
27
- };
@@ -1,38 +0,0 @@
1
- import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
- import {
3
- GitleaksClient,
4
- PLACEHOLDER_SECRET_REGEXES,
5
- classifyAndFilterFindings,
6
- hasGitRepo,
7
- hasGitleaksSignal,
8
- parseGitleaksReport,
9
- writeScopedGitleaksConfig
10
- } from "./chunk-PVV27TOX.js";
11
- import "./chunk-OG3UCAHV.js";
12
- import "./chunk-FD4LJQ6Y.js";
13
- import "./chunk-HFIFEH46.js";
14
- import "./chunk-QQGZY2BR.js";
15
- import "./chunk-5HVDD7IA.js";
16
- import "./chunk-2APSZHHI.js";
17
- import "./chunk-WWZLT6AM.js";
18
- import "./chunk-LDPY22FS.js";
19
- import "./chunk-M3QGXGY4.js";
20
- import "./chunk-GIK6VUCY.js";
21
- import "./chunk-N2U644ZW.js";
22
- import "./chunk-DLGJYQML.js";
23
- import "./chunk-EKQDQPX6.js";
24
- import "./chunk-P7EV5ISR.js";
25
- import "./chunk-S26LC76R.js";
26
- import "./chunk-HUWW77QY.js";
27
- import "./chunk-LJDODBBZ.js";
28
- import "./chunk-6MWX2J5H.js";
29
- import "./chunk-NXL4FFQQ.js";
30
- export {
31
- GitleaksClient,
32
- PLACEHOLDER_SECRET_REGEXES,
33
- classifyAndFilterFindings,
34
- hasGitRepo,
35
- hasGitleaksSignal,
36
- parseGitleaksReport,
37
- writeScopedGitleaksConfig
38
- };
@@ -1,17 +0,0 @@
1
- import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
- import {
3
- isTestMode
4
- } from "./chunk-HUWW77QY.js";
5
-
6
- // dist/clients/scanner-temp-root.js
7
- import * as os from "node:os";
8
- function scannerReportParentDir() {
9
- if (!isTestMode() && process.env.PI_LENS_TEST_SCANNER_HARNESS !== "1")
10
- return os.tmpdir();
11
- const override = process.env.PI_LENS_TEST_SCANNER_TMPDIR?.trim();
12
- return override && override.length > 0 ? override : os.tmpdir();
13
- }
14
-
15
- export {
16
- scannerReportParentDir
17
- };
@@ -1,255 +0,0 @@
1
- import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
- import {
3
- classifyProbeFailure,
4
- installRetryDelayMs
5
- } from "./chunk-LDPY22FS.js";
6
- import {
7
- safeSpawnAsync
8
- } from "./chunk-M3QGXGY4.js";
9
- import {
10
- assertInstallAllowed
11
- } from "./chunk-EKQDQPX6.js";
12
- import {
13
- logExtension,
14
- recordDegradationOnce
15
- } from "./chunk-P7EV5ISR.js";
16
- import {
17
- isToolInstallDisabled
18
- } from "./chunk-HUWW77QY.js";
19
- import {
20
- normalizeMapKey
21
- } from "./chunk-6MWX2J5H.js";
22
-
23
- // dist/clients/dispatch/collect-later-tier.js
24
- var COLLECT_LATER_THRESHOLD_MS = 5e3;
25
- var slowRunners = /* @__PURE__ */ new Map();
26
- function runnerFlightKey(projectRoot, runnerId) {
27
- return `${normalizeMapKey(projectRoot)}\0${runnerId}`;
28
- }
29
- function classifyObservedRunner(projectRoot, runnerId, dispatch) {
30
- const runnerKey = runnerFlightKey(projectRoot, runnerId);
31
- const flight = flights.get(runnerKey);
32
- return slowRunners.has(runnerKey) || flight !== void 0 && (flight.owner === void 0 || flight.owner !== dispatch) ? "collect-later" : "inline";
33
- }
34
- function observeRunnerLatency(options) {
35
- const normalizedProjectRoot = normalizeMapKey(options.projectRoot);
36
- const runnerKey = runnerFlightKey(normalizedProjectRoot, options.runnerId);
37
- if (options.timedOut === true || options.durationMs > COLLECT_LATER_THRESHOLD_MS) {
38
- slowRunners.set(runnerKey, {
39
- projectRoot: normalizedProjectRoot,
40
- runnerId: options.runnerId
41
- });
42
- return "collect-later";
43
- }
44
- slowRunners.delete(runnerKey);
45
- return "inline";
46
- }
47
- var flights = /* @__PURE__ */ new Map();
48
- var DROPPED_BY_RESET = {
49
- status: "skipped",
50
- diagnostics: [],
51
- semantic: "none"
52
- };
53
- function runCollectLater(options) {
54
- const flightKey = runnerFlightKey(options.projectRoot, options.runnerId);
55
- const flight = flights.get(flightKey);
56
- if (flight) {
57
- const fileKey = normalizeMapKey(options.filePath);
58
- const queued = flight.queued.get(fileKey);
59
- if (queued) {
60
- queued.start = options.start;
61
- return { promise: queued.promise, coalesced: true };
62
- }
63
- const slot = {
64
- start: options.start,
65
- promise: Promise.allSettled([flight.tail]).then(() => startQueued(flightKey, flight, fileKey, slot))
66
- };
67
- flight.queued.set(fileKey, slot);
68
- chain(flightKey, flight, slot.promise);
69
- return { promise: slot.promise, coalesced: true };
70
- }
71
- const promise = options.start();
72
- holdFlight(flightKey, promise);
73
- return { promise, coalesced: false };
74
- }
75
- function holdFlight(flightKey, promise, owner) {
76
- const held = flights.get(flightKey);
77
- if (held) {
78
- chain(flightKey, held, Promise.allSettled([held.tail, promise]));
79
- return;
80
- }
81
- const started = { tail: promise, queued: /* @__PURE__ */ new Map(), owner };
82
- flights.set(flightKey, started);
83
- chain(flightKey, started, promise);
84
- }
85
- function flightTail(flightKey) {
86
- return flights.get(flightKey)?.tail;
87
- }
88
- function startQueued(flightKey, flight, fileKey, slot) {
89
- if (flights.get(flightKey) !== flight)
90
- return DROPPED_BY_RESET;
91
- flight.queued.delete(fileKey);
92
- return slot.start();
93
- }
94
- function chain(flightKey, flight, run) {
95
- flight.tail = run;
96
- void Promise.allSettled([run]).then(() => {
97
- if (flight.tail === run && flights.get(flightKey) === flight)
98
- flights.delete(flightKey);
99
- });
100
- }
101
- function resetObservedRunnerLatency() {
102
- slowRunners.clear();
103
- flights.clear();
104
- }
105
-
106
- // dist/clients/dispatch/runners/utils/lazy-installer.js
107
- var LAZY_INSTALL_SPECS = {
108
- rubocop: { command: "gem", args: ["install", "rubocop", "--no-document"] },
109
- "rust-clippy": { command: "rustup", args: ["component", "add", "clippy"] },
110
- rustfmt: { command: "rustup", args: ["component", "add", "rustfmt"] }
111
- };
112
- var LAZY_INSTALL_IGNORES_AMBIENT_SIGNAL = true;
113
- var LAZY_INSTALL_TIMEOUT_MS = 18e4;
114
- var attempts = /* @__PURE__ */ new Map();
115
- function key(cwd, tool) {
116
- return `${cwd}:${tool}`;
117
- }
118
- function getLazyInstallAttempt(tool, cwd) {
119
- return attempts.get(key(cwd, tool))?.fact;
120
- }
121
- function resetLazyInstallAttempts() {
122
- attempts.clear();
123
- }
124
- function suppressionFor(state) {
125
- if (!state)
126
- return null;
127
- if (state.fact.outcome === "succeeded")
128
- return "succeeded";
129
- if (state.retryAtMs === 0)
130
- return "held";
131
- return Date.now() < state.retryAtMs ? "cooling" : null;
132
- }
133
- var inFlight = /* @__PURE__ */ new Map();
134
- async function runLazyInstall(tool, cwd, spec) {
135
- if (isToolInstallDisabled()) {
136
- recordDegradationOnce({
137
- kind: "install-disabled",
138
- subject: tool,
139
- reason: "installation disabled by PI_LENS_DISABLE_TOOL_INSTALL=1"
140
- });
141
- return false;
142
- }
143
- const k = key(cwd, tool);
144
- const running = inFlight.get(k);
145
- if (running)
146
- return running;
147
- const previous = attempts.get(k);
148
- const suppressed = suppressionFor(previous);
149
- if (suppressed !== null) {
150
- logExtension({
151
- subsystem: "install",
152
- message: `lazy-install ${tool} suppressed (${suppressed})`,
153
- metadata: {
154
- tool,
155
- cwd,
156
- suppressed,
157
- outcome: previous?.fact.outcome,
158
- ...previous?.fact.reason && { reason: previous.fact.reason },
159
- ...suppressed === "cooling" && {
160
- retryAfterMs: Math.max(0, (previous?.retryAtMs ?? 0) - Date.now())
161
- }
162
- }
163
- });
164
- return false;
165
- }
166
- const started = performInstall(k, tool, cwd, spec);
167
- inFlight.set(k, started);
168
- try {
169
- return await started;
170
- } finally {
171
- inFlight.delete(k);
172
- }
173
- }
174
- async function performInstall(k, tool, cwd, spec) {
175
- let result;
176
- try {
177
- result = await safeSpawnAsync(spec.command, spec.args, {
178
- timeout: LAZY_INSTALL_TIMEOUT_MS,
179
- cwd,
180
- ...LAZY_INSTALL_IGNORES_AMBIENT_SIGNAL && { ignoreAmbientSignal: true }
181
- });
182
- } catch (err) {
183
- result = {
184
- stdout: "",
185
- stderr: err?.message ?? String(err),
186
- status: null,
187
- error: err,
188
- failure: "spawn"
189
- };
190
- }
191
- if (!result.error && result.status === 0) {
192
- attempts.set(k, {
193
- fact: { outcome: "succeeded" },
194
- retryAtMs: 0,
195
- transientAttempts: 0
196
- });
197
- return true;
198
- }
199
- const classified = classifyProbeFailure(result, {
200
- command: spec.command,
201
- unclassifiedFailureOutcome: "transient"
202
- });
203
- const durable = classified.outcome === "missing";
204
- const reason = (result.error?.message ?? result.stderr ?? `exit ${result.status}`).trim().slice(0, 200);
205
- const settledPrevious = attempts.get(k);
206
- const transientAttempts = durable ? 0 : (settledPrevious?.transientAttempts ?? 0) + 1;
207
- const cooldownMs = durable ? 0 : installRetryDelayMs(transientAttempts);
208
- const retryAtMs = cooldownMs === 0 ? 0 : Date.now() + cooldownMs;
209
- attempts.set(k, {
210
- fact: { outcome: "failed", reason },
211
- retryAtMs,
212
- transientAttempts
213
- });
214
- logExtension({
215
- subsystem: "install",
216
- message: `lazy-install ${tool} failed: ${reason}`,
217
- metadata: {
218
- tool,
219
- cwd,
220
- command: spec.command,
221
- cause: classified.cause,
222
- durable,
223
- transientAttempts,
224
- held: retryAtMs === 0,
225
- ...retryAtMs > 0 && { retryAfterMs: retryAtMs - Date.now() },
226
- evidence: classified.evidence
227
- }
228
- });
229
- return false;
230
- }
231
- async function tryLazyInstall(tool, cwd) {
232
- if (!assertInstallAllowed(`runner lazy install: ${tool}`))
233
- return false;
234
- return runLazyInstall(tool, cwd, LAZY_INSTALL_SPECS[tool]);
235
- }
236
- async function tryLazyInstallForFormatter(tool, cwd) {
237
- if (!assertInstallAllowed(`formatter lazy install: ${tool}`))
238
- return false;
239
- return runLazyInstall(tool, cwd, LAZY_INSTALL_SPECS[tool]);
240
- }
241
-
242
- export {
243
- COLLECT_LATER_THRESHOLD_MS,
244
- runnerFlightKey,
245
- classifyObservedRunner,
246
- observeRunnerLatency,
247
- runCollectLater,
248
- holdFlight,
249
- flightTail,
250
- resetObservedRunnerLatency,
251
- getLazyInstallAttempt,
252
- resetLazyInstallAttempts,
253
- tryLazyInstall,
254
- tryLazyInstallForFormatter
255
- };
@@ -1,46 +0,0 @@
1
- import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
- import {
3
- TrivyClient,
4
- existingDependencyManifests,
5
- hasAnyDependencyManifest,
6
- isTrivyEnabled,
7
- parseTrivyLicenses,
8
- parseTrivyReport,
9
- parseTrivySecrets,
10
- resolveSeverityFloor,
11
- shouldScanTrivy,
12
- trivyEvidenceFiles,
13
- worktreeSkipDirs
14
- } from "./chunk-W2YHHNY3.js";
15
- import "./chunk-OG3UCAHV.js";
16
- import "./chunk-FD4LJQ6Y.js";
17
- import "./chunk-HFIFEH46.js";
18
- import "./chunk-QQGZY2BR.js";
19
- import "./chunk-5HVDD7IA.js";
20
- import "./chunk-2APSZHHI.js";
21
- import "./chunk-WWZLT6AM.js";
22
- import "./chunk-LDPY22FS.js";
23
- import "./chunk-M3QGXGY4.js";
24
- import "./chunk-GIK6VUCY.js";
25
- import "./chunk-N2U644ZW.js";
26
- import "./chunk-DLGJYQML.js";
27
- import "./chunk-EKQDQPX6.js";
28
- import "./chunk-P7EV5ISR.js";
29
- import "./chunk-S26LC76R.js";
30
- import "./chunk-HUWW77QY.js";
31
- import "./chunk-LJDODBBZ.js";
32
- import "./chunk-6MWX2J5H.js";
33
- import "./chunk-NXL4FFQQ.js";
34
- export {
35
- TrivyClient,
36
- existingDependencyManifests,
37
- hasAnyDependencyManifest,
38
- isTrivyEnabled,
39
- parseTrivyLicenses,
40
- parseTrivyReport,
41
- parseTrivySecrets,
42
- resolveSeverityFloor,
43
- shouldScanTrivy,
44
- trivyEvidenceFiles,
45
- worktreeSkipDirs
46
- };