pi-lens 4.4.6 → 4.4.7

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 (121) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +5 -1
  3. package/dist/{chunk-JL6CXUMW.js → chunk-24BILSZW.js} +1 -1
  4. package/dist/{chunk-S67UJDGQ.js → chunk-2TF6RXWB.js} +5 -5
  5. package/dist/{chunk-ARD426WI.js → chunk-3F6BMY53.js} +1 -1
  6. package/dist/{chunk-5ZR3APIM.js → chunk-3FRLWYBG.js} +26 -26
  7. package/dist/{chunk-T7FTXGS3.js → chunk-3K2F6UDZ.js} +30 -30
  8. package/dist/{chunk-HK6JVFZC.js → chunk-3YY7IXIL.js} +2 -2
  9. package/dist/chunk-46TNM7XZ.js +88 -0
  10. package/dist/{chunk-4AVZ3TG7.js → chunk-4L36HG27.js} +8 -8
  11. package/dist/{chunk-PO45POGF.js → chunk-4LM3VAZH.js} +1 -1
  12. package/dist/{chunk-UN4TEBWN.js → chunk-4LOE5R5P.js} +9 -9
  13. package/dist/{chunk-KLQVC3XC.js → chunk-4YHYPW2G.js} +30 -7
  14. package/dist/{chunk-W5LGKNET.js → chunk-4ZYJHQMB.js} +6 -6
  15. package/dist/{chunk-W2V54OCL.js → chunk-6IR3ZYIB.js} +2 -2
  16. package/dist/{chunk-FJIVKLPH.js → chunk-72OKUXSD.js} +10 -10
  17. package/dist/{chunk-7RQXA5GG.js → chunk-75GAYVNO.js} +10 -9
  18. package/dist/{chunk-V3APN3DY.js → chunk-7E2563GA.js} +12 -12
  19. package/dist/{chunk-4WX4CTUE.js → chunk-7GLOLOSH.js} +25 -25
  20. package/dist/{chunk-BWYQUPOS.js → chunk-ABPKUVA4.js} +1 -1
  21. package/dist/{chunk-IPDG45G5.js → chunk-AKUUMGD5.js} +9 -9
  22. package/dist/{chunk-Q6D6VMI4.js → chunk-ASUXV767.js} +6 -6
  23. package/dist/{chunk-BM5GS6ZH.js → chunk-AWDSEDER.js} +2 -2
  24. package/dist/{chunk-MA77RSFN.js → chunk-BZARLRJW.js} +4 -4
  25. package/dist/{chunk-EVDGNG4F.js → chunk-CB4WHS4H.js} +3 -3
  26. package/dist/{chunk-FA5LDARD.js → chunk-CCV2EU7T.js} +7 -7
  27. package/dist/{chunk-U6OC3QEM.js → chunk-CE6VMBCB.js} +15 -15
  28. package/dist/{chunk-AMXIUN2R.js → chunk-CPSR3AVL.js} +2 -2
  29. package/dist/{chunk-SXGD4ANG.js → chunk-CTADOKYM.js} +7 -7
  30. package/dist/{chunk-63RIVFQI.js → chunk-DH5JPM3K.js} +1 -1
  31. package/dist/{chunk-MT6BVNFW.js → chunk-DPGEAHZT.js} +3 -3
  32. package/dist/{chunk-4PCQCU47.js → chunk-DQZFQSR5.js} +2 -2
  33. package/dist/{chunk-BHUWL2Y3.js → chunk-E7HJ56Y7.js} +5 -5
  34. package/dist/{chunk-DQXSPYRI.js → chunk-EAOK7MIZ.js} +2 -2
  35. package/dist/{chunk-2RLWJO5K.js → chunk-EKWX4WD3.js} +3 -3
  36. package/dist/{chunk-WIZWZR4C.js → chunk-F7K5IBZG.js} +30 -28
  37. package/dist/{chunk-VQH24FIP.js → chunk-FB5SCCPT.js} +9 -9
  38. package/dist/{chunk-GZE7WOI4.js → chunk-FZKFVUEC.js} +438 -140
  39. package/dist/{chunk-TIYGSODX.js → chunk-H7OR7DFZ.js} +15 -13
  40. package/dist/{chunk-CJYKEW2L.js → chunk-HO6LWE2E.js} +1 -1
  41. package/dist/{chunk-YSBHPOY6.js → chunk-HR3OJ3TH.js} +8 -8
  42. package/dist/{chunk-CFRQMBGP.js → chunk-HWDAVBFU.js} +14 -14
  43. package/dist/{chunk-2X4VLOCC.js → chunk-JJ2RRESP.js} +8 -5
  44. package/dist/{chunk-YBSONGSZ.js → chunk-JMEKXFOL.js} +24 -24
  45. package/dist/{chunk-MKVZQUEG.js → chunk-KDX35VXP.js} +69 -13
  46. package/dist/{chunk-75SY4F24.js → chunk-KKCK636N.js} +7 -7
  47. package/dist/{chunk-OLAWH5UQ.js → chunk-KPPJTH44.js} +2 -1
  48. package/dist/{chunk-5APMQ2IJ.js → chunk-KW5JQPO5.js} +1 -1
  49. package/dist/{chunk-SCIUNBPF.js → chunk-L3CMBQMH.js} +11 -11
  50. package/dist/{chunk-GAACZY6R.js → chunk-L5JYIU47.js} +7 -7
  51. package/dist/{chunk-2DDDCJDL.js → chunk-LBLBAFG3.js} +3 -3
  52. package/dist/{chunk-NNKXDXXS.js → chunk-LLS45EWB.js} +8 -0
  53. package/dist/{chunk-WQOIR3QY.js → chunk-LS3QJRUB.js} +7 -7
  54. package/dist/{chunk-XCUHKYCQ.js → chunk-LSC3VADM.js} +6 -6
  55. package/dist/{chunk-GMTFDAOK.js → chunk-LUBPZN36.js} +6 -6
  56. package/dist/{chunk-DMSLNKF7.js → chunk-LV4UMYVH.js} +19 -19
  57. package/dist/{chunk-XAIT2YGS.js → chunk-MB6PXBUA.js} +2 -2
  58. package/dist/{chunk-AE37FEGH.js → chunk-MNJIXFX4.js} +1 -1
  59. package/dist/{chunk-OJLTLYHB.js → chunk-MPKRJBPK.js} +30 -10
  60. package/dist/{chunk-QGSTQH4D.js → chunk-N5WSK2K7.js} +6 -6
  61. package/dist/{chunk-Z7IGUAXL.js → chunk-NA7SEXHE.js} +10 -6
  62. package/dist/{chunk-UHGF5UT5.js → chunk-O4BJFESU.js} +1 -1
  63. package/dist/{chunk-UCGQT677.js → chunk-OE5ZBP7F.js} +10 -10
  64. package/dist/{chunk-KSR7RGQY.js → chunk-OXOI55RU.js} +4 -4
  65. package/dist/{chunk-NDMCVUYK.js → chunk-PR6PO3ES.js} +2 -2
  66. package/dist/{chunk-NIU2IPC5.js → chunk-PUZ3E2J4.js} +3 -3
  67. package/dist/{chunk-2DMLM3ZO.js → chunk-QHSNL7B2.js} +8 -8
  68. package/dist/{chunk-ZYNI26MI.js → chunk-QOE342SU.js} +1 -1
  69. package/dist/{chunk-3WEPUD2V.js → chunk-R5MOQM2H.js} +98 -31
  70. package/dist/{chunk-PPIBVH4R.js → chunk-RC2Z6K47.js} +4 -4
  71. package/dist/{chunk-LEJOJDXL.js → chunk-RORGS5II.js} +4 -4
  72. package/dist/{chunk-K2YGBXOA.js → chunk-RQS4QQSD.js} +1 -1
  73. package/dist/{chunk-XQCSWV2G.js → chunk-RRV3FNNM.js} +10 -10
  74. package/dist/{chunk-GTAI2J6U.js → chunk-SHLDT3OI.js} +8 -8
  75. package/dist/{chunk-VPBIMOAQ.js → chunk-SNDXCFRS.js} +11 -9
  76. package/dist/{chunk-Q4FCYCRE.js → chunk-T7A2HK2B.js} +10 -10
  77. package/dist/{chunk-MN7MHUXQ.js → chunk-U5HPROLA.js} +1 -1
  78. package/dist/{chunk-ZUUI3ZSA.js → chunk-U6VN4NVL.js} +1 -1
  79. package/dist/{chunk-W5R5SABV.js → chunk-U7BD2QL7.js} +6 -6
  80. package/dist/{chunk-P4QNXS6I.js → chunk-UF7RTZSO.js} +8 -8
  81. package/dist/{chunk-A3YNG5KP.js → chunk-URCQWAQ4.js} +11 -11
  82. package/dist/{chunk-FFL3A2VP.js → chunk-VUZWQ7UG.js} +4 -4
  83. package/dist/{chunk-YRD4ISED.js → chunk-W4WP2ERB.js} +10 -10
  84. package/dist/{chunk-OOU2WZZE.js → chunk-WDBICWH3.js} +1 -1
  85. package/dist/{chunk-BI5LAQ3Y.js → chunk-WGRJOXED.js} +114 -148
  86. package/dist/{chunk-ZQ6NZZTB.js → chunk-WME2OQST.js} +33 -0
  87. package/dist/{chunk-DC4CFXM5.js → chunk-XT2HTCJ5.js} +1 -1
  88. package/dist/{chunk-SJJYRZB4.js → chunk-Y7F7IEE3.js} +55 -23
  89. package/dist/{chunk-2F47TQOA.js → chunk-YES5CACN.js} +29 -29
  90. package/dist/{chunk-H7HTEQUZ.js → chunk-YHC2O2WO.js} +7 -7
  91. package/dist/{chunk-Q3UZHW6N.js → chunk-YVHBNSME.js} +6 -10
  92. package/dist/{chunk-3MYEA7QD.js → chunk-ZE3KXHS7.js} +2 -2
  93. package/dist/{chunk-VG5JS5SW.js → chunk-ZGSJDWQU.js} +2 -2
  94. package/dist/{chunk-5CV5ITZF.js → chunk-ZJTT47IG.js} +1 -1
  95. package/dist/{chunk-Q4EMRFNA.js → chunk-ZMAUPOMG.js} +24 -24
  96. package/dist/index.js +1925 -944
  97. package/dist/mcp/analyze-cli.js +6 -6
  98. package/dist/mcp/cli.js +30 -30
  99. package/dist/mcp/server.js +707 -455
  100. package/dist/mcp/worker.js +48 -48
  101. package/dist/probes/installer.js +13 -13
  102. package/docs/agent-tools.md +11 -3
  103. package/docs/defect-shapes.md +15 -1
  104. package/docs/dependencies.md +1 -0
  105. package/docs/environment-variables.md +14 -0
  106. package/docs/features.md +11 -1
  107. package/docs/globalconfig.md +12 -1
  108. package/docs/invariants/git-guard-host.md +34 -0
  109. package/docs/invariants/lsp-trust-exec.md +6 -0
  110. package/docs/invariants/session-telemetry.md +42 -2
  111. package/docs/lsp-capability-matrix.md +89 -45
  112. package/docs/lsp-idle-eviction.md +3 -5
  113. package/docs/pi-lens-fixer.md +8 -1
  114. package/docs/pi-lens-merge-policy.md +7 -4
  115. package/docs/pi-lens-subagent.md +7 -4
  116. package/docs/schema/pi-lens-config-v1.json +23 -0
  117. package/docs/servercapabilities.md +1 -1
  118. package/docs/settings.md +5 -0
  119. package/docs/usage.md +5 -0
  120. package/package.json +1 -1
  121. package/dist/chunk-G2B7F6ZU.js +0 -88
