Documentation
¶
Index ¶
- type A2ADiscoverFunc
- type A2ADiscoveredInstance
- type IMActionFunc
- type IMRuntimeStatus
- type IMStatusFunc
- type MCPRuntimeStatus
- type MCPStatusFunc
- type Server
- func (s *Server) Addr() string
- func (s *Server) Close() error
- func (s *Server) SetA2ADiscoverFn(fn A2ADiscoverFunc)
- func (s *Server) SetIMActionFn(fn IMActionFunc)
- func (s *Server) SetIMStatusFn(fn IMStatusFunc)
- func (s *Server) SetMCPStatusFn(fn MCPStatusFunc)
- func (s *Server) SetRestartFn(fn func())
- func (s *Server) Start(addr string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type A2ADiscoverFunc ¶ added in v1.1.47
type A2ADiscoverFunc func() []A2ADiscoveredInstance
A2ADiscoverFunc returns discovered A2A instances (other running ggcode processes).
type A2ADiscoveredInstance ¶ added in v1.1.47
type A2ADiscoveredInstance struct {
ID string `json:"id"`
Workspace string `json:"workspace"`
Endpoint string `json:"endpoint"`
Status string `json:"status"`
StartedAt string `json:"started_at"`
}
A2ADiscoveredInstance describes a remote ggcode instance discovered via A2A.
type IMActionFunc ¶
IMActionFunc performs an IM action (enable/disable/mute/unmute/unbind).
type IMRuntimeStatus ¶
type IMRuntimeStatus struct {
Adapter string `json:"adapter"`
Platform string `json:"platform"`
Healthy bool `json:"healthy"`
Status string `json:"status"`
LastError string `json:"last_error,omitempty"`
BoundDir string `json:"bound_dir,omitempty"`
ChannelID string `json:"channel_id,omitempty"`
TargetID string `json:"target_id,omitempty"`
Muted bool `json:"muted"`
Disabled bool `json:"disabled"`
AllDirs []string `json:"all_dirs,omitempty"` // all persisted bound directories
}
IMRuntimeStatus describes a running IM adapter's state.
type IMStatusFunc ¶
type IMStatusFunc func() []IMRuntimeStatus
IMStatusFunc returns runtime IM adapter states. Keys are adapter names.
type MCPRuntimeStatus ¶
type MCPRuntimeStatus struct {
Connected bool `json:"connected"`
Pending bool `json:"pending"`
Disabled bool `json:"disabled"`
Error string `json:"error,omitempty"`
Tools []string `json:"tools,omitempty"`
}
MCPRuntimeStatus describes a running MCP server's state.
type MCPStatusFunc ¶
type MCPStatusFunc func() map[string]MCPRuntimeStatus
MCPStatusFunc returns runtime MCP server statuses. Keys are server names.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server provides a built-in WebUI for configuration and chat.
func (*Server) SetA2ADiscoverFn ¶ added in v1.1.47
func (s *Server) SetA2ADiscoverFn(fn A2ADiscoverFunc)
SetA2ADiscoverFn sets the A2A instance discovery provider.
func (*Server) SetIMActionFn ¶
func (s *Server) SetIMActionFn(fn IMActionFunc)
SetIMActionFn sets the IM action handler.
func (*Server) SetIMStatusFn ¶
func (s *Server) SetIMStatusFn(fn IMStatusFunc)
SetIMStatusFn sets the runtime IM status provider.
func (*Server) SetMCPStatusFn ¶
func (s *Server) SetMCPStatusFn(fn MCPStatusFunc)
SetMCPStatusFn sets the runtime MCP status provider.
func (*Server) SetRestartFn ¶
func (s *Server) SetRestartFn(fn func())
SetRestartFn sets the restart callback (triggers process self-restart).