pi-lens 4.4.8 → 4.4.9

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 (163) hide show
  1. package/CHANGELOG-USER.md +31 -0
  2. package/CHANGELOG.md +178 -0
  3. package/README.md +2 -1
  4. package/config/dependency-cruiser-eager-allowlist.json +1 -1
  5. package/dist/{chunk-3O5EII3W.js → chunk-2VZ3VN3N.js} +2 -2
  6. package/dist/{chunk-SDFKOLSF.js → chunk-3HTZDY3C.js} +8 -6
  7. package/dist/{chunk-A5GRLYPZ.js → chunk-3NPWO5UO.js} +7 -13
  8. package/dist/{chunk-AGGUWKRK.js → chunk-47UCC4MM.js} +1 -1
  9. package/dist/chunk-4ENEJHF4.js +198 -0
  10. package/dist/{chunk-WXUDRAG6.js → chunk-5GEYJJHG.js} +10 -12
  11. package/dist/{chunk-HHR7WGCI.js → chunk-5YSEQHJN.js} +3 -3
  12. package/dist/{chunk-L3CLUGDY.js → chunk-6GPB3JLL.js} +3 -3
  13. package/dist/{chunk-5F3XF3SX.js → chunk-7R5GZIA6.js} +6 -6
  14. package/dist/{chunk-CUDD35TW.js → chunk-7UTSNTWM.js} +4 -4
  15. package/dist/{chunk-DYRZGUMA.js → chunk-7YTRG6YW.js} +2 -2
  16. package/dist/{chunk-JZRP4DGP.js → chunk-AACN5GNE.js} +2 -2
  17. package/dist/{chunk-7ANZ7XDD.js → chunk-ACRJ2GZ5.js} +2 -2
  18. package/dist/{chunk-6FIRFP6A.js → chunk-C3YRO3EU.js} +10 -12
  19. package/dist/{chunk-GMROJJRN.js → chunk-CB7PEVOJ.js} +9 -1
  20. package/dist/{chunk-BBET6HD6.js → chunk-CDFJF5YD.js} +1 -1
  21. package/dist/{chunk-NSPVR3FN.js → chunk-CJS6WE66.js} +17 -19
  22. package/dist/{chunk-6YUNI7B5.js → chunk-CM6BDY4E.js} +14 -60
  23. package/dist/{chunk-G5GV2Q7K.js → chunk-CZCAZVTD.js} +16 -2
  24. package/dist/chunk-DGKFWQK4.js +23 -0
  25. package/dist/{chunk-VOP4PJKA.js → chunk-E65WJVI5.js} +7 -9
  26. package/dist/{chunk-TV6RXRYH.js → chunk-EKNYSXFB.js} +8 -10
  27. package/dist/{chunk-4LL2VRNY.js → chunk-EY6LY2HO.js} +16 -18
  28. package/dist/{chunk-MC6VB2E5.js → chunk-F6BEQWAK.js} +17 -5
  29. package/dist/{chunk-R2QQC33W.js → chunk-FGNSESAC.js} +12 -14
  30. package/dist/{chunk-OC7VWJBZ.js → chunk-FRUBVFXV.js} +35 -37
  31. package/dist/{chunk-7CGIDRIK.js → chunk-G22UNQID.js} +14 -16
  32. package/dist/{chunk-L4NEVZ4T.js → chunk-GQTQUNCG.js} +25 -27
  33. package/dist/{chunk-ZKLTNLAW.js → chunk-H3BVMK47.js} +6 -6
  34. package/dist/chunk-H6FLQ5NW.js +28 -0
  35. package/dist/{chunk-2ZE3AUJQ.js → chunk-HEA3EM23.js} +13 -15
  36. package/dist/{chunk-CZL44WFN.js → chunk-HSOBIN22.js} +2 -2
  37. package/dist/{chunk-PKSUMEPT.js → chunk-HYSKJMZK.js} +3 -3
  38. package/dist/{chunk-VN3L2JWZ.js → chunk-IICERRFF.js} +5 -5
  39. package/dist/{chunk-O4N5BQ3T.js → chunk-IILEH3ZC.js} +8 -10
  40. package/dist/{chunk-WC6WRNQT.js → chunk-J3Q2NYJR.js} +2 -2
  41. package/dist/{chunk-SFLHSL5R.js → chunk-JUZ67QZQ.js} +18 -7
  42. package/dist/chunk-KR5VGMVT.js +25 -0
  43. package/dist/{chunk-UHHLR2VY.js → chunk-KV6GQOGN.js} +38 -41
  44. package/dist/{chunk-HUAM7QG3.js → chunk-KXMJLOZF.js} +25 -23
  45. package/dist/{chunk-BUZIQDFS.js → chunk-L4Y3ROKQ.js} +3 -3
  46. package/dist/{chunk-JBP7KESM.js → chunk-L6WBJGQS.js} +1 -1
  47. package/dist/{chunk-35WKJWO5.js → chunk-L7O774U7.js} +14 -14
  48. package/dist/{chunk-BOPDQ7AZ.js → chunk-LAHHGNAY.js} +19 -21
  49. package/dist/{chunk-RGGH6M34.js → chunk-LT62P654.js} +1 -1
  50. package/dist/{chunk-5T5A6YAJ.js → chunk-LWOM6LVS.js} +33 -34
  51. package/dist/{chunk-JYLOYTZD.js → chunk-MKPDIAZH.js} +5 -1
  52. package/dist/{chunk-CM73PPGD.js → chunk-MN635QYA.js} +3 -4
  53. package/dist/{chunk-BQG2QFVO.js → chunk-MQ4PPCJB.js} +21 -29
  54. package/dist/{chunk-HXFUTMX2.js → chunk-MRLH4MYU.js} +2 -2
  55. package/dist/{chunk-XOMGO63G.js → chunk-N56BNAA6.js} +19 -21
  56. package/dist/{chunk-7MAD5ZAY.js → chunk-N5CEGQPG.js} +14 -16
  57. package/dist/{chunk-ZFORSIED.js → chunk-NCLO6E6N.js} +13 -33
  58. package/dist/{chunk-SQC7K3SP.js → chunk-NL5LSKVD.js} +2 -2
  59. package/dist/{chunk-I22THIHI.js → chunk-NMUSOZ2D.js} +10 -12
  60. package/dist/{chunk-4NBWFYWW.js → chunk-NOWH2VA2.js} +8 -33
  61. package/dist/{chunk-NM2NWH55.js → chunk-NUSXS6YB.js} +6 -5
  62. package/dist/{chunk-OZWXLJMX.js → chunk-OSEKJEUU.js} +2 -2
  63. package/dist/{chunk-2BKUFQKR.js → chunk-OUYAUXAT.js} +405 -181
  64. package/dist/{chunk-JPRDTY5S.js → chunk-PBZNYHMM.js} +8 -10
  65. package/dist/{chunk-JE6HKLC7.js → chunk-PIIUNJIT.js} +2 -4
  66. package/dist/{chunk-ZZDIOAAJ.js → chunk-PRHYIA6X.js} +6 -6
  67. package/dist/{chunk-4W52ZKZX.js → chunk-PXQ45SGD.js} +2 -2
  68. package/dist/chunk-Q6JQKWPK.js +25 -0
  69. package/dist/{chunk-PIQQM32Y.js → chunk-QB7T2PHK.js} +2 -2
  70. package/dist/{chunk-HKIL6DCL.js → chunk-QGITU23N.js} +1 -1
  71. package/dist/chunk-QJJKOHLH.js +57 -0
  72. package/dist/{chunk-6LJOJ6EO.js → chunk-QP33NKYC.js} +14 -16
  73. package/dist/{chunk-DIWK3LBC.js → chunk-QVBOXT3L.js} +8 -10
  74. package/dist/{chunk-IYVYZQRL.js → chunk-RNJFRXEN.js} +5 -7
  75. package/dist/{chunk-G6JKM4O7.js → chunk-RNXOWDM6.js} +10 -10
  76. package/dist/{chunk-5RNB4HVK.js → chunk-RTFMDIKV.js} +1 -1
  77. package/dist/{chunk-XWIME22V.js → chunk-SIQHOB6P.js} +11 -13
  78. package/dist/{chunk-T2S3FNNJ.js → chunk-SLSMJPEF.js} +41 -42
  79. package/dist/chunk-T5QSLSMM.js +50 -0
  80. package/dist/chunk-TGQDAG4B.js +88 -0
  81. package/dist/{chunk-6GMGEKQN.js → chunk-THYHUIDR.js} +39 -12
  82. package/dist/{chunk-WMDUT4KH.js → chunk-TMNUTMT5.js} +72 -89
  83. package/dist/{chunk-7TNILKGY.js → chunk-TOE2RRCS.js} +1 -1
  84. package/dist/chunk-TYHPVE5H.js +25 -0
  85. package/dist/chunk-UAKO2M6B.js +73 -0
  86. package/dist/chunk-UC5AXW5Z.js +20 -0
  87. package/dist/chunk-UTJP6WOS.js +28 -0
  88. package/dist/{chunk-FRLAUP2B.js → chunk-UXTQ3QPD.js} +4 -4
  89. package/dist/{chunk-4QG55RRC.js → chunk-V2WDBOLZ.js} +10 -12
  90. package/dist/{chunk-FHEV6T4L.js → chunk-V67D6TMU.js} +8 -10
  91. package/dist/{chunk-VLQ7UKZH.js → chunk-VCRVNLE7.js} +135 -2
  92. package/dist/{chunk-KZ4ALBCH.js → chunk-VO4JFPTV.js} +2 -2
  93. package/dist/{chunk-GIRBSBGL.js → chunk-VWLSU3XV.js} +3 -3
  94. package/dist/{chunk-2453RRJ2.js → chunk-W5E72HJA.js} +59 -22
  95. package/dist/{chunk-VPLBLWFO.js → chunk-W7TY6HYX.js} +1 -1
  96. package/dist/{chunk-SP4TFY5F.js → chunk-WSSLVMDA.js} +11 -13
  97. package/dist/{chunk-PPKECBPP.js → chunk-WTB4GKMH.js} +10 -1
  98. package/dist/{chunk-X35S7HSB.js → chunk-X5BJ3G2P.js} +41 -30
  99. package/dist/{chunk-X66YJ2SS.js → chunk-XKFO2SZV.js} +33 -34
  100. package/dist/{chunk-OWTG6UMO.js → chunk-XLAI7UYY.js} +75 -22
  101. package/dist/{chunk-4B2YFN4U.js → chunk-XO756WE5.js} +45 -33
  102. package/dist/{chunk-VOXTCULR.js → chunk-XVB3Q2PG.js} +2 -4
  103. package/dist/{chunk-XYLC35E4.js → chunk-YOXCCJDF.js} +517 -308
  104. package/dist/{chunk-O2ARHQKF.js → chunk-ZCQBNPRH.js} +2 -2
  105. package/dist/chunk-ZD4KVFXI.js +234 -0
  106. package/dist/{chunk-LSFXZLPW.js → chunk-ZDMFGACN.js} +184 -235
  107. package/dist/{chunk-4BKU7PV3.js → chunk-ZMMHHXSW.js} +1 -1
  108. package/dist/{chunk-OY7WZI7Q.js → chunk-ZPM7ZIFL.js} +6 -6
  109. package/dist/{chunk-R4QWJQ2H.js → chunk-ZVCDHYWZ.js} +9 -11
  110. package/dist/{chunk-RZG472YW.js → chunk-ZZN74OGD.js} +83 -46
  111. package/dist/{chunk-BHWW6FAX.js → chunk-ZZSJAR76.js} +37 -19
  112. package/dist/index.js +4910 -4218
  113. package/dist/mcp/analyze-cli.js +12 -17
  114. package/dist/mcp/cli.js +41 -42
  115. package/dist/mcp/server.js +1451 -648
  116. package/dist/mcp/worker.js +59 -60
  117. package/dist/probes/installer.js +17 -19
  118. package/docs/agent-tools.md +40 -8
  119. package/docs/analysisall.md +1 -1
  120. package/docs/ci-bot-pr-checks.md +7 -5
  121. package/docs/configuration.md +51 -9
  122. package/docs/defect-shapes.md +52 -3
  123. package/docs/environment-variables.md +18 -1
  124. package/docs/features.md +12 -5
  125. package/docs/globalconfig.md +11 -3
  126. package/docs/invariants/lsp-trust-exec.md +9 -2
  127. package/docs/invariants/session-telemetry.md +2 -2
  128. package/docs/language-coverage.md +1 -0
  129. package/docs/lsp-capability-matrix.md +57 -35
  130. package/docs/lsp-idle-eviction.md +4 -1
  131. package/docs/merge-queue-rollout.md +10 -8
  132. package/docs/module-report-read-symbol.md +34 -23
  133. package/docs/pi-lens-fixer.md +11 -1
  134. package/docs/pi-lens-investigator.md +3 -0
  135. package/docs/pi-lens-merge-policy.md +15 -7
  136. package/docs/pi-lens-reviewer.md +1 -1
  137. package/docs/pi-lens-subagent.md +13 -0
  138. package/docs/public-api-stability.md +39 -5
  139. package/docs/release-qa-baseline.md +7 -4
  140. package/docs/schema/pi-lens-config-v1.json +11 -2
  141. package/docs/servercapabilities.md +3 -1
  142. package/docs/settings.md +2 -2
  143. package/docs/word-index.md +3 -2
  144. package/package.json +8 -3
  145. package/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +1 -2
  146. package/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +1 -2
  147. package/scripts/download-grammars.js +3 -2
  148. package/skills/pi-lens-lsp-navigation/SKILL.md +5 -1
  149. package/dist/chunk-2TS4GLOJ.js +0 -31
  150. package/dist/chunk-3JAHQBSY.js +0 -27
  151. package/dist/chunk-447YZL4S.js +0 -25
  152. package/dist/chunk-565VRUP4.js +0 -136
  153. package/dist/chunk-57X2CDRX.js +0 -49
  154. package/dist/chunk-GGYOZWHW.js +0 -27
  155. package/dist/chunk-IE5D3RA5.js +0 -58
  156. package/dist/chunk-LPYTPNOJ.js +0 -22
  157. package/dist/chunk-OFNMHPBT.js +0 -89
  158. package/dist/chunk-U3AS2FR6.js +0 -106
  159. package/dist/chunk-W3BGKBBK.js +0 -27
  160. package/dist/chunk-WQV6BI4Q.js +0 -48
  161. package/dist/chunk-YHGYAEFH.js +0 -443
  162. package/dist/chunk-ZONZ6YY3.js +0 -74
  163. package/dist/chunk-ZSM35JF4.js +0 -30
