Expand description
The tool-level error model, and the redaction every error passes through.
Two rules shape this module.
An operation that runs and fails is a result, not a protocol error: the model asked a sensible question and deserves a structured answer it can act on. Protocol errors are reserved for requests that were malformed before any work began — an unknown tool, arguments that do not fit the schema.
Every error path can carry a secret, because the thing that failed was usually handed one. Redaction therefore lives here, on the type, rather than at each call site where it would eventually be forgotten.
Structs§
- Redactor
- Scrubs known secret values in addition to key-shaped ones.
- Tool
Error - A failed tool call, as the client sees it.
Enums§
- Error
Code - The fixed vocabulary of failures a tool can report.
Constants§
- REDACTED
- What replaces a secret once it has been found.
Functions§
- redact
- Remove anything key-shaped from a string.
Type Aliases§
- Tool
Result - The result type every tool handler returns.