@hasna/hooks 0.12.6 → 0.12.8
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 +10 -4
- package/bin/hooks-mcp.js +3666 -1268
- package/bin/index.js +4104 -1723
- package/bin/native-safety-entry.js +25 -20
- package/bin/native-safety-worker.cjs +25 -20
- package/bin/serve.js +2 -2
- package/dist/index.js +3936 -1522
- package/dist/lib/claude-skills-coordination.d.ts +16 -2
- package/dist/lib/codex-safety-check.d.ts +1 -1
- package/dist/lib/installer.d.ts +11 -0
- package/dist/lib/native-safety-registration.d.ts +8 -3
- package/hooks/hook-trash-guard/README.md +49 -15
- package/hooks/hook-trash-guard/src/hook.ts +741 -125
- package/hooks/hook-workspace-repos-guard/src/hook.ts +274 -79
- package/hooks/shell-words.ts +368 -0
- package/package.json +2 -2
package/bin/serve.js
CHANGED
|
@@ -178,7 +178,7 @@ var HOOKS = [
|
|
|
178
178
|
timeoutSeconds: 10,
|
|
179
179
|
displayName: "Workspace Repos Guard",
|
|
180
180
|
description: "Blocks writes and deletes that break the protected repo-checkout structure (~/.hasna/repos/clones canonical, plus legacy ~/workspace/repos during the migration window): writes to a protected root, top-level entry creation, non-org folders, and any delete under a protected root",
|
|
181
|
-
version: "0.1.
|
|
181
|
+
version: "0.1.1",
|
|
182
182
|
category: "Git Safety",
|
|
183
183
|
event: "PreToolUse",
|
|
184
184
|
matcher: "^(Bash|Write|Edit|MultiEdit|NotebookEdit|apply_patch|ApplyPatch|functions\\.apply_patch)$",
|
|
@@ -190,7 +190,7 @@ var HOOKS = [
|
|
|
190
190
|
name: "trash-guard",
|
|
191
191
|
displayName: "Trash Guard",
|
|
192
192
|
description: "Rewrites rm issued through Bash into `trash guard`, so the delete lands in a recoverable trash store; refuses the delete when there is nothing to redirect to (trash absent, a delete verb it cannot rewrite, or the protected class: /, ~, ~/.hasna, ~/.ssh, ~/.aws)",
|
|
193
|
-
version: "0.1.
|
|
193
|
+
version: "0.1.2",
|
|
194
194
|
category: "Git Safety",
|
|
195
195
|
event: "PreToolUse",
|
|
196
196
|
matcher: "^(Bash|apply_patch|ApplyPatch|functions\\.apply_patch)$",
|