@codyswann/lisa 2.106.8 → 2.107.0
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/hooks-installer.d.ts.map +1 -1
- package/dist/codex/hooks-installer.js +8 -0
- package/dist/codex/hooks-installer.js.map +1 -1
- package/dist/codex/scripts/block-suppress-directives.sh +96 -0
- 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/rules/base-rules.md +1 -1
- package/plugins/lisa/scripts/automation-status-codex-adapter.mjs +72 -2
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-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-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-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-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-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-typescript/.claude-plugin/plugin.json +13 -2
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/hooks/block-suppress-directives.sh +73 -0
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/src/base/rules/base-rules.md +1 -1
- package/plugins/src/base/scripts/automation-status-codex-adapter.mjs +72 -2
- package/plugins/src/typescript/.claude-plugin/plugin.json +9 -1
- package/plugins/src/typescript/hooks/block-suppress-directives.sh +73 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks-installer.d.ts","sourceRoot":"","sources":["../../src/codex/hooks-installer.ts"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAUrD,kEAAkE;AAClE,eAAO,MAAM,iBAAiB,QAA6B,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,cAAc,2BAA2B,CAAC;AAEvD,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAE9C,+DAA+D;AAC/D,eAAO,MAAM,cAAc,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"hooks-installer.d.ts","sourceRoot":"","sources":["../../src/codex/hooks-installer.ts"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAUrD,kEAAkE;AAClE,eAAO,MAAM,iBAAiB,QAA6B,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,cAAc,2BAA2B,CAAC;AAEvD,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAE9C,+DAA+D;AAC/D,eAAO,MAAM,cAAc,eAAe,CAAC;AAkI3C,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC,yEAAyE;IACzE,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,0DAA0D;IAC1D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,SAAS,WAAW,EAAE,GACpC,OAAO,CAAC,kBAAkB,CAAC,CA4D7B"}
|
|
@@ -140,6 +140,14 @@ const HOOK_CATALOG = [
|
|
|
140
140
|
forProjectTypes: ["nestjs"],
|
|
141
141
|
needsEditPathLib: true,
|
|
142
142
|
},
|
|
143
|
+
{
|
|
144
|
+
id: "block-suppress-directives",
|
|
145
|
+
event: "PreToolUse",
|
|
146
|
+
matcher: WRITE_MATCHER,
|
|
147
|
+
scriptFilename: "block-suppress-directives.sh",
|
|
148
|
+
forProjectTypes: ["typescript"],
|
|
149
|
+
statusMessage: "Checking for error-suppression directives",
|
|
150
|
+
},
|
|
143
151
|
];
|
|
144
152
|
/**
|
|
145
153
|
* Install Lisa hook scripts + rules + hooks.json entries.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks-installer.js","sourceRoot":"","sources":["../../src/codex/hooks-installer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,EACL,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAIL,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAE3B,kEAAkE;AAClE,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,wBAAwB,CAAC;AAEvD,kFAAkF;AAClF,MAAM,CAAC,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAE9C,+DAA+D;AAC/D,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC;AAE3C;;;;GAIG;AACH,MAAM,aAAa,GAAG,wBAAwB,CAAC;AAwB/C;;;;;;;;GAQG;AACH,MAAM,YAAY,GAAgC;IAChD;QACE,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,cAAc;QACrB,OAAO,EAAE,EAAE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AAC,IAAI,KAAK,QAAQ,CAAC,MAAM,EAAE,CAAC;QAC/C,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAC7B,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,CAClD,CAAC;QACF,MAAM,IAAI,KAAK,CACb,iCAAiC,SAAS,IAAI,SAAS,oCAAoC,CAC5F,CAAC;IACJ,CAAC;IAED,mEAAmE;IACnE,MAAM,OAAO,CAAC,GAAG,CACf,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,CACzC,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CACf,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CACpE,CACF,CACF,CACF,CAAC;IAEF,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Lisa-managed Codex hook script (PreToolUse Edit|Write|apply_patch).
|
|
3
|
+
# Blocks adding error-suppression directives (@ts-ignore, @ts-nocheck,
|
|
4
|
+
# eslint-disable, biome-ignore, prettier-ignore) to JS/TS source. Suppressing
|
|
5
|
+
# the type checker, linter, or formatter hides real defects — fix the
|
|
6
|
+
# underlying error. Suppression is a last resort: when genuinely unavoidable
|
|
7
|
+
# the agent should stop and get the user's approval rather than slip it past.
|
|
8
|
+
#
|
|
9
|
+
# Codex blocks the tool call when the script exits 2 with a deny message on
|
|
10
|
+
# stderr. apply_patch carries the whole diff as a STRING under
|
|
11
|
+
# tool_input.command (verified against codex-cli 0.125.0), so we walk the patch
|
|
12
|
+
# and inspect added (`+`) lines under JS/TS file headers. Edit/Write inspect the
|
|
13
|
+
# new text directly. Only comment-syntax matches count, so prose/strings that
|
|
14
|
+
# merely mention these tokens are not flagged.
|
|
15
|
+
set -uo pipefail
|
|
16
|
+
|
|
17
|
+
JSON_INPUT="$(cat)"
|
|
18
|
+
|
|
19
|
+
# Project rule: never parse JSON with grep/sed/cut/awk — use jq. Fail open.
|
|
20
|
+
command -v jq >/dev/null 2>&1 || exit 0
|
|
21
|
+
|
|
22
|
+
# Comment-syntax-only match: // or /* opener, optional whitespace, directive.
|
|
23
|
+
# @ts-expect-error is intentionally NOT matched — it is the safer alternative.
|
|
24
|
+
DIRECTIVE_RE='(//|/\*)[[:space:]]*(@ts-(ignore|nocheck)|eslint-disable|biome-ignore|prettier-ignore)'
|
|
25
|
+
|
|
26
|
+
# True only for JS/TS file extensions.
|
|
27
|
+
is_js_ts() {
|
|
28
|
+
case "${1##*.}" in
|
|
29
|
+
ts | tsx | js | jsx | mjs | cjs) return 0 ;;
|
|
30
|
+
*) return 1 ;;
|
|
31
|
+
esac
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
deny() {
|
|
35
|
+
cat >&2 <<MSG
|
|
36
|
+
⚠ block-suppress-directives: refusing to add an error-suppression directive to ${1}.
|
|
37
|
+
|
|
38
|
+
@ts-ignore / @ts-nocheck / eslint-disable / biome-ignore / prettier-ignore
|
|
39
|
+
silence the type checker, linter, or formatter instead of fixing the problem.
|
|
40
|
+
Fix the underlying type/lint error instead — add the missing annotation, narrow
|
|
41
|
+
the type, or restructure the code so the rule passes.
|
|
42
|
+
|
|
43
|
+
Suppression is a last resort. If there is genuinely no other way, STOP and get
|
|
44
|
+
the user's approval first, prefer @ts-expect-error over @ts-ignore, scope the
|
|
45
|
+
disable to one line and one rule, and add a "-- <reason>" description.
|
|
46
|
+
MSG
|
|
47
|
+
exit 2
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
TOOL_NAME="$(printf '%s' "$JSON_INPUT" | jq -r '.tool_name // .tool // empty')"
|
|
51
|
+
|
|
52
|
+
if [ "$TOOL_NAME" = "apply_patch" ]; then
|
|
53
|
+
PATCH_TEXT="$(printf '%s' "$JSON_INPUT" | jq -r '.tool_input.command // empty')"
|
|
54
|
+
[ -n "$PATCH_TEXT" ] || exit 0
|
|
55
|
+
current_file=""
|
|
56
|
+
while IFS= read -r line; do
|
|
57
|
+
case "$line" in
|
|
58
|
+
"*** Add File: "* | "*** Update File: "*)
|
|
59
|
+
current_file="${line#*File: }"
|
|
60
|
+
;;
|
|
61
|
+
"*** Delete File: "* | "*** Begin Patch"* | "*** End Patch"*)
|
|
62
|
+
current_file=""
|
|
63
|
+
;;
|
|
64
|
+
"+"*)
|
|
65
|
+
[ -n "$current_file" ] || continue
|
|
66
|
+
is_js_ts "$current_file" || continue
|
|
67
|
+
# Strip the single leading '+' that marks an added line.
|
|
68
|
+
added="${line#+}"
|
|
69
|
+
if printf '%s' "$added" | grep -Eq "$DIRECTIVE_RE"; then
|
|
70
|
+
deny "$current_file"
|
|
71
|
+
fi
|
|
72
|
+
;;
|
|
73
|
+
esac
|
|
74
|
+
done <<EOF
|
|
75
|
+
$PATCH_TEXT
|
|
76
|
+
EOF
|
|
77
|
+
exit 0
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
# Edit / Write
|
|
81
|
+
FILE_PATH="$(printf '%s' "$JSON_INPUT" | jq -r '.tool_input.file_path // empty')"
|
|
82
|
+
[ -n "$FILE_PATH" ] || exit 0
|
|
83
|
+
is_js_ts "$FILE_PATH" || exit 0
|
|
84
|
+
|
|
85
|
+
NEW_TEXT="$(printf '%s' "$JSON_INPUT" | jq -r '
|
|
86
|
+
.tool_input as $i
|
|
87
|
+
| if ($i.content // null) != null then $i.content
|
|
88
|
+
elif ($i.edits // null) != null then ([$i.edits[].new_string] | join("\n"))
|
|
89
|
+
elif ($i.new_string // null) != null then $i.new_string
|
|
90
|
+
else "" end')"
|
|
91
|
+
|
|
92
|
+
if printf '%s' "$NEW_TEXT" | grep -Eq "$DIRECTIVE_RE"; then
|
|
93
|
+
deny "$FILE_PATH"
|
|
94
|
+
fi
|
|
95
|
+
|
|
96
|
+
exit 0
|
package/package.json
CHANGED
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"lodash": ">=4.18.1"
|
|
83
83
|
},
|
|
84
84
|
"name": "@codyswann/lisa",
|
|
85
|
-
"version": "2.
|
|
85
|
+
"version": "2.107.0",
|
|
86
86
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
87
87
|
"main": "dist/index.js",
|
|
88
88
|
"exports": {
|
|
@@ -111,7 +111,7 @@ NEVER:
|
|
|
111
111
|
- Update CHANGELOG.
|
|
112
112
|
|
|
113
113
|
ASK FIRST:
|
|
114
|
-
- Before adding a lint suppression comment (e.g. eslint-disable, noqa, #[allow(...)], @SuppressWarnings). These should be a last resort.
|
|
114
|
+
- Before adding a lint or formatter suppression comment (e.g. eslint-disable, biome-ignore, prettier-ignore, noqa, #[allow(...)], @SuppressWarnings). These should be a last resort.
|
|
115
115
|
- Before adding a type-checking suppression comment (e.g. ts-ignore, ts-expect-error, ts-nocheck, type: ignore).
|
|
116
116
|
- Lint suppression in test files is acceptable without asking only when comprehensive test coverage requires it (e.g. file length limits) or when intentional duplication improves test isolation. Include matching re-enable comments where applicable.
|
|
117
117
|
|
|
@@ -26,6 +26,77 @@ const NEGATED_FAILURE_PATTERN =
|
|
|
26
26
|
/\b(no|without)\s+(?:recent\s+)?(?:fail(?:ure|ed)|errors?|exceptions?)\b/i;
|
|
27
27
|
const execFileAsync = promisify(execFile);
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Git location env vars that, when inherited, override the `-C <dir>` flag and
|
|
31
|
+
* cwd. When this adapter runs inside a Git hook (e.g. pre-push) these are
|
|
32
|
+
* exported by Git, so a `git -C <cwd> rev-parse` would answer about the hook's
|
|
33
|
+
* repository instead of the inspected automation cwd — misreporting every
|
|
34
|
+
* healthy automation as FAILING. They must be scrubbed so `-C`/cwd governs.
|
|
35
|
+
*/
|
|
36
|
+
const GIT_LOCATION_ENV_VARS = [
|
|
37
|
+
"GIT_DIR",
|
|
38
|
+
"GIT_WORK_TREE",
|
|
39
|
+
"GIT_INDEX_FILE",
|
|
40
|
+
"GIT_OBJECT_DIRECTORY",
|
|
41
|
+
"GIT_ALTERNATE_OBJECT_DIRECTORIES",
|
|
42
|
+
"GIT_COMMON_DIR",
|
|
43
|
+
"GIT_NAMESPACE",
|
|
44
|
+
"GIT_PREFIX",
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Process-spawn failures that are transient under heavy fork load (the OS could
|
|
49
|
+
* not start the child, not git reporting a result). Retrying these avoids
|
|
50
|
+
* misclassifying a healthy cwd as a `git_error` when the machine is saturated.
|
|
51
|
+
*/
|
|
52
|
+
const TRANSIENT_SPAWN_ERROR_CODES = new Set([
|
|
53
|
+
"EAGAIN",
|
|
54
|
+
"ENOMEM",
|
|
55
|
+
"EMFILE",
|
|
56
|
+
"ENFILE",
|
|
57
|
+
"ETXTBSY",
|
|
58
|
+
]);
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Build a git-safe environment: the ambient process env minus the location
|
|
62
|
+
* overrides so a `-C <dir>` invocation targets the intended directory.
|
|
63
|
+
*
|
|
64
|
+
* @returns {NodeJS.ProcessEnv}
|
|
65
|
+
*/
|
|
66
|
+
function gitEnvWithoutLocationOverrides() {
|
|
67
|
+
const env = { ...process.env };
|
|
68
|
+
for (const key of GIT_LOCATION_ENV_VARS) {
|
|
69
|
+
delete env[key];
|
|
70
|
+
}
|
|
71
|
+
return env;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Run `git` against an explicit directory, immune to inherited Git location env
|
|
76
|
+
* vars, with a bounded retry on transient process-spawn failures. A git process
|
|
77
|
+
* that actually ran — success or non-zero exit — is surfaced unchanged on the
|
|
78
|
+
* first attempt; only failures to launch the child at all are retried.
|
|
79
|
+
*
|
|
80
|
+
* @param {readonly string[]} args git arguments
|
|
81
|
+
* @param {import("node:child_process").ExecFileOptions} [options]
|
|
82
|
+
* @param {number} [attempts] maximum attempts (default 4)
|
|
83
|
+
* @returns {Promise<{ stdout: string, stderr: string }>}
|
|
84
|
+
*/
|
|
85
|
+
async function execGitWithRetry(args, options, attempts = 4) {
|
|
86
|
+
const mergedOptions = { ...options, env: gitEnvWithoutLocationOverrides() };
|
|
87
|
+
for (let attempt = 1; ; attempt += 1) {
|
|
88
|
+
try {
|
|
89
|
+
return await execFileAsync("git", args, mergedOptions);
|
|
90
|
+
} catch (error) {
|
|
91
|
+
const transient = TRANSIENT_SPAWN_ERROR_CODES.has(error?.code);
|
|
92
|
+
if (!transient || attempt >= attempts) {
|
|
93
|
+
throw error;
|
|
94
|
+
}
|
|
95
|
+
await new Promise(resolve => setTimeout(resolve, 2 ** attempt * 25));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
29
100
|
/**
|
|
30
101
|
* @typedef {import("./automation-status-expected-fleet.mjs").resolveExpectedAutomationFleet extends (...args: any[]) => infer T ? T : never} ExpectedFleet
|
|
31
102
|
*
|
|
@@ -442,8 +513,7 @@ async function inspectAutomationCwd(cwd) {
|
|
|
442
513
|
}
|
|
443
514
|
|
|
444
515
|
try {
|
|
445
|
-
const { stdout } = await
|
|
446
|
-
"git",
|
|
516
|
+
const { stdout } = await execGitWithRetry(
|
|
447
517
|
["-C", cwd, "rev-parse", "--is-inside-work-tree", "--is-bare-repository"],
|
|
448
518
|
{ timeout: 5000 }
|
|
449
519
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.107.0",
|
|
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": "2.
|
|
3
|
+
"version": "2.107.0",
|
|
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-typescript",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "TypeScript-specific hooks — Prettier formatting, ESLint linting,
|
|
3
|
+
"version": "2.107.0",
|
|
4
|
+
"description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
7
7
|
},
|
|
@@ -9,6 +9,17 @@
|
|
|
9
9
|
"lisa"
|
|
10
10
|
],
|
|
11
11
|
"hooks": {
|
|
12
|
+
"PreToolUse": [
|
|
13
|
+
{
|
|
14
|
+
"matcher": "Write|Edit",
|
|
15
|
+
"hooks": [
|
|
16
|
+
{
|
|
17
|
+
"type": "command",
|
|
18
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/block-suppress-directives.sh"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
],
|
|
12
23
|
"PostToolUse": [
|
|
13
24
|
{
|
|
14
25
|
"matcher": "Write|Edit",
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# This file is managed by Lisa.
|
|
3
|
+
# Do not edit directly — changes will be overwritten on the next `lisa` run.
|
|
4
|
+
#
|
|
5
|
+
# PreToolUse hook (Write|Edit): block adding error-suppression directives to
|
|
6
|
+
# JS/TS source. Suppressing the type checker, linter, or formatter hides real
|
|
7
|
+
# defects instead of fixing them, so it is a documented last resort (see the
|
|
8
|
+
# base "ASK FIRST" governance rule). The agent should stop and get the user's
|
|
9
|
+
# approval rather than slip a suppression past silently.
|
|
10
|
+
#
|
|
11
|
+
# Inspects only the NEW text the tool introduces, scoped to JS/TS files, and
|
|
12
|
+
# matches the directive only in comment syntax (// or /*) so prose, strings,
|
|
13
|
+
# and identifiers that merely mention these tokens are not flagged.
|
|
14
|
+
# Exit code 2 blocks the tool call and surfaces stderr to Claude.
|
|
15
|
+
# Reference: https://docs.claude.com/en/docs/claude-code/hooks
|
|
16
|
+
|
|
17
|
+
JSON_INPUT=$(cat)
|
|
18
|
+
|
|
19
|
+
# Project rule (.claude/rules/PROJECT_RULES.md): never parse JSON in shell with
|
|
20
|
+
# grep/sed/cut/awk — always use jq. Fail open without jq so we never hard-block
|
|
21
|
+
# the agent on missing tooling.
|
|
22
|
+
command -v jq >/dev/null 2>&1 || exit 0
|
|
23
|
+
|
|
24
|
+
FILE_PATH=$(printf '%s' "$JSON_INPUT" | jq -r '.tool_input.file_path // empty')
|
|
25
|
+
[ -n "$FILE_PATH" ] || exit 0
|
|
26
|
+
|
|
27
|
+
# Only guard JS/TS source. Directives in other file types (docs, configs that
|
|
28
|
+
# document the rules, this script) are not suppressions.
|
|
29
|
+
case "${FILE_PATH##*.}" in
|
|
30
|
+
ts | tsx | js | jsx | mjs | cjs) ;;
|
|
31
|
+
*) exit 0 ;;
|
|
32
|
+
esac
|
|
33
|
+
|
|
34
|
+
# Resolve the new text per tool shape:
|
|
35
|
+
# Write -> tool_input.content
|
|
36
|
+
# MultiEdit -> tool_input.edits[].new_string
|
|
37
|
+
# Edit -> tool_input.new_string
|
|
38
|
+
NEW_TEXT=$(printf '%s' "$JSON_INPUT" | jq -r '
|
|
39
|
+
.tool_input as $i
|
|
40
|
+
| if ($i.content // null) != null then $i.content
|
|
41
|
+
elif ($i.edits // null) != null then ([$i.edits[].new_string] | join("\n"))
|
|
42
|
+
elif ($i.new_string // null) != null then $i.new_string
|
|
43
|
+
else "" end')
|
|
44
|
+
|
|
45
|
+
# Comment-syntax-only match: a // or /* opener, optional whitespace, then the
|
|
46
|
+
# suppression directive. @ts-expect-error is intentionally NOT matched — it is
|
|
47
|
+
# the safer alternative this hook steers toward.
|
|
48
|
+
DIRECTIVE_RE='(//|/\*)[[:space:]]*(@ts-(ignore|nocheck)|eslint-disable|biome-ignore|prettier-ignore)'
|
|
49
|
+
|
|
50
|
+
if printf '%s' "$NEW_TEXT" | grep -Eq "$DIRECTIVE_RE"; then
|
|
51
|
+
cat >&2 <<MSG
|
|
52
|
+
❌ Blocked: error-suppression directive in $FILE_PATH
|
|
53
|
+
|
|
54
|
+
You are adding a @ts-ignore / @ts-nocheck / eslint-disable / biome-ignore /
|
|
55
|
+
prettier-ignore comment. These silence the type checker, linter, or formatter
|
|
56
|
+
instead of fixing the underlying problem. They are a last resort, not a default.
|
|
57
|
+
|
|
58
|
+
Fix it properly first:
|
|
59
|
+
- Resolve the actual type/lint error rather than suppressing it.
|
|
60
|
+
- Add the missing annotation, narrow the type, or restructure the code so the
|
|
61
|
+
rule passes legitimately.
|
|
62
|
+
- For a faulty dependency type, prefer a typed wrapper or module augmentation.
|
|
63
|
+
|
|
64
|
+
If — and only if — there is genuinely no other way (e.g. a known upstream bug):
|
|
65
|
+
- STOP and get the user's approval before suppressing (base "ASK FIRST" rule).
|
|
66
|
+
- Prefer @ts-expect-error over @ts-ignore (it fails once the error is gone).
|
|
67
|
+
- Scope the disable to one line and one rule, never a whole file.
|
|
68
|
+
- Include a "-- <reason>" description (eslint-comments/require-description).
|
|
69
|
+
MSG
|
|
70
|
+
exit 2
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
exit 0
|
|
@@ -111,7 +111,7 @@ NEVER:
|
|
|
111
111
|
- Update CHANGELOG.
|
|
112
112
|
|
|
113
113
|
ASK FIRST:
|
|
114
|
-
- Before adding a lint suppression comment (e.g. eslint-disable, noqa, #[allow(...)], @SuppressWarnings). These should be a last resort.
|
|
114
|
+
- Before adding a lint or formatter suppression comment (e.g. eslint-disable, biome-ignore, prettier-ignore, noqa, #[allow(...)], @SuppressWarnings). These should be a last resort.
|
|
115
115
|
- Before adding a type-checking suppression comment (e.g. ts-ignore, ts-expect-error, ts-nocheck, type: ignore).
|
|
116
116
|
- Lint suppression in test files is acceptable without asking only when comprehensive test coverage requires it (e.g. file length limits) or when intentional duplication improves test isolation. Include matching re-enable comments where applicable.
|
|
117
117
|
|
|
@@ -26,6 +26,77 @@ const NEGATED_FAILURE_PATTERN =
|
|
|
26
26
|
/\b(no|without)\s+(?:recent\s+)?(?:fail(?:ure|ed)|errors?|exceptions?)\b/i;
|
|
27
27
|
const execFileAsync = promisify(execFile);
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Git location env vars that, when inherited, override the `-C <dir>` flag and
|
|
31
|
+
* cwd. When this adapter runs inside a Git hook (e.g. pre-push) these are
|
|
32
|
+
* exported by Git, so a `git -C <cwd> rev-parse` would answer about the hook's
|
|
33
|
+
* repository instead of the inspected automation cwd — misreporting every
|
|
34
|
+
* healthy automation as FAILING. They must be scrubbed so `-C`/cwd governs.
|
|
35
|
+
*/
|
|
36
|
+
const GIT_LOCATION_ENV_VARS = [
|
|
37
|
+
"GIT_DIR",
|
|
38
|
+
"GIT_WORK_TREE",
|
|
39
|
+
"GIT_INDEX_FILE",
|
|
40
|
+
"GIT_OBJECT_DIRECTORY",
|
|
41
|
+
"GIT_ALTERNATE_OBJECT_DIRECTORIES",
|
|
42
|
+
"GIT_COMMON_DIR",
|
|
43
|
+
"GIT_NAMESPACE",
|
|
44
|
+
"GIT_PREFIX",
|
|
45
|
+
];
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Process-spawn failures that are transient under heavy fork load (the OS could
|
|
49
|
+
* not start the child, not git reporting a result). Retrying these avoids
|
|
50
|
+
* misclassifying a healthy cwd as a `git_error` when the machine is saturated.
|
|
51
|
+
*/
|
|
52
|
+
const TRANSIENT_SPAWN_ERROR_CODES = new Set([
|
|
53
|
+
"EAGAIN",
|
|
54
|
+
"ENOMEM",
|
|
55
|
+
"EMFILE",
|
|
56
|
+
"ENFILE",
|
|
57
|
+
"ETXTBSY",
|
|
58
|
+
]);
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Build a git-safe environment: the ambient process env minus the location
|
|
62
|
+
* overrides so a `-C <dir>` invocation targets the intended directory.
|
|
63
|
+
*
|
|
64
|
+
* @returns {NodeJS.ProcessEnv}
|
|
65
|
+
*/
|
|
66
|
+
function gitEnvWithoutLocationOverrides() {
|
|
67
|
+
const env = { ...process.env };
|
|
68
|
+
for (const key of GIT_LOCATION_ENV_VARS) {
|
|
69
|
+
delete env[key];
|
|
70
|
+
}
|
|
71
|
+
return env;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Run `git` against an explicit directory, immune to inherited Git location env
|
|
76
|
+
* vars, with a bounded retry on transient process-spawn failures. A git process
|
|
77
|
+
* that actually ran — success or non-zero exit — is surfaced unchanged on the
|
|
78
|
+
* first attempt; only failures to launch the child at all are retried.
|
|
79
|
+
*
|
|
80
|
+
* @param {readonly string[]} args git arguments
|
|
81
|
+
* @param {import("node:child_process").ExecFileOptions} [options]
|
|
82
|
+
* @param {number} [attempts] maximum attempts (default 4)
|
|
83
|
+
* @returns {Promise<{ stdout: string, stderr: string }>}
|
|
84
|
+
*/
|
|
85
|
+
async function execGitWithRetry(args, options, attempts = 4) {
|
|
86
|
+
const mergedOptions = { ...options, env: gitEnvWithoutLocationOverrides() };
|
|
87
|
+
for (let attempt = 1; ; attempt += 1) {
|
|
88
|
+
try {
|
|
89
|
+
return await execFileAsync("git", args, mergedOptions);
|
|
90
|
+
} catch (error) {
|
|
91
|
+
const transient = TRANSIENT_SPAWN_ERROR_CODES.has(error?.code);
|
|
92
|
+
if (!transient || attempt >= attempts) {
|
|
93
|
+
throw error;
|
|
94
|
+
}
|
|
95
|
+
await new Promise(resolve => setTimeout(resolve, 2 ** attempt * 25));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
29
100
|
/**
|
|
30
101
|
* @typedef {import("./automation-status-expected-fleet.mjs").resolveExpectedAutomationFleet extends (...args: any[]) => infer T ? T : never} ExpectedFleet
|
|
31
102
|
*
|
|
@@ -442,8 +513,7 @@ async function inspectAutomationCwd(cwd) {
|
|
|
442
513
|
}
|
|
443
514
|
|
|
444
515
|
try {
|
|
445
|
-
const { stdout } = await
|
|
446
|
-
"git",
|
|
516
|
+
const { stdout } = await execGitWithRetry(
|
|
447
517
|
["-C", cwd, "rev-parse", "--is-inside-work-tree", "--is-bare-repository"],
|
|
448
518
|
{ timeout: 5000 }
|
|
449
519
|
);
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-typescript",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"description": "TypeScript-specific hooks — Prettier formatting, ESLint linting,
|
|
4
|
+
"description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
|
|
5
5
|
"author": { "name": "Cody Swann" },
|
|
6
6
|
"dependencies": ["lisa"],
|
|
7
7
|
"hooks": {
|
|
8
|
+
"PreToolUse": [
|
|
9
|
+
{
|
|
10
|
+
"matcher": "Write|Edit",
|
|
11
|
+
"hooks": [
|
|
12
|
+
{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/block-suppress-directives.sh" }
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
],
|
|
8
16
|
"PostToolUse": [
|
|
9
17
|
{
|
|
10
18
|
"matcher": "Write|Edit",
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# This file is managed by Lisa.
|
|
3
|
+
# Do not edit directly — changes will be overwritten on the next `lisa` run.
|
|
4
|
+
#
|
|
5
|
+
# PreToolUse hook (Write|Edit): block adding error-suppression directives to
|
|
6
|
+
# JS/TS source. Suppressing the type checker, linter, or formatter hides real
|
|
7
|
+
# defects instead of fixing them, so it is a documented last resort (see the
|
|
8
|
+
# base "ASK FIRST" governance rule). The agent should stop and get the user's
|
|
9
|
+
# approval rather than slip a suppression past silently.
|
|
10
|
+
#
|
|
11
|
+
# Inspects only the NEW text the tool introduces, scoped to JS/TS files, and
|
|
12
|
+
# matches the directive only in comment syntax (// or /*) so prose, strings,
|
|
13
|
+
# and identifiers that merely mention these tokens are not flagged.
|
|
14
|
+
# Exit code 2 blocks the tool call and surfaces stderr to Claude.
|
|
15
|
+
# Reference: https://docs.claude.com/en/docs/claude-code/hooks
|
|
16
|
+
|
|
17
|
+
JSON_INPUT=$(cat)
|
|
18
|
+
|
|
19
|
+
# Project rule (.claude/rules/PROJECT_RULES.md): never parse JSON in shell with
|
|
20
|
+
# grep/sed/cut/awk — always use jq. Fail open without jq so we never hard-block
|
|
21
|
+
# the agent on missing tooling.
|
|
22
|
+
command -v jq >/dev/null 2>&1 || exit 0
|
|
23
|
+
|
|
24
|
+
FILE_PATH=$(printf '%s' "$JSON_INPUT" | jq -r '.tool_input.file_path // empty')
|
|
25
|
+
[ -n "$FILE_PATH" ] || exit 0
|
|
26
|
+
|
|
27
|
+
# Only guard JS/TS source. Directives in other file types (docs, configs that
|
|
28
|
+
# document the rules, this script) are not suppressions.
|
|
29
|
+
case "${FILE_PATH##*.}" in
|
|
30
|
+
ts | tsx | js | jsx | mjs | cjs) ;;
|
|
31
|
+
*) exit 0 ;;
|
|
32
|
+
esac
|
|
33
|
+
|
|
34
|
+
# Resolve the new text per tool shape:
|
|
35
|
+
# Write -> tool_input.content
|
|
36
|
+
# MultiEdit -> tool_input.edits[].new_string
|
|
37
|
+
# Edit -> tool_input.new_string
|
|
38
|
+
NEW_TEXT=$(printf '%s' "$JSON_INPUT" | jq -r '
|
|
39
|
+
.tool_input as $i
|
|
40
|
+
| if ($i.content // null) != null then $i.content
|
|
41
|
+
elif ($i.edits // null) != null then ([$i.edits[].new_string] | join("\n"))
|
|
42
|
+
elif ($i.new_string // null) != null then $i.new_string
|
|
43
|
+
else "" end')
|
|
44
|
+
|
|
45
|
+
# Comment-syntax-only match: a // or /* opener, optional whitespace, then the
|
|
46
|
+
# suppression directive. @ts-expect-error is intentionally NOT matched — it is
|
|
47
|
+
# the safer alternative this hook steers toward.
|
|
48
|
+
DIRECTIVE_RE='(//|/\*)[[:space:]]*(@ts-(ignore|nocheck)|eslint-disable|biome-ignore|prettier-ignore)'
|
|
49
|
+
|
|
50
|
+
if printf '%s' "$NEW_TEXT" | grep -Eq "$DIRECTIVE_RE"; then
|
|
51
|
+
cat >&2 <<MSG
|
|
52
|
+
❌ Blocked: error-suppression directive in $FILE_PATH
|
|
53
|
+
|
|
54
|
+
You are adding a @ts-ignore / @ts-nocheck / eslint-disable / biome-ignore /
|
|
55
|
+
prettier-ignore comment. These silence the type checker, linter, or formatter
|
|
56
|
+
instead of fixing the underlying problem. They are a last resort, not a default.
|
|
57
|
+
|
|
58
|
+
Fix it properly first:
|
|
59
|
+
- Resolve the actual type/lint error rather than suppressing it.
|
|
60
|
+
- Add the missing annotation, narrow the type, or restructure the code so the
|
|
61
|
+
rule passes legitimately.
|
|
62
|
+
- For a faulty dependency type, prefer a typed wrapper or module augmentation.
|
|
63
|
+
|
|
64
|
+
If — and only if — there is genuinely no other way (e.g. a known upstream bug):
|
|
65
|
+
- STOP and get the user's approval before suppressing (base "ASK FIRST" rule).
|
|
66
|
+
- Prefer @ts-expect-error over @ts-ignore (it fails once the error is gone).
|
|
67
|
+
- Scope the disable to one line and one rule, never a whole file.
|
|
68
|
+
- Include a "-- <reason>" description (eslint-comments/require-description).
|
|
69
|
+
MSG
|
|
70
|
+
exit 2
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
exit 0
|