Skip to main content

Crate codewhale_tools

Crate codewhale_tools 

Source

Structs§

ConfiguredToolDescriptor
A ToolDescriptor together with its runtime configuration.
PreparedToolCall
A side-effect-free, input-specific tool decision prepared for authority checks and scheduling.
ToolCall
A tool invocation request before it has been validated and dispatched.
ToolCallRuntime
Manages concurrent tool execution via a read/write lock.
ToolDescriptor
Descriptor that describes a tool available in the registry.
ToolExecutionOutcome
Terminal wrapper around the v0.9.1-compatible tool result/error contract.
ToolInvocation
A validated tool invocation ready to be handled.
ToolRegistry
Central registry that maps tool names to their specs and handlers.
ToolResult
Result of a tool execution.

Enums§

ApprovalRequirement
Approval requirement for a tool.
FunctionCallError
Errors that can occur during tool dispatch and execution.
ResourceClaim
A conservative resource claim calculated before a tool may execute.
ToolCallSource
Identifies where a tool call originated from.
ToolCapability
Capabilities that a tool may have or require.
ToolError
Errors that can occur during tool execution.
ToolResultContentBlock
Provider-neutral non-text content returned alongside a tool result.
ToolTerminalStatus
Machine-readable terminal state for one tool call.

Traits§

ToolHandler
Trait implemented by concrete tool handlers.

Functions§

json_type_name
Name the JSON type of a value the way a tool schema would spell it.
optional_bool
Helper to extract an optional bool field with default.
optional_bool_opt
Helper to extract an optional bool that has no default.
optional_str
Helper to extract an optional string field from JSON input.
optional_u64
Helper to extract an optional u64 field with default.
required_str
Helper to extract a required string field from JSON input.
required_u64
Helper to extract a required u64 field from JSON input.
schedule_non_conflicting
Build deterministic parallel batches. Items with no conflicting resource claims share a batch; conflicting items retain their original order.
type_mismatch
The one error every type mismatch on a tool parameter produces.
value_preview
Render a value for an error message, truncated so a huge payload cannot swamp the transcript.