@codyswann/lisa 4.60.2 → 4.60.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/lib/worktree-dependencies.d.mts +5 -0
- package/all/copy-overwrite/scripts/lib/worktree-dependencies.mjs +65 -0
- package/all/copy-overwrite/scripts/lisa-hooks/block-instruction-file-edits.sh +11 -1
- package/all/copy-overwrite/scripts/lisa-hooks/parity-safety-net-heredoc.py +43 -0
- package/all/copy-overwrite/scripts/lisa-hooks/parity-safety-net.sh +16 -1
- package/all/copy-overwrite/scripts/lisa-run-gates.mjs +10 -2
- package/cdk/package-lisa/package.lisa.json +12 -12
- package/dist/cli/lisa-test-run.d.ts.map +1 -1
- package/dist/cli/lisa-test-run.js +4 -0
- package/dist/cli/lisa-test-run.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +28 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- 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 +27 -16
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/opencode/plugin-templates/parity-safety-net-heredoc.py +43 -0
- package/dist/opencode/plugin-templates/parity-safety-net.sh +16 -1
- package/expo/package-lisa/package.lisa.json +16 -16
- package/harper-fabric/package-lisa/package.lisa.json +19 -19
- package/nestjs/package-lisa/package.lisa.json +10 -10
- package/npm-package/package-lisa/package.lisa.json +8 -8
- package/package.json +28 -28
- package/phaser/package-lisa/package.lisa.json +23 -23
- 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 +11 -1
- package/plugins/lisa/hooks/parity-safety-net-heredoc.py +43 -0
- package/plugins/lisa/hooks/parity-safety-net.sh +16 -1
- package/plugins/lisa-agy/hooks/block-instruction-file-edits.sh +11 -1
- package/plugins/lisa-agy/hooks/parity-safety-net-heredoc.py +43 -0
- package/plugins/lisa-agy/hooks/parity-safety-net.sh +16 -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 +11 -1
- package/plugins/lisa-copilot/hooks/parity-safety-net-heredoc.py +43 -0
- package/plugins/lisa-copilot/hooks/parity-safety-net.sh +16 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/block-instruction-file-edits.sh +11 -1
- package/plugins/lisa-cursor/hooks/parity-safety-net-heredoc.py +43 -0
- package/plugins/lisa-cursor/hooks/parity-safety-net.sh +16 -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 +11 -1
- package/plugins/src/base/hooks/parity-safety-net-heredoc.py +43 -0
- package/plugins/src/base/hooks/parity-safety-net.sh +16 -1
- package/scripts/lib/worktree-dependencies.d.mts +5 -0
- package/scripts/lib/worktree-dependencies.mjs +65 -0
- package/scripts/two-channel-couplings.json +1 -1
- package/typescript/copy-contents/.husky/pre-push +1 -1
- package/typescript/package-lisa/package.lisa.json +19 -19
|
@@ -229,6 +229,46 @@ def shell_tokens(prefix: str) -> list[str] | None:
|
|
|
229
229
|
return None
|
|
230
230
|
|
|
231
231
|
|
|
232
|
+
def literal_display_projection(command: str) -> str:
|
|
233
|
+
"""Remove data from one literal printer, retaining its real output target.
|
|
234
|
+
|
|
235
|
+
Reuse the literal simple-command grammar: pipes, chains, substitutions,
|
|
236
|
+
comments and ambiguous syntax keep the original scan. This is not a shell
|
|
237
|
+
parser or an execution exemption. ANSI-C quoting and computed targets also
|
|
238
|
+
keep their original scan rather than guessing their expanded spelling.
|
|
239
|
+
"""
|
|
240
|
+
if "$'" in command:
|
|
241
|
+
return command
|
|
242
|
+
|
|
243
|
+
def printer(text: str) -> bool:
|
|
244
|
+
tokens = shell_tokens(text)
|
|
245
|
+
if not tokens or len(tokens) < 2:
|
|
246
|
+
return False
|
|
247
|
+
if tokens[0] == "echo":
|
|
248
|
+
return True
|
|
249
|
+
if tokens[0] != "printf":
|
|
250
|
+
return False
|
|
251
|
+
arguments = tokens[2:] if tokens[1] == "--" else tokens[1:]
|
|
252
|
+
if not arguments or arguments[0].startswith("-"):
|
|
253
|
+
return False
|
|
254
|
+
# %n writes a variable (including an evaluated array subscript), and a
|
|
255
|
+
# dynamic format could select it. Only known display conversions qualify.
|
|
256
|
+
remaining = re.sub(r"%%|%[sbqQ]", "", arguments[0])
|
|
257
|
+
return not any(char in remaining for char in "%$`*?[]~")
|
|
258
|
+
|
|
259
|
+
if printer(command):
|
|
260
|
+
return "printf '%s' literal-display-content"
|
|
261
|
+
for redirect in re.finditer(r">>|>\||>", command):
|
|
262
|
+
if not printer(command[:redirect.start()]):
|
|
263
|
+
continue
|
|
264
|
+
target = shell_tokens(command[redirect.end():])
|
|
265
|
+
if target and len(target) == 1 and not any(
|
|
266
|
+
char in target[0] for char in "$`\\\n\r*?[]~"
|
|
267
|
+
):
|
|
268
|
+
return "printf '%s' literal-display-content " + redirect[0] + " " + shlex.quote(target[0])
|
|
269
|
+
return command
|
|
270
|
+
|
|
271
|
+
|
|
232
272
|
def is_allowed_gh(tokens: list[str]) -> bool:
|
|
233
273
|
return (
|
|
234
274
|
len(tokens) >= 3
|
|
@@ -905,6 +945,9 @@ def marker_is_closed(command: str, marker: Marker) -> bool:
|
|
|
905
945
|
|
|
906
946
|
def main() -> int:
|
|
907
947
|
command = sys.stdin.read()
|
|
948
|
+
if sys.argv[1:] == ["--literal-display"]:
|
|
949
|
+
print(literal_display_projection(command), end="")
|
|
950
|
+
return SAFE
|
|
908
951
|
if "<<" not in command:
|
|
909
952
|
print(command, end="")
|
|
910
953
|
return SAFE
|
|
@@ -431,6 +431,18 @@ case "$command_str" in
|
|
|
431
431
|
;;
|
|
432
432
|
esac
|
|
433
433
|
|
|
434
|
+
custom_command_for_guards="$command_for_guards"
|
|
435
|
+
# A single literal printer writes data, not shell commands. Keep its actual
|
|
436
|
+
# redirection in the scan; unsupported syntax and unavailable parsing retain
|
|
437
|
+
# the original text. Chained commands and shell substitutions never qualify.
|
|
438
|
+
if [[ "$command_for_guards" =~ ^[[:blank:]]*(printf|echo)[[:blank:]] ]] \
|
|
439
|
+
&& command -v python3 >/dev/null 2>&1; then
|
|
440
|
+
if display_projection="$(printf '%s' "$command_for_guards" | python3 \
|
|
441
|
+
"$lisa_guard_hook_dir/parity-safety-net-heredoc.py" --literal-display 2>/dev/null)"; then
|
|
442
|
+
command_for_guards="$display_projection"
|
|
443
|
+
fi
|
|
444
|
+
fi
|
|
445
|
+
|
|
434
446
|
# ─── Follow execution into the file a command RUNS (issue #3612) ─────────────
|
|
435
447
|
#
|
|
436
448
|
# Every guard below classifies SHELL COMMAND TEXT, and until this block existed
|
|
@@ -2380,6 +2392,9 @@ fi
|
|
|
2380
2392
|
# 16. Project-local custom rules. Each non-comment line is an ERE; a match blocks.
|
|
2381
2393
|
rules_file="${SAFETY_NET_RULES_FILE:-${CLAUDE_PROJECT_DIR:-$PWD}/.claude/safety-net-rules.txt}"
|
|
2382
2394
|
if [ -f "$rules_file" ]; then
|
|
2395
|
+
# Custom rules can intentionally govern text itself, so preserve their input.
|
|
2396
|
+
custom_command_str="$(printf '%s\n%s' "$custom_command_for_guards" "$followed_text" \
|
|
2397
|
+
| awk '{ if (sub(/\\$/, "")) printf "%s ", $0; else print }')"
|
|
2383
2398
|
while IFS= read -r rule || [ -n "$rule" ]; do
|
|
2384
2399
|
case "$rule" in
|
|
2385
2400
|
'' | '#'*) continue ;;
|
|
@@ -2393,7 +2408,7 @@ if [ -f "$rules_file" ]; then
|
|
|
2393
2408
|
# not a refusal. The `||` puts the pipeline in a condition context, where
|
|
2394
2409
|
# a non-zero status is expected rather than fatal.
|
|
2395
2410
|
rule_status=0
|
|
2396
|
-
printf '%s' "$
|
|
2411
|
+
printf '%s' "$custom_command_str" | grep -Eiq -- "$rule" || rule_status=$?
|
|
2397
2412
|
case "$rule_status" in
|
|
2398
2413
|
0) block "matched a project custom safety rule (${rules_file##*/}): $rule" ;;
|
|
2399
2414
|
1) ;; # no match
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"fetch:graphql:schema:dev": "./scripts/fetch-graphql-schema.sh development",
|
|
27
27
|
"fetch:graphql:schema:production": "./scripts/fetch-graphql-schema.sh production",
|
|
28
28
|
"fetch:graphql:schema:staging": "./scripts/fetch-graphql-schema.sh staging",
|
|
29
|
-
"lint:fix": "oxlint --fix && eslint . --fix",
|
|
30
|
-
"lint:lisa": "oxlint && eslint . --quiet",
|
|
29
|
+
"lint:fix": "node scripts/lib/worktree-dependencies.mjs && oxlint --fix && eslint . --fix",
|
|
30
|
+
"lint:lisa": "node scripts/lib/worktree-dependencies.mjs && oxlint && eslint . --quiet",
|
|
31
31
|
"maestro:classify": "node scripts/classify-maestro-failures.mjs",
|
|
32
32
|
"pre-build:eas": "cat .gitignore > .easignore && cat .easignore.extra >> .easignore",
|
|
33
33
|
"security:zap": "bash scripts/zap-baseline.sh",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"start:simulator:ios:production": "cp .env.production .env.local && STAGE=production expo start --ios",
|
|
46
46
|
"start:simulator:ios:staging": "cp .env.staging .env.local && STAGE=staging expo start --ios",
|
|
47
47
|
"start:staging": "cp .env.staging .env.local && STAGE=staging expo start",
|
|
48
|
-
"test:cov:lisa": "NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --coverage",
|
|
49
|
-
"test:cov:unit:lisa": "LISA_COVERAGE_SCOPE=unit NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --coverage --testPathIgnorePatterns=\"\\.integration[.\\\\-](test|spec)\\.(ts|tsx)$\"",
|
|
50
|
-
"test:integration:lisa": "NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --testPathPatterns=\"\\.integration[.\\\\-](test|spec)\\.(ts|tsx)$\"",
|
|
51
|
-
"test:lisa": "NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest",
|
|
52
|
-
"test:mutation": "LISA_TEST_SCRATCH_PREFIXES='[\"lisa-mutation-\",\"worker-\"]' lisa-test-run --profile expo --adapter direct -- node scripts/lisa-mutation.mjs",
|
|
53
|
-
"test:node:lisa": "LISA_TEST_SCRATCH_PREFIXES='[\"node-\"]' lisa-test-run --profile expo --adapter direct -- node scripts/lisa-test-node.mjs",
|
|
54
|
-
"test:unit:lisa": "NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --testPathIgnorePatterns=\"\\.integration[.\\\\-](test|spec)\\.(ts|tsx)$\"",
|
|
55
|
-
"test:watch:lisa": "NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --watch"
|
|
48
|
+
"test:cov:lisa": "node scripts/lib/worktree-dependencies.mjs && NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --coverage",
|
|
49
|
+
"test:cov:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && LISA_COVERAGE_SCOPE=unit NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --coverage --testPathIgnorePatterns=\"\\.integration[.\\\\-](test|spec)\\.(ts|tsx)$\"",
|
|
50
|
+
"test:integration:lisa": "node scripts/lib/worktree-dependencies.mjs && NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --testPathPatterns=\"\\.integration[.\\\\-](test|spec)\\.(ts|tsx)$\"",
|
|
51
|
+
"test:lisa": "node scripts/lib/worktree-dependencies.mjs && NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest",
|
|
52
|
+
"test:mutation": "node scripts/lib/worktree-dependencies.mjs && LISA_TEST_SCRATCH_PREFIXES='[\"lisa-mutation-\",\"worker-\"]' lisa-test-run --profile expo --adapter direct -- node scripts/lisa-mutation.mjs",
|
|
53
|
+
"test:node:lisa": "node scripts/lib/worktree-dependencies.mjs && LISA_TEST_SCRATCH_PREFIXES='[\"node-\"]' lisa-test-run --profile expo --adapter direct -- node scripts/lisa-test-node.mjs",
|
|
54
|
+
"test:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --testPathIgnorePatterns=\"\\.integration[.\\\\-](test|spec)\\.(ts|tsx)$\"",
|
|
55
|
+
"test:watch:lisa": "node scripts/lib/worktree-dependencies.mjs && NODE_ENV=test lisa-test-run --profile expo --adapter direct -- jest --watch"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@apollo/client": "^3.10.8",
|
|
@@ -176,13 +176,13 @@
|
|
|
176
176
|
"lighthouse:check": "lhci autorun --collect.settings.chromeFlags='--no-sandbox --disable-gpu --headless' --assert.assertions.forced-reflow-insight=off && node scripts/check-lighthouse-details.mjs",
|
|
177
177
|
"lint": "$npm_execpath run lint:lisa",
|
|
178
178
|
"maestro:studio": "maestro studio",
|
|
179
|
-
"maestro:test": "lisa-test-run --profile expo --adapter direct -- maestro test .maestro/flows",
|
|
180
|
-
"maestro:test:android": "lisa-test-run --profile expo --adapter direct -- maestro test -p android .maestro/flows",
|
|
181
|
-
"maestro:test:ios": "lisa-test-run --profile expo --adapter direct -- maestro test -p ios .maestro/flows",
|
|
182
|
-
"maestro:test:smoke": "lisa-test-run --profile expo --adapter direct -- maestro test -p ios --include-tags=smoke .maestro/flows",
|
|
179
|
+
"maestro:test": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile expo --adapter direct -- maestro test .maestro/flows",
|
|
180
|
+
"maestro:test:android": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile expo --adapter direct -- maestro test -p android .maestro/flows",
|
|
181
|
+
"maestro:test:ios": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile expo --adapter direct -- maestro test -p ios .maestro/flows",
|
|
182
|
+
"maestro:test:smoke": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile expo --adapter direct -- maestro test -p ios --include-tags=smoke .maestro/flows",
|
|
183
183
|
"playwright:build": "expo export --platform web",
|
|
184
|
-
"playwright:test": "bun run playwright:build && lisa-test-run --profile expo --adapter direct -- playwright test",
|
|
185
|
-
"playwright:test:ui": "bun run playwright:build && lisa-test-run --profile expo --adapter direct -- playwright test --ui",
|
|
184
|
+
"playwright:test": "node scripts/lib/worktree-dependencies.mjs && bun run playwright:build && lisa-test-run --profile expo --adapter direct -- playwright test",
|
|
185
|
+
"playwright:test:ui": "node scripts/lib/worktree-dependencies.mjs && bun run playwright:build && lisa-test-run --profile expo --adapter direct -- playwright test --ui",
|
|
186
186
|
"test": "$npm_execpath run test:lisa",
|
|
187
187
|
"test:cov": "$npm_execpath run test:cov:lisa",
|
|
188
188
|
"test:cov:unit": "$npm_execpath run test:cov:unit:lisa",
|
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
"force": {
|
|
3
3
|
"scripts": {
|
|
4
4
|
"bootstrap": "bash scripts/bootstrap.sh",
|
|
5
|
-
"format": "prettier --check . --write",
|
|
6
|
-
"format:check:lisa": "prettier --check .",
|
|
7
|
-
"knip:check:lisa": "knip",
|
|
8
|
-
"knip:fix": "knip --fix",
|
|
9
|
-
"lint:fix": "oxlint --fix && eslint . --fix",
|
|
10
|
-
"lint:lisa": "oxlint && eslint . --quiet",
|
|
11
|
-
"lint:slow:lisa": "eslint . --config eslint.slow.config.ts --quiet",
|
|
5
|
+
"format": "node scripts/lib/worktree-dependencies.mjs && prettier --check . --write",
|
|
6
|
+
"format:check:lisa": "node scripts/lib/worktree-dependencies.mjs && prettier --check .",
|
|
7
|
+
"knip:check:lisa": "node scripts/lib/worktree-dependencies.mjs && knip",
|
|
8
|
+
"knip:fix": "node scripts/lib/worktree-dependencies.mjs && knip --fix",
|
|
9
|
+
"lint:fix": "node scripts/lib/worktree-dependencies.mjs && oxlint --fix && eslint . --fix",
|
|
10
|
+
"lint:lisa": "node scripts/lib/worktree-dependencies.mjs && oxlint && eslint . --quiet",
|
|
11
|
+
"lint:slow:lisa": "node scripts/lib/worktree-dependencies.mjs && eslint . --config eslint.slow.config.ts --quiet",
|
|
12
12
|
"prepare": "husky install || true",
|
|
13
13
|
"reset": "harperdb stop || true; [ -n \"$HOME\" ] && rm -rf \"$HOME/.harperdb\" && bun run bootstrap && bun run seed && bun run verify",
|
|
14
14
|
"setup:deploy-key": "setup-deploy-key",
|
|
15
|
-
"sg:scan:lisa": "ast-grep scan",
|
|
16
|
-
"sg:test": "ast-grep test",
|
|
15
|
+
"sg:scan:lisa": "node scripts/lib/worktree-dependencies.mjs && ast-grep scan",
|
|
16
|
+
"sg:test": "node scripts/lib/worktree-dependencies.mjs && ast-grep test",
|
|
17
17
|
"start": "harperdb start",
|
|
18
18
|
"status": "harperdb status",
|
|
19
19
|
"stop": "harperdb stop",
|
|
20
|
-
"test:cov:lisa": "lisa-test-run --profile harper-fabric --adapter vitest -- vitest run --coverage",
|
|
21
|
-
"test:cov:unit:lisa": "LISA_COVERAGE_SCOPE=unit lisa-test-run --profile harper-fabric --adapter vitest -- vitest run --coverage --exclude='**/integration/**'",
|
|
22
|
-
"test:integration:lisa": "lisa-test-run --profile harper-fabric --adapter vitest -- vitest run '.integration.' 'integration/'",
|
|
23
|
-
"test:lisa": "lisa-test-run --profile harper-fabric --adapter vitest -- vitest run",
|
|
24
|
-
"test:mutation": "LISA_TEST_SCRATCH_PREFIXES='[\"lisa-mutation-\",\"worker-\"]' lisa-test-run --profile harper-fabric --adapter direct -- node scripts/lisa-mutation.mjs",
|
|
25
|
-
"test:node:lisa": "LISA_TEST_SCRATCH_PREFIXES='[\"node-\"]' lisa-test-run --profile harper-fabric --adapter direct -- node scripts/lisa-test-node.mjs",
|
|
26
|
-
"test:unit:lisa": "lisa-test-run --profile harper-fabric --adapter vitest -- vitest run --exclude='**/integration/**'",
|
|
27
|
-
"test:watch:lisa": "lisa-test-run --profile harper-fabric --adapter vitest -- vitest",
|
|
28
|
-
"typecheck:lisa": "tsc --noEmit"
|
|
20
|
+
"test:cov:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile harper-fabric --adapter vitest -- vitest run --coverage",
|
|
21
|
+
"test:cov:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && LISA_COVERAGE_SCOPE=unit lisa-test-run --profile harper-fabric --adapter vitest -- vitest run --coverage --exclude='**/integration/**'",
|
|
22
|
+
"test:integration:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile harper-fabric --adapter vitest -- vitest run '.integration.' 'integration/'",
|
|
23
|
+
"test:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile harper-fabric --adapter vitest -- vitest run",
|
|
24
|
+
"test:mutation": "node scripts/lib/worktree-dependencies.mjs && LISA_TEST_SCRATCH_PREFIXES='[\"lisa-mutation-\",\"worker-\"]' lisa-test-run --profile harper-fabric --adapter direct -- node scripts/lisa-mutation.mjs",
|
|
25
|
+
"test:node:lisa": "node scripts/lib/worktree-dependencies.mjs && LISA_TEST_SCRATCH_PREFIXES='[\"node-\"]' lisa-test-run --profile harper-fabric --adapter direct -- node scripts/lisa-test-node.mjs",
|
|
26
|
+
"test:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile harper-fabric --adapter vitest -- vitest run --exclude='**/integration/**'",
|
|
27
|
+
"test:watch:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile harper-fabric --adapter vitest -- vitest",
|
|
28
|
+
"typecheck:lisa": "node scripts/lib/worktree-dependencies.mjs && tsc --noEmit"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"harperdb": "^4.7.29"
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
},
|
|
80
80
|
"defaults": {
|
|
81
81
|
"scripts": {
|
|
82
|
-
"build": "tsc && node dist/build/build.js",
|
|
82
|
+
"build": "node scripts/lib/worktree-dependencies.mjs && tsc && node dist/build/build.js",
|
|
83
83
|
"deploy": "bun run build && node dist/scripts/deploy.js",
|
|
84
84
|
"dev:server": "bun run build && node dist/scripts/dev_server.js",
|
|
85
85
|
"format:check": "$npm_execpath run format:check:lisa",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"k6:soak": "./scripts/k6-run.sh --scenario soak",
|
|
41
41
|
"k6:spike": "./scripts/k6-run.sh --scenario spike",
|
|
42
42
|
"k6:stress": "./scripts/k6-run.sh --scenario stress",
|
|
43
|
-
"lint:fix": "oxlint --fix && eslint . --fix",
|
|
44
|
-
"lint:lisa": "oxlint && eslint . --quiet",
|
|
43
|
+
"lint:fix": "node scripts/lib/worktree-dependencies.mjs && oxlint --fix && eslint . --fix",
|
|
44
|
+
"lint:lisa": "node scripts/lib/worktree-dependencies.mjs && oxlint && eslint . --quiet",
|
|
45
45
|
"security:zap": "bash scripts/zap-baseline.sh",
|
|
46
46
|
"setup:deploy-key": "setup-deploy-key",
|
|
47
47
|
"start:dev": "IS_OFFLINE=true sls offline start --stage dev",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"start:docker:build": "docker compose up --build",
|
|
50
50
|
"start:docker:down": "docker compose down",
|
|
51
51
|
"start:local": "IS_OFFLINE=true sls offline start --noTimeout",
|
|
52
|
-
"test:cov:lisa": "lisa-test-run --profile nestjs --adapter vitest -- vitest run --coverage",
|
|
53
|
-
"test:cov:unit:lisa": "LISA_COVERAGE_SCOPE=unit lisa-test-run --profile nestjs --adapter vitest -- vitest run --coverage --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
54
|
-
"test:integration:lisa": "lisa-test-run --profile nestjs --adapter vitest -- vitest run '.integration.' 'integration/'",
|
|
55
|
-
"test:lisa": "lisa-test-run --profile nestjs --adapter vitest -- vitest run",
|
|
56
|
-
"test:mutation": "LISA_TEST_SCRATCH_PREFIXES='[\"lisa-mutation-\",\"worker-\"]' lisa-test-run --profile nestjs --adapter direct -- node scripts/lisa-mutation.mjs",
|
|
57
|
-
"test:node:lisa": "LISA_TEST_SCRATCH_PREFIXES='[\"node-\"]' lisa-test-run --profile nestjs --adapter direct -- node scripts/lisa-test-node.mjs",
|
|
58
|
-
"test:unit:lisa": "lisa-test-run --profile nestjs --adapter vitest -- vitest run --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
59
|
-
"test:watch:lisa": "lisa-test-run --profile nestjs --adapter vitest -- vitest"
|
|
52
|
+
"test:cov:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile nestjs --adapter vitest -- vitest run --coverage",
|
|
53
|
+
"test:cov:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && LISA_COVERAGE_SCOPE=unit lisa-test-run --profile nestjs --adapter vitest -- vitest run --coverage --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
54
|
+
"test:integration:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile nestjs --adapter vitest -- vitest run '.integration.' 'integration/'",
|
|
55
|
+
"test:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile nestjs --adapter vitest -- vitest run",
|
|
56
|
+
"test:mutation": "node scripts/lib/worktree-dependencies.mjs && LISA_TEST_SCRATCH_PREFIXES='[\"lisa-mutation-\",\"worker-\"]' lisa-test-run --profile nestjs --adapter direct -- node scripts/lisa-mutation.mjs",
|
|
57
|
+
"test:node:lisa": "node scripts/lib/worktree-dependencies.mjs && LISA_TEST_SCRATCH_PREFIXES='[\"node-\"]' lisa-test-run --profile nestjs --adapter direct -- node scripts/lisa-test-node.mjs",
|
|
58
|
+
"test:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile nestjs --adapter vitest -- vitest run --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
59
|
+
"test:watch:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile nestjs --adapter vitest -- vitest"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@apollo/server": "^5.4.0",
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
"prepare": "$npm_execpath run build && husky install || true",
|
|
5
5
|
"prepublishOnly": "$npm_execpath run build",
|
|
6
6
|
"setup:deploy-key": "setup-deploy-key",
|
|
7
|
-
"test:cov:lisa": "lisa-test-run --profile npm-package --adapter vitest -- vitest run --coverage",
|
|
8
|
-
"test:cov:unit:lisa": "LISA_COVERAGE_SCOPE=unit lisa-test-run --profile npm-package --adapter vitest -- vitest run --coverage --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
9
|
-
"test:integration:lisa": "lisa-test-run --profile npm-package --adapter vitest -- vitest run '.integration.' 'integration/'",
|
|
10
|
-
"test:lisa": "lisa-test-run --profile npm-package --adapter vitest -- vitest run",
|
|
11
|
-
"test:mutation": "LISA_TEST_SCRATCH_PREFIXES='[\"lisa-mutation-\",\"worker-\"]' lisa-test-run --profile npm-package --adapter direct -- node scripts/lisa-mutation.mjs",
|
|
12
|
-
"test:node:lisa": "LISA_TEST_SCRATCH_PREFIXES='[\"node-\"]' lisa-test-run --profile npm-package --adapter direct -- node scripts/lisa-test-node.mjs",
|
|
13
|
-
"test:unit:lisa": "lisa-test-run --profile npm-package --adapter vitest -- vitest run --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
14
|
-
"test:watch:lisa": "lisa-test-run --profile npm-package --adapter vitest -- vitest"
|
|
7
|
+
"test:cov:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile npm-package --adapter vitest -- vitest run --coverage",
|
|
8
|
+
"test:cov:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && LISA_COVERAGE_SCOPE=unit lisa-test-run --profile npm-package --adapter vitest -- vitest run --coverage --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
9
|
+
"test:integration:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile npm-package --adapter vitest -- vitest run '.integration.' 'integration/'",
|
|
10
|
+
"test:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile npm-package --adapter vitest -- vitest run",
|
|
11
|
+
"test:mutation": "node scripts/lib/worktree-dependencies.mjs && LISA_TEST_SCRATCH_PREFIXES='[\"lisa-mutation-\",\"worker-\"]' lisa-test-run --profile npm-package --adapter direct -- node scripts/lisa-mutation.mjs",
|
|
12
|
+
"test:node:lisa": "node scripts/lib/worktree-dependencies.mjs && LISA_TEST_SCRATCH_PREFIXES='[\"node-\"]' lisa-test-run --profile npm-package --adapter direct -- node scripts/lisa-test-node.mjs",
|
|
13
|
+
"test:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile npm-package --adapter vitest -- vitest run --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
14
|
+
"test:watch:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile npm-package --adapter vitest -- vitest"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"vite": "^8.0.16",
|
package/package.json
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"scripts": {
|
|
3
3
|
"build": "bun run build:dist && bun run build:plugins",
|
|
4
|
-
"build:dist": "node scripts/clean-dist.mjs && tsc && node scripts/copy-codex-scripts.mjs && node scripts/copy-opencode-plugin-templates.mjs",
|
|
5
|
-
"build:dist:in-place": "tsc && node scripts/copy-codex-scripts.mjs && node scripts/copy-opencode-plugin-templates.mjs",
|
|
6
|
-
"lisa-test-run": "bun run build && node dist/cli/lisa-test-run.js --profile lisa",
|
|
7
|
-
"test:integration": "$npm_execpath run lisa-test-run -- --adapter vitest -- vitest run tests/integration",
|
|
8
|
-
"test:integration:push": "$npm_execpath run lisa-test-run -- --adapter vitest -- vitest run tests/integration --exclude='**/mutation-gate-bite.test.ts' --exclude='**/mutation-gate-diff-bite.test.ts' --exclude='**/mutation-sigterm-control.test.ts' --exclude='**/mutation-performance-fixture.test.ts' --exclude='**/mutation-performance-packed-apply.test.ts'",
|
|
4
|
+
"build:dist": "node scripts/lib/worktree-dependencies.mjs && node scripts/clean-dist.mjs && tsc && node scripts/copy-codex-scripts.mjs && node scripts/copy-opencode-plugin-templates.mjs",
|
|
5
|
+
"build:dist:in-place": "node scripts/lib/worktree-dependencies.mjs && tsc && node scripts/copy-codex-scripts.mjs && node scripts/copy-opencode-plugin-templates.mjs",
|
|
6
|
+
"lisa-test-run": "node scripts/lib/worktree-dependencies.mjs && bun run build && node dist/cli/lisa-test-run.js --profile lisa",
|
|
7
|
+
"test:integration": "node scripts/lib/worktree-dependencies.mjs && $npm_execpath run lisa-test-run -- --adapter vitest -- vitest run tests/integration",
|
|
8
|
+
"test:integration:push": "node scripts/lib/worktree-dependencies.mjs && $npm_execpath run lisa-test-run -- --adapter vitest -- vitest run tests/integration --exclude='**/mutation-gate-bite.test.ts' --exclude='**/mutation-gate-diff-bite.test.ts' --exclude='**/mutation-sigterm-control.test.ts' --exclude='**/mutation-performance-fixture.test.ts' --exclude='**/mutation-performance-packed-apply.test.ts'",
|
|
9
9
|
"postinstall": "bash ./scripts/install-claude-plugins.sh || true; node ./scripts/install-generated-artifact-merge-driver.mjs || true; [ ! -f tsconfig.json ] || tsc -p tsconfig.json || true",
|
|
10
10
|
"pretest": "bun run build",
|
|
11
|
-
"test": "$npm_execpath run lisa-test-run -- --adapter vitest -- vitest run",
|
|
12
|
-
"test:unit": "$npm_execpath run lisa-test-run -- --adapter vitest -- vitest run --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
13
|
-
"test:cov": "$npm_execpath run lisa-test-run -- --adapter vitest -- vitest run --coverage",
|
|
14
|
-
"test:cov:unit": "LISA_COVERAGE_SCOPE=unit $npm_execpath run lisa-test-run -- --adapter vitest -- vitest run --coverage --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
15
|
-
"test:cov:unit:push": "LISA_COVERAGE_SCOPE=unit $npm_execpath run lisa-test-run -- --adapter vitest -- vitest run --coverage --exclude='**/integration/**' --exclude='**/*.integration.*' --exclude='**/measure-tmpdir-growth-performance.test.ts'",
|
|
11
|
+
"test": "node scripts/lib/worktree-dependencies.mjs && $npm_execpath run lisa-test-run -- --adapter vitest -- vitest run",
|
|
12
|
+
"test:unit": "node scripts/lib/worktree-dependencies.mjs && $npm_execpath run lisa-test-run -- --adapter vitest -- vitest run --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
13
|
+
"test:cov": "node scripts/lib/worktree-dependencies.mjs && $npm_execpath run lisa-test-run -- --adapter vitest -- vitest run --coverage",
|
|
14
|
+
"test:cov:unit": "node scripts/lib/worktree-dependencies.mjs && LISA_COVERAGE_SCOPE=unit $npm_execpath run lisa-test-run -- --adapter vitest -- vitest run --coverage --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
15
|
+
"test:cov:unit:push": "node scripts/lib/worktree-dependencies.mjs && LISA_COVERAGE_SCOPE=unit $npm_execpath run lisa-test-run -- --adapter vitest -- vitest run --coverage --exclude='**/integration/**' --exclude='**/*.integration.*' --exclude='**/measure-tmpdir-growth-performance.test.ts'",
|
|
16
16
|
"pretest:mutation": "bun run build",
|
|
17
|
-
"test:mutation": "LISA_TEST_SCRATCH_PREFIXES='[\"lisa-mutation-\",\"worker-\"]' $npm_execpath run lisa-test-run -- --adapter direct -- node scripts/lisa-mutation.mjs",
|
|
18
|
-
"test:mutation:full": "LISA_TEST_SCRATCH_PREFIXES='[\"lisa-mutation-\",\"worker-\"]' $npm_execpath run lisa-test-run -- --adapter direct -- node scripts/lisa-mutation.mjs --all",
|
|
19
|
-
"lint": "oxlint --disable-nested-config && eslint . --quiet",
|
|
20
|
-
"lint:fix": "oxlint --fix --disable-nested-config && eslint . --fix",
|
|
21
|
-
"lint:slow": "eslint . --config eslint.slow.config.ts --quiet",
|
|
22
|
-
"typecheck": "tsc --noEmit && bun run typecheck:tests && bun run typecheck:engine-floor",
|
|
17
|
+
"test:mutation": "node scripts/lib/worktree-dependencies.mjs && LISA_TEST_SCRATCH_PREFIXES='[\"lisa-mutation-\",\"worker-\"]' $npm_execpath run lisa-test-run -- --adapter direct -- node scripts/lisa-mutation.mjs",
|
|
18
|
+
"test:mutation:full": "node scripts/lib/worktree-dependencies.mjs && LISA_TEST_SCRATCH_PREFIXES='[\"lisa-mutation-\",\"worker-\"]' $npm_execpath run lisa-test-run -- --adapter direct -- node scripts/lisa-mutation.mjs --all",
|
|
19
|
+
"lint": "node scripts/lib/worktree-dependencies.mjs && oxlint --disable-nested-config && eslint . --quiet",
|
|
20
|
+
"lint:fix": "node scripts/lib/worktree-dependencies.mjs && oxlint --fix --disable-nested-config && eslint . --fix",
|
|
21
|
+
"lint:slow": "node scripts/lib/worktree-dependencies.mjs && eslint . --config eslint.slow.config.ts --quiet",
|
|
22
|
+
"typecheck": "node scripts/lib/worktree-dependencies.mjs && tsc --noEmit && bun run typecheck:tests && bun run typecheck:engine-floor",
|
|
23
23
|
"typecheck:tests": "node scripts/check-typecheck-tests.mjs",
|
|
24
24
|
"typecheck:engine-floor": "node scripts/check-engine-floor.mjs",
|
|
25
25
|
"measure:scripts-profile-gap": "bun scripts/measure-scripts-profile-gap.mts",
|
|
26
|
-
"format:check": "prettier --check .",
|
|
27
|
-
"format": "prettier --check . --write",
|
|
28
|
-
"knip:check": "knip",
|
|
29
|
-
"knip:fix": "knip --fix",
|
|
30
|
-
"sg:scan": "ast-grep scan",
|
|
31
|
-
"sg:test": "ast-grep test",
|
|
26
|
+
"format:check": "node scripts/lib/worktree-dependencies.mjs && prettier --check .",
|
|
27
|
+
"format": "node scripts/lib/worktree-dependencies.mjs && prettier --check . --write",
|
|
28
|
+
"knip:check": "node scripts/lib/worktree-dependencies.mjs && knip",
|
|
29
|
+
"knip:fix": "node scripts/lib/worktree-dependencies.mjs && knip --fix",
|
|
30
|
+
"sg:scan": "node scripts/lib/worktree-dependencies.mjs && ast-grep scan",
|
|
31
|
+
"sg:test": "node scripts/lib/worktree-dependencies.mjs && ast-grep test",
|
|
32
32
|
"build:plugins": "bash scripts/build-plugins.sh",
|
|
33
33
|
"prepare": "node -e \"if (process.env.INIT_CWD?.includes('.serverless')) process.exit(0); process.exit(1);\" || husky install || true",
|
|
34
34
|
"start": "node dist/index.js",
|
|
35
35
|
"dev": "tsx src/index.ts",
|
|
36
|
-
"test:watch": "$npm_execpath run lisa-test-run -- --adapter vitest -- vitest",
|
|
36
|
+
"test:watch": "node scripts/lib/worktree-dependencies.mjs && $npm_execpath run lisa-test-run -- --adapter vitest -- vitest",
|
|
37
37
|
"update-node-version": "tsx scripts/update-node-version.ts",
|
|
38
38
|
"cleanup:amplify-branches": "bash scripts/cleanup-amplify-branches.sh",
|
|
39
39
|
"cleanup:github-branches": "bash scripts/cleanup-github-branches.sh",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"check:cwd-resolution-corpus": "node scripts/check-cwd-resolution-corpus.mjs",
|
|
72
72
|
"check:probe-absence-direction": "node scripts/check-probe-absence-direction.mjs",
|
|
73
73
|
"check:guard-parity-notes": "node scripts/check-guard-parity-notes.mjs",
|
|
74
|
-
"check:shell-guard-refusals": "bun run build && $npm_execpath run lisa-test-run -- --adapter direct -- node scripts/check-shell-guard-refusal-coverage.mjs --trace-out .lisa/shell-guard-trace.jsonl",
|
|
74
|
+
"check:shell-guard-refusals": "node scripts/lib/worktree-dependencies.mjs && bun run build && $npm_execpath run lisa-test-run -- --adapter direct -- node scripts/check-shell-guard-refusal-coverage.mjs --trace-out .lisa/shell-guard-trace.jsonl",
|
|
75
75
|
"check:workflow-inputs": "node scripts/detect-stale-workflow-inputs.mjs --project . --project typescript/create-only --project rails/create-only --json",
|
|
76
76
|
"check:conflict-markers": "node all/copy-overwrite/scripts/check-conflict-markers.mjs",
|
|
77
77
|
"check:vacuous-required-checks": "node typescript/copy-overwrite/scripts/check-skipped-required-checks.mjs --vacuity",
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"zod-validation-error": "^4.0.0"
|
|
188
188
|
},
|
|
189
189
|
"name": "@codyswann/lisa",
|
|
190
|
-
"version": "4.60.
|
|
190
|
+
"version": "4.60.4",
|
|
191
191
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
192
192
|
"main": "dist/index.js",
|
|
193
193
|
"exports": {
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
"test": "tests"
|
|
337
337
|
},
|
|
338
338
|
"types": "./dist/index.d.ts",
|
|
339
|
-
"lisaReleaseCommit": "
|
|
340
|
-
"gitHead": "
|
|
341
|
-
"lisaReleaseTag": "v4.60.
|
|
339
|
+
"lisaReleaseCommit": "a5aa6f4c2d82967499ffda11f3ab637dc3041ab7",
|
|
340
|
+
"gitHead": "a5aa6f4c2d82967499ffda11f3ab637dc3041ab7",
|
|
341
|
+
"lisaReleaseTag": "v4.60.4"
|
|
342
342
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"force": {
|
|
3
3
|
"scripts": {
|
|
4
|
-
"format": "prettier --write .",
|
|
5
|
-
"format:check:lisa": "prettier --check .",
|
|
6
|
-
"knip:check:lisa": "knip",
|
|
7
|
-
"knip:fix": "knip --fix",
|
|
8
|
-
"lint:fix": "oxlint --fix && eslint . --fix",
|
|
9
|
-
"lint:lisa": "oxlint && eslint . --quiet",
|
|
10
|
-
"lint:slow:lisa": "eslint . --config eslint.slow.config.ts --quiet",
|
|
4
|
+
"format": "node scripts/lib/worktree-dependencies.mjs && prettier --write .",
|
|
5
|
+
"format:check:lisa": "node scripts/lib/worktree-dependencies.mjs && prettier --check .",
|
|
6
|
+
"knip:check:lisa": "node scripts/lib/worktree-dependencies.mjs && knip",
|
|
7
|
+
"knip:fix": "node scripts/lib/worktree-dependencies.mjs && knip --fix",
|
|
8
|
+
"lint:fix": "node scripts/lib/worktree-dependencies.mjs && oxlint --fix && eslint . --fix",
|
|
9
|
+
"lint:lisa": "node scripts/lib/worktree-dependencies.mjs && oxlint && eslint . --quiet",
|
|
10
|
+
"lint:slow:lisa": "node scripts/lib/worktree-dependencies.mjs && eslint . --config eslint.slow.config.ts --quiet",
|
|
11
11
|
"prepare": "husky install || true",
|
|
12
12
|
"setup:deploy-key": "setup-deploy-key",
|
|
13
|
-
"sg:scan:lisa": "ast-grep scan",
|
|
14
|
-
"sg:test": "ast-grep test",
|
|
15
|
-
"test:cov:lisa": "lisa-test-run --profile phaser --adapter vitest -- vitest run --coverage",
|
|
16
|
-
"test:cov:unit:lisa": "LISA_COVERAGE_SCOPE=unit lisa-test-run --profile phaser --adapter vitest -- vitest run --coverage --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
17
|
-
"test:e2e": "lisa-test-run --profile phaser --adapter direct -- playwright test",
|
|
18
|
-
"test:integration:lisa": "lisa-test-run --profile phaser --adapter vitest -- vitest run '.integration.' 'integration/'",
|
|
19
|
-
"test:lisa": "lisa-test-run --profile phaser --adapter vitest -- vitest run",
|
|
20
|
-
"test:mutation": "LISA_TEST_SCRATCH_PREFIXES='[\"lisa-mutation-\",\"worker-\"]' lisa-test-run --profile phaser --adapter direct -- node scripts/lisa-mutation.mjs",
|
|
21
|
-
"test:node:lisa": "LISA_TEST_SCRATCH_PREFIXES='[\"node-\"]' lisa-test-run --profile phaser --adapter direct -- node scripts/lisa-test-node.mjs",
|
|
22
|
-
"test:unit:lisa": "lisa-test-run --profile phaser --adapter vitest -- vitest run --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
23
|
-
"test:watch:lisa": "lisa-test-run --profile phaser --adapter vitest -- vitest",
|
|
24
|
-
"typecheck:lisa": "tsc --noEmit"
|
|
13
|
+
"sg:scan:lisa": "node scripts/lib/worktree-dependencies.mjs && ast-grep scan",
|
|
14
|
+
"sg:test": "node scripts/lib/worktree-dependencies.mjs && ast-grep test",
|
|
15
|
+
"test:cov:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile phaser --adapter vitest -- vitest run --coverage",
|
|
16
|
+
"test:cov:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && LISA_COVERAGE_SCOPE=unit lisa-test-run --profile phaser --adapter vitest -- vitest run --coverage --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
17
|
+
"test:e2e": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile phaser --adapter direct -- playwright test",
|
|
18
|
+
"test:integration:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile phaser --adapter vitest -- vitest run '.integration.' 'integration/'",
|
|
19
|
+
"test:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile phaser --adapter vitest -- vitest run",
|
|
20
|
+
"test:mutation": "node scripts/lib/worktree-dependencies.mjs && LISA_TEST_SCRATCH_PREFIXES='[\"lisa-mutation-\",\"worker-\"]' lisa-test-run --profile phaser --adapter direct -- node scripts/lisa-mutation.mjs",
|
|
21
|
+
"test:node:lisa": "node scripts/lib/worktree-dependencies.mjs && LISA_TEST_SCRATCH_PREFIXES='[\"node-\"]' lisa-test-run --profile phaser --adapter direct -- node scripts/lisa-test-node.mjs",
|
|
22
|
+
"test:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile phaser --adapter vitest -- vitest run --exclude='**/integration/**' --exclude='**/*.integration.*'",
|
|
23
|
+
"test:watch:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile phaser --adapter vitest -- vitest",
|
|
24
|
+
"typecheck:lisa": "node scripts/lib/worktree-dependencies.mjs && tsc --noEmit"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@ast-grep/cli": "^0.40.4",
|
|
@@ -80,15 +80,15 @@
|
|
|
80
80
|
},
|
|
81
81
|
"defaults": {
|
|
82
82
|
"scripts": {
|
|
83
|
-
"build": "vite build",
|
|
84
|
-
"dev": "vite",
|
|
83
|
+
"build": "node scripts/lib/worktree-dependencies.mjs && vite build",
|
|
84
|
+
"dev": "node scripts/lib/worktree-dependencies.mjs && vite",
|
|
85
85
|
"format:check": "$npm_execpath run format:check:lisa",
|
|
86
86
|
"knip:check": "$npm_execpath run knip:check:lisa",
|
|
87
87
|
"lint": "$npm_execpath run lint:lisa",
|
|
88
88
|
"lint:slow": "$npm_execpath run lint:slow:lisa",
|
|
89
|
-
"preview": "vite preview",
|
|
89
|
+
"preview": "node scripts/lib/worktree-dependencies.mjs && vite preview",
|
|
90
90
|
"sg:scan": "$npm_execpath run sg:scan:lisa",
|
|
91
|
-
"size": "size-limit",
|
|
91
|
+
"size": "node scripts/lib/worktree-dependencies.mjs && size-limit",
|
|
92
92
|
"test": "$npm_execpath run test:lisa",
|
|
93
93
|
"test:cov": "$npm_execpath run test:cov:lisa",
|
|
94
94
|
"test:cov:unit": "$npm_execpath run test:cov:unit:lisa",
|
|
@@ -52,7 +52,8 @@ if [ -r "$lisa_guard_dedupe_lib" ]; then
|
|
|
52
52
|
# shellcheck source=guard-dedupe.bash
|
|
53
53
|
. "$lisa_guard_dedupe_lib"
|
|
54
54
|
trap 'lisa_guard_dedupe_record $?' EXIT
|
|
55
|
-
lisa_guard_dedupe block-instruction-file-edits "$input"
|
|
55
|
+
lisa_guard_dedupe block-instruction-file-edits "$input" \
|
|
56
|
+
"$lisa_guard_hook_dir/parity-safety-net-heredoc.py"
|
|
56
57
|
fi
|
|
57
58
|
|
|
58
59
|
command -v jq >/dev/null 2>&1 || exit 0
|
|
@@ -187,6 +188,15 @@ EOF
|
|
|
187
188
|
grep -Eqi '(agents|claude|copilot-instructions)\.md'; then
|
|
188
189
|
exit 0
|
|
189
190
|
fi
|
|
191
|
+
# Literal printf/echo arguments are content. The shared projection keeps
|
|
192
|
+
# the real redirect target, and leaves executable/ambiguous syntax intact.
|
|
193
|
+
if [[ "$command_str" =~ ^[[:blank:]]*(printf|echo)[[:blank:]] ]] \
|
|
194
|
+
&& command -v python3 >/dev/null 2>&1; then
|
|
195
|
+
if display_projection="$(printf '%s' "$command_str" | python3 \
|
|
196
|
+
"$lisa_guard_hook_dir/parity-safety-net-heredoc.py" --literal-display 2>/dev/null)"; then
|
|
197
|
+
command_str="$display_projection"
|
|
198
|
+
fi
|
|
199
|
+
fi
|
|
190
200
|
# Write signatures only. A bare mention (`cat AGENTS.md`, `rg x AGENTS.md`)
|
|
191
201
|
# is a read and must stay allowed — the filename has to appear as the target
|
|
192
202
|
# of a redirection, a tee, or an in-place sed.
|
|
@@ -229,6 +229,46 @@ def shell_tokens(prefix: str) -> list[str] | None:
|
|
|
229
229
|
return None
|
|
230
230
|
|
|
231
231
|
|
|
232
|
+
def literal_display_projection(command: str) -> str:
|
|
233
|
+
"""Remove data from one literal printer, retaining its real output target.
|
|
234
|
+
|
|
235
|
+
Reuse the literal simple-command grammar: pipes, chains, substitutions,
|
|
236
|
+
comments and ambiguous syntax keep the original scan. This is not a shell
|
|
237
|
+
parser or an execution exemption. ANSI-C quoting and computed targets also
|
|
238
|
+
keep their original scan rather than guessing their expanded spelling.
|
|
239
|
+
"""
|
|
240
|
+
if "$'" in command:
|
|
241
|
+
return command
|
|
242
|
+
|
|
243
|
+
def printer(text: str) -> bool:
|
|
244
|
+
tokens = shell_tokens(text)
|
|
245
|
+
if not tokens or len(tokens) < 2:
|
|
246
|
+
return False
|
|
247
|
+
if tokens[0] == "echo":
|
|
248
|
+
return True
|
|
249
|
+
if tokens[0] != "printf":
|
|
250
|
+
return False
|
|
251
|
+
arguments = tokens[2:] if tokens[1] == "--" else tokens[1:]
|
|
252
|
+
if not arguments or arguments[0].startswith("-"):
|
|
253
|
+
return False
|
|
254
|
+
# %n writes a variable (including an evaluated array subscript), and a
|
|
255
|
+
# dynamic format could select it. Only known display conversions qualify.
|
|
256
|
+
remaining = re.sub(r"%%|%[sbqQ]", "", arguments[0])
|
|
257
|
+
return not any(char in remaining for char in "%$`*?[]~")
|
|
258
|
+
|
|
259
|
+
if printer(command):
|
|
260
|
+
return "printf '%s' literal-display-content"
|
|
261
|
+
for redirect in re.finditer(r">>|>\||>", command):
|
|
262
|
+
if not printer(command[:redirect.start()]):
|
|
263
|
+
continue
|
|
264
|
+
target = shell_tokens(command[redirect.end():])
|
|
265
|
+
if target and len(target) == 1 and not any(
|
|
266
|
+
char in target[0] for char in "$`\\\n\r*?[]~"
|
|
267
|
+
):
|
|
268
|
+
return "printf '%s' literal-display-content " + redirect[0] + " " + shlex.quote(target[0])
|
|
269
|
+
return command
|
|
270
|
+
|
|
271
|
+
|
|
232
272
|
def is_allowed_gh(tokens: list[str]) -> bool:
|
|
233
273
|
return (
|
|
234
274
|
len(tokens) >= 3
|
|
@@ -905,6 +945,9 @@ def marker_is_closed(command: str, marker: Marker) -> bool:
|
|
|
905
945
|
|
|
906
946
|
def main() -> int:
|
|
907
947
|
command = sys.stdin.read()
|
|
948
|
+
if sys.argv[1:] == ["--literal-display"]:
|
|
949
|
+
print(literal_display_projection(command), end="")
|
|
950
|
+
return SAFE
|
|
908
951
|
if "<<" not in command:
|
|
909
952
|
print(command, end="")
|
|
910
953
|
return SAFE
|
|
@@ -431,6 +431,18 @@ case "$command_str" in
|
|
|
431
431
|
;;
|
|
432
432
|
esac
|
|
433
433
|
|
|
434
|
+
custom_command_for_guards="$command_for_guards"
|
|
435
|
+
# A single literal printer writes data, not shell commands. Keep its actual
|
|
436
|
+
# redirection in the scan; unsupported syntax and unavailable parsing retain
|
|
437
|
+
# the original text. Chained commands and shell substitutions never qualify.
|
|
438
|
+
if [[ "$command_for_guards" =~ ^[[:blank:]]*(printf|echo)[[:blank:]] ]] \
|
|
439
|
+
&& command -v python3 >/dev/null 2>&1; then
|
|
440
|
+
if display_projection="$(printf '%s' "$command_for_guards" | python3 \
|
|
441
|
+
"$lisa_guard_hook_dir/parity-safety-net-heredoc.py" --literal-display 2>/dev/null)"; then
|
|
442
|
+
command_for_guards="$display_projection"
|
|
443
|
+
fi
|
|
444
|
+
fi
|
|
445
|
+
|
|
434
446
|
# ─── Follow execution into the file a command RUNS (issue #3612) ─────────────
|
|
435
447
|
#
|
|
436
448
|
# Every guard below classifies SHELL COMMAND TEXT, and until this block existed
|
|
@@ -2380,6 +2392,9 @@ fi
|
|
|
2380
2392
|
# 16. Project-local custom rules. Each non-comment line is an ERE; a match blocks.
|
|
2381
2393
|
rules_file="${SAFETY_NET_RULES_FILE:-${CLAUDE_PROJECT_DIR:-$PWD}/.claude/safety-net-rules.txt}"
|
|
2382
2394
|
if [ -f "$rules_file" ]; then
|
|
2395
|
+
# Custom rules can intentionally govern text itself, so preserve their input.
|
|
2396
|
+
custom_command_str="$(printf '%s\n%s' "$custom_command_for_guards" "$followed_text" \
|
|
2397
|
+
| awk '{ if (sub(/\\$/, "")) printf "%s ", $0; else print }')"
|
|
2383
2398
|
while IFS= read -r rule || [ -n "$rule" ]; do
|
|
2384
2399
|
case "$rule" in
|
|
2385
2400
|
'' | '#'*) continue ;;
|
|
@@ -2393,7 +2408,7 @@ if [ -f "$rules_file" ]; then
|
|
|
2393
2408
|
# not a refusal. The `||` puts the pipeline in a condition context, where
|
|
2394
2409
|
# a non-zero status is expected rather than fatal.
|
|
2395
2410
|
rule_status=0
|
|
2396
|
-
printf '%s' "$
|
|
2411
|
+
printf '%s' "$custom_command_str" | grep -Eiq -- "$rule" || rule_status=$?
|
|
2397
2412
|
case "$rule_status" in
|
|
2398
2413
|
0) block "matched a project custom safety rule (${rules_file##*/}): $rule" ;;
|
|
2399
2414
|
1) ;; # no match
|