Skip to content

feat: add client-side tool guard - #5

Merged
Raezil merged 1 commit into
mainfrom
codex/guard-client-adapter
Aug 29, 2026
Merged

feat: add client-side tool guard#5
Raezil merged 1 commit into
mainfrom
codex/guard-client-adapter

Conversation

@Raezil

@Raezil Raezil commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Summary by cubic

Adds a configurable client-side guard that evaluates every call_tool invocation before tool lookup, discovery, or transport dispatch, so non-allowed calls never reach a native transport.

  • Supports allow, deny, review, and error verdicts; only allow dispatches, exactly once.
  • A review verdict requires an approve(call, review_verdict) method that must return allow, otherwise the call fails without dispatching.
  • bypass_tools allowlist skips guard evaluation for intentionally safe, client-owned tools.
  • Invalid verdicts, evaluator crashes, and approval failures fail closed with structured guard_* errors including the tool name, args, and verdict.
  • The guard can be a function or a table with evaluate(call); existing clients without a guard config are unaffected.

Docs and examples

  • Adds a guard example, README sections, Makefile target, and rockspec/init registration for utcp.guard.
  • Adds tests covering deny, review, error, bypass, approval, and evaluator-crash paths.

Written for commit 8931398. Summary will update on new commits.

Review in cubic

@Raezil
Raezil merged commit 612c8aa into main Aug 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant