docs(plugins): describe full-identity hook grants on apm 0.39

The kyberforge and delivery hook docs still described apm 0.28.0: a bare
kyberforge#<version> or delivery key matching, and "parked pending
approval" printed for a granted package. On 0.39.3 a bare key parks the
hook and deploys nothing with exit 0, the full
<host>/<owner>/<repo>/<path> identity is required, and the #<version>
suffix is still ignored when matching. Re-run the copilot and codex hook
placement on 0.39.3: with codex in targets, apm now creates .codex/
itself.

Refs: #273

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
This commit is contained in:
Defame1297andClaude Opus 5.5 committed 2026-12-02 11:59:17 +00:00
1 parent 0fb106b731
commit aaada85e26
2 files changed
+27 -16

No files matched your search

+10 -6
View File
@@ -152,7 +152,7 @@ The script tells runtimes apart by where apm deployed it:
|---|---|---|
| `.claude/hooks/` | Claude Code | Output is `hookSpecificOutput.permissionDecision`. `onFailure: block` makes a crash or timeout block the call (Claude Code ≥ 2.1.295). Verified live on 2.1.326. |
| `.github/hooks/scripts/` | Copilot CLI | Output is top-level `permissionDecision` plus a reason. A non-zero exit denies, but a **timeout lets the call through**. The TUI auto-approves `ask` (ADR-0032 accepted risk). apm writes the entry in Claude's nested shape with `command`/`timeout`, and Copilot's docs accept both keys but don't document the nested group, so it is **unverified** until a Copilot account exists. |
| `.codex/hooks/` | Codex | `ask` is unsupported, so the guard denies with exit 2 and the reason on stderr. apm deploys only if `.codex/` already exists, and Codex skips project hooks until a human trusts them. Codex resolves the relative command from the session cwd, so a session started in a subdirectory may not find the script. |
| `.codex/hooks/` | Codex | `ask` is unsupported, so the guard denies with exit 2 and the reason on stderr. apm deploys it when the consuming project targets `codex`; with `codex` in `targets:`, apm 0.39.3 creates `.codex/` itself. Codex skips project hooks until a human trusts them. Codex resolves the relative command from the session cwd, so a session started in a subdirectory may not find the script. |
| anywhere else | unknown | Treated like Codex: odd jobs are denied, with exit 2. The payload's shape (`toolName` or `tool_name`) picks only how the payload is read, never the runtime. |
## What a consuming repo needs
@@ -160,18 +160,22 @@ The script tells runtimes apart by where apm deployed it:
- `python3` on PATH. The script uses the standard library only. Without python3 the hook cannot
start, which blocks every tool call on Claude Code and Copilot. That's deliberate.
- An `executables.allow` grant for the package in the repo's `apm.yml`, when that repo turns on apm's
executable-trust gate:
executable-trust gate. On apm 0.39 the key is the package's full identity, as
`apm approve --list` prints it:
```yaml
executables:
allow:
delivery:
git.rkdr.net/Mortis/Holocron/plugins/delivery:
hooks: true
```
apm 0.28.0 prints "parked pending approval" even when the grant matches (holocron#208). Check that
the hook actually deployed by looking for `guard.py` under `.claude/hooks/delivery/` and the
`PreToolUse` entry in `.claude/settings.json`. Don't rely on the install exit code.
A bare `delivery` key, which apm 0.28.0 matched, no longer does: under 0.39.3 the hook is parked
("parked pending approval"), nothing deploys, and install still exits 0. A `#<version>` suffix on
the key is ignored when matching. Check that the hook actually deployed by looking for `guard.py`
under `.claude/hooks/delivery/` and the `PreToolUse` entry in `.claude/settings.json`. Don't rely
on the install exit code. apm 0.28.0 also printed "parked pending approval" when the grant matched
(holocron#208); 0.39.3 does not.
- Host hardening is documented, not shipped (ADR-0032 layer 3). Examples are Claude permission
deny rules, sandbox `denyRead` on the vault password file, and managed settings with
`allowManagedHooksOnly` so the guard cannot be switched off.