Versions in this module Expand all Collapse all v0 v0.3.0 Mar 16, 2026 Changes in this version + const ErrCodeInternal + const ErrCodeInvalidParams + const ErrCodeInvalidRequest + const ErrCodeMethodNotFound + const ErrCodeNotFound + const MethodAgentMessage + const MethodAgents + const MethodChannels + const MethodEvents + const MethodInterrupt + const MethodPing + const MethodReply + const MethodSend + const MethodStatus + func DefaultSocketPath() string + func IsDaemonRunning(socketPath string) bool + type AgentConfig struct + ID string + TmuxPane string + TmuxSession string + Type string + type AgentInfo struct + ID string + Status string + Target string + Type string + type AgentMessageParams struct + FromAgentID string + Message string + ToAgentID string + type AgentMessageResult struct + Delivered bool + EventID string + type AgentsResult struct + Agents []AgentInfo + type ChannelInfo struct + AgentID string + ChannelID string + Provider string + type ChannelMapping struct + AgentID string + ChannelID string + type ChannelsResult struct + Channels []ChannelInfo + type ChatConfig struct + Channels []ChannelMapping + Discord *DiscordConfig + Telegram *TelegramConfig + WhatsApp *WhatsAppConfig + type ChatSender interface + SendMessage func(ctx context.Context, channelID, content string) error + type Client struct + func DefaultClient() *Client + func NewClient(socketPath string) *Client + func (c *Client) AgentMessage(_ context.Context, fromAgentID, toAgentID, message string) (*AgentMessageResult, error) + func (c *Client) Agents(_ context.Context) (*AgentsResult, error) + func (c *Client) Channels(_ context.Context) (*ChannelsResult, error) + func (c *Client) Close() error + func (c *Client) Connect() error + func (c *Client) Events(_ context.Context, agentID string, limit int) (*EventsResult, error) + func (c *Client) EventsSince(_ context.Context, agentID, sinceID string, limit int) (*EventsResult, error) + func (c *Client) Interrupt(_ context.Context, agentID, reason string) (*InterruptResult, error) + func (c *Client) IsConnected() bool + func (c *Client) Ping(_ context.Context) error + func (c *Client) Reply(_ context.Context, channelID, message, agentID string) (*ReplyResult, error) + func (c *Client) Send(_ context.Context, agentID, message string) (*SendResult, error) + func (c *Client) Status(_ context.Context) (*StatusResult, error) + type Config struct + DataDir string + Logger *slog.Logger + SocketPath string + func DefaultConfig() *Config + type Daemon struct + func New(cfg *Config) *Daemon + func (d *Daemon) Chat() *transport.ChatTransport + func (d *Daemon) Client() *ent.Client + func (d *Daemon) Router() *router.Router + func (d *Daemon) Start(ctx context.Context) error + func (d *Daemon) Stop() error + type DaemonConfig struct + Agents []AgentConfig + Chat *ChatConfig + DataDir string + LogLevel string + func DefaultDaemonConfig() *DaemonConfig + func LoadDaemonConfig(dataDir string) (*DaemonConfig, error) + func (c *DaemonConfig) FindAgentByChannel(channelID string) (string, bool) + func (c *DaemonConfig) GetAgent(id string) (*AgentConfig, bool) + func (c *DaemonConfig) HasChatProviders() bool + func (c *DaemonConfig) Validate() error + type DiscordConfig struct + GuildID string + Token string + type ErrorInfo struct + Code int + Message string + type EventInfo struct + AgentID string + ChannelID string + ID string + Payload map[string]any + Role string + Status string + Timestamp time.Time + Type string + type EventsParams struct + AgentID string + Limit int + Since string + type EventsResult struct + Events []EventInfo + type InterruptParams struct + AgentID string + Reason string + type InterruptResult struct + Delivered bool + EventID string + type PingResult struct + Pong bool + type ReplyParams struct + AgentID string + ChannelID string + Message string + type ReplyResult struct + Delivered bool + EventID string + type Request struct + ID string + Method string + Params json.RawMessage + func NewRequest(id, method string, params any) (*Request, error) + func (r *Request) ParseParams(target any) error + type Response struct + Error *ErrorInfo + ID string + Result json.RawMessage + func NewErrorResponse(id string, code int, message string) *Response + func NewResponse(id string, result any) (*Response, error) + func (r *Response) Err() error + func (r *Response) IsError() bool + func (r *Response) ParseResult(target any) error + type SendParams struct + AgentID string + Message string + type SendResult struct + Delivered bool + EventID string + type Server struct + func NewServer(cfg ServerConfig) *Server + func (s *Server) Start(ctx context.Context) error + func (s *Server) Stop() error + type ServerConfig struct + ChatSender ChatSender + Client *ent.Client + DaemonCfg *DaemonConfig + Logger *slog.Logger + Providers []string + Router *router.Router + SocketPath string + type StatusResult struct + Agents int + Providers []string + Running bool + StartedAt time.Time + type TelegramConfig struct + Token string + type WhatsAppConfig struct + DBPath string