errors

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

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")

	// 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

type MessageParseError struct {
	Message string
	Err     error
	Data    map[string]any
}

MessageParseError indicates message parsing failed.

func (*MessageParseError) Error

func (e *MessageParseError) Error() string

func (*MessageParseError) IsVLLMSDKError

func (e *MessageParseError) IsVLLMSDKError() bool

IsVLLMSDKError implements VLLMSDKError.

func (*MessageParseError) Unwrap

func (e *MessageParseError) Unwrap() error

type ToolPermissionDeniedError

type ToolPermissionDeniedError struct {
	ToolName  string
	Message   string
	Interrupt bool
}

ToolPermissionDeniedError indicates a tool was denied by permission policy.

func (*ToolPermissionDeniedError) Error

func (e *ToolPermissionDeniedError) Error() string

func (*ToolPermissionDeniedError) IsVLLMSDKError

func (e *ToolPermissionDeniedError) IsVLLMSDKError() bool

IsVLLMSDKError implements VLLMSDKError.

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) IsVLLMSDKError

func (e *UnsupportedHookEventError) IsVLLMSDKError() bool

IsVLLMSDKError implements VLLMSDKError.

type UnsupportedHookOutputError

type UnsupportedHookOutputError struct {
	Event string
	Field string
}

UnsupportedHookOutputError indicates a hook output field is not supported by this backend runtime.

func (*UnsupportedHookOutputError) Error

func (*UnsupportedHookOutputError) IsVLLMSDKError

func (e *UnsupportedHookOutputError) IsVLLMSDKError() bool

IsVLLMSDKError implements VLLMSDKError.

type VLLMSDKError

type VLLMSDKError interface {
	error
	IsVLLMSDKError() bool
}

VLLMSDKError is the base interface for all SDK errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL