feat(validation): implement tool wrapping runtime (wraps + transform delegation) #555
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/cleveragents-core!555
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/m5-tool-wrapping-runtime"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements the runtime execution engine for validation tool wrapping as specified in
docs/specification.md§ Core Concepts > Validation > Tool Wrapping. This adds the missing runtime layer that actually performs delegation when a validation haswrapsset.Changes
WrappedToolExecutor— Resolveswrapsreferences and delegates execution to the wrapped tool. Supports composable wrapping chains (wrapper wraps another wrapper) with cycle detection and depth limiting (max 10 levels).ArgumentMapper— Appliesargument_mappingconfiguration to translate arguments between the wrapper's schema and the wrapped tool's schema. Supports forwarded parameter names and literal fixed values.TransformExecutor— Runs the user-suppliedtransformfunction in a sandboxed Python environment with restricted builtins (no imports, no filesystem, no network). Validates that transforms return proper validation-format dicts with apassedboolean.WrappedToolNotFoundError,WrappingCycleError,WrappingDepthExceededError,TransformExecutionErrorwith clear diagnostic messages.cleveragents.tool.__init__.Testing
features/tool_wrapping_runtime.feature): argument mapping (identity, configured, literal values, error cases), transform execution (valid, sandbox, missing function, invalid return), wrapping delegation (simple, chained, missing tool, cycle detection, context inheritance, type validation).robot/tool_wrapping_runtime.robot): end-to-end smoke tests for imports, mapping, transform, delegation, and error handling.benchmarks/tool_wrapping_bench.py): delegation overhead for identity mapping, configured mapping, transform execution, single and chained delegation.Quality Gates
nox -s lint— passesnox -s typecheck— 0 errors, 0 warnings (Pyright strict, no# type: ignore)nox -s unit_tests— 8154 scenarios passed (including 20 new)Closes #543
85603ae5a99a7795a5e99a7795a5e9646f27218b646f27218b93e3893d69