pi-lens 4.5.0 → 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 (148) hide show
  1. package/CHANGELOG-USER.md +12 -12
  2. package/CHANGELOG.md +253 -0
  3. package/README.md +11 -2
  4. package/config/dependency-cruiser-eager-allowlist.json +1 -0
  5. package/dist/{chunk-ZULZS2I6.js → chunk-2ERVW2UF.js} +1115 -423
  6. package/dist/{chunk-BBSDJTOV.js → chunk-2K7BUOKS.js} +13 -13
  7. package/dist/{chunk-I2FYOZNW.js → chunk-3JJ4OAJI.js} +10 -10
  8. package/dist/{chunk-5JB4WENL.js → chunk-3UHGSUVL.js} +1 -1
  9. package/dist/{chunk-W26QZ3OM.js → chunk-463WN3VP.js} +10 -10
  10. package/dist/{chunk-4IZZEN63.js → chunk-4X3ML2UQ.js} +31 -34
  11. package/dist/{chunk-I3NZVAMN.js → chunk-5BI5YP57.js} +10 -10
  12. package/dist/{chunk-7U36VQL6.js → chunk-5Z4XLUFF.js} +3 -3
  13. package/dist/{chunk-DCA2MXVQ.js → chunk-62AJH3IN.js} +51 -29
  14. package/dist/{chunk-37IDWT6O.js → chunk-6F34GMP7.js} +16 -14
  15. package/dist/{chunk-VSQT6IHZ.js → chunk-6LIUVGOR.js} +28 -4
  16. package/dist/{chunk-27JQHK7Y.js → chunk-6REF4GCO.js} +1 -1
  17. package/dist/{chunk-INBK3HIT.js → chunk-7KRR24GO.js} +3 -3
  18. package/dist/{chunk-OZQQ3AIR.js → chunk-7OMOMBEQ.js} +9 -9
  19. package/dist/{chunk-ARTYCUGF.js → chunk-7ZFXICNN.js} +123 -20
  20. package/dist/{chunk-K4Z7MK6T.js → chunk-ABKRQVOY.js} +28 -52
  21. package/dist/{chunk-C5PLBTNR.js → chunk-ANSLRJBG.js} +1 -1
  22. package/dist/{chunk-HRLF35WL.js → chunk-AWMFBPGJ.js} +9 -9
  23. package/dist/{chunk-CXQYK4YT.js → chunk-BG7KHGNX.js} +2 -2
  24. package/dist/{chunk-ZI7YHV6I.js → chunk-BK2R2223.js} +10 -8
  25. package/dist/chunk-BXXC6KRR.js +107 -0
  26. package/dist/{chunk-QMWKSYWB.js → chunk-CKJS2AUI.js} +4 -4
  27. package/dist/{chunk-PPQHMSPH.js → chunk-COGU5KQJ.js} +15 -15
  28. package/dist/{chunk-NHA5K226.js → chunk-CQNXALZJ.js} +27 -6
  29. package/dist/{chunk-KZ732ZVW.js → chunk-CSZESDPP.js} +1 -1
  30. package/dist/chunk-CZ5TCJPB.js +98 -0
  31. package/dist/{chunk-LOEJFTF2.js → chunk-D2LFEA5U.js} +9 -2
  32. package/dist/chunk-D3KLF5CD.js +50 -0
  33. package/dist/{chunk-4DAHGU3V.js → chunk-ENJ2M76Y.js} +31 -29
  34. package/dist/{chunk-ZQSSO7LO.js → chunk-EQKF6BAK.js} +3 -3
  35. package/dist/{chunk-PFJLYRO3.js → chunk-F2SAP2FM.js} +40 -47
  36. package/dist/{chunk-ADYQRETD.js → chunk-F6QAJXQV.js} +2 -2
  37. package/dist/chunk-GR2QDWH5.js +25 -0
  38. package/dist/{chunk-LVLPA32Q.js → chunk-GVE5VZYQ.js} +48 -11
  39. package/dist/{chunk-AZG5UJYY.js → chunk-GWZZOJD2.js} +1 -1
  40. package/dist/chunk-GZS6VPIE.js +27 -0
  41. package/dist/chunk-H4B4SC7I.js +71 -0
  42. package/dist/{chunk-YCR6ZYTE.js → chunk-HA6TUJOE.js} +1 -1
  43. package/dist/{chunk-DI4AZZNY.js → chunk-HKPJTI47.js} +2 -2
  44. package/dist/{chunk-O6LCSHHI.js → chunk-HPKC55MA.js} +1 -1
  45. package/dist/{chunk-LQQNFCQJ.js → chunk-I65CQLCG.js} +1 -1
  46. package/dist/{chunk-P5MSLVUW.js → chunk-IDKLWVKY.js} +11 -11
  47. package/dist/chunk-IUM2Q7NF.js +25 -0
  48. package/dist/{chunk-L6BDRYUK.js → chunk-J24IS3KZ.js} +5 -5
  49. package/dist/{chunk-KNSOA43J.js → chunk-J2DAHH4T.js} +2 -2
  50. package/dist/{chunk-7ZVTFLCC.js → chunk-JBDZVOFL.js} +11 -11
  51. package/dist/{chunk-HIJ4CHFF.js → chunk-JC6NFC57.js} +3 -3
  52. package/dist/{chunk-K7O6AHSJ.js → chunk-JTHEUTW7.js} +11 -11
  53. package/dist/{chunk-KXGTLAUW.js → chunk-JWW3ODBN.js} +2 -2
  54. package/dist/{chunk-HIRBC72R.js → chunk-K3ZIYLHT.js} +4 -4
  55. package/dist/{chunk-6GLMMGCX.js → chunk-KDPZA2UE.js} +2 -3
  56. package/dist/{chunk-AXAR5ZW2.js → chunk-KMY2OU4T.js} +553 -434
  57. package/dist/{chunk-DFKOA74L.js → chunk-KQF7VT26.js} +10 -10
  58. package/dist/{chunk-S6MCMD27.js → chunk-KVGA7X76.js} +3 -3
  59. package/dist/{chunk-74AMPWNC.js → chunk-KW7O72AK.js} +2 -2
  60. package/dist/{chunk-UN72ZAJ5.js → chunk-LEQTVRSV.js} +9 -9
  61. package/dist/{chunk-B42AIWPJ.js → chunk-LKPSBM6S.js} +3 -3
  62. package/dist/{chunk-R4L7KZ7R.js → chunk-LKW2HFSZ.js} +9 -9
  63. package/dist/{chunk-3PO4YYOX.js → chunk-LURFD4HD.js} +4240 -3734
  64. package/dist/{chunk-PQXUZYTQ.js → chunk-M6ELTECW.js} +4 -4
  65. package/dist/{chunk-3QXFUP6T.js → chunk-MGVVYYKW.js} +12 -12
  66. package/dist/{chunk-CZJGAOKL.js → chunk-MQBKGRSB.js} +7 -7
  67. package/dist/{chunk-NNEQOC3U.js → chunk-MVG2ZEAO.js} +9 -7
  68. package/dist/{chunk-VWEBZ2JV.js → chunk-MY4XNNTX.js} +39 -41
  69. package/dist/{chunk-RIH3UBK4.js → chunk-N4AJVFRF.js} +11 -11
  70. package/dist/{chunk-TKOFTLGB.js → chunk-OFKKMXWM.js} +31 -36
  71. package/dist/{chunk-3PAS2ERX.js → chunk-OFZE4ANN.js} +8 -8
  72. package/dist/chunk-OLXBUTJR.js +61 -0
  73. package/dist/{chunk-6CFSDLHE.js → chunk-OZGEHOSG.js} +38 -17
  74. package/dist/{chunk-3TSMQZG6.js → chunk-PKGOROPQ.js} +40 -2
  75. package/dist/{chunk-OLWGYBYT.js → chunk-Q6D5QKRG.js} +17 -17
  76. package/dist/{chunk-QE7BJQ6K.js → chunk-QECLJFHI.js} +12 -17
  77. package/dist/{chunk-RJ3APNIP.js → chunk-QJA33VD5.js} +4 -4
  78. package/dist/{chunk-MOAVEPC4.js → chunk-R5XVJ6AN.js} +11 -11
  79. package/dist/{chunk-ZRQMENT4.js → chunk-REZL4OM4.js} +1 -1
  80. package/dist/{chunk-PKWEBMCA.js → chunk-RK5RBREN.js} +251 -201
  81. package/dist/chunk-RP5ZQTHO.js +86 -0
  82. package/dist/{chunk-J2ZB5MDS.js → chunk-RURPX2YV.js} +23 -23
  83. package/dist/chunk-TB5MGZLS.js +53 -0
  84. package/dist/chunk-TC63XRYP.js +27 -0
  85. package/dist/chunk-TJOYHAXJ.js +69 -0
  86. package/dist/{chunk-Q7J3JYJ2.js → chunk-TRXKDCBP.js} +13 -13
  87. package/dist/{chunk-6E5QLMWI.js → chunk-TTK37D7R.js} +22 -23
  88. package/dist/{chunk-XDNWR7SG.js → chunk-UH3QHLR5.js} +2 -2
  89. package/dist/{chunk-SCU62JLX.js → chunk-UNTJJ7GN.js} +7 -7
  90. package/dist/{chunk-O2MHF7QM.js → chunk-UPAFSETJ.js} +58 -63
  91. package/dist/{chunk-PQF6YGYB.js → chunk-UX75PTQW.js} +50 -31
  92. package/dist/{chunk-TWEOJE3D.js → chunk-V353PYMK.js} +1233 -576
  93. package/dist/{chunk-CQY2HEH7.js → chunk-V4TFQY5G.js} +2 -2
  94. package/dist/{chunk-B2OXE4AH.js → chunk-VC3W54G3.js} +446 -293
  95. package/dist/{chunk-JGUDT5KD.js → chunk-VSBCJVPC.js} +5 -5
  96. package/dist/{chunk-5HBQL7DH.js → chunk-WAQQGXVV.js} +3 -3
  97. package/dist/{chunk-7DPXUPRF.js → chunk-WLEVWR7Y.js} +2 -2
  98. package/dist/{chunk-QE5DJ7MX.js → chunk-WPMPVP5I.js} +4 -4
  99. package/dist/{chunk-KNJH6WJQ.js → chunk-WXNLFOC2.js} +7 -7
  100. package/dist/{chunk-XSC3BCN3.js → chunk-Y3ZNOZZS.js} +6 -6
  101. package/dist/{chunk-VGRGW4UL.js → chunk-YL6JQTWC.js} +29 -32
  102. package/dist/{chunk-7CLWC2UH.js → chunk-YVE5Q2UU.js} +86 -217
  103. package/dist/{chunk-LGH2HHZG.js → chunk-YZNARDMM.js} +42 -28
  104. package/dist/{chunk-NGNBJIUO.js → chunk-ZDWNFZJ2.js} +8 -8
  105. package/dist/{chunk-X33QECRJ.js → chunk-ZEUF7BIN.js} +2 -2
  106. package/dist/{chunk-2H5GHZKC.js → chunk-ZIF4WLWR.js} +45 -25
  107. package/dist/{chunk-WLD6BGON.js → chunk-ZSPVF7KI.js} +231 -24
  108. package/dist/{chunk-SDYLT45T.js → chunk-ZX6OKBVO.js} +2 -2
  109. package/dist/index.js +10566 -6819
  110. package/dist/mcp/analyze-cli.js +8 -8
  111. package/dist/mcp/cli.js +39 -41
  112. package/dist/mcp/server.js +1083 -685
  113. package/dist/mcp/worker.js +68 -59
  114. package/dist/probes/installer.js +21 -22
  115. package/docs/ci-bot-pr-checks.md +18 -9
  116. package/docs/ci.md +7 -0
  117. package/docs/configuration.md +24 -10
  118. package/docs/defect-shapes.md +61 -30
  119. package/docs/environment-variables.md +18 -9
  120. package/docs/globalconfig.md +17 -0
  121. package/docs/invariants/dispatch-runners.md +22 -0
  122. package/docs/invariants/lsp-trust-exec.md +33 -3
  123. package/docs/lsp-capability-matrix.md +23 -10
  124. package/docs/lsp-idle-eviction.md +7 -1
  125. package/docs/module-report-read-symbol.md +6 -2
  126. package/docs/pi-lens-merge-policy.md +3 -2
  127. package/docs/pi-lens-orchestration.md +2 -1
  128. package/docs/pi-lens-subagent.md +2 -1
  129. package/docs/release-qa-baseline.md +22 -17
  130. package/docs/servercapabilities.md +1 -1
  131. package/docs/settings.md +10 -2
  132. package/docs/tools.md +1 -1
  133. package/docs/usage.md +1 -0
  134. package/package.json +3 -3
  135. package/dist/chunk-2H7NFZ4Q.js +0 -25
  136. package/dist/chunk-5YJXF2IS.js +0 -56
  137. package/dist/chunk-7WKVCZI4.js +0 -69
  138. package/dist/chunk-BKWFDWYM.js +0 -46
  139. package/dist/chunk-G53LBDNU.js +0 -255
  140. package/dist/chunk-GCSDF5IE.js +0 -27
  141. package/dist/chunk-H5API74E.js +0 -67
  142. package/dist/chunk-HBX55MWO.js +0 -27
  143. package/dist/chunk-JOIKBUQN.js +0 -88
  144. package/dist/chunk-M2YMBT5G.js +0 -73
  145. package/dist/chunk-MJRGPEQ5.js +0 -25
  146. package/dist/chunk-QV3JPCMK.js +0 -17
  147. package/dist/chunk-TFKN5EIR.js +0 -27
  148. package/dist/chunk-UNP6Y4JV.js +0 -38