@@ -1,13 +1,13 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  getGlobalPiLensDir
4
- } from "./chunk-WMDUT4KH.js";
4
+ } from "./chunk-TMNUTMT5.js";
5
5
  import {
6
6
  getTurnId
7
- } from "./chunk-VLQ7UKZH.js";
7
+ } from "./chunk-VCRVNLE7.js";
8
8
  import {
9
9
  BoundedFifoMap
10
- } from "./chunk-GMROJJRN.js";
10
+ } from "./chunk-CB7PEVOJ.js";
11
11
 
12
12
  // dist/clients/custom-rule-locations.js
13
13
  import * as path from "node:path";
@@ -4,14 +4,14 @@ import {
4
4
  } from "./chunk-3MED75HT.js";
5
5
  import {
6
6
  getProjectDataDir
7
- } from "./chunk-WMDUT4KH.js";
7
+ } from "./chunk-TMNUTMT5.js";
8
8
  import {
9
9
  writeFileAtomic
10
- } from "./chunk-JE6HKLC7.js";
10
+ } from "./chunk-PIIUNJIT.js";
11
11
  import {
12
12
  normalizeMapKey,
13
13
  toProjectRelativePath
14
- } from "./chunk-GMROJJRN.js";
14
+ } from "./chunk-CB7PEVOJ.js";
15
15
 
