feat(tool): add tool and validation domain models #290

Closed
opened 2026-02-22 23:40:57 +00:00 by freemo · 1 comment
Owner

Metadata

  • Commit: feat(tool): add tool and validation domain models
  • Branch: feature/m3-mcp-config

Subtasks

  • Add MCP config examples under examples/tools/ with allowlist and connection settings.
  • Tests (Behave): Add scenarios that load MCP configs and assert schema validation passes.
  • Tests (Robot): Add Robot test that loads MCP config examples.
  • Tests (ASV): Add benchmarks/mcp_config_bench.py for config parsing overhead.
  • Run nox (all default sessions, including benchmark), fix any errors if needed ensuring nox passes.
  • Verify coverage >=97% via nox -s coverage_report. If coverage is <97% then review the current unit test coverage report at build/coverage.xml and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun nox -s coverage_report to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%.

Section: ### Section 5: Actors, Skills & Tool Execution [WORKSTREAM C - Aditya Lead]
Status: Completed

## Metadata - **Commit**: `feat(tool): add tool and validation domain models` - **Branch**: `feature/m3-mcp-config` ## Subtasks - [x] Add MCP config examples under `examples/tools/` with allowlist and connection settings. - [x] Tests (Behave): Add scenarios that load MCP configs and assert schema validation passes. - [x] Tests (Robot): Add Robot test that loads MCP config examples. - [x] Tests (ASV): Add `benchmarks/mcp_config_bench.py` for config parsing overhead. - [x] Run `nox` (all default sessions, including benchmark), fix any errors if needed ensuring nox passes. - [x] Verify coverage >=97% via `nox -s coverage_report`. If coverage is <97% then review the current unit test coverage report at `build/coverage.xml` and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun `nox -s coverage_report` to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%. **Section**: ### Section 5: Actors, Skills & Tool Execution [WORKSTREAM C - Aditya Lead] **Status**: Completed
freemo added this to the v3.1.0 milestone 2026-02-22 23:40:57 +00:00
Author
Owner

Implementation Notes — C0.domain: Tool and Validation Domain Models

2026-02-13: Stage C0.domain Complete - Tool and Validation Domain Models

  • Created tool.py (624 lines) with 6 StrEnums, 5 Pydantic models, full validators, factory methods.
  • Key decision: YAML loader implemented as from_config() class methods (matches action.py pattern) rather than separate module.
  • Key decision: Validation extends Tool via Pydantic model inheritance.
  • Key decision: wraps field sets source to wrapped implicitly; transform required when wraps is set.

(Migrated from docs/implementation-notes.md)

## Implementation Notes — C0.domain: Tool and Validation Domain Models **2026-02-13**: Stage C0.domain Complete - Tool and Validation Domain Models - Created `tool.py` (624 lines) with 6 StrEnums, 5 Pydantic models, full validators, factory methods. - Key decision: YAML loader implemented as `from_config()` class methods (matches action.py pattern) rather than separate module. - Key decision: `Validation` extends `Tool` via Pydantic model inheritance. - Key decision: `wraps` field sets source to `wrapped` implicitly; `transform` required when `wraps` is set. *(Migrated from `docs/implementation-notes.md`)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
#354 Epic: Actor & Skill Schema + CLI (C0)
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#290
No description provided.