@@ -1,53 +1,53 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  buildModuleGraph
4
- } from "./chunk-JGUDT5KD.js";
4
+ } from "./chunk-VSBCJVPC.js";
5
5
  import {
6
6
  aliasedImportTargets,
7
7
  referencedProjectImportTarget
8
- } from "./chunk-CXQYK4YT.js";
8
+ } from "./chunk-BG7KHGNX.js";
9
9
  import {
10
10
  getSharedTreeSitterClient,
11
11
  loadWebTreeSitter,
12
12
  logTreeSitterDiagnostic,
13
13
  resolveTreeSitterLanguage,
14
14
  wasmQueryInput
15
- } from "./chunk-37IDWT6O.js";
15
+ } from "./chunk-6F34GMP7.js";
16
16
  import {
17
17
  EXTENSION_TO_GRAMMAR,
18
18
  KIND_TO_GRAMMAR
19
- } from "./chunk-DI4AZZNY.js";
19
+ } from "./chunk-HKPJTI47.js";
20
20
  import {
21
21
  toRunnerDisplayPath
22
- } from "./chunk-ZRQMENT4.js";
22
+ } from "./chunk-REZL4OM4.js";
23
+ import {
24
+ hashContentBytes
25
+ } from "./chunk-CIA7X2PZ.js";
23
26
  import {
24
27
  LSP_QUERY_MAX_FILE_LINES_MAX,
25
28
  getGlobalLspQueryMaxFileLines,
26
29
  loadPiLensGlobalConfig
27
- } from "./chunk-3PO4YYOX.js";
28
- import {
29
- isFileKind
30
- } from "./chunk-CQY2HEH7.js";
30
+ } from "./chunk-LURFD4HD.js";
31
31
  import {
32
32
  isDeclarationFile
33
- } from "./chunk-PQF6YGYB.js";
33
+ } from "./chunk-UX75PTQW.js";
34
34
  import {
35
- hashContentBytes
36
- } from "./chunk-CIA7X2PZ.js";
35
+ isFileKind
36
+ } from "./chunk-V4TFQY5G.js";
37
37
  import {
38
38
  HOOK_WALL_BUDGET_MS,
39
39
  bounded
40
- } from "./chunk-W26QZ3OM.js";
40
+ } from "./chunk-463WN3VP.js";
41
41
  import {
42
42
  incrementDegradationCount,
43
43
  recordDegradationOnce
44
- } from "./chunk-NHA5K226.js";
44
+ } from "./chunk-CQNXALZJ.js";
45
45
  import {
46
46
  freshnessFromMtime
47
47
  } from "./chunk-S26LC76R.js";
