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-Z2XAOKHK.js
DELETED
|
@@ -1,136 +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
|
-
import {
|
|
10
|
-
normalizeLoggedPath
|
|
11
|
-
} from "./chunk-PQJFG24Z.js";
|
|
12
|
-
|
|
13
|
-
// dist/clients/latency-logger.js
|
|
14
|
-
import * as path from "node:path";
|
|
15
|
-
var LATENCY_LOG_DIR = getGlobalPiLensLogDir();
|
|
16
|
-
var LATENCY_LOG_FILE = path.join(LATENCY_LOG_DIR, "latency.log");
|
|
17
|
-
var writer = createNdjsonLogger({
|
|
18
|
-
filePath: LATENCY_LOG_FILE,
|
|
19
|
-
maxBytes: getMaxLogSizeMB() * 1024 * 1024
|
|
20
|
-
});
|
|
21
|
-
var RECENT_PHASE_CAP = 5;
|
|
22
|
-
var recentPhases = [];
|
|
23
|
-
var LAST_PHASE_EXCLUDED = /* @__PURE__ */ new Set([
|
|
24
|
-
"loop_block",
|
|
25
|
-
"lsp_typescript_project_identity",
|
|
26
|
-
"advisory_provenance_decision",
|
|
27
|
-
"authoritative_content_attachment_decision",
|
|
28
|
-
"agent_end_deferred_mutation_drain",
|
|
29
|
-
"agent_end_deferred_mutation_requeue",
|
|
30
|
-
"session_end_bus_rollup",
|
|
31
|
-
"cache_usage_summary",
|
|
32
|
-
"test_runner_failed_target_state",
|
|
33
|
-
"turn_end_test_selection",
|
|
34
|
-
"lsp_aux_wait_outcome",
|
|
35
|
-
"tool_set_mutation",
|
|
36
|
-
"tool_set_decision",
|
|
37
|
-
"availability_decision",
|
|
38
|
-
"finding_dead_path_drop",
|
|
39
|
-
"finding_stale_line_demote",
|
|
40
|
-
"finding_path_stat_budget_exhausted",
|
|
41
|
-
"lsp_scanner_coverage_gap",
|
|
42
|
-
"lsp_notify_resync_deferred",
|
|
43
|
-
"lsp_notify_write_late_landed",
|
|
44
|
-
"lsp_notify_stall_cpu_busy",
|
|
45
|
-
"degradation_ledger",
|
|
46
|
-
"path_attribution_verified_rollup",
|
|
47
|
-
"concurrent_session_bind_rollup",
|
|
48
|
-
"auxiliary_readiness",
|
|
49
|
-
"lsp_empty_first_publish_held",
|
|
50
|
-
"lsp_diagnostics_fence",
|
|
51
|
-
"lsp_rules_refreshed",
|
|
52
|
-
"read_guard_conversation_read",
|
|
53
|
-
"read_widening_note",
|
|
54
|
-
"session_handoff_slot",
|
|
55
|
-
"session_handoff_adopt",
|
|
56
|
-
"session_store_action",
|
|
57
|
-
"session_end_fence_rollup",
|
|
58
|
-
"session_handoff_turn_state",
|
|
59
|
-
"format_late_resync_chained",
|
|
60
|
-
"lsp_created_import_scan_rollup"
|
|
61
|
-
]);
|
|
62
|
-
var liveBrackets = /* @__PURE__ */ new Map();
|
|
63
|
-
var closedBrackets = [];
|
|
64
|
-
function phaseStarted(phase) {
|
|
65
|
-
const token = { phase, startedAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
66
|
-
liveBrackets.set(token, true);
|
|
67
|
-
return token;
|
|
68
|
-
}
|
|
69
|
-
function phaseFinished(token) {
|
|
70
|
-
if (!liveBrackets.delete(token))
|
|
71
|
-
return;
|
|
72
|
-
closedBrackets = [
|
|
73
|
-
{
|
|
74
|
-
phase: token.phase,
|
|
75
|
-
startedAt: token.startedAt,
|
|
76
|
-
closedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
77
|
-
},
|
|
78
|
-
...closedBrackets
|
|
79
|
-
].slice(0, RECENT_PHASE_CAP);
|
|
80
|
-
}
|
|
81
|
-
var oncePerSessionPhases = /* @__PURE__ */ new Set();
|
|
82
|
-
var sessionRecordSeq = 0;
|
|
83
|
-
function mintSessionRecordId() {
|
|
84
|
-
sessionRecordSeq += 1;
|
|
85
|
-
return `${process.pid.toString(36)}-${Date.now().toString(36)}-${sessionRecordSeq.toString(36)}`;
|
|
86
|
-
}
|
|
87
|
-
var sessionRecordId = mintSessionRecordId();
|
|
88
|
-
function currentSessionRecordId() {
|
|
89
|
-
return sessionRecordId;
|
|
90
|
-
}
|
|
91
|
-
function claimKey(phase, scope) {
|
|
92
|
-
return `${phase}\0${scope}`;
|
|
93
|
-
}
|
|
94
|
-
function claimPhaseOncePerSession(phase, scope) {
|
|
95
|
-
const key = claimKey(phase, scope);
|
|
96
|
-
if (oncePerSessionPhases.has(key))
|
|
97
|
-
return false;
|
|
98
|
-
oncePerSessionPhases.add(key);
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
function releasePhaseClaim(phase, scope) {
|
|
102
|
-
oncePerSessionPhases.delete(claimKey(phase, scope));
|
|
103
|
-
}
|
|
104
|
-
function logLatency(entry) {
|
|
105
|
-
const ts = (/* @__PURE__ */ new Date()).toISOString();
|
|
106
|
-
if (entry.type === "phase" && entry.phase && !LAST_PHASE_EXCLUDED.has(entry.phase)) {
|
|
107
|
-
recentPhases = [
|
|
108
|
-
{
|
|
109
|
-
phase: entry.phase,
|
|
110
|
-
ts,
|
|
111
|
-
...entry.toolName !== void 0 && { toolName: entry.toolName },
|
|
112
|
-
...entry.metadata !== void 0 && { metadata: entry.metadata }
|
|
113
|
-
},
|
|
114
|
-
...recentPhases
|
|
115
|
-
].slice(0, RECENT_PHASE_CAP);
|
|
116
|
-
}
|
|
117
|
-
if (isTestMode()) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
writer.log({
|
|
121
|
-
...entry,
|
|
122
|
-
ts,
|
|
123
|
-
pid: process.pid,
|
|
124
|
-
turnId: entry.turnId ?? getTurnId(),
|
|
125
|
-
filePath: normalizeLoggedPath(entry.filePath)
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export {
|
|
130
|
-
phaseStarted,
|
|
131
|
-
phaseFinished,
|
|
132
|
-
currentSessionRecordId,
|
|
133
|
-
claimPhaseOncePerSession,
|
|
134
|
-
releasePhaseClaim,
|
|
135
|
-
logLatency
|
|
136
|
-
};
|