Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrClientNotConnected indicates the client is not connected. ErrClientNotConnected = errors.New("client not connected") // ErrClientAlreadyConnected indicates the client is already connected. ErrClientAlreadyConnected = errors.New("client already connected") // ErrClientClosed indicates the client has been closed and cannot be reused. ErrClientClosed = errors.New("client closed: clients are single-use, create a new one with New()") // ErrTransportNotConnected indicates the transport is not connected. ErrTransportNotConnected = errors.New("transport not connected") // ErrRequestTimeout indicates a request timed out. ErrRequestTimeout = errors.New("request timeout") // ErrStreamIdle indicates a streaming response produced no data within the idle timeout window. ErrStreamIdle = errors.New("stream idle timeout") // ErrSessionNotFound indicates a requested local session could not be found. ErrSessionNotFound = errors.New("session not found") // ErrControllerStopped indicates the protocol controller has stopped. ErrControllerStopped = errors.New("protocol controller stopped") // ErrStdinClosed indicates stdin was closed due to context cancellation. ErrStdinClosed = errors.New("stdin closed") // ErrOperationCancelled indicates an operation was cancelled via cancel request. ErrOperationCancelled = errors.New("operation cancelled") // ErrUnknownMessageType indicates the message type is not recognized by the SDK. // Callers should skip these messages rather than treating them as fatal. ErrUnknownMessageType = errors.New("unknown message type") )
Sentinel errors for commonly checked conditions.
Functions ¶
This section is empty.
Types ¶
type MessageParseError ¶
MessageParseError indicates message parsing failed.
func (*MessageParseError) Error ¶
func (e *MessageParseError) Error() string
func (*MessageParseError) IsOpenRouterSDKError ¶
func (e *MessageParseError) IsOpenRouterSDKError() bool
IsOpenRouterSDKError implements OpenRouterSDKError.
func (*MessageParseError) Unwrap ¶
func (e *MessageParseError) Unwrap() error
type OpenRouterSDKError ¶
OpenRouterSDKError is the base interface for all SDK errors.
type ToolPermissionDeniedError ¶
ToolPermissionDeniedError indicates a tool was denied by permission policy.
func (*ToolPermissionDeniedError) Error ¶
func (e *ToolPermissionDeniedError) Error() string
func (*ToolPermissionDeniedError) IsOpenRouterSDKError ¶
func (e *ToolPermissionDeniedError) IsOpenRouterSDKError() bool
IsOpenRouterSDKError implements OpenRouterSDKError.
type UnsupportedHookEventError ¶
type UnsupportedHookEventError struct {
Event string
}
UnsupportedHookEventError indicates a hook event is not supported by this backend runtime.
func (*UnsupportedHookEventError) Error ¶
func (e *UnsupportedHookEventError) Error() string
func (*UnsupportedHookEventError) IsOpenRouterSDKError ¶
func (e *UnsupportedHookEventError) IsOpenRouterSDKError() bool
IsOpenRouterSDKError implements OpenRouterSDKError.
type UnsupportedHookOutputError ¶
UnsupportedHookOutputError indicates a hook output field is not supported by this backend runtime.
func (*UnsupportedHookOutputError) Error ¶
func (e *UnsupportedHookOutputError) Error() string
func (*UnsupportedHookOutputError) IsOpenRouterSDKError ¶
func (e *UnsupportedHookOutputError) IsOpenRouterSDKError() bool
IsOpenRouterSDKError implements OpenRouterSDKError.
Click to show internal directories.
Click to hide internal directories.