16
16
  // dist/clients/call-graph.js
17
17
  import * as fs from "node:fs";
@@ -1,24 +1,24 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  loadProjectSnapshotWithoutWordIndex
4
- } from "./chunk-ZZDIOAAJ.js";
4
+ } from "./chunk-PRHYIA6X.js";
5
5
  import {
6
6
  resolvePackagePath
7
- } from "./chunk-HKIL6DCL.js";
7
+ } from "./chunk-QGITU23N.js";
8
8
  import {
9
9
  TERRAGRUNT_FILENAMES
10
- } from "./chunk-G5GV2Q7K.js";
10
+ } from "./chunk-CZCAZVTD.js";
11
11
  import {
12
12
  recordDegradationOnce
13
- } from "./chunk-2453RRJ2.js";
13
+ } from "./chunk-W5E72HJA.js";
14
14
  import {
15
15
  logLatency
16
- } from "./chunk-565VRUP4.js";
16
+ } from "./chunk-VCRVNLE7.js";
17
17
  import {
18
18
  findNearestContaining,
19
19
  normalizeMapKey,
20
20
  walkUpDirs
21
- } from "./chunk-GMROJJRN.js";
21
+ } from "./chunk-CB7PEVOJ.js";
22
22
 
23
23
  // dist/clients/tool-policy.js
