@codyswann/lisa 2.341.3 → 2.341.4
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/all/copy-overwrite/scripts/lisa-enforcement-fallback.sh +14 -1
- package/all/copy-overwrite/scripts/lisa-hooks/block-instruction-file-edits.sh +47 -7
- package/all/copy-overwrite/scripts/lisa-hooks/block-no-verify.sh +49 -5
- package/all/copy-overwrite/scripts/lisa-hooks/block-shell-json-parsing.sh +20 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +10 -8
- package/dist/core/upstream-evidence-manifest.js.map +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/hooks/block-instruction-file-edits.sh +47 -7
- package/plugins/lisa/hooks/block-no-verify.sh +49 -5
- package/plugins/lisa/hooks/block-shell-json-parsing.sh +20 -1
- package/plugins/lisa-agy/hooks/block-instruction-file-edits.sh +47 -7
- package/plugins/lisa-agy/hooks/block-shell-json-parsing.sh +20 -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-copilot/hooks/block-instruction-file-edits.sh +47 -7
- package/plugins/lisa-copilot/hooks/block-no-verify.sh +49 -5
- package/plugins/lisa-copilot/hooks/block-shell-json-parsing.sh +20 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/block-instruction-file-edits.sh +47 -7
- package/plugins/lisa-cursor/hooks/block-no-verify.sh +49 -5
- package/plugins/lisa-cursor/hooks/block-shell-json-parsing.sh +20 -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/plugins/src/base/hooks/block-instruction-file-edits.sh +47 -7
- package/plugins/src/base/hooks/block-no-verify.sh +49 -5
- package/plugins/src/base/hooks/block-shell-json-parsing.sh +20 -1
- package/scripts/lisa-enforcement-fallback.sh +14 -1
|
@@ -24,6 +24,25 @@ set -euo pipefail
|
|
|
24
24
|
|
|
25
25
|
input="$(cat)"
|
|
26
26
|
|
|
27
|
+
# Probe the interpreters before the first use. Under `set -euo pipefail` an
|
|
28
|
+
# absent jq does not merely skip the parse — the assignment below dies with
|
|
29
|
+
# 127, and 127 is not a refusal, so the guard vanishes and the command runs.
|
|
30
|
+
# Worse, that 127 used to outrank a sibling guard's 2 in
|
|
31
|
+
# lisa-enforcement-fallback.sh, taking a real refusal down with it.
|
|
32
|
+
#
|
|
33
|
+
# Degrading to "allow" stays right: a hook that cannot parse its input cannot
|
|
34
|
+
# tell a bypass from an ordinary command, and failing closed would block every
|
|
35
|
+
# Bash call on a machine missing an interpreter. Doing it QUIETLY is what is
|
|
36
|
+
# wrong — a guard that is silently absent reads exactly like a guard that is
|
|
37
|
+
# passing. Mirrors block-no-verify.sh, which already had this.
|
|
38
|
+
for required in jq python3; do
|
|
39
|
+
if ! command -v "$required" >/dev/null 2>&1; then
|
|
40
|
+
printf 'block-shell-json-parsing: %s not found; JSON-parsing protection is NOT active\n' \
|
|
41
|
+
"$required" >&2
|
|
42
|
+
exit 0
|
|
43
|
+
fi
|
|
44
|
+
done
|
|
45
|
+
|
|
27
46
|
tool_name="$(printf '%s' "$input" | jq -r '.tool_name // empty')"
|
|
28
47
|
if [ "$tool_name" != "Bash" ]; then
|
|
29
48
|
exit 0
|
|
@@ -40,7 +59,7 @@ case "$command_str" in
|
|
|
40
59
|
*) exit 0 ;;
|
|
41
60
|
esac
|
|
42
61
|
|
|
43
|
-
|
|
62
|
+
# python3 is probed with jq at the top now, announced rather than silent.
|
|
44
63
|
|
|
45
64
|
if ! BLOCK_SHELL_JSON_COMMAND="$command_str" python3 - <<'PY'
|
|
46
65
|
import os
|
|
@@ -88,7 +88,20 @@ for guard in block-no-verify parity-safety-net block-shell-json-parsing \
|
|
|
88
88
|
# fail-open this file exists to close.
|
|
89
89
|
printf '%s' "$payload" | bash "$script"
|
|
90
90
|
guard_status=$?
|
|
91
|
-
|
|
91
|
+
# 2 is the ONLY status Claude Code treats as a refusal. Every other non-zero
|
|
92
|
+
# is a non-blocking error: it is surfaced, and the tool call proceeds anyway.
|
|
93
|
+
# So the aggregate cannot be the numerically largest status — under `-gt`, a
|
|
94
|
+
# guard erroring with 3, or dying on a missing interpreter with 127,
|
|
95
|
+
# outranks another guard's 2 and silently downgrades a refusal into a
|
|
96
|
+
# warning. That is the precise fail-open this file exists to close,
|
|
97
|
+
# reintroduced one layer up.
|
|
98
|
+
#
|
|
99
|
+
# 2 therefore dominates and is sticky; a lesser non-zero is only carried when
|
|
100
|
+
# no guard has refused, so a genuine error is still reported when nothing
|
|
101
|
+
# blocked.
|
|
102
|
+
if [ "$guard_status" -eq 2 ]; then
|
|
103
|
+
status=2
|
|
104
|
+
elif [ "$guard_status" -ne 0 ] && [ "$status" -ne 2 ]; then
|
|
92
105
|
status="$guard_status"
|
|
93
106
|
fi
|
|
94
107
|
done
|