Skip to main content

Module handler

Module handler 

Source
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_code and execute_code tools
  • Response formatting: Consistent JSON responses across server types

Structs§

CodeModeToolBuilder
Builder for standard Code Mode tool definitions.
ExecuteCodeInput
Input for execute_code tool.
ValidateCodeInput
Input for validate_code tool.
ValidationResponse
Response from validate_code_impl containing all validation results.

Traits§

CodeModeHandler
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.