24
24
  import * as fs from "node:fs";
@@ -4,18 +4,18 @@ import {
4
4
  readCargoDependencyNames,
5
5
  readCargoPackageName,
6
6
  readCargoWorkspaceMembers
7
- } from "./chunk-WC6WRNQT.js";
7
+ } from "./chunk-J3Q2NYJR.js";
8
8
  import {
9
9
  getProjectIgnoreMatcher,
10
10
  isExcludedDirName
11
- } from "./chunk-WMDUT4KH.js";
11
+ } from "./chunk-TMNUTMT5.js";
12
12
  import {
13
13
  getWorkspaceManifestMarkers
14
- } from "./chunk-SQC7K3SP.js";
14
+ } from "./chunk-NL5LSKVD.js";
15
15
  import {
16
16
  normalizeMapKey,
17
17
  toPosix
18
- } from "./chunk-GMROJJRN.js";
18
+ } from "./chunk-CB7PEVOJ.js";
19
19
 
20
20
  // dist/clients/review-graph/workspace-modules.js
21
21
  import * as fs from "node:fs";
@@ -1,10 +1,10 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  resolveOpengrepRulePack
4
- } from "./chunk-5RNB4HVK.js";
4
+ } from "./chunk-RTFMDIKV.js";
5
5
  import {
6
6
  findLocalToolConfig
7
- } from "./chunk-GMROJJRN.js";
7
+ } from "./chunk-CB7PEVOJ.js";
8
8
 
9
9
  // dist/clients/opengrep-config.js
10
10
  import * as path from "node:path";
@@ -1,10 +1,10 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  getProjectTrustGeneration
4
- } from "./chunk-JE6HKLC7.js";
4
+ } from "./chunk-PIIUNJIT.js";
5
5
  import {
6
6
  logLatency
7
- } from "./chunk-565VRUP4.js";
7
+ } from "./chunk-VCRVNLE7.js";
8
8
 
9
9
  // dist/clients/dispatch/runners/utils/availability-policy.js
10
10
  function describeProbeEvidence(result, command) {
@@ -3,10 +3,10 @@ import {
3
3
  findGoverningTsconfigDir,
4
4
  getDirectoryMarkers,
5
5
  registerWorkspaceTopologyReset
6
- } from "./chunk-SQC7K3SP.js";
6
+ } from "./chunk-NL5LSKVD.js";
7
7
  import {
8
8
  BoundedLruCache
9
- } from "./chunk-GMROJJRN.js";
9
+ } from "./chunk-CB7PEVOJ.js";
10
10
 
11
11
  // dist/clients/review-graph/tsconfig-paths.js
12
12
  import * as fs from "node:fs";
@@ -1,21 +1,19 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  collectSourceFiles
4
- } from "./chunk-G6JKM4O7.js";
5
- import "./chunk-O2ARHQKF.js";
6
- import "./chunk-WMDUT4KH.js";
4
+ } from "./chunk-RNXOWDM6.js";
5
+ import "./chunk-ZCQBNPRH.js";
6
+ import "./chunk-TMNUTMT5.js";
7
7
  import "./chunk-QYF5S6P6.js";
