Class AllowAllToolFilter

java.lang.Object
com.tnsai.agents.execution.AllowAllToolFilter
All Implemented Interfaces:
ToolCallFilter

public final class AllowAllToolFilter extends Object implements ToolCallFilter
Pass-through ToolCallFilter that allows every tool call. Used as the @AgentSpec.toolCallFilter default class (TNS-611), where it acts as the "not set" sentinel: the agent-init extractor treats AllowAllToolFilter.class as "no override" so the agent runs with no filter wired (the historical behaviour) and the AGENT-V006 approval gate still warns about confirmation-required tools without an explicit filter.

Users can wire this class explicitly when they have consciously decided to opt out of filtering — that explicit choice does not currently override V006 by itself (V006 reads AgentBuilder.toolCallFilter, not the annotation default class); to silence V006 either provide a real filter or .relaxValidation("AGENT-V006").

Since:
0.12.0 (TNS-611)
  • Constructor Details

    • AllowAllToolFilter

      public AllowAllToolFilter()
  • Method Details

    • isAllowed

      public boolean isAllowed(String toolName, Map<String,Object> arguments)
      Description copied from interface: ToolCallFilter
      Checks whether a tool call is allowed to execute.
      Specified by:
      isAllowed in interface ToolCallFilter
      Parameters:
      toolName - the name of the tool being called
      arguments - the arguments passed to the tool
      Returns:
      true if the tool call should proceed, false to block it