@@ -1,13 +1,13 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  resolveOpengrepConfig
4
- } from "./chunk-JL6CXUMW.js";
4
+ } from "./chunk-24BILSZW.js";
5
5
  import {
6
6
  PYTHON_COMPILE_VERDICT_SERVER_ID,
7
7
  augmentPythonEnvironment,
8
8
  detectPythonEnvironment,
9
9
  pythonEnvironmentToolCandidates
10
- } from "./chunk-NDMCVUYK.js";
10
+ } from "./chunk-PR6PO3ES.js";
11
11
  import {
12
12
  hasCargoWorkspaceTable,
13
13
  readCargoWorkspaceExclude,
@@ -17,7 +17,7 @@ import {
17
17
  import {
18
18
  getUserRuleRoot,
19
19
  ruleCorpusFingerprintForCycle
20
- } from "./chunk-ZUUI3ZSA.js";
20
+ } from "./chunk-U6VN4NVL.js";
21
21
  import {
22
22
  load,
23
23
  resolvePackagePath
@@ -30,7 +30,7 @@ import {
30
30
  } from "./chunk-CKEQFGLT.js";
31
31
  import {
32
32
  bounded
33
- } from "./chunk-CJYKEW2L.js";
33
+ } from "./chunk-HO6LWE2E.js";
34
34
  import {
35
35
  ensureTool,
36
36
  findManagedToolBinary,
@@ -40,25 +40,25 @@ import {
40
40
  isZizmorAuditTarget,
41
41
  logSessionStart,
42
42
  resolveZizmorGitHubToken
43
- } from "./chunk-MKVZQUEG.js";
43
+ } from "./chunk-KDX35VXP.js";
44
44
  import {
45
45
  resolveToolCwd
46
- } from "./chunk-MT6BVNFW.js";
46
+ } from "./chunk-DPGEAHZT.js";
47
47
  import {
48
48
  commandSearchReachesProject,
49
49
  findGlobalBinary,
50
50
  isProjectLocalBinPath
51
- } from "./chunk-Z7IGUAXL.js";
51
+ } from "./chunk-NA7SEXHE.js";
52
52
  import {
53
53
  classifyProbeFailure,
54
54
  createAvailabilityLatch,
55
55
  describeInstallAttempt,
56
56
  logAvailabilityDecision,
57
57
  startHostStallSampler
58
- } from "./chunk-5APMQ2IJ.js";
58
+ } from "./chunk-KW5JQPO5.js";
59
59
  import {
60
60
  readDirEntriesSafeAsync
61
- } from "./chunk-VG5JS5SW.js";
61
+ } from "./chunk-ZGSJDWQU.js";
62
62
  import {
63
63
  OWNER_TAG_ENV,
64
64
  SpawnFailureError,
@@ -87,7 +87,7 @@ import {
87
87
  safeSpawnAsync,
88
88
  statIsFile,
89
89
  trustScopedEnvironment
90
- } from "./chunk-Q3UZHW6N.js";
90
+ } from "./chunk-YVHBNSME.js";
91
91
  import {
92
92
  DOTNET_CSHARP_ROOT_MARKERS,
93
93
  DOTNET_FSHARP_ROOT_MARKERS,
@@ -103,7 +103,7 @@ import {
103
103
  reportPiLensConfigRecords,
104
104
  resolvePiLensConfig,
105
105
  summarizeConfigResolution
106
- } from "./chunk-OLAWH5UQ.js";
106
+ } from "./chunk-KPPJTH44.js";
107
107
  import {
108
108
  FRESHNESS_CADENCE_MS,
109
109
  LSP_NAMESPACE_KEY,
@@ -116,12 +116,12 @@ import {
116
116
  import {
117
117
  getProjectTrustGeneration,
118
118
  getProjectTrustState
119
- } from "./chunk-MN7MHUXQ.js";
119
+ } from "./chunk-U5HPROLA.js";
120
120
  import {
121
121
  getDegradationLedgerGeneration,
122
122
  incrementDegradationCount,
123
123
  recordDegradationOnce
124
- } from "./chunk-ZQ6NZZTB.js";
124
+ } from "./chunk-WME2OQST.js";
125
125
  import {
126
126
  logExtension
127
127
  } from "./chunk-KXF5R4UN.js";