8
- import "./chunk-G5GV2Q7K.js";
9
- import "./chunk-X35S7HSB.js";
10
- import "./chunk-SQC7K3SP.js";
11
- import "./chunk-JE6HKLC7.js";
12
- import "./chunk-2453RRJ2.js";
13
- import "./chunk-WQV6BI4Q.js";
8
+ import "./chunk-CZCAZVTD.js";
9
+ import "./chunk-X5BJ3G2P.js";
10
+ import "./chunk-NL5LSKVD.js";
11
+ import "./chunk-PIIUNJIT.js";
12
+ import "./chunk-W5E72HJA.js";
14
13
  import "./chunk-S26LC76R.js";
15
- import "./chunk-565VRUP4.js";
16
- import "./chunk-VLQ7UKZH.js";
14
+ import "./chunk-VCRVNLE7.js";
17
15
  import "./chunk-LJDODBBZ.js";
18
- import "./chunk-GMROJJRN.js";
16
+ import "./chunk-CB7PEVOJ.js";
19
17
  import "./chunk-NXL4FFQQ.js";
20
18
 
21
19
  // dist/clients/todo-scanner.js
@@ -2605,13 +2605,20 @@ function relativeInside(root, file, pathImpl = path2) {
2605
2605
  return relative !== ".." && !relative.startsWith(`..${pathImpl.sep}`) && !pathImpl.isAbsolute(relative) ? relative.replace(/\\/g, "/") : void 0;
2606
2606
  }
2607
2607
  function toProjectRelativePath(filePath, projectRoot) {
2608
+ return relativeToProjectRoot(filePath, projectRoot, () => normalizeFilePath(projectRoot));
2609
+ }
2610
+ function createProjectRelativePathResolver(projectRoot) {
2611
+ let canonicalRoot;
2612
+ return (filePath) => relativeToProjectRoot(filePath, projectRoot, () => canonicalRoot ??= normalizeFilePath(projectRoot));
2613
+ }
2614
+ function relativeToProjectRoot(filePath, projectRoot, canonicalRoot) {
2608
2615
  const p = isWindowsPath(filePath) ? win32 : path2;
2609
2616
  if (!p.isAbsolute(filePath))
2610
2617
  return filePath.replace(/\\/g, "/");
2611
2618
  const direct = relativeInside(projectRoot, filePath, p);
2612
2619
  if (direct)
2613
2620
  return direct;
2614
- const canonical = relativeInside(normalizeFilePath(projectRoot), normalizeFilePath(filePath), p);
2621
+ const canonical = relativeInside(canonicalRoot(), normalizeFilePath(filePath), p);
2615
2622
  if (canonical)
2616
2623
  return canonical;
2617
2624
  return filePath.replace(/\\/g, "/");
@@ -2997,6 +3004,7 @@ export {
2997
3004
  normalizeMapKey,
2998
3005
  relativeInside,
2999
3006
  toProjectRelativePath,
3007
+ createProjectRelativePathResolver,
3000
3008
  normalizeEphemeralMapKey,
3001
3009
  pathsEqual,
3002
3010
  walkUpDirs,
@@ -2,7 +2,7 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
2
2
  import {
3
3
  collectSourceFiles,
4
4
  collectSourceFilesAsync
5
- } from "./chunk-G6JKM4O7.js";
5
+ } from "./chunk-RNXOWDM6.js";
6
6
 
7
7
  // dist/clients/scan-utils.js
8
8
  function getSourceFiles(dir, _isTsProject) {
@@ -1,40 +1,38 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  getScratchTreeDirNames
4
- } from "./chunk-KZ4ALBCH.js";
4
+ } from "./chunk-VO4JFPTV.js";
5
5
  import {
6
6
  SecurityScanClient
7
- } from "./chunk-JPRDTY5S.js";
8
- import {
9
- scannerReportParentDir
10
- } from "./chunk-RGGH6M34.js";
11
- import "./chunk-RZG472YW.js";
7
+ } from "./chunk-PBZNYHMM.js";
8
+ import "./chunk-ZZN74OGD.js";
12
9
  import {
13
10
  resolveOpengrepConfig
14
- } from "./chunk-DYRZGUMA.js";
11
+ } from "./chunk-7YTRG6YW.js";
12
+ import {
13
+ scannerReportParentDir
14
+ } from "./chunk-LT62P654.js";
15
15
  import {
16
16
  stripPackRuleIdPrefix
17
- } from "./chunk-5RNB4HVK.js";
18
- import "./chunk-JBP7KESM.js";
19
- import "./chunk-JZRP4DGP.js";
17
+ } from "./chunk-RTFMDIKV.js";
18
+ import "./chunk-L6WBJGQS.js";
19
+ import "./chunk-AACN5GNE.js";
20
20
  import {
21
21
  safeSpawnAsync
22
- } from "./chunk-WMDUT4KH.js";
22
+ } from "./chunk-TMNUTMT5.js";
23
23
  import "./chunk-AWQWXSW4.js";
