@codyswann/lisa 4.17.0 → 4.17.2
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/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +10 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +8 -5
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/expo/copy-overwrite/scripts/check-lighthouse-details.mjs +183 -0
- package/expo/create-only/lighthouserc-config.json +2 -1
- package/expo/create-only/lighthouserc.js +7 -0
- package/expo/package-lisa/package.lisa.json +1 -1
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/scripts/two-channel-couplings.json +1 -1
- package/typescript/copy-overwrite/.prettierignore +1 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// This file is managed by Lisa and IS replaced on each `lisa` run.
|
|
3
|
+
// Do not edit directly — durable changes belong upstream in Lisa.
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Enforce performance budgets whose measurements Lighthouse CI cannot assert.
|
|
7
|
+
*
|
|
8
|
+
* `forced-reflow-insight` exposes its useful duration only in a nested detail
|
|
9
|
+
* table. Its score is effectively binary, so a score floor makes unchanged
|
|
10
|
+
* pages alternate between green and red as runner timing changes. LHCI writes
|
|
11
|
+
* the measurement into each LHR; this checker applies a real millisecond
|
|
12
|
+
* ceiling to every collected run.
|
|
13
|
+
* @module scripts/check-lighthouse-details
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import fs from "node:fs";
|
|
17
|
+
import path from "node:path";
|
|
18
|
+
|
|
19
|
+
const AUDIT_ID = "forced-reflow-insight";
|
|
20
|
+
const CONFIG_FILE = "lighthouserc-config.json";
|
|
21
|
+
const REPORT_DIRECTORY = ".lighthouseci";
|
|
22
|
+
const REPORT_PATTERN = /^lhr-.*\.json$/;
|
|
23
|
+
const DEFAULT_MAX_FORCED_REFLOW_MS = 100;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Read the bottom-up aggregate table from one forced-reflow audit.
|
|
27
|
+
* Lighthouse may prepend a top-level-function table derived from the same
|
|
28
|
+
* events, then appends the bottom-up aggregate. Summing every nested table
|
|
29
|
+
* would count those events twice.
|
|
30
|
+
* @param {unknown} details - Forced-reflow audit details
|
|
31
|
+
* @returns {number[]} Per-source aggregate measurements
|
|
32
|
+
*/
|
|
33
|
+
function readAggregateMeasurements(details) {
|
|
34
|
+
if (details === null || typeof details !== "object") {
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
37
|
+
const tables =
|
|
38
|
+
details.type === "table"
|
|
39
|
+
? [details]
|
|
40
|
+
: Array.isArray(details.items)
|
|
41
|
+
? details.items.filter(
|
|
42
|
+
item =>
|
|
43
|
+
item !== null && typeof item === "object" && item.type === "table"
|
|
44
|
+
)
|
|
45
|
+
: [];
|
|
46
|
+
const aggregate = tables.at(-1);
|
|
47
|
+
if (!aggregate || !Array.isArray(aggregate.items)) {
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
return aggregate.items.map((item, index) => {
|
|
51
|
+
const measurement = item?.reflowTime;
|
|
52
|
+
if (typeof measurement !== "number" || !Number.isFinite(measurement)) {
|
|
53
|
+
throw new Error(
|
|
54
|
+
`forced-reflow aggregate row ${index + 1} has no finite reflowTime`
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
return measurement;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Read the host threshold, falling back to Lisa's shipped default.
|
|
63
|
+
* @param {string} projectRoot - Host project root
|
|
64
|
+
* @returns {number} Maximum forced-reflow duration per Lighthouse run
|
|
65
|
+
*/
|
|
66
|
+
function readMaximum(projectRoot) {
|
|
67
|
+
const configPath = path.join(projectRoot, CONFIG_FILE);
|
|
68
|
+
if (!fs.existsSync(configPath)) {
|
|
69
|
+
return DEFAULT_MAX_FORCED_REFLOW_MS;
|
|
70
|
+
}
|
|
71
|
+
let config;
|
|
72
|
+
try {
|
|
73
|
+
config = JSON.parse(fs.readFileSync(configPath, "utf8"));
|
|
74
|
+
} catch (error) {
|
|
75
|
+
throw new Error(
|
|
76
|
+
`${CONFIG_FILE} is not valid JSON: ${error instanceof Error ? error.message : String(error)}`
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
const configured =
|
|
80
|
+
config?.assertions?.forcedReflowInsight?.maxNumericValue ??
|
|
81
|
+
DEFAULT_MAX_FORCED_REFLOW_MS;
|
|
82
|
+
if (
|
|
83
|
+
typeof configured !== "number" ||
|
|
84
|
+
!Number.isFinite(configured) ||
|
|
85
|
+
configured < 0
|
|
86
|
+
) {
|
|
87
|
+
throw new Error(
|
|
88
|
+
`${CONFIG_FILE} assertions.forcedReflowInsight.maxNumericValue must be a finite number at least 0`
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
return configured;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Load one Lighthouse result without allowing malformed evidence to pass.
|
|
96
|
+
* @param {string} reportPath - LHR path
|
|
97
|
+
* @returns {Record<string, unknown>} Parsed LHR
|
|
98
|
+
*/
|
|
99
|
+
function readReport(reportPath) {
|
|
100
|
+
try {
|
|
101
|
+
return JSON.parse(fs.readFileSync(reportPath, "utf8"));
|
|
102
|
+
} catch (error) {
|
|
103
|
+
throw new Error(
|
|
104
|
+
`${path.basename(reportPath)} is not a valid Lighthouse result: ${
|
|
105
|
+
error instanceof Error ? error.message : String(error)
|
|
106
|
+
}`
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Run the detail budget against the current project. */
|
|
112
|
+
function main() {
|
|
113
|
+
const projectRoot = process.cwd();
|
|
114
|
+
const maximum = readMaximum(projectRoot);
|
|
115
|
+
const reportDirectory = path.join(projectRoot, REPORT_DIRECTORY);
|
|
116
|
+
if (!fs.existsSync(reportDirectory)) {
|
|
117
|
+
throw new Error(
|
|
118
|
+
`${REPORT_DIRECTORY} is missing; Lighthouse produced no evidence`
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
const reportPaths = fs
|
|
122
|
+
.readdirSync(reportDirectory)
|
|
123
|
+
.filter(file => REPORT_PATTERN.test(file))
|
|
124
|
+
.sort()
|
|
125
|
+
.map(file => path.join(reportDirectory, file));
|
|
126
|
+
if (reportPaths.length === 0) {
|
|
127
|
+
throw new Error(`${REPORT_DIRECTORY} contains no Lighthouse result JSON`);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const failures = [];
|
|
131
|
+
let observedMaximum = 0;
|
|
132
|
+
for (const reportPath of reportPaths) {
|
|
133
|
+
const report = readReport(reportPath);
|
|
134
|
+
const audit = report?.audits?.[AUDIT_ID];
|
|
135
|
+
if (audit === null || typeof audit !== "object") {
|
|
136
|
+
failures.push(`${path.basename(reportPath)}: missing ${AUDIT_ID} audit`);
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
let measurements;
|
|
140
|
+
try {
|
|
141
|
+
measurements = readAggregateMeasurements(audit.details);
|
|
142
|
+
} catch (error) {
|
|
143
|
+
failures.push(
|
|
144
|
+
`${path.basename(reportPath)}: ${error instanceof Error ? error.message : String(error)}`
|
|
145
|
+
);
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
if (audit.score === 0 && measurements.length === 0) {
|
|
149
|
+
failures.push(
|
|
150
|
+
`${path.basename(reportPath)}: ${AUDIT_ID} failed without measurable reflowTime evidence`
|
|
151
|
+
);
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
const total = measurements.reduce(
|
|
155
|
+
(sum, measurement) => sum + measurement,
|
|
156
|
+
0
|
|
157
|
+
);
|
|
158
|
+
observedMaximum = Math.max(observedMaximum, total);
|
|
159
|
+
if (total > maximum) {
|
|
160
|
+
failures.push(
|
|
161
|
+
`${report.finalUrl ?? path.basename(reportPath)}: ${total.toFixed(1)} ms exceeds ${maximum} ms`
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (failures.length > 0) {
|
|
167
|
+
throw new Error(
|
|
168
|
+
`forced-reflow detail budget failed:\n${failures.map(failure => `- ${failure}`).join("\n")}`
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
console.log(
|
|
172
|
+
`lighthouse detail budget passed: ${reportPaths.length} report(s), forced reflow <= ${maximum} ms (max ${observedMaximum.toFixed(1)} ms)`
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
try {
|
|
177
|
+
main();
|
|
178
|
+
} catch (error) {
|
|
179
|
+
console.error(
|
|
180
|
+
`lighthouse detail budget failed: ${error instanceof Error ? error.message : String(error)}`
|
|
181
|
+
);
|
|
182
|
+
process.exitCode = 1;
|
|
183
|
+
}
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"legacyJavascriptInsight": { "minScore": 0.4 },
|
|
29
29
|
"speedIndex": { "minScore": 0.9 },
|
|
30
30
|
"networkDependencyTreeInsight": { "minScore": 0.9 },
|
|
31
|
-
"duplicatedJavascriptInsight": { "minScore": 0.9 }
|
|
31
|
+
"duplicatedJavascriptInsight": { "minScore": 0.9 },
|
|
32
|
+
"forcedReflowInsight": { "maxNumericValue": 100 }
|
|
32
33
|
}
|
|
33
34
|
}
|
|
@@ -76,6 +76,7 @@ const defaults = {
|
|
|
76
76
|
speedIndex: { minScore: 0.9 },
|
|
77
77
|
networkDependencyTreeInsight: { minScore: 0.9 },
|
|
78
78
|
duplicatedJavascriptInsight: { minScore: 0.9 },
|
|
79
|
+
forcedReflowInsight: { maxNumericValue: 100 },
|
|
79
80
|
},
|
|
80
81
|
};
|
|
81
82
|
|
|
@@ -141,6 +142,7 @@ const handledKeys = new Set([
|
|
|
141
142
|
"fontDisplayInsight",
|
|
142
143
|
"networkDependencyTreeInsight",
|
|
143
144
|
"duplicatedJavascriptInsight",
|
|
145
|
+
"forcedReflowInsight",
|
|
144
146
|
]);
|
|
145
147
|
|
|
146
148
|
/**
|
|
@@ -283,6 +285,11 @@ module.exports = {
|
|
|
283
285
|
"warn",
|
|
284
286
|
assertionOptions(a.duplicatedJavascriptInsight),
|
|
285
287
|
],
|
|
288
|
+
// Lighthouse exposes forced-reflow duration only in a nested detail
|
|
289
|
+
// table, while the preset assertion sees an all-or-nothing score. The
|
|
290
|
+
// shipped detail-budget checker enforces the configured millisecond
|
|
291
|
+
// ceiling after LHCI writes its reports.
|
|
292
|
+
"forced-reflow-insight": "off",
|
|
286
293
|
|
|
287
294
|
// Dynamic overrides for any extra config keys not handled above.
|
|
288
295
|
// Projects can tune or disable any preset assertion by adding it
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"force": {
|
|
3
3
|
"scripts": {
|
|
4
4
|
"setup:deploy-key": "setup-deploy-key",
|
|
5
|
-
"lighthouse:check": "lhci autorun --collect.settings.chromeFlags='--no-sandbox --disable-gpu --headless'",
|
|
5
|
+
"lighthouse:check": "lhci autorun --collect.settings.chromeFlags='--no-sandbox --disable-gpu --headless' --assert.assertions.forced-reflow-insight=off && node scripts/check-lighthouse-details.mjs",
|
|
6
6
|
"playwright:build": "expo export --platform web",
|
|
7
7
|
"playwright:test": "bun run playwright:build && playwright test",
|
|
8
8
|
"playwright:test:ui": "bun run playwright:build && playwright test --ui",
|
package/package.json
CHANGED
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"zod-validation-error": "^4.0.0"
|
|
153
153
|
},
|
|
154
154
|
"name": "@codyswann/lisa",
|
|
155
|
-
"version": "4.17.
|
|
155
|
+
"version": "4.17.2",
|
|
156
156
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
157
157
|
"main": "dist/index.js",
|
|
158
158
|
"exports": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.2",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.2",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.2",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.2",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.2",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|