Commit Graph

3 Commits

Author SHA1 Message Date
freemo 225eab25b1 fix(cli): change agents validation attach extra args to use --key value named option format (#3837)
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
2026-04-06 07:55:09 +00:00
freemo abf250901f fix(tool): implement tool_type filter in ToolRegistry.list_tools()
The tool_type parameter in ToolRegistry.list_tools() was explicitly
silenced with '_ = tool_type', making it a no-op. Both
'agents tool list --type validation' and 'agents tool list --type tool'
returned the full unfiltered tool list.

Changes:
- src/cleveragents/tool/runtime.py: Add tool_type: Literal['tool',
  'validation'] field to ToolSpec (default 'tool') so the registry
  has a discriminator to filter on.
- src/cleveragents/tool/registry.py: Remove '_ = tool_type' no-op and
  implement actual filter: specs = [s for s in specs if s.tool_type == tool_type].
  Update docstring to reflect the parameter is now active.
- features/consolidated_tool.feature: Add 7 comprehensive Behave
  scenarios covering all filter combinations (tool, validation, None,
  default type, exclusion).
- features/steps/tool_runtime_steps.py: Add step definition for
  registering a ToolSpec with an explicit tool_type.
- robot/helper_tool_cli.py: Add tool_list_type_tool() and
  tool_list_type_validation() helper functions that verify the CLI
  passes tool_type through to the service layer.
- robot/tool_cli.robot: Add two Robot test cases for
  'tool list --type tool' and 'tool list --type validation'.

The CLI handler (cli/commands/tool.py) and database repository
(infrastructure/database/repositories.py) already passed tool_type
through correctly — no changes needed there.

ISSUES CLOSED: #2974
2026-04-05 17:49:35 +00:00
Jeff (CTO) 18482b938f feat(tool): add tool runtime core 2026-02-14 13:46:10 -05:00