Documentation
¶
Index ¶
Constants ¶
View Source
const ID = "ref-tool-policy"
ID is the YAML id for the proof feature (design §19 tool-policy).
Variables ¶
This section is empty.
Functions ¶
func NewToolCatalogFilter ¶
func NewToolCatalogFilter(cfg Config) toolcatalog.Filter
NewToolCatalogFilter removes blocked tools from the call before the backend.
func NewToolReactor ¶
func NewToolReactor(cfg Config) sdk.ToolReactor
NewToolReactor swallows tool stream events for blocked tool names.
Types ¶
type Config ¶
type Config struct {
Order *int `yaml:"order"`
// BlockNames is exact tool names to drop.
BlockNames []string `yaml:"block_names"`
// BlockPrefixes: tool names with any of these prefixes are dropped.
BlockPrefixes []string `yaml:"block_prefixes"`
}
Config lists tools removed from the catalog; the reactor also swallows stream events for those tool names to prove catalog vs event enforcement.
type ToolCallPolicy ¶
type ToolCallPolicy struct {
// contains filtered or unexported fields
}
func NewToolCallPolicy ¶
func NewToolCallPolicy(cfg Config) ToolCallPolicy
NewToolCallPolicy denies canonical tool-call stream events that match the same block rules as NewToolCatalogFilter (deterministic fail-closed denial before tool reactors run).
func (ToolCallPolicy) FailureMode ¶
func (p ToolCallPolicy) FailureMode() sdk.FailureMode
func (ToolCallPolicy) Handle ¶
func (p ToolCallPolicy) Handle( _ context.Context, event lipapi.ToolEvent, _ toolpolicy.Meta, _ toolpolicy.Services, ) (toolpolicy.Decision, error)
func (ToolCallPolicy) ID ¶
func (p ToolCallPolicy) ID() string
func (ToolCallPolicy) Order ¶
func (p ToolCallPolicy) Order() int
Click to show internal directories.
Click to hide internal directories.