24
- import "./chunk-X35S7HSB.js";
25
- import "./chunk-SQC7K3SP.js";
26
- import "./chunk-JE6HKLC7.js";
24
+ import "./chunk-X5BJ3G2P.js";
25
+ import "./chunk-NL5LSKVD.js";
26
+ import "./chunk-PIIUNJIT.js";
27
27
  import {
28
28
  recordDegradationOnce
29
- } from "./chunk-2453RRJ2.js";
30
- import "./chunk-WQV6BI4Q.js";
29
+ } from "./chunk-W5E72HJA.js";
31
30
  import "./chunk-S26LC76R.js";
32
- import "./chunk-565VRUP4.js";
33
- import "./chunk-VLQ7UKZH.js";
31
+ import "./chunk-VCRVNLE7.js";
34
32
  import "./chunk-LJDODBBZ.js";
35
33
  import {
36
34
  realpathOrResolve
37
- } from "./chunk-GMROJJRN.js";
35
+ } from "./chunk-CB7PEVOJ.js";
38
36
  import "./chunk-NXL4FFQQ.js";
39
37
 
40
38
  // dist/clients/opengrep-client.js
@@ -1,17 +1,20 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
+ import {
3
+ measureFunction
4
+ } from "./chunk-ZD4KVFXI.js";
2
5
  import {
3
6
  extractFactsFromTree
4
- } from "./chunk-7TNILKGY.js";
7
+ } from "./chunk-TOE2RRCS.js";
5
8
  import {
6
9
  findOwnerName
7
10
  } from "./chunk-5W3R6LFT.js";
8
11
  import {
9
12
  firstChildOfType,
10
13
  walk
11
- } from "./chunk-BHWW6FAX.js";
14
+ } from "./chunk-ZZSJAR76.js";
12
15
  import {
13
16
  isJstsFactFile
14
- } from "./chunk-G5GV2Q7K.js";
17
+ } from "./chunk-CZCAZVTD.js";
15
18
 
16
19
  // dist/clients/dispatch/facts/function-facts.js
17
20
  var BOUNDARY_PREFIXES = [
@@ -30,28 +33,6 @@ var FUNCTION_TYPES = /* @__PURE__ */ new Set([
30
33
  "function_expression",
31
34
  "arrow_function"
32
35
  ]);
33
- var COMPLEXITY_TYPES = /* @__PURE__ */ new Set([
34
- "if_statement",
35
- "for_statement",
36
- "for_in_statement",
37
- // for…of and for…in both parse to for_in_statement
38
- "while_statement",
39
- "do_statement",
40
- "switch_case",
41
- // `case` only — `default` (switch_default) is not counted
42
- "catch_clause",
43
- "ternary_expression"
44
- ]);
45
- var NESTING_TYPES = /* @__PURE__ */ new Set([
46
- "if_statement",
47
- "for_statement",
48
- "for_in_statement",
49
- "while_statement",
50
- "do_statement",
51
- "switch_statement",
52
- "try_statement"
53
- ]);
54
- var LOGICAL_OPERATORS = /* @__PURE__ */ new Set(["&&", "||", "??"]);
55
36
  function namedChildren(node) {
56
37
  return (node.children ?? []).filter((c) => c && c.isNamed && c.type !== "comment");
57
38
  }
@@ -123,19 +104,6 @@ function isCallPassThrough(stmt, paramNames) {
123
104
  }
124
105
  return { pass: true, target: (expr.children ?? [])[0]?.text };
125
106
  }
