pi-lens 4.4.4 → 4.4.6
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 +477 -0
- package/README.md +45 -3
- package/config/biome/core.jsonc +3 -3
- package/config/dependency-cruiser-eager-allowlist.json +1 -0
- package/dist/{chunk-UBOQLVT2.js → chunk-2DDDCJDL.js} +4 -4
- package/dist/{chunk-RKKOYPRA.js → chunk-2DMLM3ZO.js} +13 -15
- package/dist/chunk-2F47TQOA.js +73 -0
- package/dist/{chunk-O4NWQT6I.js → chunk-2PHMIAKO.js} +4 -4
- package/dist/{chunk-DGUKIYSI.js → chunk-2RLWJO5K.js} +8 -10
- package/dist/{chunk-S67KYG37.js → chunk-2X4VLOCC.js} +2 -2
- package/dist/{chunk-TIQ2PKDW.js → chunk-3MYEA7QD.js} +4 -4
- package/dist/{chunk-3DA2JDOL.js → chunk-3WEPUD2V.js} +551 -203
- package/dist/{chunk-AMERCH6V.js → chunk-4AVZ3TG7.js} +15 -16
- package/dist/{chunk-IYNJ6YPZ.js → chunk-4PCQCU47.js} +4 -4
- package/dist/chunk-4WX4CTUE.js +57 -0
- package/dist/{chunk-P63GXC37.js → chunk-5APMQ2IJ.js} +31 -4
- package/dist/{chunk-ZIVJBOO3.js → chunk-5CV5ITZF.js} +2 -2
- package/dist/{chunk-6DLWKFEX.js → chunk-5ZR3APIM.js} +41 -42
- package/dist/{chunk-XTBDCR27.js → chunk-63RIVFQI.js} +4 -4
- package/dist/{chunk-GSLNCYGG.js → chunk-75SY4F24.js} +13 -14
- package/dist/{chunk-U44DJXQP.js → chunk-7RQXA5GG.js} +15 -18
- package/dist/chunk-A3YNG5KP.js +45 -0
- package/dist/{chunk-5OFV52AM.js → chunk-AE37FEGH.js} +1 -1
- package/dist/{chunk-BWD5EPKO.js → chunk-AMXIUN2R.js} +4 -6
- package/dist/{chunk-3KAZU3VR.js → chunk-ARD426WI.js} +2 -2
- package/dist/{chunk-BW5KFIQC.js → chunk-AWQWXSW4.js} +1 -0
- package/dist/{chunk-YH5MVY2U.js → chunk-BHUWL2Y3.js} +7 -7
- package/dist/{chunk-CT4MN5IU.js → chunk-BI5LAQ3Y.js} +353 -359
- package/dist/{chunk-KAPJINKN.js → chunk-BM5GS6ZH.js} +2 -2
- package/dist/{chunk-TLX72JTG.js → chunk-BWYQUPOS.js} +1 -1
- package/dist/chunk-CFRQMBGP.js +49 -0
- package/dist/{chunk-RMLC67LF.js → chunk-CJYKEW2L.js} +2 -30
- package/dist/chunk-CKEQFGLT.js +32 -0
- package/dist/{chunk-IWDLU6K3.js → chunk-DC4CFXM5.js} +4 -6
- package/dist/{chunk-ZVUL7QYY.js → chunk-DMSLNKF7.js} +29 -32
- package/dist/{chunk-KN35K52N.js → chunk-DQXSPYRI.js} +3 -3
- package/dist/{chunk-HYGZEMX6.js → chunk-EVDGNG4F.js} +11 -5
- package/dist/{chunk-SRYEJNES.js → chunk-F5Z6URKM.js} +2 -2
- package/dist/{chunk-UMS2MFPZ.js → chunk-F6X3YJWD.js} +2 -3
- package/dist/{chunk-XYURS6EN.js → chunk-FA5LDARD.js} +15 -17
- package/dist/{chunk-24AKHFGP.js → chunk-FFL3A2VP.js} +6 -6
- package/dist/chunk-FJIVKLPH.js +31 -0
- package/dist/chunk-G2B7F6ZU.js +88 -0
- package/dist/{chunk-US7ECLD7.js → chunk-GAACZY6R.js} +131 -41
- package/dist/{chunk-MZGQNL3Y.js → chunk-GMTFDAOK.js} +12 -13
- package/dist/{chunk-VOOAPROD.js → chunk-GNSIWBAT.js} +3 -3
- package/dist/chunk-GTAI2J6U.js +27 -0
- package/dist/{chunk-RVK72CZX.js → chunk-GZE7WOI4.js} +1362 -459
- package/dist/{chunk-IUE7SSKV.js → chunk-H7HTEQUZ.js} +13 -7
- package/dist/{chunk-EUXZEFTV.js → chunk-HK6JVFZC.js} +3 -3
- package/dist/chunk-IPDG45G5.js +26 -0
- package/dist/{chunk-5HSRT26B.js → chunk-J6JP25XU.js} +16 -15
- package/dist/{chunk-HWCCCQNX.js → chunk-JL6CXUMW.js} +13 -6
- package/dist/{chunk-EBC36LNN.js → chunk-K2YGBXOA.js} +17 -17
- package/dist/{chunk-WMYE35PX.js → chunk-KLQVC3XC.js} +7 -5
- package/dist/{chunk-ATKJFDQN.js → chunk-KSR7RGQY.js} +12 -14
- package/dist/{chunk-POMLXPMY.js → chunk-KXF5R4UN.js} +1 -1
- package/dist/{chunk-LLJNQKQW.js → chunk-LEJOJDXL.js} +20 -13
- package/dist/{chunk-JUKMK5Y4.js → chunk-MA77RSFN.js} +10 -11
- package/dist/{chunk-GAQ7OQG6.js → chunk-MKVZQUEG.js} +85 -96
- package/dist/{chunk-2EECBNC5.js → chunk-MN7MHUXQ.js} +75 -0
- package/dist/{chunk-DEL2U6CM.js → chunk-MT6BVNFW.js} +16 -14
- package/dist/chunk-NDMCVUYK.js +507 -0
- package/dist/{chunk-HRNHZA3N.js → chunk-NIU2IPC5.js} +12 -16
- package/dist/{chunk-AGSS7277.js → chunk-NNKXDXXS.js} +7 -24
- package/dist/{chunk-V35JG4JB.js → chunk-OJLTLYHB.js} +152 -334
- package/dist/{chunk-J6MPGQTS.js → chunk-OLAWH5UQ.js} +81 -15
- package/dist/{chunk-T57LYLZT.js → chunk-OOU2WZZE.js} +1 -1
- package/dist/{chunk-CYRKQRPM.js → chunk-OSTKYB55.js} +2 -4
- package/dist/chunk-P4QNXS6I.js +27 -0
- package/dist/chunk-PKES3ISE.js +297 -0
- package/dist/{chunk-ROYSX2S5.js → chunk-PO45POGF.js} +2 -2
- package/dist/{chunk-T7FEBKXN.js → chunk-PPIBVH4R.js} +7 -9
- package/dist/{chunk-3RKP3FMS.js → chunk-PQJFG24Z.js} +295 -23
- package/dist/{chunk-KUA4OJ5Y.js → chunk-Q3UZHW6N.js} +846 -350
- package/dist/{chunk-N5FLEO7W.js → chunk-Q4EMRFNA.js} +37 -37
- package/dist/{chunk-5IUSNGOC.js → chunk-Q4FCYCRE.js} +28 -21
- package/dist/chunk-Q6D6VMI4.js +22 -0
- package/dist/{chunk-UZ2XCLYS.js → chunk-QGSTQH4D.js} +8 -8
- package/dist/{chunk-DUO2TU77.js → chunk-RZOXUSPC.js} +10 -4
- package/dist/{chunk-JMYYOTQG.js → chunk-S26LC76R.js} +13 -1
- package/dist/{chunk-GMX5OS7B.js → chunk-S67UJDGQ.js} +11 -12
- package/dist/chunk-SCIUNBPF.js +44 -0
- package/dist/{chunk-RKBXZN3A.js → chunk-SJJYRZB4.js} +2 -2
- package/dist/chunk-SXGD4ANG.js +25 -0
- package/dist/{chunk-YCWYO6TQ.js → chunk-T7FTXGS3.js} +48 -45
- package/dist/{chunk-FM4RDMKT.js → chunk-TIQJPRDD.js} +115 -61
- package/dist/{chunk-XHJBS436.js → chunk-TIYGSODX.js} +25 -25
- package/dist/{chunk-S2HEXIWI.js → chunk-U2SDMG7C.js} +10 -6
- package/dist/{chunk-2KXTHF3M.js → chunk-U6OC3QEM.js} +253 -33
- package/dist/{chunk-AWSCPCN2.js → chunk-UCGQT677.js} +19 -19
- package/dist/chunk-UHGF5UT5.js +32 -0
- package/dist/{chunk-JW3YWBVB.js → chunk-UN4TEBWN.js} +17 -19
- package/dist/{chunk-ZHH37KZL.js → chunk-V3APN3DY.js} +17 -17
- package/dist/{chunk-ED36RF6Y.js → chunk-V63BC55Q.js} +1 -1
- package/dist/{chunk-XBJVAEEO.js → chunk-VG5JS5SW.js} +3 -2
- package/dist/{chunk-W66O5E25.js → chunk-VPBIMOAQ.js} +13 -15
- package/dist/chunk-VQH24FIP.js +37 -0
- package/dist/{chunk-YNE3RP52.js → chunk-VSFLRN5Y.js} +8 -1
- package/dist/{chunk-7D6L4MTX.js → chunk-W2V54OCL.js} +3 -3
- package/dist/{chunk-2FN63LPV.js → chunk-W5LGKNET.js} +13 -14
- package/dist/{chunk-IQWN5JCP.js → chunk-W5R5SABV.js} +13 -14
- package/dist/{chunk-R3T7CLQ2.js → chunk-WIZWZR4C.js} +41 -41
- package/dist/{chunk-TOY6QKOH.js → chunk-WQOIR3QY.js} +17 -17
- package/dist/{chunk-Y6GZHWSJ.js → chunk-XAIT2YGS.js} +6 -6
- package/dist/chunk-XCUHKYCQ.js +23 -0
- package/dist/{chunk-GSM5UU7A.js → chunk-XQCSWV2G.js} +44 -35
- package/dist/{chunk-OHKJ7PQF.js → chunk-YBSONGSZ.js} +43 -39
- package/dist/{chunk-GXFV6MYU.js → chunk-YISME6ON.js} +72 -39
- package/dist/chunk-YRD4ISED.js +30 -0
- package/dist/{chunk-SD4I7ZO4.js → chunk-YSBHPOY6.js} +43 -53
- package/dist/{chunk-QBFBRV2B.js → chunk-Z2XAOKHK.js} +4 -2
- package/dist/{chunk-5VSF4UUQ.js → chunk-Z7IGUAXL.js} +34 -39
- package/dist/{chunk-MPNJLASA.js → chunk-ZKXQKGWZ.js} +10 -13
- package/dist/{chunk-J64T55EI.js → chunk-ZQ6NZZTB.js} +75 -9
- package/dist/chunk-ZUUI3ZSA.js +38 -0
- package/dist/{chunk-7HXE67BN.js → chunk-ZYNI26MI.js} +2 -2
- package/dist/index.js +32674 -27567
- package/dist/mcp/analyze-cli.js +11 -12
- package/dist/mcp/cli.js +46 -45
- package/dist/mcp/server.js +1210 -574
- package/dist/mcp/worker.js +65 -65
- package/dist/probes/installer.js +21 -23
- package/docs/adr/0010-trace-validation-session-lifecycle.md +390 -0
- package/docs/adr/README.md +1 -0
- package/docs/agent-tools.md +28 -7
- package/docs/ast-grep_rules_catalog.md +5 -3
- package/docs/configuration.md +12 -1
- package/docs/defect-shapes.md +738 -0
- package/docs/engineering-principles.md +12 -0
- package/docs/environment-variables.md +20 -0
- package/docs/features.md +16 -1
- package/docs/globalconfig.md +37 -8
- package/docs/invariants/caches-stores.md +30 -0
- package/docs/invariants/dispatch-runners.md +164 -0
- package/docs/invariants/git-guard-host.md +53 -0
- package/docs/invariants/language-config.md +31 -0
- package/docs/invariants/lsp-trust-exec.md +286 -0
- package/docs/invariants/paths-os.md +59 -0
- package/docs/invariants/session-telemetry.md +74 -0
- package/docs/lsp-capability-matrix.md +105 -12
- package/docs/lsp-idle-eviction.md +37 -18
- package/docs/pi-lens-fixer.md +24 -2
- package/docs/pi-lens-investigator.md +14 -0
- package/docs/pi-lens-merge-policy.md +32 -17
- package/docs/pi-lens-monitor.md +66 -10
- package/docs/pi-lens-orchestration.md +41 -0
- package/docs/pi-lens-release.md +20 -0
- package/docs/pi-lens-retro.md +5 -4
- package/docs/pi-lens-reviewer.md +54 -7
- package/docs/pi-lens-subagent.md +10 -3
- package/docs/release-qa-baseline.md +19 -7
- package/docs/servercapabilities.md +47 -47
- package/docs/settings.md +9 -5
- package/docs/subagent-compat.md +1 -1
- package/docs/usage.md +1 -0
- package/package.json +8 -5
- package/rules/ast-grep-rules/rule-tests/no-return-value-in-generator-test.yml +17 -0
- package/rules/ast-grep-rules/rule-tests/no-sql-in-code-execute-js-test.yml +86 -0
- package/rules/ast-grep-rules/rule-tests/no-sql-in-code-execute-test.yml +86 -0
- package/rules/ast-grep-rules/rule-tests/unchecked-numeric-parse-python-test.yml +15 -0
- package/rules/ast-grep-rules/rules/no-return-value-in-generator.yml +9 -4
- package/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +119 -0
- package/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +119 -0
- package/rules/ast-grep-rules/rules/unchecked-numeric-parse-python.yml +13 -2
- package/rules/rule-catalog.json +25 -1
- package/scripts/analyze-pi-lens-logs.mjs +15 -5
- package/scripts/lib/is-main-module.mjs +27 -0
- package/scripts/lib/scratch-home-env.mjs +21 -0
- package/scripts/rpc-load-check.mjs +4 -6
- package/scripts/warm-loader-cache.mjs +2 -5
- package/dist/chunk-3PTHXJXR.js +0 -28
- package/dist/chunk-3QED2P4V.js +0 -31
- package/dist/chunk-5WRPDP2A.js +0 -47
- package/dist/chunk-ABBOA7UD.js +0 -157
- package/dist/chunk-CUHSHSB6.js +0 -273
- package/dist/chunk-GL5LUMZE.js +0 -51
- package/dist/chunk-HAD7QRQI.js +0 -30
- package/dist/chunk-JORED7EX.js +0 -44
- package/dist/chunk-KYUB6QDC.js +0 -72
- package/dist/chunk-LZSEQW6A.js +0 -57
- package/dist/chunk-M2IFVFWU.js +0 -79
- package/dist/chunk-M2UD3LPU.js +0 -88
- package/dist/chunk-MBKQHGA7.js +0 -39
- package/dist/chunk-R7YOCSNV.js +0 -23
- package/dist/chunk-SKAMFC7A.js +0 -28
- package/dist/chunk-SYE6T2EB.js +0 -28
- package/dist/chunk-TRETHTQO.js +0 -26
- package/dist/chunk-UA7ZXYDR.js +0 -184
- package/dist/chunk-XTFDJI3T.js +0 -24
- package/dist/chunk-Z3CCVDUB.js +0 -76
|
@@ -2,59 +2,59 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
createAvailabilityChecker,
|
|
4
4
|
resolveAvailableOrInstall
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-V3APN3DY.js";
|
|
6
6
|
import {
|
|
7
7
|
ruffConfigArgs
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-XAIT2YGS.js";
|
|
9
|
+
import "./chunk-3WEPUD2V.js";
|
|
10
|
+
import "./chunk-JL6CXUMW.js";
|
|
11
|
+
import "./chunk-NDMCVUYK.js";
|
|
12
|
+
import "./chunk-PPIBVH4R.js";
|
|
13
|
+
import "./chunk-PKES3ISE.js";
|
|
14
|
+
import "./chunk-ZKXQKGWZ.js";
|
|
15
|
+
import "./chunk-ZUUI3ZSA.js";
|
|
16
|
+
import "./chunk-TIQJPRDD.js";
|
|
17
|
+
import "./chunk-YISME6ON.js";
|
|
18
|
+
import "./chunk-UHGF5UT5.js";
|
|
19
|
+
import "./chunk-CKEQFGLT.js";
|
|
20
|
+
import "./chunk-CJYKEW2L.js";
|
|
21
|
+
import "./chunk-VPBIMOAQ.js";
|
|
22
|
+
import "./chunk-ZYNI26MI.js";
|
|
21
23
|
import "./chunk-2BEMIWEW.js";
|
|
22
24
|
import "./chunk-IJYGIDF4.js";
|
|
23
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-MKVZQUEG.js";
|
|
24
26
|
import {
|
|
25
27
|
resolveToolCwd
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-MT6BVNFW.js";
|
|
29
|
+
import "./chunk-Z7IGUAXL.js";
|
|
30
|
+
import "./chunk-ARD426WI.js";
|
|
31
|
+
import "./chunk-5APMQ2IJ.js";
|
|
32
|
+
import "./chunk-NIU2IPC5.js";
|
|
33
|
+
import "./chunk-BWYQUPOS.js";
|
|
34
|
+
import "./chunk-2RLWJO5K.js";
|
|
35
|
+
import "./chunk-VG5JS5SW.js";
|
|
34
36
|
import {
|
|
35
37
|
safeSpawnAsync
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-Q3UZHW6N.js";
|
|
39
|
+
import "./chunk-AWQWXSW4.js";
|
|
38
40
|
import "./chunk-QYF5S6P6.js";
|
|
39
41
|
import {
|
|
40
42
|
isFileKind
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-J64T55EI.js";
|
|
43
|
+
} from "./chunk-RZOXUSPC.js";
|
|
44
|
+
import "./chunk-OLAWH5UQ.js";
|
|
45
|
+
import "./chunk-J6JP25XU.js";
|
|
46
|
+
import "./chunk-MN7MHUXQ.js";
|
|
47
|
+
import "./chunk-ZQ6NZZTB.js";
|
|
47
48
|
import {
|
|
48
49
|
createSubsystemLogger
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
50
|
+
} from "./chunk-KXF5R4UN.js";
|
|
51
|
+
import "./chunk-S26LC76R.js";
|
|
52
|
+
import "./chunk-Z2XAOKHK.js";
|
|
53
|
+
import "./chunk-VSFLRN5Y.js";
|
|
53
54
|
import "./chunk-LJDODBBZ.js";
|
|
54
|
-
import "./chunk-ABBOA7UD.js";
|
|
55
55
|
import {
|
|
56
56
|
pathsEqual
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-PQJFG24Z.js";
|
|
58
58
|
import "./chunk-NXL4FFQQ.js";
|
|
59
59
|
|
|
60
60
|
// dist/clients/ruff-client.js
|
|
@@ -124,8 +124,12 @@ var RuffClient = class {
|
|
|
124
124
|
"check",
|
|
125
125
|
"--output-format",
|
|
126
126
|
"json",
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
// No target-version override here (#4638): one made the pre-check
|
|
128
|
+
// parse at py310 while `check --fix` below (and the lint runner)
|
|
129
|
+
// read the project's own setting, so a 3.12-only line looked
|
|
130
|
+
// fixable to one pass and unparseable to the other. Ruff
|
|
131
|
+
// discovers the level from the project config itself; a value
|
|
132
|
+
// derived here would be a second owner of that decision.
|
|
129
133
|
...configArgs,
|
|
130
134
|
absolutePath
|
|
131
135
|
], { timeout: 1e4, cwd: ruffCwd });
|
|
@@ -1,39 +1,7 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
getGlobalPiLensDir
|
|
4
|
-
} from "./chunk-KUA4OJ5Y.js";
|
|
5
2
|
import {
|
|
6
3
|
SPECIAL_FILENAMES
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
getTurnId
|
|
10
|
-
} from "./chunk-YNE3RP52.js";
|
|
11
|
-
import {
|
|
12
|
-
BoundedFifoMap
|
|
13
|
-
} from "./chunk-ABBOA7UD.js";
|
|
14
|
-
|
|
15
|
-
// dist/clients/custom-rule-locations.js
|
|
16
|
-
import * as path from "node:path";
|
|
17
|
-
function getUserRuleRoot() {
|
|
18
|
-
return path.join(getGlobalPiLensDir(), "rules");
|
|
19
|
-
}
|
|
20
|
-
var RULE_CORPUS_CYCLE_ENTRIES = 16;
|
|
21
|
-
var ruleCorpusCycleFingerprints = new BoundedFifoMap(RULE_CORPUS_CYCLE_ENTRIES);
|
|
22
|
-
var cycleSlot;
|
|
23
|
-
function ruleCorpusFingerprintForCycle(family, root, compute, force = false) {
|
|
24
|
-
const cycle = getTurnId();
|
|
25
|
-
if (!force && cycleSlot !== void 0 && cycleSlot.cycle === cycle && cycleSlot.family === family && cycleSlot.root === root) {
|
|
26
|
-
return cycleSlot.fingerprint;
|
|
27
|
-
}
|
|
28
|
-
const key = `${cycle}\0${family}\0${root}`;
|
|
29
|
-
let fingerprint = force ? void 0 : ruleCorpusCycleFingerprints.get(key);
|
|
30
|
-
if (fingerprint === void 0) {
|
|
31
|
-
fingerprint = compute(root);
|
|
32
|
-
ruleCorpusCycleFingerprints.set(key, fingerprint);
|
|
33
|
-
}
|
|
34
|
-
cycleSlot = { cycle, family, root, fingerprint };
|
|
35
|
-
return fingerprint;
|
|
36
|
-
}
|
|
4
|
+
} from "./chunk-RZOXUSPC.js";
|
|
37
5
|
|
|
38
6
|
// dist/clients/language-registry.js
|
|
39
7
|
var LANGUAGES = [
|
|
@@ -172,7 +140,44 @@ var LANGUAGES = [
|
|
|
172
140
|
grammar: "json",
|
|
173
141
|
grammarExtensions: []
|
|
174
142
|
},
|
|
175
|
-
|
|
143
|
+
// JSONC by convention, not by extension (#4636). `.json` belongs to the
|
|
144
|
+
// `json` entry, so an extension-only lookup announced these files as `json`
|
|
145
|
+
// and the JSON language server applied its comments-not-allowed mode to
|
|
146
|
+
// them: `languageId === 'jsonc'` is the only spelling that selects
|
|
147
|
+
// `comments: 'ignore'` (vscode-langservers-extracted 4.10.0,
|
|
148
|
+
// lib/json-language-server/jsonServer.js:521), so every comment the file's
|
|
149
|
+
// own format allows arrived as a blocking finding. The catalog is CLOSED and
|
|
150
|
+
// copied from the two places that decide the association for editors,
|
|
151
|
+
// microsoft/vscode 1.105.0:
|
|
152
|
+
// - extensions/typescript-basics/package.json:44-56 — the tsconfig and
|
|
153
|
+
// jsconfig families, exact names plus the `.*.json` and `-*.json`
|
|
154
|
+
// patterns;
|
|
155
|
+
// - extensions/json/package.json:50-72 — the `jsonc` basenames and the
|
|
156
|
+
// one `jsonc` extension that ends in `.json` (`babel.config.json`,
|
|
157
|
+
// `.babelrc.json`, `.eslintrc.json`, `typedoc.json`).
|
|
158
|
+
// A jsonc name whose own extension is not `.json` (`.babelrc`, `.jshintrc`,
|
|
159
|
+
// `bun.lock`, `.ember-cli`) stays out: no extension lookup claims it, so it
|
|
160
|
+
// was never announced as `json` and this entry would have to own a format it
|
|
161
|
+
// does not parse.
|
|
162
|
+
{
|
|
163
|
+
id: "jsonc",
|
|
164
|
+
kind: "json",
|
|
165
|
+
extensions: [".jsonc"],
|
|
166
|
+
filenames: [
|
|
167
|
+
".babelrc.json",
|
|
168
|
+
".eslintrc.json",
|
|
169
|
+
"babel.config.json",
|
|
170
|
+
"jsconfig.json",
|
|
171
|
+
"tsconfig.json",
|
|
172
|
+
"typedoc.json"
|
|
173
|
+
],
|
|
174
|
+
filenamePatterns: [
|
|
175
|
+
"jsconfig-*.json",
|
|
176
|
+
"jsconfig.*.json",
|
|
177
|
+
"tsconfig-*.json",
|
|
178
|
+
"tsconfig.*.json"
|
|
179
|
+
]
|
|
180
|
+
},
|
|
176
181
|
{ id: "julia", extensions: [".jl"] },
|
|
177
182
|
{
|
|
178
183
|
id: "kotlin",
|
|
@@ -242,7 +247,14 @@ var LANGUAGES = [
|
|
|
242
247
|
{ id: "svelte", kind: "jsts", extensions: [".svelte"] },
|
|
243
248
|
{ id: "swift", kind: "swift", extensions: [".swift"], grammar: "swift" },
|
|
244
249
|
{ id: "systemverilog", extensions: [".sv"] },
|
|
245
|
-
{ id: "terraform", kind: "terraform", extensions: [".tf"
|
|
250
|
+
{ id: "terraform", kind: "terraform", extensions: [".tf"] },
|
|
251
|
+
// terraform-ls validates a variables file only when its `languageId` is
|
|
252
|
+
// `terraform-vars`; announced as `terraform` it decodes the file as module
|
|
253
|
+
// code and (with enhanced validation, its default since 0.32) reports every
|
|
254
|
+
// assignment as "Unexpected attribute" (hashicorp/vscode-terraform#1672).
|
|
255
|
+
// Same kind, so the same server, runners, and formatter policy; only the LSP
|
|
256
|
+
// `languageId` differs.
|
|
257
|
+
{ id: "terraform-vars", kind: "terraform", extensions: [".tfvars"] },
|
|
246
258
|
{
|
|
247
259
|
id: "terragrunt",
|
|
248
260
|
kind: "terragrunt",
|
|
@@ -315,6 +327,18 @@ for (const entry of LANGUAGES) {
|
|
|
315
327
|
BY_FILENAME.set(filename.toLowerCase(), entry);
|
|
316
328
|
}
|
|
317
329
|
}
|
|
330
|
+
function matchesFilenamePattern(pattern, basename) {
|
|
331
|
+
const star = pattern.indexOf("*");
|
|
332
|
+
if (star === -1 || pattern.indexOf("*", star + 1) !== -1)
|
|
333
|
+
return false;
|
|
334
|
+
const name = basename.toLowerCase();
|
|
335
|
+
const prefix = pattern.slice(0, star).toLowerCase();
|
|
336
|
+
const suffix = pattern.slice(star + 1).toLowerCase();
|
|
337
|
+
if (!prefix || !suffix)
|
|
338
|
+
return false;
|
|
339
|
+
return name.length > prefix.length + suffix.length && name.startsWith(prefix) && name.endsWith(suffix);
|
|
340
|
+
}
|
|
341
|
+
var FILENAME_PATTERNS = LANGUAGES.flatMap((entry) => (entry.filenamePatterns ?? []).map((pattern) => ({ pattern, entry })));
|
|
318
342
|
var BY_ID = new Map(LANGUAGES.map((entry) => [entry.id, entry]));
|
|
319
343
|
function extensionsForLanguage(id) {
|
|
320
344
|
return BY_ID.get(id)?.extensions ?? [];
|
|
@@ -361,16 +385,25 @@ var BY_KIND = /* @__PURE__ */ new Map();
|
|
|
361
385
|
BY_KIND.set(kind, resolved);
|
|
362
386
|
}
|
|
363
387
|
}
|
|
364
|
-
function
|
|
388
|
+
function resolveFilenameLanguage(filePath) {
|
|
365
389
|
if (!filePath)
|
|
366
390
|
return void 0;
|
|
367
391
|
const base = basenameOf(filePath);
|
|
368
392
|
const byName = BY_FILENAME.get(base.toLowerCase());
|
|
393
|
+
if (byName)
|
|
394
|
+
return byName;
|
|
395
|
+
return FILENAME_PATTERNS.find(({ pattern }) => matchesFilenamePattern(pattern, base))?.entry;
|
|
396
|
+
}
|
|
397
|
+
function resolveLanguage(filePath) {
|
|
398
|
+
if (!filePath)
|
|
399
|
+
return void 0;
|
|
400
|
+
const byName = resolveFilenameLanguage(filePath);
|
|
369
401
|
if (byName)
|
|
370
402
|
return byName;
|
|
371
403
|
const byExtension = BY_EXTENSION.get(extensionOf(filePath));
|
|
372
404
|
if (byExtension)
|
|
373
405
|
return byExtension;
|
|
406
|
+
const base = basenameOf(filePath);
|
|
374
407
|
for (const { pattern, kind } of SPECIAL_FILENAMES) {
|
|
375
408
|
if (pattern.test(base))
|
|
376
409
|
return BY_KIND.get(kind);
|
|
@@ -397,7 +430,7 @@ var SCAN_LANGUAGE_PRIORITY = [
|
|
|
397
430
|
["haskell"],
|
|
398
431
|
["elixir"],
|
|
399
432
|
["gleam"],
|
|
400
|
-
["terraform"],
|
|
433
|
+
["terraform", "terraform-vars"],
|
|
401
434
|
["nix"],
|
|
402
435
|
["shell"],
|
|
403
436
|
["php"],
|
|
@@ -415,10 +448,10 @@ var SCAN_LANGUAGE_PRIORITY = [
|
|
|
415
448
|
];
|
|
416
449
|
|
|
417
450
|
export {
|
|
418
|
-
|
|
419
|
-
ruleCorpusFingerprintForCycle,
|
|
451
|
+
lspLanguageId,
|
|
420
452
|
extensionsForLanguage,
|
|
421
453
|
extensionsForLanguageToken,
|
|
454
|
+
resolveFilenameLanguage,
|
|
422
455
|
resolveLanguage,
|
|
423
456
|
EXTENSION_TO_LSP_ID,
|
|
424
457
|
EXTENSION_TO_GRAMMAR,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
importFactProvider,
|
|
4
|
+
importFactsApplyTo
|
|
5
|
+
} from "./chunk-4PCQCU47.js";
|
|
6
|
+
import "./chunk-OOU2WZZE.js";
|
|
7
|
+
import "./chunk-GAACZY6R.js";
|
|
8
|
+
import "./chunk-Z54ZSOBZ.js";
|
|
9
|
+
import "./chunk-ZUUI3ZSA.js";
|
|
10
|
+
import "./chunk-TIQJPRDD.js";
|
|
11
|
+
import "./chunk-YISME6ON.js";
|
|
12
|
+
import "./chunk-CJYKEW2L.js";
|
|
13
|
+
import "./chunk-5APMQ2IJ.js";
|
|
14
|
+
import "./chunk-Q3UZHW6N.js";
|
|
15
|
+
import "./chunk-RZOXUSPC.js";
|
|
16
|
+
import "./chunk-OLAWH5UQ.js";
|
|
17
|
+
import "./chunk-J6JP25XU.js";
|
|
18
|
+
import "./chunk-MN7MHUXQ.js";
|
|
19
|
+
import "./chunk-ZQ6NZZTB.js";
|
|
20
|
+
import "./chunk-KXF5R4UN.js";
|
|
21
|
+
import "./chunk-S26LC76R.js";
|
|
22
|
+
import "./chunk-Z2XAOKHK.js";
|
|
23
|
+
import "./chunk-VSFLRN5Y.js";
|
|
24
|
+
import "./chunk-LJDODBBZ.js";
|
|
25
|
+
import "./chunk-PQJFG24Z.js";
|
|
26
|
+
import "./chunk-NXL4FFQQ.js";
|
|
27
|
+
export {
|
|
28
|
+
importFactProvider,
|
|
29
|
+
importFactsApplyTo
|
|
30
|
+
};
|
|
@@ -1,56 +1,52 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
stripAnsi
|
|
4
|
-
} from "./chunk-6HWVI6MI.js";
|
|
5
2
|
import {
|
|
6
3
|
augmentPythonEnvironment,
|
|
7
4
|
detectPythonEnvironment,
|
|
8
5
|
emitBounded
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
resolveGitCheckout
|
|
12
|
-
} from "./chunk-UA7ZXYDR.js";
|
|
6
|
+
} from "./chunk-NDMCVUYK.js";
|
|
13
7
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./chunk-
|
|
8
|
+
stripAnsi
|
|
9
|
+
} from "./chunk-6HWVI6MI.js";
|
|
16
10
|
import {
|
|
17
11
|
resolveToolCwd
|
|
18
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MT6BVNFW.js";
|
|
19
13
|
import {
|
|
20
14
|
findGlobalBinary,
|
|
21
15
|
findLocalBinAt,
|
|
22
16
|
localBinPath
|
|
23
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Z7IGUAXL.js";
|
|
24
18
|
import {
|
|
25
19
|
getIsolatedNpxSpawnOptions
|
|
26
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ARD426WI.js";
|
|
27
21
|
import {
|
|
28
22
|
resolveLanguageRootForFile
|
|
29
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-NIU2IPC5.js";
|
|
30
24
|
import {
|
|
25
|
+
resolveGitCheckout,
|
|
31
26
|
safeSpawn,
|
|
32
27
|
safeSpawnAsync
|
|
33
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-Q3UZHW6N.js";
|
|
34
29
|
import {
|
|
30
|
+
DOTNET_CSHARP_ROOT_MARKERS,
|
|
35
31
|
detectFileKind
|
|
36
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-RZOXUSPC.js";
|
|
37
33
|
import {
|
|
34
|
+
PathKeyedMap,
|
|
38
35
|
detectFileRole
|
|
39
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-OLAWH5UQ.js";
|
|
40
37
|
import {
|
|
41
38
|
findNearestDirWithAnyBasename
|
|
42
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-J6JP25XU.js";
|
|
43
40
|
import {
|
|
44
41
|
LEDGER_FIELD_MAX,
|
|
45
42
|
recordDegradationOnce
|
|
46
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-ZQ6NZZTB.js";
|
|
47
44
|
import {
|
|
48
45
|
createSubsystemLogger
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import {
|
|
51
|
-
BoundedFifoMap
|
|
52
|
-
} from "./chunk-ABBOA7UD.js";
|
|
46
|
+
} from "./chunk-KXF5R4UN.js";
|
|
53
47
|
import {
|
|
48
|
+
BoundedFifoMap,
|
|
49
|
+
direntsHaveMarkerGlobMatch,
|
|
54
50
|
findNearestMarkerRootDetailed,
|
|
55
51
|
isRealGitMarker,
|
|
56
52
|
isUnderDir,
|
|
@@ -58,8 +54,9 @@ import {
|
|
|
58
54
|
normalizeEphemeralMapKey,
|
|
59
55
|
normalizeMapKey,
|
|
60
56
|
pathsEqual,
|
|
57
|
+
realpathOrResolve,
|
|
61
58
|
toPosix
|
|
62
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-PQJFG24Z.js";
|
|
63
60
|
|
|
64
61
|
// dist/clients/test-runner-client.js
|
|
65
62
|
import { createHash } from "node:crypto";
|
|
@@ -311,7 +308,8 @@ var RUNNERS = {
|
|
|
311
308
|
},
|
|
312
309
|
dotnet: {
|
|
313
310
|
kinds: ["csharp", "fsharp"],
|
|
314
|
-
|
|
311
|
+
// #4806: the .NET marker seam, not a private copy of it.
|
|
312
|
+
configFiles: [...DOTNET_CSHARP_ROOT_MARKERS],
|
|
315
313
|
command: "dotnet",
|
|
316
314
|
args: (_testFile, _cwd) => ["test", "--no-build"],
|
|
317
315
|
parseJson: false
|
|
@@ -404,23 +402,16 @@ var MAX_FAILED_TARGETS_PER_RUNNER = 32;
|
|
|
404
402
|
var MAX_FAILED_TARGET_CHECKS_PER_SELECTION = 8;
|
|
405
403
|
var FAILED_TARGET_DETAIL_CAP_PER_TURN = 8;
|
|
406
404
|
function canonicalFailedPath(filePath) {
|
|
407
|
-
|
|
408
|
-
try {
|
|
409
|
-
return normalizeMapKey(fs.realpathSync.native(absolute));
|
|
410
|
-
} catch {
|
|
411
|
-
return normalizeMapKey(absolute);
|
|
412
|
-
}
|
|
405
|
+
return normalizeMapKey(realpathOrResolve(filePath));
|
|
413
406
|
}
|
|
414
407
|
function canonicalProjectRoot(cwd) {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
}
|
|
422
|
-
return { key: normalizeEphemeralMapKey(absolute), resolved: false };
|
|
423
|
-
}
|
|
408
|
+
return {
|
|
409
|
+
key: normalizeEphemeralMapKey(realpathOrResolve(cwd)),
|
|
410
|
+
// A cwd that is not on disk still has an identity (its nearest existing
|
|
411
|
+
// ancestor plus the tail), but is a guess about a path that may later be
|
|
412
|
+
// a link: `getCanonicalProjectRoot` memoizes only a resolved one (#2077).
|
|
413
|
+
resolved: fs.existsSync(cwd)
|
|
414
|
+
};
|
|
424
415
|
}
|
|
425
416
|
var MAX_CANONICAL_ROOT_MEMO_ENTRIES = 512;
|
|
426
417
|
function filesystemErrorCode(error) {
|
|
@@ -458,7 +449,7 @@ function parsePytestSummary(output) {
|
|
|
458
449
|
}
|
|
459
450
|
}
|
|
460
451
|
const durationMatch = /in\s+([\d.]+)s/.exec(summaryLine);
|
|
461
|
-
const duration = durationMatch ?
|
|
452
|
+
const duration = durationMatch ? toMeasuredDurationMs(Number.parseFloat(durationMatch[1]) * 1e3) : void 0;
|
|
462
453
|
return { passed, failed, skipped, duration };
|
|
463
454
|
}
|
|
464
455
|
var TestRunnerClient = class {
|
|
@@ -471,10 +462,10 @@ var TestRunnerClient = class {
|
|
|
471
462
|
// never memoized (#2077): the fallback key is a guess about a path that does
|
|
472
463
|
// not exist yet, so memoizing it would pin an alias probed before its
|
|
473
464
|
// symlink was created to a stale verdict for the instance's life. Re-probing
|
|
474
|
-
// costs one failing
|
|
475
|
-
// resolve — a state where `detectRunner` already
|
|
476
|
-
// call. Keep the memo bounded so pathological
|
|
477
|
-
// without limit.
|
|
465
|
+
// costs one failing existence probe plus the ancestor walk per call, and only
|
|
466
|
+
// for a cwd that does not resolve — a state where `detectRunner` already
|
|
467
|
+
// walks node_modules on every call. Keep the memo bounded so pathological
|
|
468
|
+
// spelling churn cannot grow it without limit.
|
|
478
469
|
canonicalRootMemo = new BoundedFifoMap(MAX_CANONICAL_ROOT_MEMO_ENTRIES);
|
|
479
470
|
availableRunners = new PathKeyedMap(normalizeEphemeralMapKey);
|
|
480
471
|
failedTestsByRunner = /* @__PURE__ */ new Map();
|
|
@@ -725,8 +716,7 @@ var TestRunnerClient = class {
|
|
|
725
716
|
const found = config.configFiles.some((cf) => {
|
|
726
717
|
if (cf.includes("*")) {
|
|
727
718
|
try {
|
|
728
|
-
|
|
729
|
-
return files.some((f) => new RegExp(cf.replace(/\*/g, ".*")).test(f));
|
|
719
|
+
return direntsHaveMarkerGlobMatch(fs.readdirSync(cwd, { withFileTypes: true }), cf);
|
|
730
720
|
} catch {
|
|
731
721
|
return false;
|
|
732
722
|
}
|
|
@@ -1473,11 +1463,11 @@ var TestRunnerClient = class {
|
|
|
1473
1463
|
}
|
|
1474
1464
|
const span = maxEnd - minStart;
|
|
1475
1465
|
if (Number.isFinite(span) && span > 0)
|
|
1476
|
-
return
|
|
1466
|
+
return toMeasuredDurationMs(span);
|
|
1477
1467
|
if (assertionTotal > 0)
|
|
1478
|
-
return
|
|
1468
|
+
return toMeasuredDurationMs(assertionTotal);
|
|
1479
1469
|
if (Number.isFinite(span) && span === 0)
|
|
1480
|
-
return
|
|
1470
|
+
return toMeasuredDurationMs(span);
|
|
1481
1471
|
return void 0;
|
|
1482
1472
|
}
|
|
1483
1473
|
// --- Vitest Parser ---
|
|
@@ -1584,7 +1574,7 @@ ${stderr}`;
|
|
|
1584
1574
|
const minutes = Number.parseInt(clockMatch[2], 10);
|
|
1585
1575
|
const seconds = Number.parseInt(clockMatch[3], 10);
|
|
1586
1576
|
const millis = clockMatch[4] ? Number.parseInt(clockMatch[4].padEnd(3, "0"), 10) : 0;
|
|
1587
|
-
duration = ((hours * 60 + minutes) * 60 + seconds) * 1e3 + millis;
|
|
1577
|
+
duration = toMeasuredDurationMs(((hours * 60 + minutes) * 60 + seconds) * 1e3 + millis);
|
|
1588
1578
|
} else {
|
|
1589
1579
|
const legacyMatch = output.match(/^Time:\s*([\d.]+)\s*(seconds?|s|ms|milliseconds?|minutes?)\b/im);
|
|
1590
1580
|
if (legacyMatch) {
|
|
@@ -1592,7 +1582,7 @@ ${stderr}`;
|
|
|
1592
1582
|
const unit = legacyMatch[2].toLowerCase();
|
|
1593
1583
|
const scale = unit.startsWith("ms") || unit.startsWith("milli") ? 1 : unit.startsWith("min") ? 6e4 : 1e3;
|
|
1594
1584
|
if (Number.isFinite(value) && value > 0) {
|
|
1595
|
-
duration =
|
|
1585
|
+
duration = toMeasuredDurationMs(value * scale);
|
|
1596
1586
|
}
|
|
1597
1587
|
}
|
|
1598
1588
|
}
|
|
@@ -1627,7 +1617,7 @@ ${stderr}`;
|
|
|
1627
1617
|
}
|
|
1628
1618
|
const durationMatch = output.match(/Finished in\s+([\d.]+)\s+seconds?/i);
|
|
1629
1619
|
if (durationMatch) {
|
|
1630
|
-
duration =
|
|
1620
|
+
duration = toMeasuredDurationMs(Number.parseFloat(durationMatch[1]) * 1e3);
|
|
1631
1621
|
}
|
|
1632
1622
|
const failures = [];
|
|
1633
1623
|
const failureRegex = /^[^\S\n]*\d+\)\s+(.+?)\s*\(([^)]+)\)\s*$/gm;
|
|
@@ -1809,7 +1799,7 @@ ${stderr}`;
|
|
|
1809
1799
|
if (!dotnetTime)
|
|
1810
1800
|
return void 0;
|
|
1811
1801
|
if (/^\s*</.test(dotnetTime[1]))
|
|
1812
|
-
return 0;
|
|
1802
|
+
return toMeasuredDurationMs(0);
|
|
1813
1803
|
let total = 0;
|
|
1814
1804
|
let tokens = 0;
|
|
1815
1805
|
const units = {
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
getMaxLogSizeMB,
|
|
6
6
|
getTurnId,
|
|
7
7
|
isTestMode
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VSFLRN5Y.js";
|
|
9
9
|
import {
|
|
10
10
|
normalizeLoggedPath
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-PQJFG24Z.js";
|
|
12
12
|
|
|
13
13
|
// dist/clients/latency-logger.js
|
|
14
14
|
import * as path from "node:path";
|
|
@@ -33,6 +33,7 @@ var LAST_PHASE_EXCLUDED = /* @__PURE__ */ new Set([
|
|
|
33
33
|
"turn_end_test_selection",
|
|
34
34
|
"lsp_aux_wait_outcome",
|
|
35
35
|
"tool_set_mutation",
|
|
36
|
+
"tool_set_decision",
|
|
36
37
|
"availability_decision",
|
|
37
38
|
"finding_dead_path_drop",
|
|
38
39
|
"finding_stale_line_demote",
|
|
@@ -54,6 +55,7 @@ var LAST_PHASE_EXCLUDED = /* @__PURE__ */ new Set([
|
|
|
54
55
|
"session_handoff_adopt",
|
|
55
56
|
"session_store_action",
|
|
56
57
|
"session_end_fence_rollup",
|
|
58
|
+
"session_handoff_turn_state",
|
|
57
59
|
"format_late_resync_chained",
|
|
58
60
|
"lsp_created_import_scan_rollup"
|
|
59
61
|
]);
|