pi-lens 4.4.7 → 4.4.9
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 +31 -0
- package/CHANGELOG.md +327 -0
- package/README.md +13 -2
- package/config/dependency-cruiser-eager-allowlist.json +1 -1
- package/config/markdownlint/run-no-fix.mjs +36 -0
- package/dist/{chunk-4LM3VAZH.js → chunk-2VZ3VN3N.js} +2 -2
- package/dist/{chunk-PUZ3E2J4.js → chunk-3HTZDY3C.js} +8 -6
- package/dist/{chunk-RORGS5II.js → chunk-3NPWO5UO.js} +7 -13
- package/dist/{chunk-MNJIXFX4.js → chunk-47UCC4MM.js} +1 -1
- package/dist/chunk-4ENEJHF4.js +198 -0
- package/dist/chunk-5GEYJJHG.js +22 -0
- package/dist/{chunk-U6VN4NVL.js → chunk-5YSEQHJN.js} +3 -3
- package/dist/{chunk-6IR3ZYIB.js → chunk-6GPB3JLL.js} +3 -3
- package/dist/{chunk-MB6PXBUA.js → chunk-7R5GZIA6.js} +7 -15
- package/dist/{chunk-DH5JPM3K.js → chunk-7UTSNTWM.js} +10 -9
- package/dist/{chunk-24BILSZW.js → chunk-7YTRG6YW.js} +2 -2
- package/dist/{chunk-KW5JQPO5.js → chunk-AACN5GNE.js} +2 -2
- package/dist/{chunk-PKES3ISE.js → chunk-ACRJ2GZ5.js} +2 -2
- package/dist/{chunk-4ZYJHQMB.js → chunk-C3YRO3EU.js} +10 -12
- package/dist/{chunk-PQJFG24Z.js → chunk-CB7PEVOJ.js} +1300 -946
- package/dist/{chunk-ABPKUVA4.js → chunk-CDFJF5YD.js} +1 -1
- package/dist/{chunk-T7A2HK2B.js → chunk-CJS6WE66.js} +17 -18
- package/dist/{chunk-3YY7IXIL.js → chunk-CM6BDY4E.js} +14 -60
- package/dist/{chunk-RZOXUSPC.js → chunk-CZCAZVTD.js} +16 -2
- package/dist/chunk-DGKFWQK4.js +23 -0
- package/dist/{chunk-NA7SEXHE.js → chunk-E65WJVI5.js} +7 -9
- package/dist/{chunk-2TF6RXWB.js → chunk-EKNYSXFB.js} +8 -10
- package/dist/{chunk-RRV3FNNM.js → chunk-EY6LY2HO.js} +27 -30
- package/dist/{chunk-LBLBAFG3.js → chunk-F6BEQWAK.js} +17 -5
- package/dist/{chunk-4L36HG27.js → chunk-FGNSESAC.js} +12 -14
- package/dist/{chunk-3FRLWYBG.js → chunk-FRUBVFXV.js} +39 -42
- package/dist/{chunk-FB5SCCPT.js → chunk-G22UNQID.js} +14 -15
- package/dist/{chunk-LV4UMYVH.js → chunk-GQTQUNCG.js} +26 -27
- package/dist/{chunk-E7HJ56Y7.js → chunk-H3BVMK47.js} +64 -73
- package/dist/chunk-H6FLQ5NW.js +28 -0
- package/dist/{chunk-QHSNL7B2.js → chunk-HEA3EM23.js} +15 -19
- package/dist/{chunk-AWDSEDER.js → chunk-HSOBIN22.js} +2 -2
- package/dist/{chunk-EAOK7MIZ.js → chunk-HYSKJMZK.js} +17 -4
- package/dist/{chunk-VUZWQ7UG.js → chunk-IICERRFF.js} +46 -72
- package/dist/{chunk-OXOI55RU.js → chunk-IILEH3ZC.js} +8 -10
- package/dist/{chunk-ZKXQKGWZ.js → chunk-J3Q2NYJR.js} +4 -3
- package/dist/{chunk-YHC2O2WO.js → chunk-JUZ67QZQ.js} +20 -9
- package/dist/chunk-KR5VGMVT.js +25 -0
- package/dist/{chunk-F7K5IBZG.js → chunk-KV6GQOGN.js} +41 -44
- package/dist/{chunk-SNDXCFRS.js → chunk-KXMJLOZF.js} +25 -23
- package/dist/{chunk-CB4WHS4H.js → chunk-L4Y3ROKQ.js} +3 -3
- package/dist/{chunk-3F6BMY53.js → chunk-L6WBJGQS.js} +1 -1
- package/dist/{chunk-MPKRJBPK.js → chunk-L7O774U7.js} +30 -32
- package/dist/{chunk-URCQWAQ4.js → chunk-LAHHGNAY.js} +21 -21
- package/dist/{chunk-V63BC55Q.js → chunk-LT62P654.js} +1 -1
- package/dist/{chunk-ZMAUPOMG.js → chunk-LWOM6LVS.js} +34 -34
- package/dist/{chunk-HO6LWE2E.js → chunk-MKPDIAZH.js} +21 -1
- package/dist/{chunk-2PHMIAKO.js → chunk-MN635QYA.js} +3 -4
- package/dist/{chunk-KDX35VXP.js → chunk-MQ4PPCJB.js} +166 -149
- package/dist/{chunk-QOE342SU.js → chunk-MRLH4MYU.js} +2 -2
- package/dist/{chunk-CE6VMBCB.js → chunk-N56BNAA6.js} +20 -21
- package/dist/{chunk-L3CMBQMH.js → chunk-N5CEGQPG.js} +14 -17
- package/dist/{chunk-7E2563GA.js → chunk-NCLO6E6N.js} +13 -33
- package/dist/{chunk-J6JP25XU.js → chunk-NL5LSKVD.js} +4 -3
- package/dist/{chunk-U7BD2QL7.js → chunk-NMUSOZ2D.js} +10 -12
- package/dist/{chunk-BZARLRJW.js → chunk-NOWH2VA2.js} +8 -33
- package/dist/{chunk-U2SDMG7C.js → chunk-NUSXS6YB.js} +6 -5
- package/dist/{chunk-ZJTT47IG.js → chunk-OSEKJEUU.js} +2 -2
- package/dist/{chunk-FZKFVUEC.js → chunk-OUYAUXAT.js} +647 -355
- package/dist/{chunk-ZE3KXHS7.js → chunk-PBZNYHMM.js} +84 -4
- package/dist/{chunk-U5HPROLA.js → chunk-PIIUNJIT.js} +2 -4
- package/dist/chunk-PKLB2XJL.js +8 -0
- package/dist/{chunk-RC2Z6K47.js → chunk-PRHYIA6X.js} +15 -6
- package/dist/{chunk-RQS4QQSD.js → chunk-PXQ45SGD.js} +2 -2
- package/dist/chunk-Q6JQKWPK.js +25 -0
- package/dist/{chunk-F6X3YJWD.js → chunk-QB7T2PHK.js} +2 -2
- package/dist/{chunk-TIQJPRDD.js → chunk-QGITU23N.js} +3 -2
- package/dist/chunk-QJJKOHLH.js +57 -0
- package/dist/{chunk-4LOE5R5P.js → chunk-QP33NKYC.js} +18 -15
- package/dist/{chunk-N5WSK2K7.js → chunk-QVBOXT3L.js} +12 -17
- package/dist/{chunk-DPGEAHZT.js → chunk-RNJFRXEN.js} +10 -18
- package/dist/{chunk-EKWX4WD3.js → chunk-RNXOWDM6.js} +10 -10
- package/dist/{chunk-O4BJFESU.js → chunk-RTFMDIKV.js} +1 -1
- package/dist/{chunk-LS3QJRUB.js → chunk-SIQHOB6P.js} +11 -13
- package/dist/{chunk-3K2F6UDZ.js → chunk-SLSMJPEF.js} +43 -42
- package/dist/chunk-T5QSLSMM.js +50 -0
- package/dist/chunk-TGQDAG4B.js +88 -0
- package/dist/{chunk-4YHYPW2G.js → chunk-THYHUIDR.js} +44 -13
- package/dist/{chunk-YVHBNSME.js → chunk-TMNUTMT5.js} +1099 -1100
- package/dist/{chunk-WDBICWH3.js → chunk-TOE2RRCS.js} +1 -1
- package/dist/chunk-TYHPVE5H.js +25 -0
- package/dist/chunk-UAKO2M6B.js +73 -0
- package/dist/chunk-UC5AXW5Z.js +20 -0
- package/dist/chunk-UTJP6WOS.js +28 -0
- package/dist/{chunk-DQZFQSR5.js → chunk-UXTQ3QPD.js} +4 -4
- package/dist/chunk-UYXV5NIS.js +20 -0
- package/dist/{chunk-KKCK636N.js → chunk-V2WDBOLZ.js} +10 -12
- package/dist/{chunk-PR6PO3ES.js → chunk-V67D6TMU.js} +22 -20
- package/dist/{chunk-VSFLRN5Y.js → chunk-VCRVNLE7.js} +135 -2
- package/dist/{chunk-CPSR3AVL.js → chunk-VO4JFPTV.js} +2 -2
- package/dist/{chunk-XT2HTCJ5.js → chunk-VWLSU3XV.js} +6 -5
- package/dist/{chunk-WME2OQST.js → chunk-W5E72HJA.js} +66 -24
- package/dist/{chunk-LLS45EWB.js → chunk-W7TY6HYX.js} +6 -8
- package/dist/{chunk-CCV2EU7T.js → chunk-WSSLVMDA.js} +12 -13
- package/dist/{chunk-YISME6ON.js → chunk-WTB4GKMH.js} +10 -1
- package/dist/{chunk-KPPJTH44.js → chunk-X5BJ3G2P.js} +64 -35
- package/dist/{chunk-JMEKXFOL.js → chunk-XKFO2SZV.js} +39 -34
- package/dist/{chunk-HR3OJ3TH.js → chunk-XLAI7UYY.js} +84 -31
- package/dist/{chunk-H7OR7DFZ.js → chunk-XO756WE5.js} +53 -37
- package/dist/{chunk-F5Z6URKM.js → chunk-XVB3Q2PG.js} +2 -4
- package/dist/{chunk-R5MOQM2H.js → chunk-YOXCCJDF.js} +607 -366
- package/dist/{chunk-ZGSJDWQU.js → chunk-ZCQBNPRH.js} +2 -2
- package/dist/chunk-ZD4KVFXI.js +234 -0
- package/dist/{chunk-WGRJOXED.js → chunk-ZDMFGACN.js} +1295 -966
- package/dist/{chunk-OSTKYB55.js → chunk-ZMMHHXSW.js} +1 -1
- package/dist/{chunk-75GAYVNO.js → chunk-ZPM7ZIFL.js} +6 -6
- package/dist/{chunk-LUBPZN36.js → chunk-ZVCDHYWZ.js} +9 -11
- package/dist/{chunk-Y7F7IEE3.js → chunk-ZZN74OGD.js} +102 -7
- package/dist/{chunk-L5JYIU47.js → chunk-ZZSJAR76.js} +39 -20
- package/dist/index.js +10933 -8644
- package/dist/mcp/analyze-cli.js +12 -17
- package/dist/mcp/cli.js +43 -42
- package/dist/mcp/server.js +3073 -1147
- package/dist/mcp/worker.js +61 -61
- package/dist/probes/installer.js +18 -19
- package/docs/adr/0003-git-guard-latch-writer.md +11 -6
- package/docs/agent-tools.md +58 -16
- package/docs/alignment-families.md +29 -0
- package/docs/analysisall.md +1 -1
- package/docs/ast-grep_rules_catalog.md +6 -4
- package/docs/ci-bot-pr-checks.md +128 -0
- package/docs/configuration.md +150 -12
- package/docs/defect-shapes.md +107 -15
- package/docs/engineering-principles.md +27 -2
- package/docs/environment-variables.md +18 -1
- package/docs/features.md +14 -7
- package/docs/globalconfig.md +11 -3
- package/docs/invariants/git-guard-host.md +7 -3
- package/docs/invariants/language-config.md +15 -4
- package/docs/invariants/lsp-trust-exec.md +25 -4
- package/docs/invariants/paths-os.md +4 -2
- package/docs/invariants/session-telemetry.md +2 -2
- package/docs/language-coverage.md +1 -0
- package/docs/lsp-capability-matrix.md +167 -65
- package/docs/lsp-idle-eviction.md +4 -1
- package/docs/merge-queue-rollout.md +10 -8
- package/docs/module-report-read-symbol.md +34 -23
- package/docs/pi-lens-fixer.md +34 -17
- package/docs/pi-lens-investigator.md +3 -0
- package/docs/pi-lens-merge-policy.md +34 -17
- package/docs/pi-lens-monitor.md +9 -0
- package/docs/pi-lens-orchestration.md +4 -1
- package/docs/pi-lens-reviewer.md +6 -6
- package/docs/pi-lens-subagent.md +19 -3
- package/docs/public-api-stability.md +57 -7
- package/docs/release-qa-baseline.md +7 -4
- package/docs/schema/pi-lens-config-v1.json +21 -2
- package/docs/servercapabilities.md +3 -1
- package/docs/settings.md +11 -7
- package/docs/word-index.md +20 -7
- package/package.json +11 -4
- package/rules/ast-grep-rules/rule-tests/no-accumulating-spread-js-test.yml +37 -0
- package/rules/ast-grep-rules/rule-tests/ts-redundant-filter-map-test.yml +12 -1
- package/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-js-test.yml +12 -0
- package/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-test.yml +25 -0
- package/rules/ast-grep-rules/rules/no-accumulating-spread-js.yml +49 -1
- package/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +1 -2
- package/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +1 -2
- package/rules/ast-grep-rules/rules/ts-redundant-filter-map.yml +9 -1
- package/rules/ast-grep-rules/rules-disabled/filter-then-map-js.yml +17 -0
- package/rules/ast-grep-rules/rules-disabled/filter-then-map.yml +36 -0
- package/rules/ast-grep-rules/self-scan-baseline.json +1 -1
- package/scripts/download-grammars.js +3 -2
- package/skills/pi-lens-lsp-navigation/SKILL.md +5 -1
- package/dist/chunk-46TNM7XZ.js +0 -88
- package/dist/chunk-72OKUXSD.js +0 -31
- package/dist/chunk-7GLOLOSH.js +0 -57
- package/dist/chunk-AKUUMGD5.js +0 -26
- package/dist/chunk-ASUXV767.js +0 -22
- package/dist/chunk-CTADOKYM.js +0 -25
- package/dist/chunk-GNSIWBAT.js +0 -106
- package/dist/chunk-HWDAVBFU.js +0 -49
- package/dist/chunk-JJ2RRESP.js +0 -58
- package/dist/chunk-KXF5R4UN.js +0 -48
- package/dist/chunk-LSC3VADM.js +0 -23
- package/dist/chunk-OE5ZBP7F.js +0 -443
- package/dist/chunk-SHLDT3OI.js +0 -27
- package/dist/chunk-UF7RTZSO.js +0 -27
- package/dist/chunk-W4WP2ERB.js +0 -30
- package/dist/chunk-YES5CACN.js +0 -73
- package/dist/chunk-Z2XAOKHK.js +0 -136
package/dist/chunk-AKUUMGD5.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
GovulncheckClient,
|
|
4
|
-
parseGovulncheckJson
|
|
5
|
-
} from "./chunk-YHC2O2WO.js";
|
|
6
|
-
import "./chunk-JJ2RRESP.js";
|
|
7
|
-
import "./chunk-ZE3KXHS7.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
|
-
GovulncheckClient,
|
|
25
|
-
parseGovulncheckJson
|
|
26
|
-
};
|
package/dist/chunk-ASUXV767.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
AgentBehaviorClient,
|
|
4
|
-
agentBehaviorClient
|
|
5
|
-
} from "./chunk-ZJTT47IG.js";
|
|
6
|
-
import "./chunk-XT2HTCJ5.js";
|
|
7
|
-
import "./chunk-YVHBNSME.js";
|
|
8
|
-
import "./chunk-KPPJTH44.js";
|
|
9
|
-
import "./chunk-J6JP25XU.js";
|
|
10
|
-
import "./chunk-U5HPROLA.js";
|
|
11
|
-
import "./chunk-WME2OQST.js";
|
|
12
|
-
import "./chunk-KXF5R4UN.js";
|
|
13
|
-
import "./chunk-S26LC76R.js";
|
|
14
|
-
import "./chunk-Z2XAOKHK.js";
|
|
15
|
-
import "./chunk-VSFLRN5Y.js";
|
|
16
|
-
import "./chunk-LJDODBBZ.js";
|
|
17
|
-
import "./chunk-PQJFG24Z.js";
|
|
18
|
-
import "./chunk-NXL4FFQQ.js";
|
|
19
|
-
export {
|
|
20
|
-
AgentBehaviorClient,
|
|
21
|
-
agentBehaviorClient
|
|
22
|
-
};
|
package/dist/chunk-CTADOKYM.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
getSourceFiles,
|
|
4
|
-
getSourceFilesAsync
|
|
5
|
-
} from "./chunk-ABPKUVA4.js";
|
|
6
|
-
import "./chunk-EKWX4WD3.js";
|
|
7
|
-
import "./chunk-ZGSJDWQU.js";
|
|
8
|
-
import "./chunk-YVHBNSME.js";
|
|
9
|
-
import "./chunk-QYF5S6P6.js";
|
|
10
|
-
import "./chunk-RZOXUSPC.js";
|
|
11
|
-
import "./chunk-KPPJTH44.js";
|
|
12
|
-
import "./chunk-J6JP25XU.js";
|
|
13
|
-
import "./chunk-U5HPROLA.js";
|
|
14
|
-
import "./chunk-WME2OQST.js";
|
|
15
|
-
import "./chunk-KXF5R4UN.js";
|
|
16
|
-
import "./chunk-S26LC76R.js";
|
|
17
|
-
import "./chunk-Z2XAOKHK.js";
|
|
18
|
-
import "./chunk-VSFLRN5Y.js";
|
|
19
|
-
import "./chunk-LJDODBBZ.js";
|
|
20
|
-
import "./chunk-PQJFG24Z.js";
|
|
21
|
-
import "./chunk-NXL4FFQQ.js";
|
|
22
|
-
export {
|
|
23
|
-
getSourceFiles,
|
|
24
|
-
getSourceFilesAsync
|
|
25
|
-
};
|
package/dist/chunk-GNSIWBAT.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
createSubsystemLogger
|
|
4
|
-
} from "./chunk-KXF5R4UN.js";
|
|
5
|
-
import "./chunk-VSFLRN5Y.js";
|
|
6
|
-
import "./chunk-PQJFG24Z.js";
|
|
7
|
-
import "./chunk-NXL4FFQQ.js";
|
|
8
|
-
|
|
9
|
-
// dist/clients/metrics-client.js
|
|
10
|
-
import * as fs from "node:fs";
|
|
11
|
-
import * as path from "node:path";
|
|
12
|
-
var MetricsClient = class {
|
|
13
|
-
log;
|
|
14
|
-
fileBaselines = /* @__PURE__ */ new Map();
|
|
15
|
-
constructor(verbose = false) {
|
|
16
|
-
this.log = verbose ? createSubsystemLogger("metrics") : () => {
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Record initial state of a file when first touched this session
|
|
21
|
-
*/
|
|
22
|
-
recordBaseline(filePath) {
|
|
23
|
-
const absolutePath = path.resolve(filePath);
|
|
24
|
-
if (!fs.existsSync(absolutePath))
|
|
25
|
-
return;
|
|
26
|
-
if (this.fileBaselines.has(absolutePath))
|
|
27
|
-
return;
|
|
28
|
-
const content = fs.readFileSync(absolutePath, "utf-8");
|
|
29
|
-
const entropy = this.calculateEntropy(content);
|
|
30
|
-
this.fileBaselines.set(absolutePath, { content, entropy });
|
|
31
|
-
this.log(`Baseline recorded: ${path.basename(filePath)} (entropy: ${entropy.toFixed(2)})`);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Get metrics for a specific file
|
|
35
|
-
*/
|
|
36
|
-
getFileMetrics(filePath) {
|
|
37
|
-
const absolutePath = path.resolve(filePath);
|
|
38
|
-
const baseline = this.fileBaselines.get(absolutePath);
|
|
39
|
-
if (!baseline)
|
|
40
|
-
return null;
|
|
41
|
-
if (!fs.existsSync(absolutePath))
|
|
42
|
-
return null;
|
|
43
|
-
const currentContent = fs.readFileSync(absolutePath, "utf-8");
|
|
44
|
-
const totalLines = currentContent.split("\n").length;
|
|
45
|
-
const entropyCurrent = this.calculateEntropy(currentContent);
|
|
46
|
-
const entropyDelta = entropyCurrent - baseline.entropy;
|
|
47
|
-
return {
|
|
48
|
-
filePath: path.relative(process.cwd(), absolutePath),
|
|
49
|
-
totalLines,
|
|
50
|
-
entropyStart: baseline.entropy,
|
|
51
|
-
entropyCurrent,
|
|
52
|
-
entropyDelta
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Get entropy delta for all touched files
|
|
57
|
-
*/
|
|
58
|
-
getEntropyDeltas() {
|
|
59
|
-
const results = [];
|
|
60
|
-
for (const [filePath, baseline] of this.fileBaselines) {
|
|
61
|
-
if (!fs.existsSync(filePath))
|
|
62
|
-
continue;
|
|
63
|
-
const content = fs.readFileSync(filePath, "utf-8");
|
|
64
|
-
const current = this.calculateEntropy(content);
|
|
65
|
-
const delta = current - baseline.entropy;
|
|
66
|
-
results.push({
|
|
67
|
-
file: path.relative(process.cwd(), filePath),
|
|
68
|
-
start: baseline.entropy,
|
|
69
|
-
current,
|
|
70
|
-
delta
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
return results.sort((a, b) => Math.abs(b.delta) - Math.abs(a.delta));
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Calculate Shannon entropy of a string
|
|
77
|
-
* Returns bits per character
|
|
78
|
-
*/
|
|
79
|
-
calculateEntropy(text) {
|
|
80
|
-
if (text.length === 0)
|
|
81
|
-
return 0;
|
|
82
|
-
const freq = /* @__PURE__ */ new Map();
|
|
83
|
-
for (const char of text) {
|
|
84
|
-
freq.set(char, (freq.get(char) || 0) + 1);
|
|
85
|
-
}
|
|
86
|
-
let entropy = 0;
|
|
87
|
-
const len = text.length;
|
|
88
|
-
for (const count of freq.values()) {
|
|
89
|
-
const p = count / len;
|
|
90
|
-
if (p > 0) {
|
|
91
|
-
entropy -= p * Math.log2(p);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return entropy;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Reset session state (for new session)
|
|
98
|
-
*/
|
|
99
|
-
reset() {
|
|
100
|
-
this.fileBaselines.clear();
|
|
101
|
-
this.log("Session metrics reset");
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
export {
|
|
105
|
-
MetricsClient
|
|
106
|
-
};
|
package/dist/chunk-HWDAVBFU.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
MAX_CANONICAL_ROOT_MEMO_ENTRIES,
|
|
4
|
-
RUNNERS,
|
|
5
|
-
SOURCE_TO_TEST_PATTERNS,
|
|
6
|
-
TURN_END_EXCLUDED_TEST_GLOBS,
|
|
7
|
-
TestRunnerClient,
|
|
8
|
-
isExcludedTestTarget,
|
|
9
|
-
isRunnerErrorResult,
|
|
10
|
-
stripWrapperArgs
|
|
11
|
-
} from "./chunk-HR3OJ3TH.js";
|
|
12
|
-
import "./chunk-PR6PO3ES.js";
|
|
13
|
-
import "./chunk-PKES3ISE.js";
|
|
14
|
-
import "./chunk-ZKXQKGWZ.js";
|
|
15
|
-
import "./chunk-YISME6ON.js";
|
|
16
|
-
import "./chunk-6HWVI6MI.js";
|
|
17
|
-
import "./chunk-DPGEAHZT.js";
|
|
18
|
-
import "./chunk-NA7SEXHE.js";
|
|
19
|
-
import "./chunk-3F6BMY53.js";
|
|
20
|
-
import "./chunk-KW5JQPO5.js";
|
|
21
|
-
import "./chunk-PUZ3E2J4.js";
|
|
22
|
-
import "./chunk-ABPKUVA4.js";
|
|
23
|
-
import "./chunk-EKWX4WD3.js";
|
|
24
|
-
import "./chunk-ZGSJDWQU.js";
|
|
25
|
-
import "./chunk-YVHBNSME.js";
|
|
26
|
-
import "./chunk-AWQWXSW4.js";
|
|
27
|
-
import "./chunk-QYF5S6P6.js";
|
|
28
|
-
import "./chunk-RZOXUSPC.js";
|
|
29
|
-
import "./chunk-KPPJTH44.js";
|
|
30
|
-
import "./chunk-J6JP25XU.js";
|
|
31
|
-
import "./chunk-U5HPROLA.js";
|
|
32
|
-
import "./chunk-WME2OQST.js";
|
|
33
|
-
import "./chunk-KXF5R4UN.js";
|
|
34
|
-
import "./chunk-S26LC76R.js";
|
|
35
|
-
import "./chunk-Z2XAOKHK.js";
|
|
36
|
-
import "./chunk-VSFLRN5Y.js";
|
|
37
|
-
import "./chunk-LJDODBBZ.js";
|
|
38
|
-
import "./chunk-PQJFG24Z.js";
|
|
39
|
-
import "./chunk-NXL4FFQQ.js";
|
|
40
|
-
export {
|
|
41
|
-
MAX_CANONICAL_ROOT_MEMO_ENTRIES,
|
|
42
|
-
RUNNERS,
|
|
43
|
-
SOURCE_TO_TEST_PATTERNS,
|
|
44
|
-
TURN_END_EXCLUDED_TEST_GLOBS,
|
|
45
|
-
TestRunnerClient,
|
|
46
|
-
isExcludedTestTarget,
|
|
47
|
-
isRunnerErrorResult,
|
|
48
|
-
stripWrapperArgs
|
|
49
|
-
};
|
package/dist/chunk-JJ2RRESP.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
truncatedByOutputCap
|
|
4
|
-
} from "./chunk-U5HPROLA.js";
|
|
5
|
-
import {
|
|
6
|
-
LEDGER_FIELD_MAX
|
|
7
|
-
} from "./chunk-WME2OQST.js";
|
|
8
|
-
|
|
9
|
-
// dist/clients/dispatch/runners/utils/spawn-outcome.js
|
|
10
|
-
function firstOutputLine(text, max = LEDGER_FIELD_MAX) {
|
|
11
|
-
for (const line of String(text ?? "").split(/\r?\n/)) {
|
|
12
|
-
const trimmed = line.trim();
|
|
13
|
-
if (!trimmed)
|
|
14
|
-
continue;
|
|
15
|
-
return trimmed.length > max ? `${trimmed.slice(0, max)}\u2026` : trimmed;
|
|
16
|
-
}
|
|
17
|
-
return "";
|
|
18
|
-
}
|
|
19
|
-
function processCutShort(result) {
|
|
20
|
-
return Boolean(result.error || result.signal) || (result.status ?? null) === null;
|
|
21
|
-
}
|
|
22
|
-
function classifyRunOutcome(input) {
|
|
23
|
-
const { result, exitCodes, reportMissing } = input;
|
|
24
|
-
const status = result.status ?? null;
|
|
25
|
-
const signal = result.signal ?? null;
|
|
26
|
-
const output = input.output ?? result.stdout;
|
|
27
|
-
const base = {
|
|
28
|
-
status,
|
|
29
|
-
signal,
|
|
30
|
-
firstOutputLine: firstOutputLine(result.stderr) || firstOutputLine(result.stdout) || firstOutputLine(result.error?.message),
|
|
31
|
-
// Evidence carried alongside the verdict, never part of deciding it — the
|
|
32
|
-
// branches below are byte-for-byte the pre-#2100 rules.
|
|
33
|
-
outputCapped: truncatedByOutputCap(result)
|
|
34
|
-
};
|
|
35
|
-
if (processCutShort(result) || status === null) {
|
|
36
|
-
return { kind: "did-not-run", ...base };
|
|
37
|
-
}
|
|
38
|
-
if (reportMissing) {
|
|
39
|
-
return status === 0 ? { kind: "ran", ...base } : { kind: "report-missing", ...base };
|
|
40
|
-
}
|
|
41
|
-
if (status !== 0 && exitCodes && !exitCodes.ran.includes(status)) {
|
|
42
|
-
return { kind: "rejected-invocation", ...base };
|
|
43
|
-
}
|
|
44
|
-
if (status !== 0 && !output?.trim()) {
|
|
45
|
-
return { kind: "did-not-run", ...base };
|
|
46
|
-
}
|
|
47
|
-
return { kind: "ran", ...base };
|
|
48
|
-
}
|
|
49
|
-
function spawnFailedWithNoOutput(result, output = result.stdout) {
|
|
50
|
-
return classifyRunOutcome({ result, output }).kind !== "ran" && !output?.trim();
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export {
|
|
54
|
-
firstOutputLine,
|
|
55
|
-
processCutShort,
|
|
56
|
-
classifyRunOutcome,
|
|
57
|
-
spawnFailedWithNoOutput
|
|
58
|
-
};
|
package/dist/chunk-KXF5R4UN.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
createNdjsonLogger,
|
|
4
|
-
getGlobalPiLensLogDir,
|
|
5
|
-
getMaxLogSizeMB,
|
|
6
|
-
getTurnId,
|
|
7
|
-
isTestMode
|
|
8
|
-
} from "./chunk-VSFLRN5Y.js";
|
|
9
|
-
|
|
10
|
-
// dist/clients/extension-log.js
|
|
11
|
-
import * as path from "node:path";
|
|
12
|
-
var EXTENSION_LOG_FILE = path.join(getGlobalPiLensLogDir(), "extension.log");
|
|
13
|
-
var writer = createNdjsonLogger({
|
|
14
|
-
filePath: EXTENSION_LOG_FILE,
|
|
15
|
-
maxBytes: getMaxLogSizeMB() * 1024 * 1024
|
|
16
|
-
});
|
|
17
|
-
function logExtension(entry) {
|
|
18
|
-
if (isTestMode())
|
|
19
|
-
return;
|
|
20
|
-
writer.log({
|
|
21
|
-
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
22
|
-
pid: process.pid,
|
|
23
|
-
turnId: getTurnId(),
|
|
24
|
-
level: entry.level ?? "error",
|
|
25
|
-
subsystem: entry.subsystem,
|
|
26
|
-
message: entry.message,
|
|
27
|
-
...entry.metadata ? { metadata: entry.metadata } : {}
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function createSubsystemLogger(subsystem, defaultLevel = "debug") {
|
|
31
|
-
const at = (level) => (message, metadata) => {
|
|
32
|
-
logExtension({ subsystem, message, level, metadata });
|
|
33
|
-
};
|
|
34
|
-
const logger = at(defaultLevel);
|
|
35
|
-
logger.error = at("error");
|
|
36
|
-
logger.warn = at("warn");
|
|
37
|
-
logger.debug = at("debug");
|
|
38
|
-
return logger;
|
|
39
|
-
}
|
|
40
|
-
function flushExtensionLog() {
|
|
41
|
-
return writer.flush();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export {
|
|
45
|
-
logExtension,
|
|
46
|
-
createSubsystemLogger,
|
|
47
|
-
flushExtensionLog
|
|
48
|
-
};
|
package/dist/chunk-LSC3VADM.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
computeImpactCascade,
|
|
4
|
-
computeTransitiveImpact
|
|
5
|
-
} from "./chunk-EAOK7MIZ.js";
|
|
6
|
-
import "./chunk-DH5JPM3K.js";
|
|
7
|
-
import "./chunk-ZKXQKGWZ.js";
|
|
8
|
-
import "./chunk-YVHBNSME.js";
|
|
9
|
-
import "./chunk-KPPJTH44.js";
|
|
10
|
-
import "./chunk-J6JP25XU.js";
|
|
11
|
-
import "./chunk-U5HPROLA.js";
|
|
12
|
-
import "./chunk-WME2OQST.js";
|
|
13
|
-
import "./chunk-KXF5R4UN.js";
|
|
14
|
-
import "./chunk-S26LC76R.js";
|
|
15
|
-
import "./chunk-Z2XAOKHK.js";
|
|
16
|
-
import "./chunk-VSFLRN5Y.js";
|
|
17
|
-
import "./chunk-LJDODBBZ.js";
|
|
18
|
-
import "./chunk-PQJFG24Z.js";
|
|
19
|
-
import "./chunk-NXL4FFQQ.js";
|
|
20
|
-
export {
|
|
21
|
-
computeImpactCascade,
|
|
22
|
-
computeTransitiveImpact
|
|
23
|
-
};
|