48
48
  import {
49
49
  toPositiveFinite
50
- } from "./chunk-7CLWC2UH.js";
50
+ } from "./chunk-YVE5Q2UU.js";
51
51
  import {
52
52
  BoundedFifoMap,
53
53
  BoundedLruCache,
@@ -56,7 +56,7 @@ import {
56
56
  normalizeEphemeralMapKey,
57
57
  normalizeMapKey,
58
58
  walkUpDirs
59
- } from "./chunk-WLD6BGON.js";
59
+ } from "./chunk-ZSPVF7KI.js";
60
60
 
61
61
  // dist/clients/blocker-freshness.js
62
62
  import * as fs4 from "node:fs";
@@ -907,9 +907,29 @@ var SYMBOL_QUERIES = {
907
907
  name: (identifier) @funcName
908
908
  parameters: (parameters) @funcParams) @funcDef
909
909
 
910
- ;; Struct definitions: struct Foo { }
910
+ ;; Struct, enum, trait, type alias, const and mod items (#5599). Each
911
+ ;; reuses a SymbolKind the other languages already map to: struct and
912
+ ;; enum are classes, a trait is an interface, a mod is a module (class,
913
+ ;; as for ruby/elixir/ocaml), a const is a variable. struct_item
914
+ ;; was captured as @structName, which no branch read, so structs never
915
+ ;; reached the graph.
911
916
  (struct_item
912
- name: (type_identifier) @structName) @structDef
917
+ name: (type_identifier) @className) @classDef
918
+
919
+ (enum_item
920
+ name: (type_identifier) @className) @classDef
921
+
922
+ (trait_item
923
+ name: (type_identifier) @interfaceName) @interfaceDef
924
+
925
+ (type_item
926
+ name: (type_identifier) @typeName) @typeDef
927
+
928
+ (const_item
929
+ name: (identifier) @constName) @constDef
930
+
931
+ (mod_item
932
+ name: (identifier) @moduleName) @moduleDef
913
933
 
