Documentation
¶
Index ¶
- type Agent
- type ChangeNotifier
- type Repository
- type Server
- func (s *Server) CreateAgent(ctx context.Context, req *connect.Request[taskguildv1.CreateAgentRequest]) (*connect.Response[taskguildv1.CreateAgentResponse], error)
- func (s *Server) DeleteAgent(ctx context.Context, req *connect.Request[taskguildv1.DeleteAgentRequest]) (*connect.Response[taskguildv1.DeleteAgentResponse], error)
- func (s *Server) GetAgent(ctx context.Context, req *connect.Request[taskguildv1.GetAgentRequest]) (*connect.Response[taskguildv1.GetAgentResponse], error)
- func (s *Server) ListAgents(ctx context.Context, req *connect.Request[taskguildv1.ListAgentsRequest]) (*connect.Response[taskguildv1.ListAgentsResponse], error)
- func (s *Server) SyncAgentsFromDir(ctx context.Context, ...) (*connect.Response[taskguildv1.SyncAgentsFromDirResponse], error)
- func (s *Server) UpdateAgent(ctx context.Context, req *connect.Request[taskguildv1.UpdateAgentRequest]) (*connect.Response[taskguildv1.UpdateAgentResponse], error)
- type WorkDirResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
ID string `yaml:"id"`
ProjectID string `yaml:"project_id"`
Name string `yaml:"name"`
Description string `yaml:"description"`
Prompt string `yaml:"prompt"`
Tools []string `yaml:"tools"`
DisallowedTools []string `yaml:"disallowed_tools"`
Model string `yaml:"model"`
PermissionMode string `yaml:"permission_mode"`
Skills []string `yaml:"skills"`
Memory string `yaml:"memory"`
IsSynced bool `yaml:"is_synced"`
CreatedAt time.Time `yaml:"created_at"`
UpdatedAt time.Time `yaml:"updated_at"`
}
type ChangeNotifier ¶
type ChangeNotifier interface {
NotifyAgentChange(projectID string)
}
ChangeNotifier is called after agent CRUD operations to notify connected agents that they should re-sync their local agent definitions.
type Repository ¶
type Repository interface {
Create(ctx context.Context, a *Agent) error
Get(ctx context.Context, id string) (*Agent, error)
List(ctx context.Context, projectID string, limit, offset int) ([]*Agent, int, error)
FindByName(ctx context.Context, projectID, name string) (*Agent, error)
Update(ctx context.Context, a *Agent) error
Delete(ctx context.Context, id string) error
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(repo Repository, notifier ChangeNotifier, resolver WorkDirResolver) *Server
func (*Server) CreateAgent ¶
func (s *Server) CreateAgent(ctx context.Context, req *connect.Request[taskguildv1.CreateAgentRequest]) (*connect.Response[taskguildv1.CreateAgentResponse], error)
func (*Server) DeleteAgent ¶
func (s *Server) DeleteAgent(ctx context.Context, req *connect.Request[taskguildv1.DeleteAgentRequest]) (*connect.Response[taskguildv1.DeleteAgentResponse], error)
func (*Server) GetAgent ¶
func (s *Server) GetAgent(ctx context.Context, req *connect.Request[taskguildv1.GetAgentRequest]) (*connect.Response[taskguildv1.GetAgentResponse], error)
func (*Server) ListAgents ¶
func (s *Server) ListAgents(ctx context.Context, req *connect.Request[taskguildv1.ListAgentsRequest]) (*connect.Response[taskguildv1.ListAgentsResponse], error)
func (*Server) SyncAgentsFromDir ¶
func (s *Server) SyncAgentsFromDir(ctx context.Context, req *connect.Request[taskguildv1.SyncAgentsFromDirRequest]) (*connect.Response[taskguildv1.SyncAgentsFromDirResponse], error)
SyncAgentsFromDir scans a directory for .claude/agents/*.md files and syncs them.
func (*Server) UpdateAgent ¶
func (s *Server) UpdateAgent(ctx context.Context, req *connect.Request[taskguildv1.UpdateAgentRequest]) (*connect.Response[taskguildv1.UpdateAgentResponse], error)
type WorkDirResolver ¶ added in v0.0.45
WorkDirResolver resolves the absolute working directory for a project by looking up the connected agent's work_dir.
Click to show internal directories.
Click to hide internal directories.