@codyswann/lisa 4.103.11 → 4.103.12
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/codex/scripts/block-suppress-directives.sh +120 -26
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +4 -1
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/opencode/plugin-templates/lisa-block-suppress-directives.ts +72 -22
- package/package.json +4 -4
- 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-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-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-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-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-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-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-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-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-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-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-openclaw-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-devin/.devin-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-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-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-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-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/hooks/block-suppress-directives.sh +104 -14
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/hooks/block-suppress-directives.sh +104 -14
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/hooks/block-suppress-directives.sh +104 -14
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/hooks/block-suppress-directives.sh +104 -14
- 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/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/typescript/hooks/block-suppress-directives.sh +104 -14
|
@@ -7,51 +7,101 @@
|
|
|
7
7
|
* underlying error. @ts-expect-error is intentionally NOT matched (it is the
|
|
8
8
|
* safer alternative).
|
|
9
9
|
*
|
|
10
|
+
* Refuses directive GROWTH, not presence (CodySwannGT/lisa#4492): a directive
|
|
11
|
+
* in the after text that the before text lacks (new, another copy, or reworded)
|
|
12
|
+
* refuses. `write` judges the whole file (disk vs content); `edit` judges only
|
|
13
|
+
* the replaced fragment (oldString vs newString), so a widening done purely by
|
|
14
|
+
* deleting text from an existing directive, or a directive assembled across
|
|
15
|
+
* separate edits, is NOT detected — a pre-existing limit, shared with the
|
|
16
|
+
* presence check this replaced. Each directive is taken from its comment
|
|
17
|
+
* opener to the end of its line. A `write` over something
|
|
18
|
+
* that exists but cannot be read, or an `edit` that brings a directive with no
|
|
19
|
+
* `oldString`, cannot be judged and is refused.
|
|
20
|
+
*
|
|
10
21
|
* Port of Lisa's Codex hook `block-suppress-directives.sh`. OpenCode exposes
|
|
11
22
|
* `edit` (oldString/newString) and `write` (content) tools — there is no
|
|
12
|
-
* multi-file apply_patch — so the
|
|
13
|
-
* Throwing in `tool.execute.before` cancels the call and
|
|
14
|
-
* to the agent (verified-by-run on opencode 1.16.2).
|
|
23
|
+
* MultiEdit and no multi-file apply_patch — so the texts come straight from
|
|
24
|
+
* the tool args. Throwing in `tool.execute.before` cancels the call and
|
|
25
|
+
* surfaces the message to the agent (verified-by-run on opencode 1.16.2).
|
|
15
26
|
*
|
|
16
27
|
* NOTE: This file is a template Lisa copies verbatim into a host project's
|
|
17
28
|
* `.opencode/plugin/`. It is intentionally excluded from this repo's tsconfig
|
|
18
29
|
* and eslint config — it runs under OpenCode's Bun runtime, not here.
|
|
19
30
|
*/
|
|
20
|
-
export const LisaBlockSuppressDirectives = async (
|
|
31
|
+
export const LisaBlockSuppressDirectives = async ({
|
|
32
|
+
directory,
|
|
33
|
+
}: { directory?: string } = {}) => {
|
|
21
34
|
// Comment-syntax-only match: // or /* opener, optional whitespace, directive.
|
|
22
35
|
const DIRECTIVE_RE =
|
|
23
|
-
/(\/\/|\/\*)\s*(@ts-(ignore|nocheck)|eslint-disable|biome-ignore|prettier-ignore)
|
|
36
|
+
/(\/\/|\/\*)\s*(@ts-(ignore|nocheck)|eslint-disable|biome-ignore|prettier-ignore).*/g;
|
|
24
37
|
const JS_TS = new Set(["ts", "tsx", "js", "jsx", "mjs", "cjs"]);
|
|
25
38
|
const extOf = (p: string) => p.split(".").pop()?.toLowerCase() ?? "";
|
|
39
|
+
const directivesIn = (text: string) =>
|
|
40
|
+
(text.match(DIRECTIVE_RE) ?? []).map(d => d.trimEnd());
|
|
41
|
+
// True when `after` carries a directive `before` does not, counting copies.
|
|
42
|
+
const grows = (before: string, after: string) => {
|
|
43
|
+
const remaining = directivesIn(before);
|
|
44
|
+
return directivesIn(after).some(d => {
|
|
45
|
+
const at = remaining.indexOf(d);
|
|
46
|
+
if (at === -1) return true;
|
|
47
|
+
remaining.splice(at, 1);
|
|
48
|
+
return false;
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
// The file a write replaces; "" when absent, undefined when unreadable.
|
|
52
|
+
const readBefore = async (filePath: string) => {
|
|
53
|
+
const { lstat, readFile } = await import("node:fs/promises");
|
|
54
|
+
const { resolve } = await import("node:path");
|
|
55
|
+
const target = resolve(directory ?? process.cwd(), filePath);
|
|
56
|
+
const exists = await lstat(target).then(
|
|
57
|
+
() => true,
|
|
58
|
+
() => false
|
|
59
|
+
);
|
|
60
|
+
if (!exists) return "";
|
|
61
|
+
return readFile(target, "utf8").catch(() => undefined);
|
|
62
|
+
};
|
|
63
|
+
const refusal = (filePath: string) =>
|
|
64
|
+
new Error(
|
|
65
|
+
[
|
|
66
|
+
`block-suppress-directives: refusing to add an error-suppression directive to ${filePath}.`,
|
|
67
|
+
"",
|
|
68
|
+
"@ts-ignore / @ts-nocheck / eslint-disable / biome-ignore / prettier-ignore",
|
|
69
|
+
"silence the type checker, linter, or formatter instead of fixing the problem.",
|
|
70
|
+
"Fix the underlying type/lint error — add the missing annotation, narrow the",
|
|
71
|
+
"type, or restructure the code so the rule passes.",
|
|
72
|
+
"",
|
|
73
|
+
"Suppression is a last resort. If there is genuinely no other way, STOP and get",
|
|
74
|
+
"the user's approval first, prefer @ts-expect-error over @ts-ignore, scope the",
|
|
75
|
+
'disable to one line and one rule, and add a "-- <reason>" description.',
|
|
76
|
+
].join("\n")
|
|
77
|
+
);
|
|
26
78
|
return {
|
|
27
79
|
"tool.execute.before": async (
|
|
28
80
|
input: { tool: string },
|
|
29
81
|
output: {
|
|
30
|
-
args?: {
|
|
82
|
+
args?: {
|
|
83
|
+
filePath?: string;
|
|
84
|
+
content?: string;
|
|
85
|
+
oldString?: string;
|
|
86
|
+
newString?: string;
|
|
87
|
+
};
|
|
31
88
|
}
|
|
32
89
|
) => {
|
|
33
90
|
if (input.tool !== "edit" && input.tool !== "write") return;
|
|
34
91
|
const filePath = String(output.args?.filePath ?? "");
|
|
35
92
|
if (!filePath || !JS_TS.has(extOf(filePath))) return;
|
|
36
|
-
const
|
|
93
|
+
const after =
|
|
37
94
|
input.tool === "write"
|
|
38
95
|
? String(output.args?.content ?? "")
|
|
39
96
|
: String(output.args?.newString ?? "");
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"type, or restructure the code so the rule passes.",
|
|
49
|
-
"",
|
|
50
|
-
"Suppression is a last resort. If there is genuinely no other way, STOP and get",
|
|
51
|
-
"the user's approval first, prefer @ts-expect-error over @ts-ignore, scope the",
|
|
52
|
-
'disable to one line and one rule, and add a "-- <reason>" description.',
|
|
53
|
-
].join("\n")
|
|
54
|
-
);
|
|
97
|
+
if (directivesIn(after).length === 0) return;
|
|
98
|
+
const before =
|
|
99
|
+
input.tool === "write"
|
|
100
|
+
? await readBefore(filePath)
|
|
101
|
+
: output.args?.oldString;
|
|
102
|
+
if (typeof before !== "string" || grows(before, after)) {
|
|
103
|
+
throw refusal(filePath);
|
|
104
|
+
}
|
|
55
105
|
},
|
|
56
106
|
};
|
|
57
107
|
};
|
package/package.json
CHANGED
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
"qs": "^6.16.0"
|
|
195
195
|
},
|
|
196
196
|
"name": "@codyswann/lisa",
|
|
197
|
-
"version": "4.103.
|
|
197
|
+
"version": "4.103.12",
|
|
198
198
|
"description": "Governance-as-code for AI coding agents: turns a repository into agent-operated software factories with guardrails, guidance and automated enforcement for Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot and Devin",
|
|
199
199
|
"main": "dist/index.js",
|
|
200
200
|
"exports": {
|
|
@@ -357,7 +357,7 @@
|
|
|
357
357
|
"test": "tests"
|
|
358
358
|
},
|
|
359
359
|
"types": "./dist/index.d.ts",
|
|
360
|
-
"lisaReleaseCommit": "
|
|
361
|
-
"gitHead": "
|
|
362
|
-
"lisaReleaseTag": "v4.103.
|
|
360
|
+
"lisaReleaseCommit": "62a5afdfc706801b80d2f4c4de69fc7f552a44b0",
|
|
361
|
+
"gitHead": "62a5afdfc706801b80d2f4c4de69fc7f552a44b0",
|
|
362
|
+
"lisaReleaseTag": "v4.103.12"
|
|
363
363
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.103.
|
|
3
|
+
"version": "4.103.12",
|
|
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.103.
|
|
3
|
+
"version": "4.103.12",
|
|
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.103.
|
|
3
|
+
"version": "4.103.12",
|
|
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.103.
|
|
3
|
+
"version": "4.103.12",
|
|
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.103.
|
|
3
|
+
"version": "4.103.12",
|
|
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.103.
|
|
3
|
+
"version": "4.103.12",
|
|
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.103.
|
|
3
|
+
"version": "4.103.12",
|
|
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"
|