914
934
  ;; Impl blocks: impl Foo { fn bar() { } }
915
935
  (impl_item
@@ -1424,6 +1444,79 @@ SYMBOL_QUERIES.javascript = {
1424
1444
  constructor: (identifier) @newIdent) @newRef
1425
1445
  `
1426
1446
  };
1447
+ function exportedByAccess(node, rule) {
1448
+ if (!rule.isPublic(node))
1449
+ return false;
1450
+ for (let up = node.parent; up; up = up.parent) {
1451
+ if (rule.bodies.includes(up.type))
1452
+ return false;
1453
+ if (rule.containers.includes(up.type))
1454
+ return exportedByAccess(up, rule);
1455
+ }
1456
+ return true;
1457
+ }
1458
+ var childOfType = (node, type) => (node.children ?? []).find((c) => c?.type === type);
1459
+ var RUST_ACCESS = {
1460
+ containers: ["mod_item", "trait_item"],
1461
+ bodies: ["block"],
1462
+ isPublic: (node) => node.parent?.parent?.type === "trait_item" || childOfType(node, "visibility_modifier")?.text === "pub"
1463
+ };
1464
+ var rustExportRule = (node) => node.parent?.parent?.type === "impl_item" && node.parent.parent.childForFieldName("trait") ? void 0 : exportedByAccess(node, RUST_ACCESS);
1465
+ var GO_ACCESS = {
1466
+ containers: [],
1467
+ bodies: ["block"],
1468
+ isPublic: (node) => /^\p{Lu}/u.test(String(node.childForFieldName("name")?.text ?? ""))
1469
+ };
1470
+ var JAVA_ACCESS = {
1471
+ containers: [
1472
+ "class_declaration",
1473
+ "interface_declaration",
1474
+ "enum_declaration",
1475
+ "record_declaration",
1476
+ "annotation_type_declaration"
1477
+ ],
1478
+ bodies: ["block", "constructor_body"],
1479
+ isPublic: (node) => {
1480
+ const modifiers = childOfType(node, "modifiers");
1481
+ const has = (keyword) => !!modifiers && !!childOfType(modifiers, keyword);
1482
+ return node.parent?.type === "interface_body" || node.parent?.type === "annotation_type_body" ? !has("private") : has("public");
1483
+ }
1484
+ };
1485
+ var KOTLIN_ACCESS = {
1486
+ containers: ["class_declaration", "object_declaration"],
1487
+ bodies: ["function_body"],
1488
+ isPublic: (node) => {
1489
+ const modifiers = childOfType(node, "modifiers");
1490
+ const visibility = modifiers ? childOfType(modifiers, "visibility_modifier")?.text : void 0;
1491
+ return visibility === void 0 || visibility === "public";
1492
+ }
1493
+ };
1494
+ var CSHARP_ACCESS = {
1495
+ containers: [
1496
+ "class_declaration",
1497
+ "struct_declaration",
1498
+ "interface_declaration",
1499
+ "enum_declaration",
1500
+ "record_declaration"
1501
+ ],
1502
+ bodies: [],
1503
+ isPublic: (node) => {
1504
+ const has = (keyword) => (node.children ?? []).some((c) => c?.type === "modifier" && c.text === keyword);
1505
+ return node.parent?.parent?.type === "interface_declaration" ? !has("private") && !has("internal") && !has("protected") : has("public");
1506
+ }
1507
+ };
1508
+ var EXPORT_RULES = {
1509
+ rust: rustExportRule,
1510
+ go: (node) => exportedByAccess(node, GO_ACCESS),
1511
+ java: (node) => exportedByAccess(node, JAVA_ACCESS),
1512
+ kotlin: (node) => exportedByAccess(node, KOTLIN_ACCESS),
1513
+ csharp: (node) => exportedByAccess(node, CSHARP_ACCESS)
1514
+ };
1515
+ var JS_TS_EXPORT_LANGUAGES = [
1516
+ "typescript",
1517
+ "tsx",
1518
+ "javascript"
1519
+ ];
1427
1520
  function symbolExtractionGrammar(kind, filePath) {
1428
1521
  if (!kind)
1429
1522
  return void 0;
@@ -1727,6 +1820,11 @@ var TreeSitterSymbolExtractor = class _TreeSitterSymbolExtractor {
1727
1820
  name = captures.typeName.text;
1728
1821
  kind = "type";
1729
1822
  defNode = captures.typeDef?.node;
1823
+ } else if (captures.constName) {
1824
+ nameNode = captures.constName.node;
1825
+ name = captures.constName.text;
1826
+ kind = "variable";
1827
+ defNode = captures.constDef?.node;
1730
1828
  } else if (captures.moduleName) {
1731
1829
  nameNode = captures.moduleName.node;
1732
1830
  name = captures.moduleName.text;
@@ -1977,6 +2075,11 @@ var TreeSitterSymbolExtractor = class _TreeSitterSymbolExtractor {
1977
2075
  }
1978
2076
  // biome-ignore lint/suspicious/noExplicitAny: Node type
1979
2077
  isExported(node, lineAt) {
2078
+ const rule = EXPORT_RULES[this.languageId];
2079
+ if (rule)
2080
+ return rule(node);
2081
+ if (!JS_TS_EXPORT_LANGUAGES.includes(this.languageId))
2082
+ return void 0;
1980
2083
  const line = lineAt(node.startPosition.row);
1981
2084
  return /^\s*export\b/.test(line) || this.hasExportModifier(node);
1982
2085
  }
@@ -2478,11 +2581,11 @@ async function sweepInlineBlockerFreshness(runtime, cwd, options) {
2478
2581
  let ownVerdict;
2479
2582
  if (setSelfDrift) {
2480
2583
  const hashBudgetWasExhausted = hashBudget.exhausted;
2481
- const selfDrift = await bounded(detectSelfDrift({
2584
+ const selfDrift = await bounded((signal) => detectSelfDrift({
2482
2585
  filePath: entry.filePath,
2483
2586
  recordedSize: entry.recordedSize,
2484
2587
  recordedHash: entry.recordedHash,
2485
- signal: options?.signal,
2588
+ signal,
2486
2589
  budget: hashBudget
2487
2590
  }), {
2488
2591
  ms: HOOK_WALL_BUDGET_MS.turn_end,
@@ -2,12 +2,10 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
2
2
  import {
3
3
  flightTail,
4
4
  holdFlight,
5
- runnerFlightKey,
6
- tryLazyInstallForFormatter
7
- } from "./chunk-G53LBDNU.js";
5
+ runnerFlightKey
6
+ } from "./chunk-CZ5TCJPB.js";
8
7
  import {
9
8
  OXFMT_SUPPORTED_EXTENSIONS,
10
- getAutoInstallToolIdForFormatter,
11
9
  getFormatterPolicyForFile,
12
10
  getSmartDefaultFormatterName,
13
11
  gradleBlockRanges,
@@ -17,41 +15,42 @@ import {
17
15
  hasNearestPackageJsonDependency,
18
16
  hasOxfmtSvelteConfig,
19
17
  resolveInstalledToolCommand,
18
+ shouldAutoInstallTool,
20
19
  stripGradleCommentsAndStrings
21
- } from "./chunk-PKWEBMCA.js";
20
+ } from "./chunk-RK5RBREN.js";
22
21
  import {
23
22
  load
24
- } from "./chunk-ZQSSO7LO.js";
23
+ } from "./chunk-EQKF6BAK.js";
25
24
  import {
26
25
  stripAnsi
27
26
  } from "./chunk-6HWVI6MI.js";
28
27
  import {
29
28
  getToolPath
30
- } from "./chunk-B2OXE4AH.js";
29
+ } from "./chunk-VC3W54G3.js";
31
30
  import {
32
31
  findToolConfig,
33
32
  hasToolConfig,
34
33
  resolveToolCwd
35
- } from "./chunk-LVLPA32Q.js";
34
+ } from "./chunk-GVE5VZYQ.js";
36
35
  import {
37
36
  findGlobalBinary,
38
37
  findLocalBinUpwards,
39
38
  localBinPath
40
- } from "./chunk-LGH2HHZG.js";
39
+ } from "./chunk-YZNARDMM.js";
41
40
  import {
42
41
  getIsolatedNpxSpawnOptions,
43
42
  probeToolAsync
44
- } from "./chunk-KXGTLAUW.js";
43
+ } from "./chunk-JWW3ODBN.js";
45
44
  import {
46
45
  readTextFileOrUndefined,
47
46
  resolveCargoPackageEdition
48
- } from "./chunk-KNSOA43J.js";
47
+ } from "./chunk-J2DAHH4T.js";
49
48
  import {
50
49
  classifyFinderFailure,
51
50
  createAvailabilityLatch,
52
51
  logAvailabilityDecision,
53
52
  startHostStallSampler
54
- } from "./chunk-6GLMMGCX.js";
53
+ } from "./chunk-KDPZA2UE.js";
55
54
  import {
56
55
  VENDOR_BIN_DIRS,
57
56
  admittedLookupAnswer,
@@ -59,24 +58,24 @@ import {
59
58
  isInSpawnTimeoutCooldown,
60
59
  resolveWriteResult,
61
60
  safeSpawnAsync
62
- } from "./chunk-3PO4YYOX.js";
61
+ } from "./chunk-LURFD4HD.js";
63
62
  import {
64
63
  TERRAGRUNT_FILENAMES
65
- } from "./chunk-CQY2HEH7.js";
64
+ } from "./chunk-V4TFQY5G.js";
66
65
  import {
67
66
  assertInstallAllowed,
68
67
  getProjectTrustGeneration
69
- } from "./chunk-W26QZ3OM.js";
68
+ } from "./chunk-463WN3VP.js";
70
69
  import {
71
70
  compareOrdinal,
72
71
  getDegradationLedgerGeneration,
73
72
  incrementDegradationCount,
74
73
  logExtension,
75
74
  recordDegradationOnce
76
- } from "./chunk-NHA5K226.js";
75
+ } from "./chunk-CQNXALZJ.js";
77
76
  import {
78
77
  logLatency
79
- } from "./chunk-7CLWC2UH.js";
78
+ } from "./chunk-YVE5Q2UU.js";
80
79
  import {
81
80
  BoundedFifoMap,
82
81
  BoundedLruCache,
@@ -85,7 +84,7 @@ import {
85
84
  realpathOrResolve,
86
85
  toPosix,
87
86
  walkUpDirs
88
- } from "./chunk-WLD6BGON.js";
87
+ } from "./chunk-ZSPVF7KI.js";
89
88
 
90
89
  // dist/clients/formatters.js
91
90
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -1147,12 +1146,6 @@ var agreementCache = new BoundedFifoMap(512);
1147
1146
  var agreementResolutionCount = 0;
1148
1147
 
1149
1148
  // dist/clients/formatters.js
1150
- async function tryLazyInstallFormatterTool(tool, cwd) {
1151
- const ok = await tryLazyInstallForFormatter(tool, cwd);
1152
- if (ok)
1153
- resetWhichLatches();
1154
- return ok;
1155
- }
1156
1149
  var SKIP_FORMATTING = "skip-formatting";
1157
1150
  var FORMATTER_UNAVAILABLE = "formatter-unavailable";
1158
1151
  var FORMATTER_AGREEMENT_UNAVAILABLE = "formatter-agreement-unavailable";
@@ -1371,9 +1364,9 @@ async function canUseBundleExec(cwd) {
1371
1364
  return lockfiles.length > 0;
1372
1365
  }
1373
1366
  async function resolveManagedSmartDefaultCommand(formatterName, filePath, args) {
1374
- const toolId = getAutoInstallToolIdForFormatter(formatterName);
1375
- if (!toolId)
1367
+ if (!shouldAutoInstallTool(formatterName))
1376
1368
  return FORMATTER_UNAVAILABLE;
1369
+ const toolId = formatterName;
1377
1370
  const found = await resolveFormatterToolCommand(toolId, filePath, formatterName);
1378
1371
  if (found.command)
1379
1372
  return [found.command, ...args, filePath];
@@ -1528,11 +1521,10 @@ var biomeFormatter = {
1528
1521
  const global = await findGlobalBinary("biome");
1529
1522
  if (global)
1530
1523
  return [global, ...args, filePath];
1531
- const toolId = getAutoInstallToolIdForFormatter("biome");
1532
- if (!toolId)
1524
+ if (!shouldAutoInstallTool("biome"))
1533
1525
  return null;
1534
1526
  const { ensureTool } = await import("./probes/installer.js");
1535
- const installed = await ensureTool(toolId);
1527
+ const installed = await ensureTool("biome");
1536
1528
  if (installed)
1537
1529
  return [installed, ...args, filePath];
1538
1530
  return null;
@@ -1653,11 +1645,10 @@ var ruffFormatter = {
1653
1645
  const found = await resolveFormatterToolCommand("ruff", filePath);
1654
1646
  if (found.command)
1655
1647
  return [found.command, ...args, filePath];
1656
- const toolId = getAutoInstallToolIdForFormatter("ruff");
1657
- if (!toolId)
1648
+ if (!shouldAutoInstallTool("ruff"))
1658
1649
  return null;
1659
1650
  const { ensureTool } = await import("./probes/installer.js");
1660
- const installed = await ensureTool(toolId);
1651
+ const installed = await ensureTool("ruff");
1661
1652
  if (installed)
1662
1653
  return [installed, ...args, filePath];
1663
1654
  return ladderMiss(found, "ruff");
@@ -1723,15 +1714,7 @@ var rustfmtFormatter = {
1723
1714
  return null;
1724
1715
  return ["rustfmt", "--edition", edition, filePath];
1725
1716
  },
1726
- async detect(cwd) {
1727
- if (await which("rustfmt") !== null)
1728
- return true;
1729
- const rustProject = (await findUp(["Cargo.toml"], cwd)).length > 0;
1730
- if (!rustProject)
1731
- return false;
1732
- if (await which("rustup") === null)
1733
- return false;
1734
- await tryLazyInstallFormatterTool("rustfmt", cwd);
1717
+ async detect(_cwd) {
1735
1718
  return await which("rustfmt") !== null;
1736
1719
  }
1737
1720
  };
@@ -1839,8 +1822,7 @@ var ktfmtFormatter = {
1839
1822
  const found = await resolveFormatterToolCommand("ktfmt", filePath);
1840
1823
  if (found.command)
1841
1824
  return styleFlag ? [found.command, styleFlag, filePath] : [found.command, filePath];
1842
- const { ensureTool } = await import("./probes/installer.js");
1843
- const installed = await ensureTool("ktfmt");
1825
+ const installed = shouldAutoInstallTool("ktfmt") ? await (await import("./probes/installer.js")).ensureTool("ktfmt") : void 0;
1844
1826
  if (!installed)
1845
1827
  return ladderMiss(found, "ktfmt");
1846
1828
  return styleFlag ? [installed, styleFlag, filePath] : [installed, filePath];
@@ -1863,9 +1845,6 @@ var rubocopFormatter = {
1863
1845
  async detect(cwd) {
1864
1846
  if (!hasToolConfig("rubocop", cwd))
1865
1847
  return false;
1866
- if (await which("rubocop") !== null)
1867
- return true;
1868
- await tryLazyInstallFormatterTool("rubocop", cwd);
1869
1848
  return await which("rubocop") !== null;
1870
1849
  }
1871
1850
  };
@@ -2303,8 +2282,7 @@ async function getFormattersForFile(filePath, cwd) {
2303
2282
  } else if (smartDefaultFormatterName) {
2304
2283
  const smartDefaultFormatter = candidateFormatters.find((f) => f.name === smartDefaultFormatterName);
2305
2284
  if (smartDefaultFormatter) {
2306
- const autoInstallToolId = getAutoInstallToolIdForFormatter(smartDefaultFormatter.name);
2307
- if (autoInstallToolId) {
2285
+ if (shouldAutoInstallTool(smartDefaultFormatter.name)) {
2308
2286
  selected = smartDefaultFormatter;
2309
2287
  } else {
2310
2288
  const { detected, error, outcome } = await detectCandidate(smartDefaultFormatter, cwd);
@@ -2434,11 +2412,10 @@ function diagnosticTail(text, maxLines = FORMATTER_ERROR_TAIL_LINES) {
2434
2412
  return lines.slice(-maxLines).join("\n");
2435
2413
  }
2436
2414
  async function resolveNpxFallback(formatterName, fallback) {
2437
- const toolId = getAutoInstallToolIdForFormatter(formatterName);
2438
- if (!toolId)
2415
+ if (!shouldAutoInstallTool(formatterName))
2439
2416
  return fallback;
2440
2417
  const { ensureTool } = await import("./probes/installer.js");
2441
- const installed = await ensureTool(toolId);
2418
+ const installed = await ensureTool(formatterName);
2442
2419
  if (!installed)
2443
2420
  return fallback;
2444
2421
  return [installed, ...fallback.slice(2)];
@@ -2588,7 +2565,6 @@ function listAllFormatters() {
2588
2565
  }
2589
2566
 
2590
2567
  export {
2591
- tryLazyInstallFormatterTool,
2592
2568
  SKIP_FORMATTING,
2593
2569
  FORMATTER_UNAVAILABLE,
2594
2570
  FORMATTER_AGREEMENT_UNAVAILABLE,
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-5W3R6LFT.js";
5
5
  import {
6
6
  firstChildOfType
7
- } from "./chunk-37IDWT6O.js";
7
+ } from "./chunk-6F34GMP7.js";
8
8
 
9
9
  // dist/clients/metrics/function-metrics.js
10
10
  var JSTS = {
@@ -3,17 +3,17 @@ import {
3
3
  AgentBehaviorClient,
4
4
  agentBehaviorClient,
5
5
  toolCallProgress
6
- } from "./chunk-B42AIWPJ.js";
7
- import "./chunk-VSQT6IHZ.js";
8
- import "./chunk-3PO4YYOX.js";
9
- import "./chunk-PQF6YGYB.js";
10
- import "./chunk-LOEJFTF2.js";
11
- import "./chunk-W26QZ3OM.js";
12
- import "./chunk-NHA5K226.js";
6
+ } from "./chunk-LKPSBM6S.js";
7
+ import "./chunk-6LIUVGOR.js";
8
+ import "./chunk-LURFD4HD.js";
9
+ import "./chunk-UX75PTQW.js";
10
+ import "./chunk-D2LFEA5U.js";
11
+ import "./chunk-463WN3VP.js";
12
+ import "./chunk-CQNXALZJ.js";
13
13
  import "./chunk-S26LC76R.js";
14
- import "./chunk-7CLWC2UH.js";
14
+ import "./chunk-YVE5Q2UU.js";
15
15
  import "./chunk-LJDODBBZ.js";
16
- import "./chunk-WLD6BGON.js";
16
+ import "./chunk-ZSPVF7KI.js";
17
17
  import "./chunk-NXL4FFQQ.js";
18
18
  export {
19
19
  AgentBehaviorClient,
@@ -3,10 +3,10 @@ import {
3
3
  findGoverningTsconfigDir,
4
4
  getDirectoryMarkers,
5
5
  registerWorkspaceTopologyReset
6
- } from "./chunk-LOEJFTF2.js";
6
+ } from "./chunk-D2LFEA5U.js";
7
7
  import {
8
8
  BoundedLruCache
9
- } from "./chunk-WLD6BGON.js";
9
+ } from "./chunk-ZSPVF7KI.js";
10
10
 
11
11
  // dist/clients/review-graph/tsconfig-paths.js
12
12
  import * as fs from "node:fs";
@@ -1,11 +1,14 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  runReportScan
4
- } from "./chunk-INBK3HIT.js";
4
+ } from "./chunk-7KRR24GO.js";
5
+ import {
6
+ findManagedReleaseBinary
7
+ } from "./chunk-RK5RBREN.js";
5
8
  import {
6
9
  createAvailabilityProbeFlight,
7
10
  probeToolAsync
8
- } from "./chunk-KXGTLAUW.js";
11
+ } from "./chunk-JWW3ODBN.js";
9
12
  import {
10
13
  classifyProbeFailure,
11
14
  createAvailabilityLatch,
@@ -13,14 +16,14 @@ import {
13
16
  describeProbeEvidence,
14
17
  logAvailabilityDecision,
15
18
  startHostStallSampler
16
- } from "./chunk-6GLMMGCX.js";
19
+ } from "./chunk-KDPZA2UE.js";
17
20
  import {
18
21
  createSingleFlight
19
- } from "./chunk-5JB4WENL.js";
22
+ } from "./chunk-3UHGSUVL.js";
20
23
  import {
21
24
  createSubsystemLogger,
22
25
  incrementDegradationCount
23
- } from "./chunk-NHA5K226.js";
26
+ } from "./chunk-CQNXALZJ.js";
24
27
 
25
28
  // dist/clients/security-scan-client.js
26
29
  import * as path from "node:path";
@@ -136,13 +139,12 @@ var SecurityScanClient = class {
136
139
  let probeJoined = false;
137
140
  try {
138
141
  const shared = securityProbeFlights.run(`security:${this.toolName}|${versionArgs.join("|")}`, async () => {
139
- const { findManagedToolBinary } = await import("./probes/installer.js");
140
- const managed = await findManagedToolBinary(this.toolName);
142
+ const managed = await findManagedReleaseBinary(this.toolName, versionArgs);
141
143
  return {
142
144
  probe: await probeToolAsync(managed ?? this.toolName, versionArgs, {
143
145
  timeout: 5e3
144
146
  }),
145
- binaryPath: managed ?? null
147
+ binaryPath: managed
146
148
  };
147
149
  });
148
150
  probeJoined = shared.joined;
@@ -0,0 +1,107 @@
1
+ import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
+ import {
3
+ coveringLaneAvailable,
4
+ createAvailabilityChecker,
5
+ createCwdCachedProbe,
6
+ createVenvFinder,
7
+ discoverManagedTool,
8
+ findManagedNodeToolBinary,
9
+ findManagedReleaseBinary,
10
+ getDispatchAvailabilityGeneration,
11
+ getManagedToolEnvironment,
12
+ lspPrimaryCoversFile,
13
+ recordAvailabilityProbeOverrun,
14
+ resetDispatchAvailabilityState,
15
+ resolveAdoptedRootCommand,
16
+ resolveAvailableOrInstall,
17
+ resolveInstalledToolCommand,
18
+ resolveManagedToolClient,
19
+ resolveNodeToolCommand,
20
+ resolveRubocopCommand,
21
+ resolveRunnerCwd,
22
+ resolveToolCommand,
23
+ resolveToolCommandWithInstallFallback,
24
+ resolveVendorToolCommand,
25
+ toolAbsentSkip,
26
+ toolBinaryVerdict,
27
+ toolOnPath
28
+ } from "./chunk-RK5RBREN.js";
29
+ import "./chunk-KMY2OU4T.js";
30
+ import "./chunk-ZIF4WLWR.js";
31
+ import "./chunk-BG7KHGNX.js";
32
+ import "./chunk-EQKF6BAK.js";
33
+ import "./chunk-GWZZOJD2.js";
34
+ import "./chunk-MVG2ZEAO.js";
35
+ import "./chunk-IDKLWVKY.js";
36
+ import "./chunk-F6QAJXQV.js";
37
+ import "./chunk-HKPJTI47.js";
38
+ import "./chunk-2APSZHHI.js";
39
+ import "./chunk-2BEMIWEW.js";
40
+ import "./chunk-IJYGIDF4.js";
41
+ import "./chunk-VC3W54G3.js";
42
+ import "./chunk-GVE5VZYQ.js";
43
+ import "./chunk-YZNARDMM.js";
44
+ import "./chunk-JWW3ODBN.js";
45
+ import "./chunk-J2DAHH4T.js";
46
+ import {
47
+ classifyProbeFailure,
48
+ createAvailabilityLatch,
49
+ describeProbeEvidence,
50
+ describeUnavailability,
51
+ isTransientDecision,
52
+ logAvailabilityDecision,
53
+ startHostStallSampler
54
+ } from "./chunk-KDPZA2UE.js";
55
+ import "./chunk-Y3ZNOZZS.js";
56
+ import "./chunk-6REF4GCO.js";
57
+ import "./chunk-LKW2HFSZ.js";
58
+ import "./chunk-KW7O72AK.js";
59
+ import "./chunk-TQWRH25U.js";
60
+ import "./chunk-UYXV5NIS.js";
61
+ import "./chunk-LURFD4HD.js";
62
+ import "./chunk-3UHGSUVL.js";
63
+ import "./chunk-QYF5S6P6.js";
64
+ import "./chunk-UX75PTQW.js";
65
+ import "./chunk-V4TFQY5G.js";
66
+ import "./chunk-D2LFEA5U.js";
67
+ import "./chunk-463WN3VP.js";
68
+ import "./chunk-CQNXALZJ.js";
69
+ import "./chunk-S26LC76R.js";
70
+ import "./chunk-YVE5Q2UU.js";
71
+ import "./chunk-LJDODBBZ.js";
72
+ import "./chunk-ZSPVF7KI.js";
73
+ import "./chunk-NXL4FFQQ.js";
74
+ export {
75
+ classifyProbeFailure,
76
+ coveringLaneAvailable,
77
+ createAvailabilityChecker,
78
+ createAvailabilityLatch,
79
+ createCwdCachedProbe,
80
+ createVenvFinder,
81
+ describeProbeEvidence,
82
+ describeUnavailability,
83
+ discoverManagedTool,
84
+ findManagedNodeToolBinary,
85
+ findManagedReleaseBinary,
86
+ getDispatchAvailabilityGeneration,
87
+ getManagedToolEnvironment,
88
+ isTransientDecision,
89
+ logAvailabilityDecision,
90
+ lspPrimaryCoversFile,
91
+ recordAvailabilityProbeOverrun,
92
+ resetDispatchAvailabilityState,
93
+ resolveAdoptedRootCommand,
94
+ resolveAvailableOrInstall,
95
+ resolveInstalledToolCommand,
96
+ resolveManagedToolClient,
97
+ resolveNodeToolCommand,
98
+ resolveRubocopCommand,
99
+ resolveRunnerCwd,
100
+ resolveToolCommand,
101
+ resolveToolCommandWithInstallFallback,
102
+ resolveVendorToolCommand,
103
+ startHostStallSampler,
104
+ toolAbsentSkip,
105
+ toolBinaryVerdict,
106
+ toolOnPath
107
+ };
@@ -2,21 +2,21 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
2
2
  import {
3
3
  createAvailabilityProbeFlight,
4
4
  probeToolAsync
5
- } from "./chunk-KXGTLAUW.js";
5
+ } from "./chunk-JWW3ODBN.js";
6
6
  import {
7
7
  classifyProbeFailure,
8
8
  createAvailabilityLatch,
9
9
  logAvailabilityDecision,
10
10
  startHostStallSampler
11
- } from "./chunk-6GLMMGCX.js";
11
+ } from "./chunk-KDPZA2UE.js";
12
12
  import {
13
13
  createGenerationSource,
14
14
  isUntrustedProjectPath,
15
15
  recordProjectCommandRefusal
16
- } from "./chunk-3PO4YYOX.js";
16
+ } from "./chunk-LURFD4HD.js";
17
17
  import {
18
18
  createSingleFlight
19
- } from "./chunk-5JB4WENL.js";
19
+ } from "./chunk-3UHGSUVL.js";
20
20
 
21
21
  // dist/clients/dispatch/runners/utils/candidate-probe.js
22
22
  import * as fs from "node:fs";