pi-lens 4.4.9 → 4.4.10
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-USER.md +6 -6
- package/CHANGELOG.md +80 -0
- package/README.md +2 -0
- package/dist/{chunk-CM6BDY4E.js → chunk-2ADRLTM2.js} +2 -2
- package/dist/{chunk-XO756WE5.js → chunk-2LVJQU3I.js} +15 -14
- package/dist/{chunk-W5E72HJA.js → chunk-3FRI5H4T.js} +13 -1
- package/dist/{chunk-N5CEGQPG.js → chunk-3HM4BUHR.js} +11 -11
- package/dist/{chunk-UAKO2M6B.js → chunk-3QWVOBZJ.js} +30 -30
- package/dist/{chunk-QB7T2PHK.js → chunk-46TQJSUE.js} +3 -1
- package/dist/{chunk-ZZN74OGD.js → chunk-4ITEFRDH.js} +3 -2
- package/dist/{chunk-C3YRO3EU.js → chunk-4NCDHTFI.js} +6 -6
- package/dist/{chunk-G22UNQID.js → chunk-6I44EDNQ.js} +10 -10
- package/dist/{chunk-OUYAUXAT.js → chunk-6MDM5MQT.js} +169 -56
- package/dist/{chunk-CDFJF5YD.js → chunk-7JX3RNG4.js} +1 -1
- package/dist/{chunk-PIIUNJIT.js → chunk-7WJ55KBN.js} +1 -1
- package/dist/{chunk-ZMMHHXSW.js → chunk-A5TEJZGJ.js} +1 -0
- package/dist/{chunk-HEA3EM23.js → chunk-ALIZWXHZ.js} +8 -8
- package/dist/{chunk-MQ4PPCJB.js → chunk-AON2QIJF.js} +32 -36
- package/dist/{chunk-DGKFWQK4.js → chunk-B2YUE6YD.js} +7 -7
- package/dist/{chunk-GQTQUNCG.js → chunk-B6HXETWY.js} +20 -20
- package/dist/{chunk-KR5VGMVT.js → chunk-BDR5MEZY.js} +9 -9
- package/dist/{chunk-MRLH4MYU.js → chunk-BGLS5SDN.js} +1 -1
- package/dist/{chunk-PRHYIA6X.js → chunk-BRESRQBE.js} +4 -4
- package/dist/{chunk-5GEYJJHG.js → chunk-C6AODRNU.js} +7 -7
- package/dist/{chunk-ZZSJAR76.js → chunk-CTB5BAJI.js} +24 -11
- package/dist/{chunk-IICERRFF.js → chunk-CYUJB552.js} +4 -4
- package/dist/{chunk-THYHUIDR.js → chunk-CZAWWXP6.js} +1 -1
- package/dist/{chunk-QJJKOHLH.js → chunk-DBS736MA.js} +27 -27
- package/dist/{chunk-XLAI7UYY.js → chunk-DOUAWKLO.js} +8 -8
- package/dist/{chunk-LAHHGNAY.js → chunk-DVRJBQOJ.js} +12 -12
- package/dist/{chunk-KV6GQOGN.js → chunk-E4VXKTBR.js} +28 -28
- package/dist/{chunk-XKFO2SZV.js → chunk-F6FT6BVQ.js} +26 -26
- package/dist/{chunk-VWLSU3XV.js → chunk-FCQSZQAT.js} +1 -1
- package/dist/{chunk-X5BJ3G2P.js → chunk-FOEPIX76.js} +1 -1
- package/dist/{chunk-F6BEQWAK.js → chunk-GMC4ZGYR.js} +4 -4
- package/dist/{chunk-TOE2RRCS.js → chunk-GTTMQ6XB.js} +1 -1
- package/dist/{chunk-5YSEQHJN.js → chunk-GUGKKGG7.js} +1 -1
- package/dist/{chunk-OSEKJEUU.js → chunk-GVWIU7M7.js} +1 -1
- package/dist/{chunk-TMNUTMT5.js → chunk-H65TYP6V.js} +25 -4
- package/dist/{chunk-7R5GZIA6.js → chunk-HILZE4BQ.js} +5 -4
- package/dist/{chunk-HYSKJMZK.js → chunk-HSYFLOZY.js} +2 -2
- package/dist/{chunk-V2WDBOLZ.js → chunk-I32RSMH6.js} +7 -7
- package/dist/chunk-I74RQGKA.js +88 -0
- package/dist/{chunk-RNXOWDM6.js → chunk-IDCTDKIA.js} +3 -3
- package/dist/{chunk-TYHPVE5H.js → chunk-IK4YS3KC.js} +8 -8
- package/dist/{chunk-ZCQBNPRH.js → chunk-IL6PIV33.js} +2 -2
- package/dist/{chunk-6GPB3JLL.js → chunk-J6BR5XN2.js} +2 -2
- package/dist/{chunk-UC5AXW5Z.js → chunk-JKOZ2Z4U.js} +6 -6
- package/dist/{chunk-WSSLVMDA.js → chunk-JZQGRARR.js} +7 -7
- package/dist/{chunk-7UTSNTWM.js → chunk-K6WIBVMK.js} +4 -3
- package/dist/{chunk-QVBOXT3L.js → chunk-KDCIG23C.js} +6 -6
- package/dist/{chunk-NOWH2VA2.js → chunk-KFRDFAOE.js} +4 -4
- package/dist/{chunk-NMUSOZ2D.js → chunk-KJ3AHOCK.js} +6 -6
- package/dist/{chunk-E65WJVI5.js → chunk-KSTQ4VXT.js} +5 -5
- package/dist/{chunk-4ENEJHF4.js → chunk-MAD4QJTP.js} +9 -9
- package/dist/{chunk-KXMJLOZF.js → chunk-NBM7PNBP.js} +7 -7
- package/dist/{chunk-7YTRG6YW.js → chunk-NE4EFHJX.js} +1 -1
- package/dist/{chunk-AACN5GNE.js → chunk-NPNFGYLV.js} +3 -1
- package/dist/{chunk-H3BVMK47.js → chunk-OPFNQBS5.js} +5 -5
- package/dist/{chunk-WTB4GKMH.js → chunk-OTSTS7L2.js} +11 -2
- package/dist/{chunk-JUZ67QZQ.js → chunk-PTSA6QKL.js} +7 -7
- package/dist/{chunk-ZPM7ZIFL.js → chunk-Q2VCKC3X.js} +3 -3
- package/dist/{chunk-2VZ3VN3N.js → chunk-QHOTTC4A.js} +2 -2
- package/dist/{chunk-L7O774U7.js → chunk-QL37SGTS.js} +105 -13
- package/dist/{chunk-FRUBVFXV.js → chunk-QMV2APEH.js} +27 -27
- package/dist/{chunk-L4Y3ROKQ.js → chunk-QSCZAP24.js} +3 -3
- package/dist/{chunk-IILEH3ZC.js → chunk-QUPYLQA4.js} +4 -4
- package/dist/{chunk-3NPWO5UO.js → chunk-QUQY3IME.js} +4 -4
- package/dist/{chunk-FGNSESAC.js → chunk-QWTHFFU6.js} +8 -8
- package/dist/{chunk-EKNYSXFB.js → chunk-RQRKIRFY.js} +5 -5
- package/dist/{chunk-NCLO6E6N.js → chunk-S3WFVG5P.js} +14 -21
- package/dist/{chunk-RTFMDIKV.js → chunk-SG2JQ2YP.js} +1 -1
- package/dist/{chunk-VO4JFPTV.js → chunk-SJQUWQR6.js} +2 -2
- package/dist/{chunk-SLSMJPEF.js → chunk-SKVNHCT5.js} +32 -32
- package/dist/{chunk-3HTZDY3C.js → chunk-TJQSYX3J.js} +3 -3
- package/dist/{chunk-RNJFRXEN.js → chunk-TLWFZ66Y.js} +3 -3
- package/dist/{chunk-LWOM6LVS.js → chunk-TN5CWX5D.js} +26 -26
- package/dist/{chunk-UTJP6WOS.js → chunk-TQHOKMVZ.js} +11 -11
- package/dist/{chunk-N56BNAA6.js → chunk-TYHOEX4V.js} +15 -15
- package/dist/{chunk-QP33NKYC.js → chunk-UNBRHPHJ.js} +10 -10
- package/dist/{chunk-EY6LY2HO.js → chunk-UOO4D2TK.js} +11 -11
- package/dist/{chunk-47UCC4MM.js → chunk-UY745U35.js} +1 -1
- package/dist/{chunk-ZDMFGACN.js → chunk-V7F7JHS5.js} +71 -55
- package/dist/{chunk-PBZNYHMM.js → chunk-VGTBLTPN.js} +4 -4
- package/dist/{chunk-L6WBJGQS.js → chunk-VPFRU5IG.js} +1 -1
- package/dist/{chunk-Q6JQKWPK.js → chunk-VS2L7QDI.js} +8 -8
- package/dist/{chunk-PXQ45SGD.js → chunk-W4CUK5G6.js} +2 -2
- package/dist/{chunk-MKPDIAZH.js → chunk-WAA63ZJV.js} +1 -1
- package/dist/{chunk-J3Q2NYJR.js → chunk-WS3UFJOU.js} +1 -1
- package/dist/{chunk-T5QSLSMM.js → chunk-XAFZJEXY.js} +16 -16
- package/dist/{chunk-YOXCCJDF.js → chunk-XPGH5O74.js} +56 -46
- package/dist/{chunk-UXTQ3QPD.js → chunk-Y3EHLUPL.js} +2 -2
- package/dist/{chunk-HSOBIN22.js → chunk-YF4G5NN5.js} +2 -2
- package/dist/{chunk-SIQHOB6P.js → chunk-YQA34KAF.js} +7 -7
- package/dist/{chunk-V67D6TMU.js → chunk-YT2VR4SL.js} +4 -4
- package/dist/{chunk-CJS6WE66.js → chunk-ZOPXB2KK.js} +11 -11
- package/dist/{chunk-H6FLQ5NW.js → chunk-ZPFLHB3R.js} +11 -11
- package/dist/{chunk-ZVCDHYWZ.js → chunk-ZZDVGCGG.js} +6 -6
- package/dist/index.js +537 -269
- package/dist/mcp/analyze-cli.js +6 -6
- package/dist/mcp/cli.js +32 -32
- package/dist/mcp/server.js +109 -109
- package/dist/mcp/worker.js +49 -49
- package/dist/probes/installer.js +13 -13
- package/docs/agent-guide.md +2 -1
- package/docs/agent-tools.md +13 -2
- package/docs/configuration.md +9 -4
- package/docs/defect-shapes.md +15 -1
- package/docs/features.md +11 -1
- package/docs/globalconfig.md +13 -0
- package/docs/invariants/language-config.md +9 -1
- package/docs/language-coverage.md +66 -0
- package/docs/lsp-capability-matrix.md +66 -20
- package/docs/lsp-idle-eviction.md +17 -13
- package/docs/pi-lens-fixer.md +8 -6
- package/docs/pi-lens-merge-policy.md +5 -1
- package/docs/pi-lens-release.md +3 -2
- package/docs/pi-lens-reviewer.md +52 -11
- package/docs/servercapabilities.md +1 -1
- package/docs/settings.md +7 -4
- package/docs/usage.md +1 -0
- package/package.json +2 -2
- package/scripts/download-grammars.js +10 -0
- package/scripts/grammars.lock.json +7 -0
- package/vendor/grammars/tree-sitter-groovy.wasm +0 -0
- package/dist/chunk-TGQDAG4B.js +0 -88
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
getProjectTrustGeneration
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7WJ55KBN.js";
|
|
5
5
|
import {
|
|
6
6
|
logLatency
|
|
7
7
|
} from "./chunk-VCRVNLE7.js";
|
|
@@ -39,6 +39,8 @@ function describeInstallAttempt(attempt, options = {}) {
|
|
|
39
39
|
install: "unavailable",
|
|
40
40
|
...reason && { installReason: reason }
|
|
41
41
|
};
|
|
42
|
+
case "declined":
|
|
43
|
+
case "skipped":
|
|
42
44
|
default:
|
|
43
45
|
return {
|
|
44
46
|
install: "not-attempted",
|
|
@@ -2,19 +2,19 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
getScratchTreeGlobPatterns,
|
|
4
4
|
nestedWorktreeOffsets
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SJQUWQR6.js";
|
|
6
6
|
import {
|
|
7
7
|
SecurityScanClient
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VGTBLTPN.js";
|
|
9
9
|
import {
|
|
10
10
|
safeSpawnAsync
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-H65TYP6V.js";
|
|
12
12
|
import {
|
|
13
13
|
loadPiLensProjectConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FOEPIX76.js";
|
|
15
15
|
import {
|
|
16
16
|
incrementDegradationCount
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3FRI5H4T.js";
|
|
18
18
|
import {
|
|
19
19
|
isUnderDir,
|
|
20
20
|
normalizeMapKey,
|
|
@@ -111,12 +111,16 @@ var LANGUAGES = [
|
|
|
111
111
|
{ id: "go-mod", extensions: [".mod", ".sum"], lspId: "go" },
|
|
112
112
|
{ id: "graphql", extensions: [".graphql", ".gql"] },
|
|
113
113
|
// Groovy source plus the two named Gradle scripts and the Jenkins pipeline
|
|
114
|
-
// entrypoint (#5235)
|
|
114
|
+
// entrypoint (#5235). The vendored grammar reaches `.groovy .gvy .gy .gsh`
|
|
115
|
+
// by extension and `Jenkinsfile`/`build.gradle`/`settings.gradle` by kind;
|
|
116
|
+
// `.gradle` stays out of `grammarExtensions` because it would claim every
|
|
117
|
+
// `.gradle` file, which `GROOVY_FILENAMES` deliberately does not.
|
|
115
118
|
{
|
|
116
119
|
id: "groovy",
|
|
117
120
|
kind: "groovy",
|
|
118
121
|
extensions: [".groovy", ".gvy", ".gy", ".gsh"],
|
|
119
|
-
filenames: GROOVY_FILENAMES
|
|
122
|
+
filenames: GROOVY_FILENAMES,
|
|
123
|
+
grammar: "groovy"
|
|
120
124
|
},
|
|
121
125
|
{ id: "haskell", kind: "haskell", extensions: [".hs", ".lhs"] },
|
|
122
126
|
{ id: "helm", kind: "helm-template", extensions: [".tpl"] },
|
|
@@ -419,6 +423,10 @@ function resolveLanguage(filePath) {
|
|
|
419
423
|
}
|
|
420
424
|
return void 0;
|
|
421
425
|
}
|
|
426
|
+
var TYPESCRIPT_EXTENSIONS = new Set(LANGUAGES.flatMap((entry) => entry.id === "typescript" || entry.id === "typescriptreact" ? entry.extensions : []));
|
|
427
|
+
function isTypeScriptFile(filePath) {
|
|
428
|
+
return TYPESCRIPT_EXTENSIONS.has(extensionOf(filePath));
|
|
429
|
+
}
|
|
422
430
|
var EXTENSION_TO_LSP_ID = Object.freeze(Object.fromEntries(LANGUAGES.flatMap((entry) => entry.extensions.map((extension) => [extension, lspLanguageId(entry)]))));
|
|
423
431
|
var EXTENSION_TO_GRAMMAR = Object.freeze(Object.fromEntries(LANGUAGES.flatMap((entry) => grammarExtensionsOf(entry).map((extension) => [extension, entry.grammar]))));
|
|
424
432
|
var KIND_TO_GRAMMAR = Object.freeze(Object.fromEntries([...BY_KIND.entries()].filter(([, entry]) => Boolean(entry.grammar)).map(([kind, entry]) => [kind, entry.grammar])));
|
|
@@ -462,6 +470,7 @@ export {
|
|
|
462
470
|
extensionsForLanguageToken,
|
|
463
471
|
resolveFilenameLanguage,
|
|
464
472
|
resolveLanguage,
|
|
473
|
+
isTypeScriptFile,
|
|
465
474
|
EXTENSION_TO_LSP_ID,
|
|
466
475
|
EXTENSION_TO_GRAMMAR,
|
|
467
476
|
KIND_TO_GRAMMAR,
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
SecurityScanClient
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VGTBLTPN.js";
|
|
5
5
|
import {
|
|
6
6
|
firstOutputLine,
|
|
7
7
|
spawnFailedWithNoOutput
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4ITEFRDH.js";
|
|
9
9
|
import {
|
|
10
10
|
probeToolAsync
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VPFRU5IG.js";
|
|
12
12
|
import {
|
|
13
13
|
INSTALL_TRANSIENT_MAX_ATTEMPTS,
|
|
14
14
|
classifyProbeFailure,
|
|
15
15
|
describeProbeEvidence,
|
|
16
16
|
logAvailabilityDecision,
|
|
17
17
|
startHostStallSampler
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NPNFGYLV.js";
|
|
19
19
|
import {
|
|
20
20
|
isUntrustedProjectPath,
|
|
21
21
|
recordProjectCommandRefusal,
|
|
22
22
|
safeSpawnAsync
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-H65TYP6V.js";
|
|
24
24
|
import {
|
|
25
25
|
assertInstallAllowed
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-7WJ55KBN.js";
|
|
27
27
|
import {
|
|
28
28
|
recordDegradationOnce
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3FRI5H4T.js";
|
|
30
30
|
import {
|
|
31
31
|
isToolInstallDisabled
|
|
32
32
|
} from "./chunk-VCRVNLE7.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
getStartupScanMaxSourceFilesDerived
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BGLS5SDN.js";
|
|
5
5
|
import {
|
|
6
6
|
shouldRecurseIntoDir,
|
|
7
7
|
walkTreeStackAsync,
|
|
8
8
|
walkTreeStackSync
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IL6PIV33.js";
|
|
10
10
|
import {
|
|
11
11
|
getProjectIgnoreMatcher
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-H65TYP6V.js";
|
|
13
13
|
import {
|
|
14
14
|
getDirectoryMarkers,
|
|
15
15
|
registerWorkspaceTopologyReset
|
|
@@ -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-QSCZAP24.js";
|
|
5
5
|
import {
|
|
6
6
|
createSubsystemLogger
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3FRI5H4T.js";
|
|
8
8
|
|
|
9
9
|
// dist/clients/go-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
|
buildModuleGraph
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-K6WIBVMK.js";
|
|
5
5
|
import {
|
|
6
6
|
aliasedImportTargets,
|
|
7
7
|
referencedProjectImportTarget
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
logTreeSitterDiagnostic,
|
|
13
13
|
resolveTreeSitterLanguage,
|
|
14
14
|
wasmQueryInput
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CTB5BAJI.js";
|
|
16
16
|
import {
|
|
17
17
|
EXTENSION_TO_GRAMMAR,
|
|
18
18
|
KIND_TO_GRAMMAR
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-OTSTS7L2.js";
|
|
20
20
|
import {
|
|
21
21
|
HOOK_WALL_BUDGET_MS
|
|
22
22
|
} from "./chunk-CKEQFGLT.js";
|
|
@@ -26,20 +26,22 @@ import {
|
|
|
26
26
|
} from "./chunk-W7TY6HYX.js";
|
|
27
27
|
import {
|
|
28
28
|
bounded
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-WAA63ZJV.js";
|
|
30
30
|
import {
|
|
31
|
+
LSP_QUERY_MAX_FILE_LINES_MAX,
|
|
32
|
+
getGlobalLspQueryMaxFileLines,
|
|
31
33
|
loadPiLensGlobalConfig
|
|
32
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-H65TYP6V.js";
|
|
33
35
|
import {
|
|
34
36
|
isFileKind
|
|
35
37
|
} from "./chunk-CZCAZVTD.js";
|
|
36
38
|
import {
|
|
37
39
|
isDeclarationFile
|
|
38
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-FOEPIX76.js";
|
|
39
41
|
import {
|
|
40
42
|
incrementDegradationCount,
|
|
41
43
|
recordDegradationOnce
|
|
42
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-3FRI5H4T.js";
|
|
43
45
|
import {
|
|
44
46
|
freshnessFromMtime
|
|
45
47
|
} from "./chunk-S26LC76R.js";
|
|
@@ -50,6 +52,7 @@ import {
|
|
|
50
52
|
BoundedFifoMap,
|
|
51
53
|
BoundedLruCache,
|
|
52
54
|
isUnderDir,
|
|
55
|
+
isWithinForm,
|
|
53
56
|
normalizeEphemeralMapKey,
|
|
54
57
|
normalizeMapKey,
|
|
55
58
|
walkUpDirs
|
|
@@ -98,6 +101,12 @@ var RUNTIME_CONFIG = {
|
|
|
98
101
|
pipeline: {
|
|
99
102
|
lspMaxFileBytes: 2 * 1024 * 1024,
|
|
100
103
|
lspMaxFileLines: 5e3,
|
|
104
|
+
// #5306: hard cap (ms) on the per-server diagnostics wait of the explicit
|
|
105
|
+
// single-file `lens_diagnostics source=lsp` query when it passes an explicit
|
|
106
|
+
// `waitMs` (`LSPTouchFileOptions.explicitQuery`). 30 s covers clangd on a
|
|
107
|
+
// 20,000-line file (~11 s measured, investigation #5306) with margin, and
|
|
108
|
+
// keeps one tool call from parking a turn for an arbitrary caller-chosen time.
|
|
109
|
+
lspExplicitQueryMaxWaitMs: 3e4,
|
|
101
110
|
cascadeMaxFiles: 5,
|
|
102
111
|
cascadeMaxDiagnosticsPerFile: 20,
|
|
103
112
|
// Hard cap on how long the pipeline will wait for an LSP client to spawn.
|
|
@@ -196,23 +205,39 @@ function lineTextAt(content, line) {
|
|
|
196
205
|
// dist/clients/lsp/content-limits.js
|
|
197
206
|
var LSP_MAX_FILE_BYTES = RUNTIME_CONFIG.pipeline.lspMaxFileBytes;
|
|
198
207
|
var LSP_MAX_FILE_LINES = RUNTIME_CONFIG.pipeline.lspMaxFileLines;
|
|
199
|
-
function exceedsLspSyncLimits(content) {
|
|
208
|
+
function exceedsLspSyncLimits(content, maxLines = LSP_MAX_FILE_LINES) {
|
|
200
209
|
const sizeBytes = Buffer.byteLength(content, "utf-8");
|
|
201
210
|
if (sizeBytes > LSP_MAX_FILE_BYTES) {
|
|
202
211
|
return {
|
|
203
212
|
tooLarge: true,
|
|
204
|
-
reason: `${sizeBytes} bytes > ${LSP_MAX_FILE_BYTES} limit
|
|
213
|
+
reason: `${sizeBytes} bytes > ${LSP_MAX_FILE_BYTES} limit`,
|
|
214
|
+
bound: "bytes"
|
|
205
215
|
};
|
|
206
216
|
}
|
|
207
217
|
const lineCount = countLfNewlines(content) + 1;
|
|
208
|
-
if (lineCount >
|
|
218
|
+
if (lineCount > maxLines) {
|
|
209
219
|
return {
|
|
210
220
|
tooLarge: true,
|
|
211
|
-
reason: `${lineCount} lines > ${
|
|
221
|
+
reason: `${lineCount} lines > ${maxLines} limit`,
|
|
222
|
+
bound: "lines"
|
|
212
223
|
};
|
|
213
224
|
}
|
|
214
225
|
return { tooLarge: false, reason: "" };
|
|
215
226
|
}
|
|
227
|
+
function exceedsExplicitQueryLimits(content) {
|
|
228
|
+
const shared = exceedsLspSyncLimits(content);
|
|
229
|
+
if (shared.bound !== "lines")
|
|
230
|
+
return shared;
|
|
231
|
+
const maxLines = getGlobalLspQueryMaxFileLines() ?? LSP_MAX_FILE_LINES;
|
|
232
|
+
const verdict = exceedsLspSyncLimits(content, maxLines);
|
|
233
|
+
if (!verdict.tooLarge || maxLines >= LSP_QUERY_MAX_FILE_LINES_MAX) {
|
|
234
|
+
return verdict;
|
|
235
|
+
}
|
|
236
|
+
return {
|
|
237
|
+
...verdict,
|
|
238
|
+
reason: `${verdict.reason}; this single-file query can raise its line limit with lsp.queryMaxFileLines in the user-level pi-lens config (up to ${LSP_QUERY_MAX_FILE_LINES_MAX})`
|
|
239
|
+
};
|
|
240
|
+
}
|
|
216
241
|
|
|
217
242
|
// dist/clients/lsp/implicit-scope.js
|
|
218
243
|
function isGoSourceFile(filePath) {
|
|
@@ -1237,6 +1262,70 @@ var SYMBOL_QUERIES = {
|
|
|
1237
1262
|
name: (command_name (word) @callIdent)) @callRef
|
|
1238
1263
|
`
|
|
1239
1264
|
},
|
|
1265
|
+
// #5235: tree-sitter-groovy (dekobon v0.3.0, vendored as is). Node names
|
|
1266
|
+
// were probed against the committed wasm. A Spock feature name
|
|
1267
|
+
// (`def "adds two numbers"()`) parses as `quoted_identifier`, so the method
|
|
1268
|
+
// name keeps its quotes. Named closures are limited to class fields and
|
|
1269
|
+
// top-level script variables: a method-local `def c = {}` is also a
|
|
1270
|
+
// `local_variable_declaration`, and listing it would put locals in the
|
|
1271
|
+
// module outline. Closure-taking calls (`list.each { }`, DSL blocks) parse
|
|
1272
|
+
// as sibling statements or `command_chain`, not `method_invocation`, so
|
|
1273
|
+
// they yield no call ref; only `foo(1)`, `a.b(2)` and `new X()` do. The
|
|
1274
|
+
// grammar's known parse gaps are in docs/language-coverage.md.
|
|
1275
|
+
groovy: {
|
|
1276
|
+
defs: `
|
|
1277
|
+
(class_declaration
|
|
1278
|
+
name: (identifier) @className) @classDef
|
|
1279
|
+
|
|
1280
|
+
(trait_declaration
|
|
1281
|
+
name: (identifier) @className) @classDef
|
|
1282
|
+
|
|
1283
|
+
(enum_declaration
|
|
1284
|
+
name: (identifier) @className) @classDef
|
|
1285
|
+
|
|
1286
|
+
(record_declaration
|
|
1287
|
+
name: (identifier) @className) @classDef
|
|
1288
|
+
|
|
1289
|
+
(interface_declaration
|
|
1290
|
+
name: (identifier) @interfaceName) @interfaceDef
|
|
1291
|
+
|
|
1292
|
+
(method_declaration
|
|
1293
|
+
name: [(identifier) (quoted_identifier)] @methodName
|
|
1294
|
+
parameters: (formal_parameters) @methodParams) @methodDef
|
|
1295
|
+
|
|
1296
|
+
(constructor_declaration
|
|
1297
|
+
name: (identifier) @funcName
|
|
1298
|
+
parameters: (formal_parameters) @funcParams) @funcDef
|
|
1299
|
+
|
|
1300
|
+
(field_declaration
|
|
1301
|
+
(variable_declarator
|
|
1302
|
+
name: (identifier) @arrowName
|
|
1303
|
+
value: (closure))) @arrowDef
|
|
1304
|
+
|
|
1305
|
+
(source_file
|
|
1306
|
+
(local_variable_declaration
|
|
1307
|
+
(variable_declarator
|
|
1308
|
+
name: (identifier) @arrowName
|
|
1309
|
+
value: (closure))) @arrowDef)
|
|
1310
|
+
`,
|
|
1311
|
+
refs: `
|
|
1312
|
+
(method_invocation
|
|
1313
|
+
function: (identifier) @callIdent) @callRef
|
|
1314
|
+
|
|
1315
|
+
(method_invocation
|
|
1316
|
+
function: (field_access
|
|
1317
|
+
field: (identifier) @callMethod)) @callMethodRef
|
|
1318
|
+
|
|
1319
|
+
(object_creation_expression
|
|
1320
|
+
type: (type_identifier) @newIdent) @newRef
|
|
1321
|
+
|
|
1322
|
+
(object_creation_expression
|
|
1323
|
+
type: (generic_type
|
|
1324
|
+
base: (type_identifier) @newIdent)) @newRef
|
|
1325
|
+
|
|
1326
|
+
(type_identifier) @typeIdent
|
|
1327
|
+
`
|
|
1328
|
+
},
|
|
1240
1329
|
// #1522: tree-sitter-cue (eonpatapon/tree-sitter-cue, vendored per #1520) has
|
|
1241
1330
|
// no `label:`/`value:` field names on `field` — verified directly against the
|
|
1242
1331
|
// committed wasm (`value:` fails query compilation with "Bad field name");
|
|
@@ -1435,6 +1524,9 @@ var IMPORT_QUERIES = {
|
|
|
1435
1524
|
(word) @importSource
|
|
1436
1525
|
(#match? @_m "^(source|\\.)$"))
|
|
1437
1526
|
`,
|
|
1527
|
+
// import a.b.C / import static a.b.C.m / import a.b.* — `name:` is the
|
|
1528
|
+
// qualified_name on every form, aliases (`as X`) included (#5235).
|
|
1529
|
+
groovy: `(import_declaration name: (qualified_name) @importSource)`,
|
|
1438
1530
|
// import "strings" / import x "encoding/json" — `import_spec`'s `path:`
|
|
1439
1531
|
// field is verified against the committed wasm. Block-form
|
|
1440
1532
|
// (`import (\n\t"strings"\n)`) nests each `import_spec` one level deeper,
|
|
@@ -1975,8 +2067,7 @@ function createImplicitScopeCheck(runtime, cwd) {
|
|
|
1975
2067
|
return role;
|
|
1976
2068
|
};
|
|
1977
2069
|
const rootKey = normalizeMapKey(nodePath.resolve(cwd));
|
|
1978
|
-
const
|
|
1979
|
-
const inRoot = (file) => file === rootKey || file.startsWith(rootPrefix);
|
|
2070
|
+
const inRoot = (file) => isWithinForm(file, rootKey);
|
|
1980
2071
|
let scanned;
|
|
1981
2072
|
const feeding = [];
|
|
1982
2073
|
let newestUnknownTs = Number.NEGATIVE_INFINITY;
|
|
@@ -2477,6 +2568,7 @@ export {
|
|
|
2477
2568
|
scanDocumentContent,
|
|
2478
2569
|
lineTextAt,
|
|
2479
2570
|
exceedsLspSyncLimits,
|
|
2571
|
+
exceedsExplicitQueryLimits,
|
|
2480
2572
|
loadAstGrepNapi,
|
|
2481
2573
|
isGoSourceFile,
|
|
2482
2574
|
goPackageFiles,
|
|
@@ -5,65 +5,65 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
formatToolFailure,
|
|
7
7
|
spawnFailedWithNoOutput
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4ITEFRDH.js";
|
|
9
9
|
import {
|
|
10
10
|
createAvailabilityChecker,
|
|
11
11
|
findManagedNodeToolBinary,
|
|
12
12
|
getManagedToolEnvironment,
|
|
13
13
|
resolveAvailableOrInstall
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-S3WFVG5P.js";
|
|
15
|
+
import "./chunk-HILZE4BQ.js";
|
|
16
|
+
import "./chunk-XPGH5O74.js";
|
|
17
|
+
import "./chunk-NE4EFHJX.js";
|
|
18
|
+
import "./chunk-YT2VR4SL.js";
|
|
19
19
|
import "./chunk-LT62P654.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-BRESRQBE.js";
|
|
21
21
|
import "./chunk-ACRJ2GZ5.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-WS3UFJOU.js";
|
|
23
|
+
import "./chunk-GUGKKGG7.js";
|
|
24
24
|
import "./chunk-QGITU23N.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-OTSTS7L2.js";
|
|
26
|
+
import "./chunk-SG2JQ2YP.js";
|
|
27
27
|
import "./chunk-CKEQFGLT.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-NBM7PNBP.js";
|
|
29
|
+
import "./chunk-BGLS5SDN.js";
|
|
30
|
+
import "./chunk-WAA63ZJV.js";
|
|
31
31
|
import "./chunk-2BEMIWEW.js";
|
|
32
32
|
import "./chunk-IJYGIDF4.js";
|
|
33
33
|
import {
|
|
34
34
|
logSessionStart
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-AON2QIJF.js";
|
|
36
|
+
import "./chunk-TLWFZ66Y.js";
|
|
37
37
|
import {
|
|
38
38
|
findLocalBinUpwards,
|
|
39
39
|
localBinPath
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-KSTQ4VXT.js";
|
|
41
|
+
import "./chunk-VPFRU5IG.js";
|
|
42
42
|
import "./chunk-UYXV5NIS.js";
|
|
43
43
|
import {
|
|
44
44
|
createAvailabilityLatch,
|
|
45
45
|
describeUnavailability
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
46
|
+
} from "./chunk-NPNFGYLV.js";
|
|
47
|
+
import "./chunk-TJQSYX3J.js";
|
|
48
|
+
import "./chunk-7JX3RNG4.js";
|
|
49
|
+
import "./chunk-IDCTDKIA.js";
|
|
50
|
+
import "./chunk-IL6PIV33.js";
|
|
51
51
|
import {
|
|
52
52
|
canonicalDirectory,
|
|
53
53
|
getProjectDataDir,
|
|
54
54
|
listNestedLinkedWorktreeRoots,
|
|
55
55
|
safeSpawnAsync
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-H65TYP6V.js";
|
|
57
57
|
import "./chunk-AWQWXSW4.js";
|
|
58
58
|
import "./chunk-QYF5S6P6.js";
|
|
59
59
|
import "./chunk-CZCAZVTD.js";
|
|
60
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-FOEPIX76.js";
|
|
61
61
|
import "./chunk-NL5LSKVD.js";
|
|
62
|
-
import "./chunk-
|
|
62
|
+
import "./chunk-7WJ55KBN.js";
|
|
63
63
|
import {
|
|
64
64
|
createSubsystemLogger,
|
|
65
65
|
incrementDegradationCount
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-3FRI5H4T.js";
|
|
67
67
|
import "./chunk-S26LC76R.js";
|
|
68
68
|
import "./chunk-VCRVNLE7.js";
|
|
69
69
|
import "./chunk-LJDODBBZ.js";
|
|
@@ -2,18 +2,18 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
createAvailabilityProbeFlight,
|
|
4
4
|
probeToolAsync
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VPFRU5IG.js";
|
|
6
6
|
import {
|
|
7
7
|
classifyProbeFailure,
|
|
8
8
|
createAvailabilityLatch,
|
|
9
9
|
logAvailabilityDecision,
|
|
10
10
|
startHostStallSampler
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NPNFGYLV.js";
|
|
12
12
|
import {
|
|
13
13
|
createGenerationSource,
|
|
14
14
|
isUntrustedProjectPath,
|
|
15
15
|
recordProjectCommandRefusal
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-H65TYP6V.js";
|
|
17
17
|
import {
|
|
18
18
|
createSingleFlight
|
|
19
19
|
} from "./chunk-AWQWXSW4.js";
|
|
@@ -36,14 +36,14 @@ import {
|
|
|
36
36
|
updateWordIndexDocumentForEdit,
|
|
37
37
|
wordIndexKey,
|
|
38
38
|
wordIndexPostingHits
|
|
39
|
-
} from "./chunk-
|
|
40
|
-
import "./chunk-
|
|
39
|
+
} from "./chunk-NBM7PNBP.js";
|
|
40
|
+
import "./chunk-BGLS5SDN.js";
|
|
41
41
|
import "./chunk-AWQWXSW4.js";
|
|
42
42
|
import "./chunk-QYF5S6P6.js";
|
|
43
43
|
import "./chunk-CZCAZVTD.js";
|
|
44
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-FOEPIX76.js";
|
|
45
45
|
import "./chunk-NL5LSKVD.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-3FRI5H4T.js";
|
|
47
47
|
import "./chunk-S26LC76R.js";
|
|
48
48
|
import "./chunk-VCRVNLE7.js";
|
|
49
49
|
import "./chunk-CB7PEVOJ.js";
|
|
@@ -26,11 +26,11 @@ import {
|
|
|
26
26
|
statIsFile,
|
|
27
27
|
trustScopedEnvironment,
|
|
28
28
|
trustScopedSearchPath
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-H65TYP6V.js";
|
|
30
|
+
import "./chunk-FOEPIX76.js";
|
|
31
31
|
import "./chunk-NL5LSKVD.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-7WJ55KBN.js";
|
|
33
|
+
import "./chunk-3FRI5H4T.js";
|
|
34
34
|
import "./chunk-S26LC76R.js";
|
|
35
35
|
import "./chunk-VCRVNLE7.js";
|
|
36
36
|
import "./chunk-LJDODBBZ.js";
|
|
@@ -8,17 +8,17 @@ import {
|
|
|
8
8
|
getDefaultStartupTools,
|
|
9
9
|
resolveLanguageRootForFile,
|
|
10
10
|
rootMarkersForFile
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-TJQSYX3J.js";
|
|
12
|
+
import "./chunk-7JX3RNG4.js";
|
|
13
|
+
import "./chunk-IDCTDKIA.js";
|
|
14
|
+
import "./chunk-IL6PIV33.js";
|
|
15
|
+
import "./chunk-H65TYP6V.js";
|
|
16
16
|
import "./chunk-QYF5S6P6.js";
|
|
17
17
|
import "./chunk-CZCAZVTD.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-FOEPIX76.js";
|
|
19
19
|
import "./chunk-NL5LSKVD.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-7WJ55KBN.js";
|
|
21
|
+
import "./chunk-3FRI5H4T.js";
|
|
22
22
|
import "./chunk-S26LC76R.js";
|
|
23
23
|
import "./chunk-VCRVNLE7.js";
|
|
24
24
|
import "./chunk-LJDODBBZ.js";
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
loadCallGraph,
|
|
8
8
|
parseSymbolKey,
|
|
9
9
|
saveCallGraph
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-J6BR5XN2.js";
|
|
11
11
|
import "./chunk-3MED75HT.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-H65TYP6V.js";
|
|
13
|
+
import "./chunk-FOEPIX76.js";
|
|
14
14
|
import "./chunk-NL5LSKVD.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-7WJ55KBN.js";
|
|
16
|
+
import "./chunk-3FRI5H4T.js";
|
|
17
17
|
import "./chunk-S26LC76R.js";
|
|
18
18
|
import "./chunk-VCRVNLE7.js";
|
|
19
19
|
import "./chunk-LJDODBBZ.js";
|