Swap PreToolUse registry check to cli-guard Registry API #26

Closed
opened 2026-05-27 23:45:27 +00:00 by coilysiren · 0 comments
Owner

Problem

defaultRegistryCheck shells out to coily dispatch registry check. This couples agent-guard to coily, but the working model is that cli-guard is the only shared surface between cli-guard's three downstream hosts (each unaware of the others).

Proposal

  • Drop the exec.Command("coily", ...) call.
  • Import github.com/coilysiren/cli-guard/dispatch and use dispatch.NewRegistry(logRoot).Conflicts(path) directly.
  • Read logRoot from the CLI_GUARD_DISPATCH_LOG_ROOT env var. Unset → pass-through (matches the current "coily not on PATH" posture).
  • Recovery message refers to dispatch registry list (the cli-guard concept) rather than coily dispatch registry list.

Out of scope

Setting CLI_GUARD_DISPATCH_LOG_ROOT from any host. Each host wires it on its own — that env-set lives in the host's hook-install layer.

**Problem** `defaultRegistryCheck` shells out to `coily dispatch registry check`. This couples agent-guard to coily, but the working model is that cli-guard is the only shared surface between cli-guard's three downstream hosts (each unaware of the others). **Proposal** - Drop the `exec.Command("coily", ...)` call. - Import `github.com/coilysiren/cli-guard/dispatch` and use `dispatch.NewRegistry(logRoot).Conflicts(path)` directly. - Read `logRoot` from the `CLI_GUARD_DISPATCH_LOG_ROOT` env var. Unset → pass-through (matches the current "coily not on PATH" posture). - Recovery message refers to `dispatch registry list` (the cli-guard concept) rather than `coily dispatch registry list`. **Out of scope** Setting `CLI_GUARD_DISPATCH_LOG_ROOT` from any host. Each host wires it on its own — that env-set lives in the host's hook-install layer.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/ward#26
No description provided.