Expand description
Codex-compatible ToolHandler trait and types
This module implements the handler pattern from OpenAI’s Codex project, providing a more modular and composable approach to tool execution.
Key patterns from Codex:
ToolHandlertrait with kind/matches_kind/is_mutating/handle methodsToolKindenum for categorizing tool typesToolPayloadfor typed tool argumentsToolOutputfor structured tool resultsToolInvocationfor execution context
Structs§
- Configured
Tool Spec - Configured tool spec with parallel execution support
- Constrained
- Lightweight wrapper used to preserve policy fields as structured values.
- Diff
Tracker - Diff tracker for file changes
- Freeform
Tool - Freeform
Tool Format - McpTool
Result - MCP tool result (from Codex)
- Responses
ApiTool - Shell
Tool Call Params - Shell command parameters (from Codex)
- Tool
Invocation - Context for tool invocation (from Codex)
- Turn
Context - Turn context for tool execution
Enums§
- Additional
Properties - Approval
Policy - Approval policy for tool execution
- Content
Item - Content item for multi-part responses (from Codex)
- File
Change - File change types (from Codex protocol)
- Sandbox
Permissions - Fine-grained permissions for sandbox operations.
- Shell
Environment Policy - Shell environment policy
- Tool
Call Error - Error type for tool execution (from Codex)
- Tool
Kind - Tool kind classification (from Codex)
- Tool
Output - Tool output types (from Codex)
- Tool
Payload - Payload types for tool invocations (from Codex)
- Tool
Spec - Tool spec types (from Codex)
Traits§
- Tool
Handler - Core trait for tool handlers (from Codex)
- Tool
Session - Session trait for tool execution context
Type Aliases§
- Json
Schema - Shared
Diff Tracker - Shared diff tracker type alias