client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package client provides client interfaces for the BubbleTea TUI. It decouples the TUI from the concrete HTTP/gRPC implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTeamRequest

type CreateTeamRequest struct {
	TemplateID      string
	Name            string
	TaskDescription string
	Strategy        string
}

CreateTeamRequest is the request to create a team.

type MemberInfo

type MemberInfo struct {
	ID        string
	SessionID string
	Label     string
	Role      string
	Status    string
	Progress  string
	IsLeader  bool
	NodeID    string
}

MemberInfo represents a team member.

type StreamClient

type StreamClient interface {
	// SendMessage sends a message and returns a channel of stream events.
	SendMessage(ctx context.Context, content string) (<-chan StreamEvent, error)

	// Model returns the current model name.
	Model() string

	// SessionID returns the current session ID.
	SessionID() string

	// BaseURL returns the server base URL.
	BaseURL() string
}

StreamClient is the interface for streaming chat communication.

type StreamContentEvent

type StreamContentEvent struct {
	Delta string
}

StreamContentEvent represents a content chunk.

type StreamEndEvent

type StreamEndEvent struct {
	Reason string
}

StreamEndEvent represents end of stream.

type StreamErrorEvent

type StreamErrorEvent struct {
	Error error
}

StreamErrorEvent represents an error.

type StreamEvent

type StreamEvent interface {
	// contains filtered or unexported methods
}

StreamEvent represents an event from the streaming response.

type StreamToolCallEvent

type StreamToolCallEvent struct {
	Calls []ToolCallInfo
}

StreamToolCallEvent represents tool call requests.

type TeamClient

type TeamClient interface {
	// ListTemplates returns available team templates.
	ListTemplates(ctx context.Context) ([]TemplateInfo, error)

	// CreateTeam creates a new team from a template.
	CreateTeam(ctx context.Context, req CreateTeamRequest) (*TeamInfo, error)

	// GetTeam retrieves team information.
	GetTeam(ctx context.Context, teamID string) (*TeamInfo, error)

	// DissolveTeam dissolves a team.
	DissolveTeam(ctx context.Context, teamID string) error

	// SendMessage sends a message to a team member.
	SendMessage(ctx context.Context, teamID, recipientLabel, content string) error

	// Broadcast sends a message to all team members.
	Broadcast(ctx context.Context, teamID, content string) error

	// Subscribe subscribes to team events.
	Subscribe(ctx context.Context, teamID string) (<-chan TeamEvent, error)
}

TeamClient is the interface for team management operations.

type TeamDissolvedEvent

type TeamDissolvedEvent struct{}

TeamDissolvedEvent indicates the team was dissolved.

type TeamEvent

type TeamEvent interface {
	// contains filtered or unexported methods
}

TeamEvent represents an event from the team.

type TeamInfo

type TeamInfo struct {
	ID         string
	Name       string
	TemplateID string
	Strategy   string
	Members    []MemberInfo
}

TeamInfo represents team information.

type TeamMemberStatusEvent

type TeamMemberStatusEvent struct {
	SessionID string
	Status    string
	Progress  string
}

TeamMemberStatusEvent represents a member status change.

type TeamMessageEvent

type TeamMessageEvent struct {
	From      string
	Content   string
	Timestamp int64
}

TeamMessageEvent represents a message from a team member.

type TemplateInfo

type TemplateInfo struct {
	ID          string
	Name        string
	Description string
	Strategy    string
	MemberCount int
}

TemplateInfo represents a team template.

type ToolCallInfo

type ToolCallInfo struct {
	ID        string
	Name      string
	Arguments string
}

ToolCallInfo represents information about a tool call.

Jump to

Keyboard shortcuts

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