Partial override returned from after_tool_call (matching pi’s AfterToolCallResult).
Merge semantics are field-by-field: provided fields replace the original; omitted fields keep their values.
Result returned from before_tool_call (matching pi’s BeforeToolCallResult).
Returning { block: true } prevents execution; reason becomes the error text.
A slash command handler (built-in or extension-provided).
Commands use the same Extension trait as tools - built-ins and
user extensions register commands through a uniform interface.
Tool-specific rendering interface (matching pi’s renderCall/renderResult pattern).
Each built-in tool implements this to provide its own visual representation.
Coerce a single JSON value to match a JSON Schema type (modifies in place).
This handles common LLM mistakes: sending numbers as strings, booleans as strings, etc.