@@ -288,18 +288,11 @@ var SGCONFIG_NAMES = ["sgconfig.yml", "sgconfig.yaml"];
288
288
  function findLocalSgconfig(startDir) {
289
289
  return findLocalToolConfig(startDir, SGCONFIG_NAMES);
290
290
  }
291
- function canonicalDir(dir) {
292
- try {
293
- return fs2.realpathSync.native(dir);
294
- } catch {
295
- return path2.resolve(dir);
296
- }
297
- }
298
291
  function getAstGrepRuleSources(projectRoot = process.cwd()) {
299
292
  const root = path2.resolve(projectRoot || process.cwd());
300
293
  const packageRoot = resolvePackagePath(import.meta.url);
301
294
  const candidates = [];
302
- if (canonicalDir(root) !== canonicalDir(packageRoot)) {
295
+ if (realpathOrResolve(root) !== realpathOrResolve(packageRoot)) {
303
296
  candidates.push({
304
297
  dir: path2.join(root, "rules", "ast-grep-rules", "rules"),
305
298
  origin: "project",
@@ -311,7 +304,7 @@ function getAstGrepRuleSources(projectRoot = process.cwd()) {
311
304
  });
312
305
  }
313
306
  const userRoot = getUserRuleRoot();
314
- if (canonicalDir(userRoot) !== canonicalDir(root)) {
307
+ if (realpathOrResolve(userRoot) !== realpathOrResolve(root)) {
315
308
  candidates.push({
316
309
  dir: path2.join(userRoot, "ast-grep-rules", "rules"),
317
310
  origin: "user",
@@ -335,7 +328,7 @@ function getAstGrepRuleSources(projectRoot = process.cwd()) {
335
328
  return candidates.filter((source) => {
336
329
  if (!fs2.existsSync(source.dir))
337
330
  return false;
338
- const key = canonicalDir(source.dir);
331
+ const key = realpathOrResolve(source.dir);
339
332
  if (seen.has(key))
340
333
  return false;
341
334
  seen.add(key);
@@ -384,7 +377,7 @@ function parseRuleDocuments(content) {
384
377
  }
385
378
  var bundledSnapshots = /* @__PURE__ */ new Map();
386
379
  function snapshotRuleSource(source) {
387
- const cacheKey = canonicalDir(source.dir);
380
+ const cacheKey = realpathOrResolve(source.dir);
388
381
  if (source.origin === "bundled") {
389
382
  const cached = bundledSnapshots.get(cacheKey);
390
383
  if (cached)
@@ -428,7 +421,7 @@ function sourceFingerprint(sources) {
428
421
  hash.update("\0");
429
422
  hash.update(source.tier);
430
423
  hash.update("\0");
431
- hash.update(canonicalDir(source.dir));
424
+ hash.update(realpathOrResolve(source.dir));
432
425
  hash.update("\0");
433
426
  hash.update(source.digest);
434
427
  hash.update("\0");
@@ -473,7 +466,7 @@ function rootArtifactKey(root) {
473
466
  return createHash("sha256").update(root).digest("hex").slice(0, 12);
474
467
  }
475
468
  function resolveBaselineSgconfig(projectRoot = process.cwd()) {
476
- const root = canonicalDir(path2.resolve(projectRoot || process.cwd()));
469
+ const root = realpathOrResolve(path2.resolve(projectRoot || process.cwd()));
477
470
  const fingerprint = getAstGrepRuleFingerprint(root, { force: true });
478
471
  const cached = cachedBaselines.get(root);
479
472
  if (cached?.fingerprint === fingerprint && fs2.existsSync(cached.path) && fs2.existsSync(cached.mergedDir)) {
@@ -595,6 +588,9 @@ var ROLE_MEMBERS = {
595
588
  auxiliary: "auxiliary"
596
589
  };
597
590
  var DEFAULT_LSP_SERVER_ROLE = "language";
591
+ function isTsgoLaunchVariant(variant) {
592
+ return variant === "native-ts7" || variant === "effect-tsgo";
593
+ }
598
594
  function isAuxiliary(bearer) {
599
595
  const declared = bearer?.role;
600
596
  const role = typeof declared === "string" && Object.hasOwn(ROLE_MEMBERS, declared) ? ROLE_MEMBERS[declared] : DEFAULT_LSP_SERVER_ROLE;
@@ -2264,7 +2260,7 @@ function overrideStrategy(serverId) {
2264
2260
  return strategy;
2265
2261
  }
2266
2262
  function getStrategy(serverId, launchVariant) {
2267
- if (serverId === "typescript" && launchVariant === "native-ts7") {
2263
+ if (serverId === "typescript" && isTsgoLaunchVariant(launchVariant)) {
2268
2264
  return NATIVE_TS7_DIAGNOSTIC_STRATEGY;
2269
2265
  }
2270
2266
  if (launchVariant === "override")
@@ -3678,7 +3674,8 @@ async function findAncestorFile(startDir, ...relativeSegments) {
3678
3674
  async function findAncestorFileAmong(startDir, candidateSegmentLists) {
3679
3675
  const fs6 = await import("node:fs/promises");
3680
3676
  let currentDir = path7.resolve(startDir);
3681
- while (!isAtOrAboveHomeDir(currentDir)) {
3677
+ const home = realpathOrResolve(os7.homedir());
3678
+ while (!isAtOrAboveHomeDir(realpathOrResolve(currentDir), home)) {
3682
3679
  for (const segments of candidateSegmentLists) {
3683
3680
  const candidate = path7.join(currentDir, ...segments);
3684
3681
  try {
@@ -3816,7 +3813,8 @@ async function findTsserverPath(root, allowInstall, options) {
3816
3813
  }
3817
3814
  async function findNativeTypeScriptLsp(root) {
3818
3815
  let currentDir = path7.resolve(root);
3819
- while (!isAtOrAboveHomeDir(currentDir)) {
3816
+ const home = realpathOrResolve(os7.homedir());
3817
+ while (!isAtOrAboveHomeDir(realpathOrResolve(currentDir), home)) {
3820
3818
  const typescriptDir = path7.join(currentDir, "node_modules", "typescript");
3821
3819
  const packageJsonPath = path7.join(typescriptDir, "package.json");
3822
3820
  let packageJsonText;
@@ -3857,7 +3855,11 @@ async function findNativeTypeScriptLsp(root) {
3857
3855
  for (const command of candidates) {
3858
3856
  try {
3859
3857
  await access(command);
3860
- return { command, version };
3858
+ return {
3859
+ command,
3860
+ version,
3861
+ nodeModulesDir: path7.join(currentDir, "node_modules")
3862
+ };
3861
3863
  } catch {
3862
3864
  }
3863
3865
  }
@@ -3865,6 +3867,27 @@ async function findNativeTypeScriptLsp(root) {
3865
3867
  }
3866
3868
  return void 0;
3867
3869
  }
3870
+ async function findEffectTsgoLsp(nodeModulesDir) {
3871
+ let release;
3872
+ try {
3873
+ const manifest = JSON.parse(await readFile(path7.join(nodeModulesDir, "@effect", "tsgo", "package.json"), "utf8"));
3874
+ release = typeof manifest === "object" && manifest !== null && "version" in manifest ? manifest.version : void 0;
3875
+ } catch {
3876
+ return void 0;
3877
+ }
3878
+ if (typeof release !== "string" || !release)
3879
+ return void 0;
3880
+ const localBin = path7.join(nodeModulesDir, ".bin", "effect-tsgo");
3881
+ const candidates = process.platform === "win32" ? [`${localBin}.cmd`, `${localBin}.exe`, localBin] : [localBin];
3882
+ for (const command of candidates) {
3883
+ try {
3884
+ await access(command);
3885
+ return { command, releaseTag: release };
3886
+ } catch {
3887
+ }
3888
+ }
3889
+ return void 0;
3890
+ }
3868
3891
  function dotnetToolCandidates(tool) {
3869
3892
  const home = os7.homedir();
3870
3893
  return [
@@ -4027,6 +4050,29 @@ var TypeScriptServer = {
4027
4050
  rootMarkers: TypeScriptRoot.rootMarkers,
4028
4051
  async spawn(root, options) {
4029
4052
  const nativeLsp = await findNativeTypeScriptLsp(root);
4053
+ const effectLsp = nativeLsp ? await findEffectTsgoLsp(nativeLsp.nodeModulesDir) : void 0;
4054
+ if (nativeLsp && effectLsp && admitProjectSuppliedTsserver(effectLsp.command, root, true, options?.projectCodeAllowed)) {
4055
+ const env2 = await getToolEnvironment();
4056
+ try {
4057
+ const proc2 = await launchLSP(effectLsp.command, ["tsc", "--lsp", "--stdio"], { cwd: root, env: env2 });
4058
+ logSessionStart(`lsp typescript-effect-tsgo: version=${effectLsp.releaseTag} typescript=${nativeLsp.version} command=${effectLsp.command}`);
4059
+ return {
4060
+ process: proc2,
4061
+ source: "direct",
4062
+ launchVariant: "effect-tsgo"
4063
+ };
4064
+ } catch (launchFailure) {
4065
+ recordDegradationOnce({
4066
+ kind: "lsp-registry-decision",
4067
+ subject: `effect-tsgo-launch:g${getDegradationLedgerGeneration()}:${root}`,
4068
+ reason: `effect-tsgo launch failed, using the native launch: ${launchFailure instanceof Error ? launchFailure.message : String(launchFailure)}`,
4069
+ metadata: {
4070
+ field: "effect-tsgo-launch",
4071
+ launchVariant: "effect-tsgo"
4072
+ }
4073
+ });
4074
+ }
4075
+ }
4030
4076
  if (nativeLsp && admitProjectSuppliedTsserver(nativeLsp.command, root, true, options?.projectCodeAllowed)) {
4031
4077
  const env2 = await getToolEnvironment();
4032
4078
  logSessionStart(`lsp typescript-native: version=${nativeLsp.version} command=${nativeLsp.command}`);
@@ -5451,6 +5497,25 @@ var TyposServer = {
5451
5497
  },
5452
5498
  autoInstall: async () => Boolean(await ensureTool("typos-lsp"))
5453
5499
  };
5500
+ var FallowServer = {
5501
+ id: "fallow",
5502
+ idleEviction: "unmeasured",
5503
+ role: "auxiliary",
5504
+ name: "fallow TS/JS Code Health",
5505
+ extensions: JS_TS_LSP_EXTENSIONS,
5506
+ root: RootWithFallback(NearestRoot([".git"])),
5507
+ looseFileRoot: "decline",
5508
+ availabilityKey: "fallow-lsp",
5509
+ spawn(root, options) {
5510
+ return resolveAndLaunchTreeBinary({
5511
+ candidates: ["fallow-lsp"],
5512
+ bundleToolId: "fallow-lsp",
5513
+ binRelPath: "fallow-lsp",
5514
+ cwd: root,
5515
+ args: []
5516
+ }, options?.allowInstall);
5517
+ }
5518
+ };
5454
5519
  var LSP_SERVERS = [
5455
5520
  TypeScriptServer,
5456
5521
  DenoServer,
@@ -5506,7 +5571,9 @@ var LSP_SERVERS = [
5506
5571
  OpengrepServer,
5507
5572
  AstGrepServer,
5508
5573
  ZizmorServer,
5509
- TyposServer
5574
+ TyposServer,
5575
+ FallowServer
5576
+ // opt-in (--lens-fallow), JS/TS only
5510
5577
  ];
5511
5578
  function getServerById(id) {
5512
5579
  return LSP_SERVERS.find((server) => server.id === id);
@@ -3,7 +3,7 @@ import {
3
3
  deserializeWordIndex,
4
4
  recordPersistedWordIndexWireBytes,
5
5
  serializeWordIndex
6
- } from "./chunk-VPBIMOAQ.js";
6
+ } from "./chunk-SNDXCFRS.js";
7
7
  import {
8
8
  fingerprintProjectSnapshotJson
9
9
  } from "./chunk-2BEMIWEW.js";
@@ -15,13 +15,13 @@ import {
15
15
  getProjectDataDir,
16
16
  isStaleStageFile,
17
17
  withGenerationLockSync
18
- } from "./chunk-Q3UZHW6N.js";
18
+ } from "./chunk-YVHBNSME.js";
19
19
  import {
20
20
  writeFileAtomic
21
- } from "./chunk-MN7MHUXQ.js";
21
+ } from "./chunk-U5HPROLA.js";
22
22
  import {
23
23
  incrementDegradationCount
24
- } from "./chunk-ZQ6NZZTB.js";
24
+ } from "./chunk-WME2OQST.js";
25
25
  import {
26
26
  logLatency
27
27
  } from "./chunk-Z2XAOKHK.js";
@@ -28,11 +28,11 @@ import {
28
28
  statIsFile,
29
29
  trustScopedEnvironment,
30
30
  trustScopedSearchPath
31
- } from "./chunk-Q3UZHW6N.js";
32
- import "./chunk-OLAWH5UQ.js";
31
+ } from "./chunk-YVHBNSME.js";
32
+ import "./chunk-KPPJTH44.js";
33
33
  import "./chunk-J6JP25XU.js";
34
- import "./chunk-MN7MHUXQ.js";
35
- import "./chunk-ZQ6NZZTB.js";
34
+ import "./chunk-U5HPROLA.js";
35
+ import "./chunk-WME2OQST.js";
36
36
  import "./chunk-KXF5R4UN.js";
37
37
  import "./chunk-S26LC76R.js";
38
38
  import "./chunk-Z2XAOKHK.js";
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  createToolchainAvailability
4
- } from "./chunk-EVDGNG4F.js";
4
+ } from "./chunk-CB4WHS4H.js";
5
5
  import {
6
6
  createSubsystemLogger
7
7
  } from "./chunk-KXF5R4UN.js";
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  tryLazyInstallForFormatter
4
- } from "./chunk-2DDDCJDL.js";
4
+ } from "./chunk-LBLBAFG3.js";
5
5
  import {
6
6
  OXFMT_SUPPORTED_EXTENSIONS,
7
7
  findPSScriptAnalyzerConfigPath,
@@ -43,7 +43,7 @@ import {
43
43
  hasTerraformConfig,
44
44
  hasVitePlusConfig,
45
45
  stripGradleCommentsAndStrings
46
- } from "./chunk-XAIT2YGS.js";
46
+ } from "./chunk-MB6PXBUA.js";
47
47
  import {
48
48
  readTextFileOrUndefined,
49
49
  resolveCargoPackageEdition
@@ -56,45 +56,45 @@ import {
56
56
  } from "./chunk-6HWVI6MI.js";
57
57
  import {
58
58
  getToolPath
59
- } from "./chunk-MKVZQUEG.js";
59
+ } from "./chunk-KDX35VXP.js";
60
60
  import {
61
61
  resolveToolCwd
62
- } from "./chunk-MT6BVNFW.js";
62
+ } from "./chunk-DPGEAHZT.js";
63
63
  import {
64
64
  findGlobalBinary,
65
65
  findLocalBinUpwards,
66
66
  localBinPath
67
- } from "./chunk-Z7IGUAXL.js";
67
+ } from "./chunk-NA7SEXHE.js";
68
68
  import {
69
69
  getIsolatedNpxSpawnOptions,
70
70
  probeToolAsync
71
- } from "./chunk-ARD426WI.js";
71
+ } from "./chunk-3F6BMY53.js";
72
72
  import {
73
73
  classifyProbeFailure,
74
74
  createAvailabilityLatch,
75
75
  logAvailabilityDecision,
76
76
  startHostStallSampler
77
- } from "./chunk-5APMQ2IJ.js";
77
+ } from "./chunk-KW5JQPO5.js";
78
78
  import {
79
79
  VENDOR_BIN_DIRS,
80
80
  VENV_BIN_DIRS,
81
81
  admittedLookupAnswer,
82
82
  createGenerationSource,
83
83
  safeSpawnAsync
84
- } from "./chunk-Q3UZHW6N.js";
84
+ } from "./chunk-YVHBNSME.js";
85
85
  import {
86
86
  TERRAGRUNT_FILENAMES
87
87
  } from "./chunk-RZOXUSPC.js";
88
88
  import {
89
89
  assertInstallAllowed,
90
90
  getProjectTrustGeneration
91
- } from "./chunk-MN7MHUXQ.js";
91
+ } from "./chunk-U5HPROLA.js";
92
92
  import {
93
93
  compareOrdinal,
94
94
  getDegradationLedgerGeneration,
95
95
  incrementDegradationCount,
96
96
  recordDegradationOnce
97
- } from "./chunk-ZQ6NZZTB.js";
97
+ } from "./chunk-WME2OQST.js";
98
98
  import {
99
99
  logExtension
100
100
  } from "./chunk-KXF5R4UN.js";
@@ -3,16 +3,16 @@ import {
3
3
  GoClient,
4
4
  goClient,
5
5
  resetGoAvailability
6
- } from "./chunk-PO45POGF.js";
7
- import "./chunk-EVDGNG4F.js";
8
- import "./chunk-ARD426WI.js";
9
- import "./chunk-5APMQ2IJ.js";
10
- import "./chunk-Q3UZHW6N.js";
6
+ } from "./chunk-4LM3VAZH.js";
7
+ import "./chunk-CB4WHS4H.js";
8
+ import "./chunk-3F6BMY53.js";
9
+ import "./chunk-KW5JQPO5.js";
10
+ import "./chunk-YVHBNSME.js";
11
11
  import "./chunk-AWQWXSW4.js";
12
- import "./chunk-OLAWH5UQ.js";
12
+ import "./chunk-KPPJTH44.js";
13
13
  import "./chunk-J6JP25XU.js";
14
- import "./chunk-MN7MHUXQ.js";
15
- import "./chunk-ZQ6NZZTB.js";
14
+ import "./chunk-U5HPROLA.js";
15
+ import "./chunk-WME2OQST.js";
16
16
  import "./chunk-KXF5R4UN.js";
17
17
  import "./chunk-S26LC76R.js";
18
18
  import "./chunk-Z2XAOKHK.js";
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  getWordIndexMaxFilesDerived
4
- } from "./chunk-ZYNI26MI.js";
4
+ } from "./chunk-QOE342SU.js";
5
5
  import {
6
6
  createSingleFlight
7
7
  } from "./chunk-AWQWXSW4.js";
@@ -16,10 +16,10 @@ import {
16
16
  import {
17
17
  PathKeyedMap,
18
18
  isTestFileName
19
- } from "./chunk-OLAWH5UQ.js";
19
+ } from "./chunk-KPPJTH44.js";
20
20
  import {
21
21
  incrementDegradationCount
22
- } from "./chunk-ZQ6NZZTB.js";
22
+ } from "./chunk-WME2OQST.js";
23
23
  import {
24
24
  logLatency
25
25
  } from "./chunk-Z2XAOKHK.js";
@@ -32,11 +32,13 @@ import {
32
32
  import {
33
33
  isAtOrAboveHomeDir,
34
34
  normalizeEphemeralMapKey,
35
- normalizeFilePath
35
+ normalizeFilePath,
36
+ realpathOrResolve
36
37
  } from "./chunk-PQJFG24Z.js";
37
38
 
38
39
  // dist/clients/word-index.js
39
40
  import * as fs from "node:fs";
41
+ import * as os from "node:os";
40
42
  import * as path2 from "node:path";
41
43
 
42
44
  // dist/clients/persist-debounce.js
@@ -859,7 +861,7 @@ async function updateWordIndexDocumentAsyncUnsafe(index, doc, shouldContinue) {
859
861
  }
860
862
  var WORD_INDEX_MAX_BYTES = 512 * 1024;
861
863
  async function collectWordIndexDocs(root, shouldContinue = () => true, preflightFiles) {
862
- const { collectSourceFilesAsync } = await import("./chunk-W5R5SABV.js");
864
+ const { collectSourceFilesAsync } = await import("./chunk-U7BD2QL7.js");
863
865
  const maxFiles = preflightFiles?.length ?? getWordIndexMaxFilesDerived(root);
864
866
  const files = preflightFiles ? preflightFiles.map((file) => file.path) : await collectSourceFilesAsync(root, {
865
867
  maxFiles,
@@ -908,7 +910,7 @@ async function refreshWordIndexIncrementally(index, root, shouldContinue = () =>
908
910
  timings: { sourceWalkMs: 0, statWalkMs: 0, refreshReadsMs: 0 }
909
911
  };
910
912
  }
911
- const { collectSourceFilesAsync } = await import("./chunk-W5R5SABV.js");
913
+ const { collectSourceFilesAsync } = await import("./chunk-U7BD2QL7.js");
912
914
  const maxFiles = getWordIndexMaxFilesDerived(root);
913
915
  const sourceWalkStartMs = Date.now();
914
916
  const walked = await collectSourceFilesAsync(root, {
@@ -1727,7 +1729,7 @@ function _resetWordIndexBuildGuardForTests() {
1727
1729
  }
1728
1730
  function triggerBackgroundWordIndexBuild(cwd, dbg, options = {}) {
1729
1731
  const key = path2.resolve(cwd);
1730
- if (isAtOrAboveHomeDir(key, options.homeDir)) {
1732
+ if (isAtOrAboveHomeDir(realpathOrResolve(key), realpathOrResolve(options.homeDir ?? os.homedir()))) {
1731
1733
  const reason = `root at/above home directory (${key})`;
1732
1734
  dbg?.(`word-index cold-build: skipped \u2014 ${reason}`);
1733
1735
  logWordIndex({
@@ -1748,7 +1750,7 @@ function triggerBackgroundWordIndexBuild(cwd, dbg, options = {}) {
1748
1750
  void (async () => {
1749
1751
  const startMs = Date.now();
1750
1752
  try {
1751
- const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-FA5LDARD.js");
1753
+ const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-CCV2EU7T.js");
1752
1754
  const docs = await collectWordIndexDocs(key);
1753
1755
  const index = await buildWordIndexAsync(docs);
1754
1756
  const existing = loadProjectSnapshot(key);
@@ -1815,7 +1817,7 @@ function getWordIndexPersistScheduler() {
1815
1817
  async function writeWordIndexSnapshot(cwd, index, dbg) {
1816
1818
  const persistStartedAt = Date.now();
1817
1819
  try {
1818
- const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-FA5LDARD.js");
1820
+ const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-CCV2EU7T.js");
1819
1821
  const existing = loadProjectSnapshot(cwd);
1820
1822
  const snapshot = existing ?? {
1821
1823
  version: PROJECT_SNAPSHOT_VERSION,
@@ -4,28 +4,28 @@ import {
4
4
  } from "./chunk-V63BC55Q.js";
5
5
  import {
6
6
  getScratchTreeDirNames
7
- } from "./chunk-AMXIUN2R.js";
7
+ } from "./chunk-CPSR3AVL.js";
8
8
  import {
9
9
  SecurityScanClient
10
- } from "./chunk-3MYEA7QD.js";
10
+ } from "./chunk-ZE3KXHS7.js";
11
11
  import {
12
12
  resolveOpengrepConfig
13
- } from "./chunk-JL6CXUMW.js";
13
+ } from "./chunk-24BILSZW.js";
14
14
  import {
15
15
  stripPackRuleIdPrefix
16
- } from "./chunk-UHGF5UT5.js";
17
- import "./chunk-ARD426WI.js";
18
- import "./chunk-5APMQ2IJ.js";
16
+ } from "./chunk-O4BJFESU.js";
17
+ import "./chunk-3F6BMY53.js";
18
+ import "./chunk-KW5JQPO5.js";
19
19
  import {
20
20
  safeSpawnAsync
21
- } from "./chunk-Q3UZHW6N.js";
21
+ } from "./chunk-YVHBNSME.js";
22
22
  import "./chunk-AWQWXSW4.js";
23
- import "./chunk-OLAWH5UQ.js";
23
+ import "./chunk-KPPJTH44.js";
24
24
  import "./chunk-J6JP25XU.js";
25
- import "./chunk-MN7MHUXQ.js";
25
+ import "./chunk-U5HPROLA.js";
26
26
  import {
27
27
  recordDegradationOnce
28
- } from "./chunk-ZQ6NZZTB.js";
28
+ } from "./chunk-WME2OQST.js";
29
29
  import "./chunk-KXF5R4UN.js";
30
30
  import "./chunk-S26LC76R.js";
31
31
  import "./chunk-Z2XAOKHK.js";
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  recordDegradation
4
- } from "./chunk-ZQ6NZZTB.js";
4
+ } from "./chunk-WME2OQST.js";
5
5
  import {
6
6
  logExtension
7
7
  } from "./chunk-KXF5R4UN.js";
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  getGlobalPiLensDir
4
- } from "./chunk-Q3UZHW6N.js";
4
+ } from "./chunk-YVHBNSME.js";
5
5
  import {
6
6
  getTurnId
7
7
  } from "./chunk-VSFLRN5Y.js";
@@ -15,15 +15,15 @@ import {
15
15
  getFilterStats,
16
16
  isBuildArtifact,
17
17
  sourceTwinCandidates
18
- } from "./chunk-2RLWJO5K.js";
19
- import "./chunk-VG5JS5SW.js";
20
- import "./chunk-Q3UZHW6N.js";
18
+ } from "./chunk-EKWX4WD3.js";
19
+ import "./chunk-ZGSJDWQU.js";
20
+ import "./chunk-YVHBNSME.js";
21
21
  import "./chunk-QYF5S6P6.js";
22
22
  import "./chunk-RZOXUSPC.js";
23
- import "./chunk-OLAWH5UQ.js";
23
+ import "./chunk-KPPJTH44.js";
24
24
  import "./chunk-J6JP25XU.js";
25
- import "./chunk-MN7MHUXQ.js";
26
- import "./chunk-ZQ6NZZTB.js";
25
+ import "./chunk-U5HPROLA.js";
26
+ import "./chunk-WME2OQST.js";
27
27
  import "./chunk-KXF5R4UN.js";
28
28
  import "./chunk-S26LC76R.js";
29
29
  import "./chunk-Z2XAOKHK.js";
@@ -3,16 +3,16 @@ import {
3
3
  RustClient,
4
4
  resetRustAvailability,
5
5
  rustClient
6
- } from "./chunk-K2YGBXOA.js";
7
- import "./chunk-EVDGNG4F.js";
8
- import "./chunk-ARD426WI.js";
9
- import "./chunk-5APMQ2IJ.js";
10
- import "./chunk-Q3UZHW6N.js";
6
+ } from "./chunk-RQS4QQSD.js";
7
+ import "./chunk-CB4WHS4H.js";
8
+ import "./chunk-3F6BMY53.js";
9
+ import "./chunk-KW5JQPO5.js";
10
+ import "./chunk-YVHBNSME.js";
11
11
  import "./chunk-AWQWXSW4.js";
12
- import "./chunk-OLAWH5UQ.js";
12
+ import "./chunk-KPPJTH44.js";
13
13
  import "./chunk-J6JP25XU.js";
14
- import "./chunk-MN7MHUXQ.js";
15
- import "./chunk-ZQ6NZZTB.js";
14
+ import "./chunk-U5HPROLA.js";
15
+ import "./chunk-WME2OQST.js";
16
16
  import "./chunk-KXF5R4UN.js";
17
17
  import "./chunk-S26LC76R.js";
18
18
  import "./chunk-Z2XAOKHK.js";