Expand description
Code Mode Handler trait for unified soft-disable and tool management.
This module provides the CodeModeHandler trait that all Code Mode implementations
should implement. It provides:
- Policy check: Requires a policy evaluator to be configured
- Pre-handle hook: Extensible hook for soft-disable and other checks
- Standard tool definitions: Consistent
validate_codeandexecute_codetools - Response formatting: Consistent JSON responses across server types
Structs§
- Code
Mode Tool Builder - Builder for standard Code Mode tool definitions.
- Execute
Code Input - Input for execute_code tool.
- Validate
Code Input - Input for validate_code tool.
- Validation
Response - Response from
validate_code_implcontaining all validation results.
Traits§
- Code
Mode Handler - Code Mode handler trait with policy check and standard tool handling.
Functions§
- format_
error_ response - Format an error as a JSON response.
- format_
execution_ error - Format an execution error as a JSON response.