@hasna/hooks 0.12.7 → 0.12.9
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 +14 -1
- package/bin/hooks-mcp.js +982 -608
- package/bin/index.js +1322 -930
- package/bin/native-safety-worker.cjs +1 -1
- package/dist/index.js +1229 -825
- package/dist/lib/claude-skills-coordination.d.ts +1 -1
- package/dist/lib/codex-safety-check.d.ts +7 -3
- package/dist/lib/codex-safety-trust.d.ts +24 -4
- package/dist/lib/installer.d.ts +7 -2
- package/dist/lib/native-safety-registration.d.ts +25 -2
- package/dist/native-safety.d.ts +10 -2
- package/dist/native-safety.js +18 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -235,6 +235,16 @@ hooks safety registration-apply --target codex --expected-plan-digest PLAN_SHA25
|
|
|
235
235
|
# The same two commands support --target claude.
|
|
236
236
|
```
|
|
237
237
|
|
|
238
|
+
Both commands, and `trust-plan`/`trust-apply` below, take
|
|
239
|
+
`--guard trash-guard|workspace-repos-guard` (default `trash-guard`). Only the
|
|
240
|
+
selected guard's own entry is rendered and written; every other entry, a
|
|
241
|
+
disabled one included, keeps its exact bytes. A plan digest for one guard is
|
|
242
|
+
never accepted by an apply for the other. trash-guard is verified by having its
|
|
243
|
+
supervisor rewrite a synthetic removal into Trash; workspace-repos-guard, which
|
|
244
|
+
never rewrites, by having its supervisor refuse a synthetic removal below
|
|
245
|
+
`~/.hasna/repos/clones` with the guard's exact reason. Neither removal is run,
|
|
246
|
+
and neither path is created.
|
|
247
|
+
|
|
238
248
|
Apply checks the exact predecessor, retains an owner-only original and intent,
|
|
239
249
|
and reads back the result. An identical registration returns unchanged without
|
|
240
250
|
rewriting its settings. The planner honors `CODEX_HOME` and `CLAUDE_CONFIG_DIR`;
|
|
@@ -289,13 +299,16 @@ CLI (`hooks --version`), after installing that version:
|
|
|
289
299
|
hooks safety registration-plan --target claude
|
|
290
300
|
hooks safety registration-apply --target claude --expected-plan-digest PLAN_SHA256
|
|
291
301
|
# Only where the repository guard is registered under its own name:
|
|
292
|
-
hooks safety
|
|
302
|
+
hooks safety registration-plan --target claude --guard workspace-repos-guard
|
|
303
|
+
hooks safety registration-apply --target claude --guard workspace-repos-guard --expected-plan-digest PLAN_SHA256
|
|
293
304
|
|
|
294
305
|
# Codex (a changed definition runs only after it is trusted again)
|
|
295
306
|
hooks safety registration-plan --target codex
|
|
296
307
|
hooks safety registration-apply --target codex --expected-plan-digest PLAN_SHA256
|
|
297
308
|
hooks safety trust-plan --target codex --cwd /path/to/project --codex-command /absolute/path/to/native/codex
|
|
298
309
|
hooks safety trust-apply --target codex --cwd /path/to/project --codex-command /absolute/path/to/native/codex --expected-plan-digest PLAN_SHA256
|
|
310
|
+
# Where Codex runs the repository guard under its own name, repeat the four
|
|
311
|
+
# Codex commands with --guard workspace-repos-guard.
|
|
299
312
|
|
|
300
313
|
# Sumi
|
|
301
314
|
hooks safety verify --target sumi # prints the current binding's sha256
|