Expand description
Tool-use filter policies — the framework’s concrete behavior for the tool-use batch between model output and tool dispatch.
§One trait, one seam
This crate defines ToolUseHook (the seam TurnRunner::with_hook
consumes, alongside the driver itself) and the concrete
policies below. Filters implement that trait directly — there is no
second extension trait and no alias layer. The default is
PassthroughHook (no opinion); dedup / kill-switch / approval are
framework or host concerns, never kernel facts.
Structs§
- Allow
AllFilter - A filter that lets every call through unchanged.
- Dedup
Filter - Default deduplication policy — same-batch
(tool_name, arguments)dedup. Subsequent occurrences of an identical pair are pushed torejectedwith the originalcall_idand a{"error": "duplicate tool call"}payload. - Deny
AllFilter - A filter that rejects every call with a fixed reason.
- Filter
Chain - Composes multiple filters sequentially.