@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/README.md
CHANGED
|
@@ -242,15 +242,21 @@ conflicting Hooks path overrides refuse. Missing native settings directories are
|
|
|
242
242
|
created only on apply. Disabled or asynchronous guards, unsafe paths, duplicate
|
|
243
243
|
JSON keys and numbers that cannot be preserved exactly refuse before a write.
|
|
244
244
|
Managed default Claude settings continue through Skills' coordinated writer.
|
|
245
|
+
For those, the plan also runs that writer's own read-only checks on the exact
|
|
246
|
+
change: it parses the Skills agent policy and plans the update without writing.
|
|
247
|
+
When the writer would refuse, the plan refuses as apply does, with
|
|
248
|
+
`writer_refused` and the same `refusal: {code, message}`, and returns no digest.
|
|
245
249
|
|
|
246
250
|
The SDK exports `planNativeSafetyRegistration` and
|
|
247
251
|
`applyNativeSafetyRegistration`. Both return `nativeAdoptionVerified: false`.
|
|
248
252
|
A changed or uncertain apply requires a fresh read-only plan and inspection of
|
|
249
253
|
its recorded operation; no automatic retry or direct overwrite is performed.
|
|
250
|
-
A refusal
|
|
251
|
-
`refusal: {code, message}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
+
A writer refusal found while planning returns `writer_refused` with its cause as
|
|
255
|
+
`refusal: {code, message}`, from plan and apply alike; nothing is written or
|
|
256
|
+
journaled. A refusal later, before the write, returns `apply_refused` with its
|
|
257
|
+
cause and records `refused.json` beside the operation's intent; settings are
|
|
258
|
+
unchanged. Only a failure after the write may have started returns
|
|
259
|
+
`apply_outcome_uncertain`.
|
|
254
260
|
|
|
255
261
|
After registration, Codex trust uses its supported native configuration writer:
|
|
256
262
|
|