126
- function isDecisionPoint(type, children) {
127
- if (COMPLEXITY_TYPES.has(type))
128
- return true;
129
- return type === "binary_expression" && children.some((c) => LOGICAL_OPERATORS.has(c?.type));
130
- }
131
- function calcCyclomaticComplexity(body) {
132
- let cc = 1;
133
- walk(body, (node) => {
134
- if (isDecisionPoint(node.type, node.children ?? []))
135
- cc++;
136
- });
137
- return cc;
138
- }
139
107
  function memberCallSite(callee) {
140
108
  if (callee?.type !== "member_expression")
141
109
  return void 0;
@@ -177,21 +145,13 @@ function addNewReceiverType(children, receiverTypes) {
177
145
  if (id && ctor?.type === "identifier")
178
146
  receiverTypes[id.text] = ctor.text;
179
147
  }
180
- function summarizeBody(body, params) {
148
+ function summarizeBody(fn, params) {
181
149
  let hasAwait = false;
182
150
  let hasReturnAwaitCall = false;
183
- let cyclomaticComplexity = 1;
184
- let maxNestingDepth = 0;
185
151
  const calls = /* @__PURE__ */ new Set();
186
152
  const memberCallSites = [];
187
153
  const receiverTypes = parameterReceiverTypes(params);
188
- const visit = (node, depth) => {
189
- const type = node.type;
190
- const children = node.children ?? [];
191
- if (depth > maxNestingDepth)
192
- maxNestingDepth = depth;
193
- if (isDecisionPoint(type, children))
194
- cyclomaticComplexity++;
154
+ const metrics = measureFunction(fn, "typescript", (node, type, children) => {
195
155
  if (type === "await_expression") {
196
156
  hasAwait = true;
197
157
  } else if (type === "return_statement") {
@@ -202,18 +162,13 @@ function summarizeBody(body, params) {
202
162
  } else if (type === "variable_declarator") {
203
163
  addNewReceiverType(children, receiverTypes);
204
164
  }
205
- const next = NESTING_TYPES.has(type) ? depth + 1 : depth;
206
- for (const child of children) {
207
- if (child)
208
- visit(child, next);
209
- }
210
- };
211
- visit(body, 0);
165
+ });
212
166
  return {
213
167
  hasAwait,
214
168
  hasReturnAwaitCall,
215
- cyclomaticComplexity,
216
- maxNestingDepth,
169
+ cyclomaticComplexity: metrics.cyclomatic,
170
+ maxNestingDepth: metrics.nesting,
171
+ parameterCount: metrics.parameters,
217
172
  outgoingCalls: [...calls],
218
173
  memberCallSites,
219
174
  receiverTypes
@@ -248,7 +203,7 @@ var functionFactProvider = {
248
203
  const target = passThrough.target ?? "";
249
204
  const lowerTarget = target.toLowerCase();
250
205
  const isBoundaryWrapper = BOUNDARY_PREFIXES.some((prefix) => lowerTarget.startsWith(prefix));
251
- const bodySummary = summarizeBody(body, params);
206
+ const bodySummary = summarizeBody(node, params);
252
207
  summaries.push({
253
208
  name: getFunctionName(node),
254
209
  line: node.startPosition.row + 1,
@@ -258,7 +213,7 @@ var functionFactProvider = {
258
213
  hasAwait: bodySummary.hasAwait,
259
214
  hasReturnAwaitCall: bodySummary.hasReturnAwaitCall,
260
215
  statementCount,
261
- parameterCount: params.length,
216
+ parameterCount: bodySummary.parameterCount,
262
217
  isPassThroughWrapper: passThrough.pass,
263
218
  passThroughTarget: passThrough.target,
264
219
  isBoundaryWrapper,
@@ -296,6 +251,5 @@ var functionFactProvider = {
296
251
  };
297
252
 
298
253
  export {
299
- calcCyclomaticComplexity,
300
254
  functionFactProvider
301
255
  };
@@ -1,10 +1,10 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  findNearestDirWithMarker
4
- } from "./chunk-SQC7K3SP.js";
4
+ } from "./chunk-NL5LSKVD.js";
5
5
  import {
6
6
  isWindowsPath
7
- } from "./chunk-GMROJJRN.js";
7
+ } from "./chunk-CB7PEVOJ.js";
8
8
 
9
9
  // dist/clients/file-kinds.js
10
10
  import { basename, extname, win32 } from "node:path";
@@ -60,6 +60,7 @@ var KIND_EXTENSIONS = {
60
60
  fsharp: [".fs", ".fsi", ".fsx"],
61
61
  gleam: [".gleam"],
62
62
  go: [".go"],
63
+ groovy: [".groovy", ".gvy", ".gy", ".gsh"],
63
64
  haskell: [".hs", ".lhs"],
64
65
  "helm-template": [".tpl"],
65
66
  html: [".htm", ".html"],
@@ -136,6 +137,11 @@ var DOTNET_FSHARP_ROOT_MARKERS = [
136
137
  "*.fsproj",
137
138
  "*.sln"
138
139
  ];
140
+ var GROOVY_FILENAMES = [
141
+ "Jenkinsfile",
142
+ "build.gradle",
143
+ "settings.gradle"
144
+ ];
139
145
  var TERRAGRUNT_FILENAMES = [
140
146
  "terragrunt.hcl",
141
147
  "root.hcl"
@@ -158,6 +164,10 @@ var SPECIAL_FILENAMES = [
158
164
  ...TERRAGRUNT_FILENAMES.map((name) => ({
159
165
  pattern: new RegExp(`^${name.replaceAll(".", "\\.")}$`, "i"),
160
166
  kind: "terragrunt"
167
+ })),
168
+ ...GROOVY_FILENAMES.map((name) => ({
169
+ pattern: new RegExp(`^${name.replaceAll(".", "\\.")}$`, "i"),
170
+ kind: "groovy"
161
171
  }))
162
172
  ];
163
173
  function isHelmYamlTemplatePath(filePath) {
@@ -211,6 +221,7 @@ var CODE_KINDS = /* @__PURE__ */ new Set([
211
221
  "fsharp",
212
222
  "gleam",
213
223
  "go",
224
+ "groovy",
214
225
  "haskell",
215
226
  "helm-template",
216
227
  "java",
@@ -250,6 +261,7 @@ function getFileKindLabel(kind) {
250
261
  jsts: "JavaScript/TypeScript",
251
262
  python: "Python",
252
263
  go: "Go",
264
+ groovy: "Groovy",
253
265
  rust: "Rust",
254
266
  cxx: "C/C++",
255
267
  cmake: "CMake",
@@ -294,6 +306,7 @@ function getLanguageId(kind) {
294
306
  jsts: "typescript",
295
307
  python: "python",
296
308
  go: "go",
309
+ groovy: "groovy",
297
310
  rust: "rust",
298
311
  cxx: "cpp",
299
312
  cmake: "cmake",
@@ -343,6 +356,7 @@ export {
343
356
  DOTNET_CSHARP_SOLUTION_MARKERS,
344
357
  DOTNET_CSHARP_ROOT_MARKERS,
345
358
  DOTNET_FSHARP_ROOT_MARKERS,
359
+ GROOVY_FILENAMES,
346
360
  TERRAGRUNT_FILENAMES,
347
361
  SPECIAL_FILENAMES,
348
362
  isHelmYamlTemplatePath,
@@ -0,0 +1,23 @@
1
+ import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
+ import {
3
+ getSourceFiles,
4
+ getSourceFilesAsync
5
+ } from "./chunk-CDFJF5YD.js";
6
+ import "./chunk-RNXOWDM6.js";
7
+ import "./chunk-ZCQBNPRH.js";
8
+ import "./chunk-TMNUTMT5.js";
9
+ import "./chunk-QYF5S6P6.js";
10
+ import "./chunk-CZCAZVTD.js";
11
+ import "./chunk-X5BJ3G2P.js";
12
+ import "./chunk-NL5LSKVD.js";
13
+ import "./chunk-PIIUNJIT.js";
14
+ import "./chunk-W5E72HJA.js";
15
+ import "./chunk-S26LC76R.js";
16
+ import "./chunk-VCRVNLE7.js";
17
+ import "./chunk-LJDODBBZ.js";
18
+ import "./chunk-CB7PEVOJ.js";
19
+ import "./chunk-NXL4FFQQ.js";
20
+ export {
21
+ getSourceFiles,
22
+ getSourceFilesAsync
23
+ };
@@ -2,14 +2,14 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
2
2
  import {
3
3
  createAvailabilityProbeFlight,
4
4
  probeToolAsync
5
- } from "./chunk-JBP7KESM.js";
5
+ } from "./chunk-L6WBJGQS.js";
6
6
  import {
7
7
  classifyProbeFailure,
8
8
  createAvailabilityLatch,
9
9
  isTransientDecision,
10
10
  logAvailabilityDecision,
11
11
  startHostStallSampler
12
- } from "./chunk-JZRP4DGP.js";
12
+ } from "./chunk-AACN5GNE.js";
13
13
  import {
14
14
  NODE_MODULES_BIN_DIRS,
15
15
  createGenerationSource,
@@ -17,22 +17,20 @@ import {
17
17
  projectLocalBinDirs,
18
18
  recordProjectCommandRefusal,
19
19
  safeSpawnAsync
20
- } from "./chunk-WMDUT4KH.js";
20
+ } from "./chunk-TMNUTMT5.js";
21
21
  import {
22
22
  getProjectTrustState
23
- } from "./chunk-JE6HKLC7.js";
23
+ } from "./chunk-PIIUNJIT.js";
24
24
  import {
25
+ logExtension,
25
26
  recordDegradationOnce
26
- } from "./chunk-2453RRJ2.js";
27
- import {
28
- logExtension
29
- } from "./chunk-WQV6BI4Q.js";
27
+ } from "./chunk-W5E72HJA.js";
30
28
  import {
31
29
  isAtOrAboveHomeDir,
32
30
  isUnderDir,
33
31
  realpathOrResolve,
34
32
  walkUpDirs
35
- } from "./chunk-GMROJJRN.js";
33
+ } from "./chunk-CB7PEVOJ.js";
36
34
 
37
35
  // dist/clients/package-manager.js
38
36
  import * as fs from "node:fs";
@@ -7,19 +7,17 @@ import {
7
7
  loadCallGraph,
8
8
  parseSymbolKey,
9
9
  saveCallGraph
10
- } from "./chunk-L3CLUGDY.js";
10
+ } from "./chunk-6GPB3JLL.js";
11
11
  import "./chunk-3MED75HT.js";
12
- import "./chunk-WMDUT4KH.js";
13
- import "./chunk-X35S7HSB.js";
14
- import "./chunk-SQC7K3SP.js";
15
- import "./chunk-JE6HKLC7.js";
16
- import "./chunk-2453RRJ2.js";
17
- import "./chunk-WQV6BI4Q.js";
12
+ import "./chunk-TMNUTMT5.js";
13
+ import "./chunk-X5BJ3G2P.js";
14
+ import "./chunk-NL5LSKVD.js";
15
+ import "./chunk-PIIUNJIT.js";
16
+ import "./chunk-W5E72HJA.js";
18
17
  import "./chunk-S26LC76R.js";
19
- import "./chunk-565VRUP4.js";
20
- import "./chunk-VLQ7UKZH.js";
18
+ import "./chunk-VCRVNLE7.js";
21
19
  import "./chunk-LJDODBBZ.js";
22
- import "./chunk-GMROJJRN.js";
20
+ import "./chunk-CB7PEVOJ.js";
23
21
  import "./chunk-NXL4FFQQ.js";
24
22
  export {
25
23
  CALL_GRAPH_CACHE_VERSION,