ACP host hooks — permission, updates, cancel, stream
Clojure · package net.clojars.muthuishere/toolnexus · SPEC §8
Opt-in hooks on an ACP model source: choose the permission option, watch every session/update, cancel a turn, and stream through an in-process client.
What to use instead
Section titled “What to use instead”The Clojure ACP client (toolnexus.acp, see clojure/examples/src/examples/acp_demo.cljc) drives a
coding agent over stdio through the in-process client seam, as in 0.21: permission requests are
answered with the first allow option, only the agent’s message text forms the reply, and the turn
cannot be streamed or cancelled mid-turn through a hook.
To gate what such an agent may do today, run it in a sandboxed working directory and configure the
agent’s own permission settings; to keep a UI informed, show the final reply. Go has
ACPOptions.OnPermission, OnUpdate, ACPClient.GenerateCtx and GenerateStream — see the
Go page.
See also
Section titled “See also”toolnexus.client/create-client— The unified client: system prompt, skills injection, parallel and chained tool calls, retries, memory.toolnexus.client/run— Send a prompt, let the loop call tools until the model stops, get a RunResult.toolnexus.client/create-client— Intercept before/after model calls and tool calls: audit, redact, veto, or rewrite.toolnexus.client/run— Keep a transcript across turns so the model remembers what it already did.