@codyswann/lisa 2.160.0 → 2.161.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/configs/eslint/harper-fabric.js +2 -2
- package/dist/configs/eslint/harper-fabric.js.map +1 -1
- package/harper-fabric/copy-contents/.prettierignore +4 -1
- package/harper-fabric/copy-overwrite/knip.json +2 -1
- package/harper-fabric/copy-overwrite/tsconfig.eslint.json +2 -1
- package/harper-fabric/merge/.oxlintrc.json +2 -1
- package/oxlint/harper-fabric.json +2 -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-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-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +12 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/hooks.json +11 -0
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/generated-artifact-globs.txt +4 -0
- package/plugins/lisa-harper-fabric/hooks/block-generated-artifact-edits.sh +72 -0
- package/plugins/lisa-harper-fabric-agy/generated-artifact-globs.txt +4 -0
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +12 -1
- package/plugins/lisa-harper-fabric-copilot/generated-artifact-globs.txt +4 -0
- package/plugins/lisa-harper-fabric-copilot/hooks/block-generated-artifact-edits.sh +72 -0
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/generated-artifact-globs.txt +4 -0
- package/plugins/lisa-harper-fabric-cursor/hooks/block-generated-artifact-edits.sh +72 -0
- package/plugins/lisa-harper-fabric-cursor/hooks/hooks.json +11 -0
- 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-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/harper-fabric/.claude-plugin/plugin.json +8 -0
- package/plugins/src/harper-fabric/generated-artifact-globs.txt +4 -0
- package/plugins/src/harper-fabric/hooks/block-generated-artifact-edits.sh +72 -0
- package/tsconfig/harper-fabric.json +3 -1
|
@@ -11,8 +11,8 @@ export const defaultHarperFabricIgnores = [
|
|
|
11
11
|
"*.config.local.ts",
|
|
12
12
|
"harper-app/resources.js",
|
|
13
13
|
"harper-app/resource-*.js",
|
|
14
|
-
"harper-app/web
|
|
15
|
-
"harper-app/
|
|
14
|
+
"harper-app/web/**",
|
|
15
|
+
"harper-app/lib/**",
|
|
16
16
|
];
|
|
17
17
|
/**
|
|
18
18
|
* Creates the Harper/Fabric ESLint configuration.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harper-fabric.js","sourceRoot":"","sources":["../../../src/configs/eslint/harper-fabric.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,GAAG,cAAc;IACjB,WAAW;IACX,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,yBAAyB;IACzB,0BAA0B;IAC1B,
|
|
1
|
+
{"version":3,"file":"harper-fabric.js","sourceRoot":"","sources":["../../../src/configs/eslint/harper-fabric.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,GAAG,cAAc;IACjB,WAAW;IACX,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,yBAAyB;IACzB,0BAA0B;IAC1B,mBAAmB;IACnB,mBAAmB;CACpB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,EACpC,eAAe,EACf,cAAc,GAAG,0BAA0B,EAC3C,UAAU,GAAG,iBAAiB,GAK/B;IACC,OAAO;QACL,GAAG,mBAAmB,CAAC;YACrB,eAAe;YACf,cAAc;YACd,UAAU;SACX,CAAC;QACF;YACE,KAAK,EAAE,CAAC,aAAa,CAAC;YACtB,KAAK,EAAE;gBACL,2BAA2B,EAAE,OAAO;gBACpC,mBAAmB,EAAE,OAAO;gBAC5B,iCAAiC,EAAE,OAAO;gBAC1C,0BAA0B,EAAE,OAAO;gBACnC,0CAA0C,EAAE,OAAO;aACpD;SACF;QACD;YACE,KAAK,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;YACnD,KAAK,EAAE;gBACL,2BAA2B,EAAE,KAAK;gBAClC,mBAAmB,EAAE,KAAK;gBAC1B,iCAAiC,EAAE,KAAK;gBACxC,0BAA0B,EAAE,KAAK;gBACjC,0CAA0C,EAAE,KAAK;aAClD;SACF;QACD;YACE,KAAK,EAAE,CAAC,qBAAqB,EAAE,eAAe,CAAC;YAC/C,KAAK,EAAE;gBACL,sBAAsB,EAAE,KAAK;aAC9B;SACF;KACiB,CAAC;AACvB,CAAC"}
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Harper/Fabric generated web output and scraped research captures are not
|
|
4
4
|
# source formatting inputs.
|
|
5
|
-
harper-app/
|
|
5
|
+
harper-app/resources.js
|
|
6
|
+
harper-app/resource-*.js
|
|
7
|
+
harper-app/web/**
|
|
8
|
+
harper-app/lib/**
|
|
6
9
|
research/articles/
|
|
7
10
|
|
|
8
11
|
# END: AI GUARDRAILS HARPER-FABRIC
|
package/package.json
CHANGED
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"lodash": ">=4.18.1"
|
|
85
85
|
},
|
|
86
86
|
"name": "@codyswann/lisa",
|
|
87
|
-
"version": "2.
|
|
87
|
+
"version": "2.161.0",
|
|
88
88
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
89
89
|
"main": "dist/index.js",
|
|
90
90
|
"exports": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-harper-fabric",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.161.0",
|
|
4
4
|
"description": "Harper/Fabric-specific rules for TypeScript component apps",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -9,6 +9,17 @@
|
|
|
9
9
|
"lisa-typescript"
|
|
10
10
|
],
|
|
11
11
|
"hooks": {
|
|
12
|
+
"PreToolUse": [
|
|
13
|
+
{
|
|
14
|
+
"matcher": "Write|Edit|MultiEdit",
|
|
15
|
+
"hooks": [
|
|
16
|
+
{
|
|
17
|
+
"type": "command",
|
|
18
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/block-generated-artifact-edits.sh"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
],
|
|
12
23
|
"SessionStart": [
|
|
13
24
|
{
|
|
14
25
|
"matcher": "",
|
|
@@ -0,0 +1,72 @@
|
|
|
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: block Write/Edit/MultiEdit on generated Harper deploy
|
|
6
|
+
# artifacts. Harper/Fabric projects build these files from TypeScript under
|
|
7
|
+
# src/, so direct edits are overwritten by the next build and usually ship as
|
|
8
|
+
# no-op fixes.
|
|
9
|
+
# Reference: https://docs.claude.com/en/docs/claude-code/hooks
|
|
10
|
+
# Exit code 2 blocks the tool call and surfaces stderr to Claude.
|
|
11
|
+
|
|
12
|
+
JSON_INPUT=$(cat)
|
|
13
|
+
|
|
14
|
+
command -v jq >/dev/null 2>&1 || exit 0
|
|
15
|
+
|
|
16
|
+
FILE_PATH=$(printf '%s' "$JSON_INPUT" | jq -r '.tool_input.file_path // empty')
|
|
17
|
+
[ -n "$FILE_PATH" ] || exit 0
|
|
18
|
+
|
|
19
|
+
PLUGIN_ROOT=${CLAUDE_PLUGIN_ROOT:-}
|
|
20
|
+
if [ -z "$PLUGIN_ROOT" ]; then
|
|
21
|
+
PLUGIN_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
22
|
+
fi
|
|
23
|
+
GLOBS_FILE="$PLUGIN_ROOT/generated-artifact-globs.txt"
|
|
24
|
+
[ -f "$GLOBS_FILE" ] || exit 0
|
|
25
|
+
|
|
26
|
+
normalize_path() {
|
|
27
|
+
local path="$1"
|
|
28
|
+
path="${path#./}"
|
|
29
|
+
printf '%s' "$path"
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
matches_glob() {
|
|
33
|
+
local file="$1"
|
|
34
|
+
local glob="$2"
|
|
35
|
+
|
|
36
|
+
if [ "${glob: -3}" = "/**" ]; then
|
|
37
|
+
local dir="${glob%/**}"
|
|
38
|
+
case "$file" in
|
|
39
|
+
"$dir"/* | */"$dir"/*) return 0 ;;
|
|
40
|
+
esac
|
|
41
|
+
return 1
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
case "$file" in
|
|
45
|
+
$glob | */$glob) return 0 ;;
|
|
46
|
+
esac
|
|
47
|
+
|
|
48
|
+
return 1
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
NORMALIZED_FILE=$(normalize_path "$FILE_PATH")
|
|
52
|
+
|
|
53
|
+
while IFS= read -r glob || [ -n "$glob" ]; do
|
|
54
|
+
[ -n "$glob" ] || continue
|
|
55
|
+
case "$glob" in \#*) continue ;; esac
|
|
56
|
+
|
|
57
|
+
if matches_glob "$NORMALIZED_FILE" "$glob"; then
|
|
58
|
+
cat >&2 <<MSG
|
|
59
|
+
Blocked: direct edit to generated Harper/Fabric artifact.
|
|
60
|
+
|
|
61
|
+
File: $FILE_PATH
|
|
62
|
+
Matched generated artifact pattern: $glob
|
|
63
|
+
|
|
64
|
+
TypeScript under src/ is the source of truth for Harper resources, web assets,
|
|
65
|
+
and shared libraries. Change the matching TypeScript source under src/ and run
|
|
66
|
+
the project build to regenerate harper-app outputs.
|
|
67
|
+
MSG
|
|
68
|
+
exit 2
|
|
69
|
+
fi
|
|
70
|
+
done <"$GLOBS_FILE"
|
|
71
|
+
|
|
72
|
+
exit 0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-harper-fabric",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.161.0",
|
|
4
4
|
"description": "Harper/Fabric-specific rules for TypeScript component apps",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -9,6 +9,17 @@
|
|
|
9
9
|
"lisa-typescript"
|
|
10
10
|
],
|
|
11
11
|
"hooks": {
|
|
12
|
+
"preToolUse": [
|
|
13
|
+
{
|
|
14
|
+
"matcher": "Write|Edit|MultiEdit",
|
|
15
|
+
"hooks": [
|
|
16
|
+
{
|
|
17
|
+
"type": "command",
|
|
18
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/block-generated-artifact-edits.sh"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
],
|
|
12
23
|
"sessionStart": [
|
|
13
24
|
{
|
|
14
25
|
"matcher": "",
|
|
@@ -0,0 +1,72 @@
|
|
|
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: block Write/Edit/MultiEdit on generated Harper deploy
|
|
6
|
+
# artifacts. Harper/Fabric projects build these files from TypeScript under
|
|
7
|
+
# src/, so direct edits are overwritten by the next build and usually ship as
|
|
8
|
+
# no-op fixes.
|
|
9
|
+
# Reference: https://docs.claude.com/en/docs/claude-code/hooks
|
|
10
|
+
# Exit code 2 blocks the tool call and surfaces stderr to Claude.
|
|
11
|
+
|
|
12
|
+
JSON_INPUT=$(cat)
|
|
13
|
+
|
|
14
|
+
command -v jq >/dev/null 2>&1 || exit 0
|
|
15
|
+
|
|
16
|
+
FILE_PATH=$(printf '%s' "$JSON_INPUT" | jq -r '.tool_input.file_path // empty')
|
|
17
|
+
[ -n "$FILE_PATH" ] || exit 0
|
|
18
|
+
|
|
19
|
+
PLUGIN_ROOT=${CLAUDE_PLUGIN_ROOT:-}
|
|
20
|
+
if [ -z "$PLUGIN_ROOT" ]; then
|
|
21
|
+
PLUGIN_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
22
|
+
fi
|
|
23
|
+
GLOBS_FILE="$PLUGIN_ROOT/generated-artifact-globs.txt"
|
|
24
|
+
[ -f "$GLOBS_FILE" ] || exit 0
|
|
25
|
+
|
|
26
|
+
normalize_path() {
|
|
27
|
+
local path="$1"
|
|
28
|
+
path="${path#./}"
|
|
29
|
+
printf '%s' "$path"
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
matches_glob() {
|
|
33
|
+
local file="$1"
|
|
34
|
+
local glob="$2"
|
|
35
|
+
|
|
36
|
+
if [ "${glob: -3}" = "/**" ]; then
|
|
37
|
+
local dir="${glob%/**}"
|
|
38
|
+
case "$file" in
|
|
39
|
+
"$dir"/* | */"$dir"/*) return 0 ;;
|
|
40
|
+
esac
|
|
41
|
+
return 1
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
case "$file" in
|
|
45
|
+
$glob | */$glob) return 0 ;;
|
|
46
|
+
esac
|
|
47
|
+
|
|
48
|
+
return 1
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
NORMALIZED_FILE=$(normalize_path "$FILE_PATH")
|
|
52
|
+
|
|
53
|
+
while IFS= read -r glob || [ -n "$glob" ]; do
|
|
54
|
+
[ -n "$glob" ] || continue
|
|
55
|
+
case "$glob" in \#*) continue ;; esac
|
|
56
|
+
|
|
57
|
+
if matches_glob "$NORMALIZED_FILE" "$glob"; then
|
|
58
|
+
cat >&2 <<MSG
|
|
59
|
+
Blocked: direct edit to generated Harper/Fabric artifact.
|
|
60
|
+
|
|
61
|
+
File: $FILE_PATH
|
|
62
|
+
Matched generated artifact pattern: $glob
|
|
63
|
+
|
|
64
|
+
TypeScript under src/ is the source of truth for Harper resources, web assets,
|
|
65
|
+
and shared libraries. Change the matching TypeScript source under src/ and run
|
|
66
|
+
the project build to regenerate harper-app outputs.
|
|
67
|
+
MSG
|
|
68
|
+
exit 2
|
|
69
|
+
fi
|
|
70
|
+
done <"$GLOBS_FILE"
|
|
71
|
+
|
|
72
|
+
exit 0
|
|
@@ -0,0 +1,72 @@
|
|
|
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: block Write/Edit/MultiEdit on generated Harper deploy
|
|
6
|
+
# artifacts. Harper/Fabric projects build these files from TypeScript under
|
|
7
|
+
# src/, so direct edits are overwritten by the next build and usually ship as
|
|
8
|
+
# no-op fixes.
|
|
9
|
+
# Reference: https://docs.claude.com/en/docs/claude-code/hooks
|
|
10
|
+
# Exit code 2 blocks the tool call and surfaces stderr to Claude.
|
|
11
|
+
|
|
12
|
+
JSON_INPUT=$(cat)
|
|
13
|
+
|
|
14
|
+
command -v jq >/dev/null 2>&1 || exit 0
|
|
15
|
+
|
|
16
|
+
FILE_PATH=$(printf '%s' "$JSON_INPUT" | jq -r '.tool_input.file_path // empty')
|
|
17
|
+
[ -n "$FILE_PATH" ] || exit 0
|
|
18
|
+
|
|
19
|
+
PLUGIN_ROOT=${CLAUDE_PLUGIN_ROOT:-}
|
|
20
|
+
if [ -z "$PLUGIN_ROOT" ]; then
|
|
21
|
+
PLUGIN_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
22
|
+
fi
|
|
23
|
+
GLOBS_FILE="$PLUGIN_ROOT/generated-artifact-globs.txt"
|
|
24
|
+
[ -f "$GLOBS_FILE" ] || exit 0
|
|
25
|
+
|
|
26
|
+
normalize_path() {
|
|
27
|
+
local path="$1"
|
|
28
|
+
path="${path#./}"
|
|
29
|
+
printf '%s' "$path"
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
matches_glob() {
|
|
33
|
+
local file="$1"
|
|
34
|
+
local glob="$2"
|
|
35
|
+
|
|
36
|
+
if [ "${glob: -3}" = "/**" ]; then
|
|
37
|
+
local dir="${glob%/**}"
|
|
38
|
+
case "$file" in
|
|
39
|
+
"$dir"/* | */"$dir"/*) return 0 ;;
|
|
40
|
+
esac
|
|
41
|
+
return 1
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
case "$file" in
|
|
45
|
+
$glob | */$glob) return 0 ;;
|
|
46
|
+
esac
|
|
47
|
+
|
|
48
|
+
return 1
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
NORMALIZED_FILE=$(normalize_path "$FILE_PATH")
|
|
52
|
+
|
|
53
|
+
while IFS= read -r glob || [ -n "$glob" ]; do
|
|
54
|
+
[ -n "$glob" ] || continue
|
|
55
|
+
case "$glob" in \#*) continue ;; esac
|
|
56
|
+
|
|
57
|
+
if matches_glob "$NORMALIZED_FILE" "$glob"; then
|
|
58
|
+
cat >&2 <<MSG
|
|
59
|
+
Blocked: direct edit to generated Harper/Fabric artifact.
|
|
60
|
+
|
|
61
|
+
File: $FILE_PATH
|
|
62
|
+
Matched generated artifact pattern: $glob
|
|
63
|
+
|
|
64
|
+
TypeScript under src/ is the source of truth for Harper resources, web assets,
|
|
65
|
+
and shared libraries. Change the matching TypeScript source under src/ and run
|
|
66
|
+
the project build to regenerate harper-app outputs.
|
|
67
|
+
MSG
|
|
68
|
+
exit 2
|
|
69
|
+
fi
|
|
70
|
+
done <"$GLOBS_FILE"
|
|
71
|
+
|
|
72
|
+
exit 0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.161.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.161.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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.161.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.161.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.161.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"
|
|
@@ -5,6 +5,14 @@
|
|
|
5
5
|
"author": { "name": "Cody Swann" },
|
|
6
6
|
"dependencies": ["lisa-typescript"],
|
|
7
7
|
"hooks": {
|
|
8
|
+
"PreToolUse": [
|
|
9
|
+
{
|
|
10
|
+
"matcher": "Write|Edit|MultiEdit",
|
|
11
|
+
"hooks": [
|
|
12
|
+
{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/block-generated-artifact-edits.sh" }
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
],
|
|
8
16
|
"SessionStart": [
|
|
9
17
|
{ "matcher": "", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/inject-rules.sh" }] }
|
|
10
18
|
],
|
|
@@ -0,0 +1,72 @@
|
|
|
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: block Write/Edit/MultiEdit on generated Harper deploy
|
|
6
|
+
# artifacts. Harper/Fabric projects build these files from TypeScript under
|
|
7
|
+
# src/, so direct edits are overwritten by the next build and usually ship as
|
|
8
|
+
# no-op fixes.
|
|
9
|
+
# Reference: https://docs.claude.com/en/docs/claude-code/hooks
|
|
10
|
+
# Exit code 2 blocks the tool call and surfaces stderr to Claude.
|
|
11
|
+
|
|
12
|
+
JSON_INPUT=$(cat)
|
|
13
|
+
|
|
14
|
+
command -v jq >/dev/null 2>&1 || exit 0
|
|
15
|
+
|
|
16
|
+
FILE_PATH=$(printf '%s' "$JSON_INPUT" | jq -r '.tool_input.file_path // empty')
|
|
17
|
+
[ -n "$FILE_PATH" ] || exit 0
|
|
18
|
+
|
|
19
|
+
PLUGIN_ROOT=${CLAUDE_PLUGIN_ROOT:-}
|
|
20
|
+
if [ -z "$PLUGIN_ROOT" ]; then
|
|
21
|
+
PLUGIN_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
22
|
+
fi
|
|
23
|
+
GLOBS_FILE="$PLUGIN_ROOT/generated-artifact-globs.txt"
|
|
24
|
+
[ -f "$GLOBS_FILE" ] || exit 0
|
|
25
|
+
|
|
26
|
+
normalize_path() {
|
|
27
|
+
local path="$1"
|
|
28
|
+
path="${path#./}"
|
|
29
|
+
printf '%s' "$path"
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
matches_glob() {
|
|
33
|
+
local file="$1"
|
|
34
|
+
local glob="$2"
|
|
35
|
+
|
|
36
|
+
if [ "${glob: -3}" = "/**" ]; then
|
|
37
|
+
local dir="${glob%/**}"
|
|
38
|
+
case "$file" in
|
|
39
|
+
"$dir"/* | */"$dir"/*) return 0 ;;
|
|
40
|
+
esac
|
|
41
|
+
return 1
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
case "$file" in
|
|
45
|
+
$glob | */$glob) return 0 ;;
|
|
46
|
+
esac
|
|
47
|
+
|
|
48
|
+
return 1
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
NORMALIZED_FILE=$(normalize_path "$FILE_PATH")
|
|
52
|
+
|
|
53
|
+
while IFS= read -r glob || [ -n "$glob" ]; do
|
|
54
|
+
[ -n "$glob" ] || continue
|
|
55
|
+
case "$glob" in \#*) continue ;; esac
|
|
56
|
+
|
|
57
|
+
if matches_glob "$NORMALIZED_FILE" "$glob"; then
|
|
58
|
+
cat >&2 <<MSG
|
|
59
|
+
Blocked: direct edit to generated Harper/Fabric artifact.
|
|
60
|
+
|
|
61
|
+
File: $FILE_PATH
|
|
62
|
+
Matched generated artifact pattern: $glob
|
|
63
|
+
|
|
64
|
+
TypeScript under src/ is the source of truth for Harper resources, web assets,
|
|
65
|
+
and shared libraries. Change the matching TypeScript source under src/ and run
|
|
66
|
+
the project build to regenerate harper-app outputs.
|
|
67
|
+
MSG
|
|
68
|
+
exit 2
|
|
69
|
+
fi
|
|
70
|
+
done <"$GLOBS_FILE"
|
|
71
|
+
|
|
72
|
+
exit 0
|