@hasna/hooks 0.12.18 → 0.12.20
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 +34 -0
- package/bin/index.js +533 -153
- package/bin/native-safety-entry.js +32 -29
- package/bin/native-safety-worker.cjs +32 -29
- package/dist/index.js +3 -2
- package/dist/lib/codex-safety-check.d.ts +4 -0
- package/hooks/codewith-native-common.ts +47 -8
- package/hooks/hook-trash-guard/src/hook.ts +84 -84
- package/hooks/hook-workspace-repos-guard/src/hook.ts +8 -4
- package/hooks/local-executors.ts +26 -1
- package/hooks/native-safety-composite.ts +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -542,6 +542,40 @@ overrides on the intended consumer. A stock OpenCode build has no guarded stop
|
|
|
542
542
|
capability: this plugin refuses registration there. Disk verification reports
|
|
543
543
|
`nativeAdoptionVerified: false` until a real native invocation proves adoption.
|
|
544
544
|
|
|
545
|
+
For Sumi 0.2.69 or a compatible native guarded-stop build, register the public
|
|
546
|
+
`@hasna/hooks/sumi-stop-plugin` factory in a dedicated project first:
|
|
547
|
+
|
|
548
|
+
```sh
|
|
549
|
+
hooks install stop-review --target sumi --project --dry-run --json
|
|
550
|
+
hooks install stop-review --target sumi --project --expected-config-sha256 <planned-digest-or-absent> --json
|
|
551
|
+
hooks install stop-review --target sumi --project --verify --json
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
This writes only `.sumi/plugins/hasna-hooks-stop-review.js` in the current
|
|
555
|
+
project directory, which must be the fresh consumer’s working directory. It refuses
|
|
556
|
+
project registration when Sumi’s project-discovery disable flags are enabled or
|
|
557
|
+
the working directory is Sumi’s global config root. Global scope follows an absolute
|
|
558
|
+
`SUMI_CONFIG_DIR`, then `$XDG_CONFIG_HOME/sumi`, then `$SUMI_HOME/config`.
|
|
559
|
+
Without an override it follows Sumi's canonical native config home
|
|
560
|
+
and adopted `~/.config/sumi` aliases, preserving a live legacy home. It does not
|
|
561
|
+
perform Sumi's home migration; independent canonical/legacy directories are refused
|
|
562
|
+
until Sumi reconciles them. Sumi discovers the default-export plugin itself; the installer does not
|
|
563
|
+
add a file entry to `sumi.json`. It preserves unrelated configuration/plugins
|
|
564
|
+
and the exact previous managed wrapper, refuses conflicting or unsafe paths,
|
|
565
|
+
and pins the retained public transport, Hooks CLI and runtime by SHA-256.
|
|
566
|
+
An identical registration is a no-op; updates require the current wrapper digest.
|
|
567
|
+
Unknown targets are refused before any Claude registration can occur.
|
|
568
|
+
|
|
569
|
+
Sumi watches native plugin directories. Applying a wrapper can affect a running
|
|
570
|
+
consumer of that project or global directory: use a fresh dedicated project for
|
|
571
|
+
a canary and do not change a shared directory until its consumers are compatible.
|
|
572
|
+
The factory refuses consumers without the parent-owned `hooks.stop-review.v1`
|
|
573
|
+
capability. Registration does not sync or trust a hook, enable the runtime policy,
|
|
574
|
+
change Instructions/Secrets references, or start/restart Sumi. Those remain
|
|
575
|
+
separate supported steps. Verification reports `nativeAdoptionVerified: false`;
|
|
576
|
+
confirm exactly one active `local.hasna-hooks-stop-review` with the expected local
|
|
577
|
+
wrapper path in native `/api/plugin`, then prove a guarded stop in a fresh session.
|
|
578
|
+
|
|
545
579
|
**Registry server.** `hooks serve` exposes the configured registry over HTTP:
|
|
546
580
|
|
|
547
581
|
```bash
|