This is an automated email from the ASF dual-hosted git repository. hsluoyz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/casbin-gateway.git
commit 16a8d7d497110351ecb562f9db6f5021f833ee3b Author: Yang Luo <[email protected]> AuthorDate: Sat Aug 15 14:06:36 2026 +0800 feat(agentpatch): tell operators what patching Claude Code changes claudeCodePatcher was the only patcher without PatchNotice, so its row fell back to the generic "Enables audit-only monitoring for this agent" and offered no follow-up. Claude Desktop and OpenClaw both said what they change and that a restart is needed, which made Claude Code look like it needed nothing, when in fact sessions already running keep using the settings they loaded at startup. Co-Authored-By: Claude Opus 5 <[email protected]> --- agentpatch/claude_code.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/agentpatch/claude_code.go b/agentpatch/claude_code.go index 328e2a7..297c9b8 100644 --- a/agentpatch/claude_code.go +++ b/agentpatch/claude_code.go @@ -85,6 +85,16 @@ func (claudeCodePatcher) Unpatch(target Target) error { return RevokeIngestToken(target) } +// PatchNotice explains the change in the operator's own words. Every other +// patcher supplies one, so without it the Claude Code row was the only one in +// the UI that gave no hint about what changes or whether a restart is needed. +func (claudeCodePatcher) PatchNotice(patched bool) (string, string) { + if patched { + return "Removes Gateway's audit-only Claude Code hooks.", "Restart any Claude Code session that is already running." + } + return "Installs audit-only Claude Code hooks. Hooks observe events and never block an action.", "Restart any Claude Code session that is already running." +} + func (claudeCodePatcher) Status(target Target) (Status, error) { path, err := claudeCodeConfigPath(target) if err != nil { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
