@zgeoff/skill-gate 0.2.1 → 0.2.3
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/README.md +9 -10
- package/dist/index.js +1118 -0
- package/package.json +5 -9
- package/src/build-bash-skill-gate-output.ts +0 -41
- package/src/build-skill-gate-output.ts +0 -54
- package/src/collect-gate-skills.ts +0 -19
- package/src/collect-loaded-skills.ts +0 -98
- package/src/collect-written-paths.ts +0 -450
- package/src/format-skill-list.ts +0 -10
- package/src/index.ts +0 -1
- package/src/parse-shell-commands.ts +0 -429
- package/src/parse-skill-gate-rules.ts +0 -72
- package/src/plan-bash-skill-gate.ts +0 -21
- package/src/plan-skill-gate.ts +0 -21
- package/src/run-skill-gate.ts +0 -235
- package/src/types.ts +0 -96
package/README.md
CHANGED
|
@@ -16,18 +16,17 @@ Install it at the repo root, so that Bun resolves it from `.claude/hooks/`. The
|
|
|
16
16
|
|
|
17
17
|
## Entry point
|
|
18
18
|
|
|
19
|
-
The hook runs a file in the repo that calls the package
|
|
20
|
-
`.claude/hooks/skill-gate/skill-gate.ts
|
|
19
|
+
The hook runs a file in the repo that calls the package's `runSkillGate`, at
|
|
20
|
+
`.claude/hooks/skill-gate/skill-gate.ts`. The `hook-skill-gate` entry of repo-sync delivers this
|
|
21
|
+
file from zgeoff/tools. `runSkillGate` reads the hook payload from stdin, prints the hook output,
|
|
22
|
+
and exits the process.
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
The entry point fails closed. When the package cannot load, the entry point blocks each edit that a
|
|
25
|
+
gate in the rules file matches, and its error names the load failure. It also blocks every edit
|
|
26
|
+
inside the project when it cannot read the rules file or the file does not parse. Any other call
|
|
27
|
+
runs, and the hook reports the load failure as a non-blocking error.
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
The `hook-skill-gate` entry of repo-sync delivers this file from zgeoff/tools. `runSkillGate` reads
|
|
29
|
-
the hook payload from stdin, prints the hook output, and exits the process. Register the entry point
|
|
30
|
-
in `.claude/settings.json`:
|
|
29
|
+
Register the entry point in `.claude/settings.json`:
|
|
31
30
|
|
|
32
31
|
```json
|
|
33
32
|
{
|