pi-lens 4.4.5 → 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.
- package/CHANGELOG.md +120 -0
- package/README.md +37 -1
- package/config/biome/core.jsonc +3 -3
- package/dist/{chunk-6XSESGWD.js → chunk-24BILSZW.js} +2 -2
- package/dist/{chunk-YXDCRUKQ.js → chunk-2PHMIAKO.js} +4 -4
- package/dist/{chunk-EN5AM7PX.js → chunk-2TF6RXWB.js} +10 -10
- package/dist/{chunk-XI34NWDI.js → chunk-3F6BMY53.js} +1 -1
- package/dist/{chunk-VUAVE3QC.js → chunk-3FRLWYBG.js} +36 -36
- package/dist/{chunk-THEXI2QO.js → chunk-3K2F6UDZ.js} +42 -42
- package/dist/{chunk-ZPJM7DID.js → chunk-3YY7IXIL.js} +3 -3
- package/dist/chunk-46TNM7XZ.js +88 -0
- package/dist/{chunk-TL2TCJYL.js → chunk-4L36HG27.js} +14 -14
- package/dist/{chunk-UCVMSOXF.js → chunk-4LM3VAZH.js} +2 -2
- package/dist/{chunk-AI3GP74G.js → chunk-4LOE5R5P.js} +15 -15
- package/dist/{chunk-AHWA4AKM.js → chunk-4YHYPW2G.js} +32 -9
- package/dist/{chunk-VITFDI3O.js → chunk-4ZYJHQMB.js} +12 -12
- package/dist/{chunk-KCBRHV5E.js → chunk-6IR3ZYIB.js} +3 -3
- package/dist/chunk-72OKUXSD.js +31 -0
- package/dist/{chunk-RCHO5W7M.js → chunk-75GAYVNO.js} +13 -12
- package/dist/{chunk-2SDHYHHO.js → chunk-7E2563GA.js} +13 -13
- package/dist/chunk-7GLOLOSH.js +57 -0
- package/dist/{chunk-CG5V25HX.js → chunk-ABPKUVA4.js} +1 -1
- package/dist/chunk-AKUUMGD5.js +26 -0
- package/dist/chunk-ASUXV767.js +22 -0
- package/dist/{chunk-Q42LJANT.js → chunk-AWDSEDER.js} +2 -2
- package/dist/{chunk-Y2TPADJR.js → chunk-BZARLRJW.js} +9 -9
- package/dist/{chunk-YKVDBNPO.js → chunk-CB4WHS4H.js} +3 -3
- package/dist/{chunk-YXGRRORB.js → chunk-CCV2EU7T.js} +13 -13
- package/dist/{chunk-PJXNTPB2.js → chunk-CE6VMBCB.js} +21 -21
- package/dist/{chunk-KPVLQHCZ.js → chunk-CPSR3AVL.js} +2 -2
- package/dist/chunk-CTADOKYM.js +25 -0
- package/dist/{chunk-CPZ5JJW6.js → chunk-DH5JPM3K.js} +4 -4
- package/dist/{chunk-4FHUGDKU.js → chunk-DPGEAHZT.js} +5 -5
- package/dist/{chunk-SNEUMLM7.js → chunk-DQZFQSR5.js} +4 -4
- package/dist/{chunk-RG3MXTRI.js → chunk-E7HJ56Y7.js} +7 -7
- package/dist/{chunk-YSDPVDFC.js → chunk-EAOK7MIZ.js} +3 -3
- package/dist/{chunk-PP2A5V2T.js → chunk-EKWX4WD3.js} +7 -7
- package/dist/{chunk-2LDMXL2M.js → chunk-F5Z6URKM.js} +2 -2
- package/dist/{chunk-72J27ICO.js → chunk-F6X3YJWD.js} +2 -2
- package/dist/{chunk-ELZRSR5N.js → chunk-F7K5IBZG.js} +41 -39
- package/dist/{chunk-EX4EXBW7.js → chunk-FB5SCCPT.js} +15 -15
- package/dist/{chunk-SJHC3BCZ.js → chunk-FZKFVUEC.js} +518 -233
- package/dist/{chunk-UVY4TOJH.js → chunk-GNSIWBAT.js} +3 -3
- package/dist/{chunk-EXVXBSGN.js → chunk-H7OR7DFZ.js} +20 -18
- package/dist/{chunk-NLIVE7L6.js → chunk-HO6LWE2E.js} +1 -1
- package/dist/{chunk-X3UTCXAA.js → chunk-HR3OJ3TH.js} +12 -12
- package/dist/{chunk-HYVXA3BB.js → chunk-HWDAVBFU.js} +23 -23
- package/dist/{chunk-ZSUX7KEM.js → chunk-J6JP25XU.js} +2 -2
- package/dist/{chunk-T4NGVFYI.js → chunk-JJ2RRESP.js} +8 -5
- package/dist/{chunk-RU34BA4D.js → chunk-JMEKXFOL.js} +34 -34
- package/dist/{chunk-IL7K66ZQ.js → chunk-KDX35VXP.js} +74 -18
- package/dist/{chunk-EDMLIW6W.js → chunk-KKCK636N.js} +12 -12
- package/dist/{chunk-KJJAVH3X.js → chunk-KPPJTH44.js} +6 -5
- package/dist/{chunk-5LRUKYFA.js → chunk-KW5JQPO5.js} +2 -2
- package/dist/{chunk-N3PLNNCW.js → chunk-KXF5R4UN.js} +1 -1
- package/dist/{chunk-YWNO5Q4R.js → chunk-L3CMBQMH.js} +17 -17
- package/dist/{chunk-YWWG4AQA.js → chunk-L5JYIU47.js} +24 -25
- package/dist/{chunk-K2GUZ4DN.js → chunk-LBLBAFG3.js} +4 -4
- package/dist/{chunk-APFJKOP6.js → chunk-LLS45EWB.js} +10 -2
- package/dist/{chunk-MKPCELNI.js → chunk-LS3QJRUB.js} +13 -13
- package/dist/chunk-LSC3VADM.js +23 -0
- package/dist/{chunk-F7BO6FWH.js → chunk-LUBPZN36.js} +11 -11
- package/dist/{chunk-ASRAO7KG.js → chunk-LV4UMYVH.js} +27 -27
- package/dist/{chunk-COOUUC5W.js → chunk-MB6PXBUA.js} +6 -6
- package/dist/{chunk-3WCEHYOI.js → chunk-MNJIXFX4.js} +1 -1
- package/dist/{chunk-FEDWAYDS.js → chunk-MPKRJBPK.js} +35 -15
- package/dist/{chunk-Q4BKKOVC.js → chunk-N5WSK2K7.js} +8 -8
- package/dist/{chunk-K4SZB56V.js → chunk-NA7SEXHE.js} +12 -8
- package/dist/{chunk-UL5SXQVX.js → chunk-O4BJFESU.js} +1 -1
- package/dist/{chunk-LMCTHJ2H.js → chunk-OE5ZBP7F.js} +18 -18
- package/dist/{chunk-NFNVDDGB.js → chunk-OSTKYB55.js} +1 -1
- package/dist/{chunk-27VWVB23.js → chunk-OXOI55RU.js} +10 -10
- package/dist/{chunk-7IYC4ENJ.js → chunk-PKES3ISE.js} +2 -2
- package/dist/{chunk-EWXXLS26.js → chunk-PQJFG24Z.js} +82 -12
- package/dist/{chunk-3SNDVPOR.js → chunk-PR6PO3ES.js} +8 -8
- package/dist/{chunk-63NMUNYP.js → chunk-PUZ3E2J4.js} +6 -6
- package/dist/{chunk-DS2USX5G.js → chunk-QHSNL7B2.js} +11 -11
- package/dist/{chunk-UO66IMVP.js → chunk-QOE342SU.js} +2 -2
- package/dist/{chunk-7ZS7MC24.js → chunk-R5MOQM2H.js} +107 -40
- package/dist/{chunk-JWOVP5BL.js → chunk-RC2Z6K47.js} +6 -6
- package/dist/{chunk-GLW3YDZZ.js → chunk-RORGS5II.js} +9 -9
- package/dist/{chunk-Y5KTA2OB.js → chunk-RQS4QQSD.js} +2 -2
- package/dist/{chunk-KFXCL4OV.js → chunk-RRV3FNNM.js} +22 -23
- package/dist/{chunk-GYRZ72R4.js → chunk-RZOXUSPC.js} +2 -2
- package/dist/chunk-SHLDT3OI.js +27 -0
- package/dist/{chunk-IEBJF3PN.js → chunk-SNDXCFRS.js} +15 -13
- package/dist/{chunk-XHLK33VM.js → chunk-T7A2HK2B.js} +16 -16
- package/dist/{chunk-WUY4BZEP.js → chunk-TIQJPRDD.js} +106 -50
- package/dist/{chunk-2FYKETQJ.js → chunk-U2SDMG7C.js} +5 -5
- package/dist/{chunk-EIKRZ32J.js → chunk-U5HPROLA.js} +2 -2
- package/dist/{chunk-2Y6OJRSI.js → chunk-U6VN4NVL.js} +3 -3
- package/dist/{chunk-OZNCKLOX.js → chunk-U7BD2QL7.js} +12 -12
- package/dist/chunk-UF7RTZSO.js +27 -0
- package/dist/{chunk-XHDBJODR.js → chunk-URCQWAQ4.js} +21 -21
- package/dist/{chunk-7FLRUH6B.js → chunk-V63BC55Q.js} +1 -1
- package/dist/{chunk-TVZRLTG6.js → chunk-VSFLRN5Y.js} +1 -1
- package/dist/{chunk-OMJ3OFBJ.js → chunk-VUZWQ7UG.js} +6 -6
- package/dist/chunk-W4WP2ERB.js +30 -0
- package/dist/{chunk-G224FADB.js → chunk-WDBICWH3.js} +1 -1
- package/dist/{chunk-4ODSZ35Z.js → chunk-WGRJOXED.js} +121 -155
- package/dist/{chunk-FWZRGGGY.js → chunk-WME2OQST.js} +39 -4
- package/dist/{chunk-MEFLGBCS.js → chunk-XT2HTCJ5.js} +3 -3
- package/dist/{chunk-VIDEKABZ.js → chunk-Y7F7IEE3.js} +55 -23
- package/dist/chunk-YES5CACN.js +73 -0
- package/dist/{chunk-ZAPSUBLU.js → chunk-YHC2O2WO.js} +7 -7
- package/dist/{chunk-GTDSYEA2.js → chunk-YISME6ON.js} +1 -1
- package/dist/{chunk-TPYYEDP5.js → chunk-YVHBNSME.js} +48 -29
- package/dist/{chunk-XWFIHYCH.js → chunk-Z2XAOKHK.js} +2 -2
- package/dist/{chunk-QT66NEYN.js → chunk-ZE3KXHS7.js} +3 -3
- package/dist/{chunk-S55TEC7I.js → chunk-ZGSJDWQU.js} +2 -2
- package/dist/{chunk-4U7GDSZQ.js → chunk-ZJTT47IG.js} +2 -2
- package/dist/{chunk-KX56K73G.js → chunk-ZKXQKGWZ.js} +2 -2
- package/dist/{chunk-5DKE4HGX.js → chunk-ZMAUPOMG.js} +34 -34
- package/dist/index.js +2446 -1303
- package/dist/mcp/analyze-cli.js +10 -10
- package/dist/mcp/cli.js +42 -42
- package/dist/mcp/server.js +724 -472
- package/dist/mcp/worker.js +61 -61
- package/dist/probes/installer.js +19 -19
- package/docs/agent-tools.md +39 -10
- package/docs/configuration.md +3 -1
- package/docs/defect-shapes.md +752 -0
- package/docs/dependencies.md +1 -0
- package/docs/environment-variables.md +14 -0
- package/docs/features.md +11 -1
- package/docs/globalconfig.md +12 -1
- package/docs/invariants/caches-stores.md +30 -0
- package/docs/invariants/dispatch-runners.md +164 -0
- package/docs/invariants/git-guard-host.md +87 -0
- package/docs/invariants/language-config.md +31 -0
- package/docs/invariants/lsp-trust-exec.md +292 -0
- package/docs/invariants/paths-os.md +59 -0
- package/docs/invariants/session-telemetry.md +114 -0
- package/docs/lsp-capability-matrix.md +89 -45
- package/docs/lsp-idle-eviction.md +3 -5
- package/docs/pi-lens-fixer.md +10 -2
- package/docs/pi-lens-merge-policy.md +17 -12
- package/docs/pi-lens-monitor.md +2 -2
- package/docs/pi-lens-orchestration.md +41 -0
- package/docs/pi-lens-release.md +20 -0
- package/docs/pi-lens-retro.md +3 -2
- package/docs/pi-lens-reviewer.md +6 -6
- package/docs/pi-lens-subagent.md +9 -6
- package/docs/schema/pi-lens-config-v1.json +23 -0
- package/docs/servercapabilities.md +1 -1
- package/docs/settings.md +5 -0
- package/docs/usage.md +5 -0
- package/package.json +3 -2
- package/dist/chunk-22Y2BM7H.js +0 -23
- package/dist/chunk-44X7VIKR.js +0 -73
- package/dist/chunk-54NIOJJZ.js +0 -25
- package/dist/chunk-7WWQAW5P.js +0 -30
- package/dist/chunk-EA2ZRG44.js +0 -27
- package/dist/chunk-EKNWOL2I.js +0 -27
- package/dist/chunk-G5UCJFT7.js +0 -26
- package/dist/chunk-N5FBM25N.js +0 -22
- package/dist/chunk-P5XUGPIX.js +0 -31
- package/dist/chunk-PKOXJIVT.js +0 -88
- package/dist/chunk-RG7OODGM.js +0 -57
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
resolveOpengrepConfig
|
|
4
|
-
} from "./chunk-
|
|
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-
|
|
10
|
+
} from "./chunk-PR6PO3ES.js";
|
|
11
11
|
import {
|
|
12
12
|
hasCargoWorkspaceTable,
|
|
13
13
|
readCargoWorkspaceExclude,
|
|
14
14
|
readCargoWorkspaceMembers,
|
|
15
15
|
readTextFileOrUndefined
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZKXQKGWZ.js";
|
|
17
17
|
import {
|
|
18
18
|
getUserRuleRoot,
|
|
19
19
|
ruleCorpusFingerprintForCycle
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-U6VN4NVL.js";
|
|
21
21
|
import {
|
|
22
22
|
load,
|
|
23
23
|
resolvePackagePath
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-TIQJPRDD.js";
|
|
25
25
|
import {
|
|
26
26
|
extensionsForLanguage
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-YISME6ON.js";
|
|
28
28
|
import {
|
|
29
29
|
HOOK_WALL_BUDGET_MS
|
|
30
30
|
} from "./chunk-CKEQFGLT.js";
|
|
31
31
|
import {
|
|
32
32
|
bounded
|
|
33
|
-
} from "./chunk-
|
|
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-
|
|
43
|
+
} from "./chunk-KDX35VXP.js";
|
|
44
44
|
import {
|
|
45
45
|
resolveToolCwd
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-DPGEAHZT.js";
|
|
47
47
|
import {
|
|
48
48
|
commandSearchReachesProject,
|
|
49
49
|
findGlobalBinary,
|
|
50
50
|
isProjectLocalBinPath
|
|
51
|
-
} from "./chunk-
|
|
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-
|
|
58
|
+
} from "./chunk-KW5JQPO5.js";
|
|
59
59
|
import {
|
|
60
60
|
readDirEntriesSafeAsync
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-ZGSJDWQU.js";
|
|
62
62
|
import {
|
|
63
63
|
OWNER_TAG_ENV,
|
|
64
64
|
SpawnFailureError,
|
|
@@ -87,13 +87,13 @@ import {
|
|
|
87
87
|
safeSpawnAsync,
|
|
88
88
|
statIsFile,
|
|
89
89
|
trustScopedEnvironment
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-YVHBNSME.js";
|
|
91
91
|
import {
|
|
92
92
|
DOTNET_CSHARP_ROOT_MARKERS,
|
|
93
93
|
DOTNET_FSHARP_ROOT_MARKERS,
|
|
94
94
|
KIND_EXTENSIONS,
|
|
95
95
|
LEAN_ROOT_MARKERS
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-RZOXUSPC.js";
|
|
97
97
|
import {
|
|
98
98
|
isRepoTier,
|
|
99
99
|
lspSectionOf,
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
reportPiLensConfigRecords,
|
|
104
104
|
resolvePiLensConfig,
|
|
105
105
|
summarizeConfigResolution
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-KPPJTH44.js";
|
|
107
107
|
import {
|
|
108
108
|
FRESHNESS_CADENCE_MS,
|
|
109
109
|
LSP_NAMESPACE_KEY,
|
|
@@ -112,31 +112,31 @@ import {
|
|
|
112
112
|
dirMtimesStillFreshAsync,
|
|
113
113
|
getPiLensGlobalConfigPath,
|
|
114
114
|
unknownDirMtimeRecords
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-J6JP25XU.js";
|
|
116
116
|
import {
|
|
117
117
|
getProjectTrustGeneration,
|
|
118
118
|
getProjectTrustState
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-U5HPROLA.js";
|
|
120
120
|
import {
|
|
121
121
|
getDegradationLedgerGeneration,
|
|
122
122
|
incrementDegradationCount,
|
|
123
123
|
recordDegradationOnce
|
|
124
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-WME2OQST.js";
|
|
125
125
|
import {
|
|
126
126
|
logExtension
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-KXF5R4UN.js";
|
|
128
128
|
import {
|
|
129
129
|
claimPhaseOncePerSession,
|
|
130
130
|
currentSessionRecordId,
|
|
131
131
|
logLatency,
|
|
132
132
|
releasePhaseClaim
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-Z2XAOKHK.js";
|
|
134
134
|
import {
|
|
135
135
|
getGlobalPiLensLogDir,
|
|
136
136
|
getProcessSingleton,
|
|
137
137
|
isTestMode,
|
|
138
138
|
redactSecrets
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-VSFLRN5Y.js";
|
|
140
140
|
import {
|
|
141
141
|
STAGE_TMP_PATTERN
|
|
142
142
|
} from "./chunk-LJDODBBZ.js";
|
|
@@ -158,7 +158,7 @@ import {
|
|
|
158
158
|
pathsEqual,
|
|
159
159
|
realpathOrResolve,
|
|
160
160
|
toPosix
|
|
161
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-PQJFG24Z.js";
|
|
162
162
|
|
|
163
163
|
// dist/clients/analysis-root.js
|
|
164
164
|
import * as fs from "node:fs";
|
|
@@ -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 (
|
|
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 (
|
|
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 =
|
|
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 =
|
|
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(
|
|
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 =
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|
|
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-
|
|
6
|
+
} from "./chunk-SNDXCFRS.js";
|
|
7
7
|
import {
|
|
8
8
|
fingerprintProjectSnapshotJson
|
|
9
9
|
} from "./chunk-2BEMIWEW.js";
|
|
@@ -15,20 +15,20 @@ import {
|
|
|
15
15
|
getProjectDataDir,
|
|
16
16
|
isStaleStageFile,
|
|
17
17
|
withGenerationLockSync
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YVHBNSME.js";
|
|
19
19
|
import {
|
|
20
20
|
writeFileAtomic
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-U5HPROLA.js";
|
|
22
22
|
import {
|
|
23
23
|
incrementDegradationCount
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-WME2OQST.js";
|
|
25
25
|
import {
|
|
26
26
|
logLatency
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-Z2XAOKHK.js";
|
|
28
28
|
import {
|
|
29
29
|
BoundedFifoMap,
|
|
30
30
|
normalizeMapKey
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-PQJFG24Z.js";
|
|
32
32
|
|
|
33
33
|
// dist/clients/project-snapshot.js
|
|
34
34
|
import * as fs3 from "node:fs";
|
|
@@ -28,17 +28,17 @@ import {
|
|
|
28
28
|
statIsFile,
|
|
29
29
|
trustScopedEnvironment,
|
|
30
30
|
trustScopedSearchPath
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-YVHBNSME.js";
|
|
32
|
+
import "./chunk-KPPJTH44.js";
|
|
33
|
+
import "./chunk-J6JP25XU.js";
|
|
34
|
+
import "./chunk-U5HPROLA.js";
|
|
35
|
+
import "./chunk-WME2OQST.js";
|
|
36
|
+
import "./chunk-KXF5R4UN.js";
|
|
37
37
|
import "./chunk-S26LC76R.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-Z2XAOKHK.js";
|
|
39
|
+
import "./chunk-VSFLRN5Y.js";
|
|
40
40
|
import "./chunk-LJDODBBZ.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-PQJFG24Z.js";
|
|
42
42
|
import "./chunk-NXL4FFQQ.js";
|
|
43
43
|
export {
|
|
44
44
|
SpawnFailureError,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
createToolchainAvailability
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CB4WHS4H.js";
|
|
5
5
|
import {
|
|
6
6
|
createSubsystemLogger
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KXF5R4UN.js";
|
|
8
8
|
|
|
9
9
|
// dist/clients/rust-client.js
|
|
10
10
|
import * as path from "node:path";
|
|
@@ -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-
|
|
4
|
+
} from "./chunk-LBLBAFG3.js";
|
|
5
5
|
import {
|
|
6
6
|
OXFMT_SUPPORTED_EXTENSIONS,
|
|
7
7
|
findPSScriptAnalyzerConfigPath,
|
|
@@ -43,64 +43,64 @@ import {
|
|
|
43
43
|
hasTerraformConfig,
|
|
44
44
|
hasVitePlusConfig,
|
|
45
45
|
stripGradleCommentsAndStrings
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-MB6PXBUA.js";
|
|
47
47
|
import {
|
|
48
48
|
readTextFileOrUndefined,
|
|
49
49
|
resolveCargoPackageEdition
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-ZKXQKGWZ.js";
|
|
51
51
|
import {
|
|
52
52
|
load
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-TIQJPRDD.js";
|
|
54
54
|
import {
|
|
55
55
|
stripAnsi
|
|
56
56
|
} from "./chunk-6HWVI6MI.js";
|
|
57
57
|
import {
|
|
58
58
|
getToolPath
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-KDX35VXP.js";
|
|
60
60
|
import {
|
|
61
61
|
resolveToolCwd
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-DPGEAHZT.js";
|
|
63
63
|
import {
|
|
64
64
|
findGlobalBinary,
|
|
65
65
|
findLocalBinUpwards,
|
|
66
66
|
localBinPath
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-NA7SEXHE.js";
|
|
68
68
|
import {
|
|
69
69
|
getIsolatedNpxSpawnOptions,
|
|
70
70
|
probeToolAsync
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-3F6BMY53.js";
|
|
72
72
|
import {
|
|
73
73
|
classifyProbeFailure,
|
|
74
74
|
createAvailabilityLatch,
|
|
75
75
|
logAvailabilityDecision,
|
|
76
76
|
startHostStallSampler
|
|
77
|
-
} from "./chunk-
|
|
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-
|
|
84
|
+
} from "./chunk-YVHBNSME.js";
|
|
85
85
|
import {
|
|
86
86
|
TERRAGRUNT_FILENAMES
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-RZOXUSPC.js";
|
|
88
88
|
import {
|
|
89
89
|
assertInstallAllowed,
|
|
90
90
|
getProjectTrustGeneration
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-U5HPROLA.js";
|
|
92
92
|
import {
|
|
93
93
|
compareOrdinal,
|
|
94
94
|
getDegradationLedgerGeneration,
|
|
95
95
|
incrementDegradationCount,
|
|
96
96
|
recordDegradationOnce
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-WME2OQST.js";
|
|
98
98
|
import {
|
|
99
99
|
logExtension
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-KXF5R4UN.js";
|
|
101
101
|
import {
|
|
102
102
|
logLatency
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-Z2XAOKHK.js";
|
|
104
104
|
import {
|
|
105
105
|
BoundedFifoMap,
|
|
106
106
|
BoundedLruCache,
|
|
@@ -108,8 +108,9 @@ import {
|
|
|
108
108
|
findNearestMarkerRoot,
|
|
109
109
|
normalizeMapKey,
|
|
110
110
|
realpathOrResolve,
|
|
111
|
-
toPosix
|
|
112
|
-
|
|
111
|
+
toPosix,
|
|
112
|
+
walkUpDirs
|
|
113
|
+
} from "./chunk-PQJFG24Z.js";
|
|
113
114
|
|
|
114
115
|
// dist/clients/formatters.js
|
|
115
116
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -1194,8 +1195,10 @@ async function fileExists(filePath) {
|
|
|
1194
1195
|
}
|
|
1195
1196
|
async function findUp(targets, startDir, stopDir = path4.parse(startDir).root) {
|
|
1196
1197
|
const found = [];
|
|
1197
|
-
|
|
1198
|
-
|
|
1198
|
+
const stopIdentity = realpathOrResolve(stopDir);
|
|
1199
|
+
for (const currentDir of walkUpDirs(startDir)) {
|
|
1200
|
+
if (currentDir === stopIdentity)
|
|
1201
|
+
break;
|
|
1199
1202
|
let entries;
|
|
1200
1203
|
try {
|
|
1201
1204
|
entries = await fs2.readdir(currentDir);
|
|
@@ -1222,10 +1225,6 @@ async function findUp(targets, startDir, stopDir = path4.parse(startDir).root) {
|
|
|
1222
1225
|
if (await fileExists(candidate))
|
|
1223
1226
|
found.push(candidate);
|
|
1224
1227
|
}
|
|
1225
|
-
const parent = path4.dirname(currentDir);
|
|
1226
|
-
if (parent === currentDir)
|
|
1227
|
-
break;
|
|
1228
|
-
currentDir = parent;
|
|
1229
1228
|
}
|
|
1230
1229
|
return found;
|
|
1231
1230
|
}
|
|
@@ -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-
|
|
4
|
+
} from "./chunk-J6JP25XU.js";
|
|
5
5
|
import {
|
|
6
6
|
isWindowsPath
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PQJFG24Z.js";
|
|
8
8
|
|
|
9
9
|
// dist/clients/file-kinds.js
|
|
10
10
|
import { basename, extname, win32 } from "node:path";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
GoClient,
|
|
4
|
+
goClient,
|
|
5
|
+
resetGoAvailability
|
|
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
|
+
import "./chunk-AWQWXSW4.js";
|
|
12
|
+
import "./chunk-KPPJTH44.js";
|
|
13
|
+
import "./chunk-J6JP25XU.js";
|
|
14
|
+
import "./chunk-U5HPROLA.js";
|
|
15
|
+
import "./chunk-WME2OQST.js";
|
|
16
|
+
import "./chunk-KXF5R4UN.js";
|
|
17
|
+
import "./chunk-S26LC76R.js";
|
|
18
|
+
import "./chunk-Z2XAOKHK.js";
|
|
19
|
+
import "./chunk-VSFLRN5Y.js";
|
|
20
|
+
import "./chunk-LJDODBBZ.js";
|
|
21
|
+
import "./chunk-PQJFG24Z.js";
|
|
22
|
+
import "./chunk-NXL4FFQQ.js";
|
|
23
|
+
export {
|
|
24
|
+
GoClient,
|
|
25
|
+
goClient,
|
|
26
|
+
resetGoAvailability
|
|
27
|
+
};
|