Versions in this module Expand all Collapse all v0 v0.0.3 Mar 26, 2026 v0.0.1 Mar 24, 2026 Changes in this version + func IsAuthError(err error) bool + func NormalizeBaseURL(raw string) (string, error) + type APIError struct + Body string + StatusCode int + func (e *APIError) Error() string + type Client struct + func NewClient(baseURL, username, password string) (*Client, error) + func (c *Client) AbortSession(ctx context.Context, sessionID string) error + func (c *Client) CreateSession(ctx context.Context, title, directory string) (*Session, error) + func (c *Client) DeleteSession(ctx context.Context, sessionID string) error + func (c *Client) GetMessage(ctx context.Context, sessionID, messageID string) (*MessageWithParts, error) + func (c *Client) ListMessages(ctx context.Context, sessionID string, limit int) ([]MessageWithParts, error) + func (c *Client) ListSessions(ctx context.Context) ([]Session, error) + func (c *Client) RejectQuestion(ctx context.Context, requestID string) error + func (c *Client) RespondPermission(ctx context.Context, sessionID, permissionID, response string) error + func (c *Client) SendMessageAsync(ctx context.Context, sessionID, messageID string, parts []PartInput) error + func (c *Client) StreamEvents(ctx context.Context) (<-chan Event, <-chan error) + func (c *Client) UpdateSessionTitle(ctx context.Context, sessionID, title string) (*Session, error) + type Event struct + Properties json.RawMessage + Type string + func (e Event) DecodeInfo(target any) error + type Message struct + Agent string + Cost float64 + Finish string + ID string + Mode string + ModelID string + ParentID string + ProviderID string + Role string + SessionID string + Time MessageTime + Tokens *TokenUsage + type MessageTime struct + Completed Timestamp + Created Timestamp + type MessageWithParts struct + Info Message + Parts []Part + type ModelRef struct + ModelID string + ProviderID string + type Part struct + Agent string + Attempt int + Auto bool + CallID string + Command string + Cost float64 + Description string + Error json.RawMessage + Extra map[string]any + Filename string + Files []string + Hash string + ID string + MessageID string + Metadata map[string]any + Mime string + Model *ModelRef + Name string + Prompt string + Reason string + SessionID string + Snapshot string + Source json.RawMessage + State *ToolState + Text string + Time *PartTime + Tokens *TokenUsage + Tool string + Type string + URL string + type PartInput struct + Agent string + Command string + Description string + Filename string + ID string + Mime string + Model *ModelRef + Name string + Prompt string + Text string + Type string + URL string + type PartTime struct + End Timestamp + Start Timestamp + type PermissionRequest struct + Always []string + ID string + Metadata map[string]any + Patterns []string + Permission string + SessionID string + Tool *RequestToolRef + type QuestionInfo struct + Custom bool + Header string + Multiple bool + Options []QuestionOption + Question string + type QuestionOption struct + Description string + Label string + type QuestionRequest struct + ID string + Questions []QuestionInfo + SessionID string + Tool *RequestToolRef + type RequestToolRef struct + CallID string + MessageID string + type Session struct + Directory string + ID string + ParentID string + ProjectID string + Slug string + Time SessionTime + Title string + Version string + type SessionTime struct + Created Timestamp + Updated Timestamp + type Timestamp int64 + func (t *Timestamp) UnmarshalJSON(data []byte) error + type TokenCache struct + Read float64 + Write float64 + type TokenUsage struct + Cache *TokenCache + Input float64 + Output float64 + Reasoning float64 + type ToolState struct + Attachments []Part + Error string + Input map[string]any + Metadata map[string]any + Output string + Raw string + Status string + Time *ToolStateTime + Title string + type ToolStateTime struct + Compacted Timestamp + End Timestamp + Start Timestamp