@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.
Files changed (73) hide show
  1. package/all/copy-overwrite/scripts/lisa-enforcement-fallback.sh +14 -1
  2. package/all/copy-overwrite/scripts/lisa-hooks/block-instruction-file-edits.sh +47 -7
  3. package/all/copy-overwrite/scripts/lisa-hooks/block-no-verify.sh +49 -5
  4. package/all/copy-overwrite/scripts/lisa-hooks/block-shell-json-parsing.sh +20 -1
  5. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  6. package/dist/core/upstream-evidence-manifest.js +10 -8
  7. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  8. package/package.json +1 -1
  9. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  10. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  11. package/plugins/lisa/hooks/block-instruction-file-edits.sh +47 -7
  12. package/plugins/lisa/hooks/block-no-verify.sh +49 -5
  13. package/plugins/lisa/hooks/block-shell-json-parsing.sh +20 -1
  14. package/plugins/lisa-agy/hooks/block-instruction-file-edits.sh +47 -7
  15. package/plugins/lisa-agy/hooks/block-shell-json-parsing.sh +20 -1
  16. package/plugins/lisa-agy/plugin.json +1 -1
  17. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  19. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  20. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa-copilot/hooks/block-instruction-file-edits.sh +47 -7
  24. package/plugins/lisa-copilot/hooks/block-no-verify.sh +49 -5
  25. package/plugins/lisa-copilot/hooks/block-shell-json-parsing.sh +20 -1
  26. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-cursor/hooks/block-instruction-file-edits.sh +47 -7
  28. package/plugins/lisa-cursor/hooks/block-no-verify.sh +49 -5
  29. package/plugins/lisa-cursor/hooks/block-shell-json-parsing.sh +20 -1
  30. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  32. package/plugins/lisa-expo-agy/plugin.json +1 -1
  33. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  37. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  38. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  42. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  43. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  47. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  48. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  52. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  53. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  57. package/plugins/lisa-rails-agy/plugin.json +1 -1
  58. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  62. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  63. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  67. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  68. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  70. package/plugins/src/base/hooks/block-instruction-file-edits.sh +47 -7
  71. package/plugins/src/base/hooks/block-no-verify.sh +49 -5
  72. package/plugins/src/base/hooks/block-shell-json-parsing.sh +20 -1
  73. 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
- command -v python3 >/dev/null 2>&1 || exit 0
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
- if [ "$guard_status" -gt "$status" ]; then
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