Documentation
¶
Index ¶
- type ChangeNotifier
- type Repository
- type Server
- func (s *Server) CreateSkill(ctx context.Context, req *connect.Request[taskguildv1.CreateSkillRequest]) (*connect.Response[taskguildv1.CreateSkillResponse], error)
- func (s *Server) DeleteSkill(ctx context.Context, req *connect.Request[taskguildv1.DeleteSkillRequest]) (*connect.Response[taskguildv1.DeleteSkillResponse], error)
- func (s *Server) GetSkill(ctx context.Context, req *connect.Request[taskguildv1.GetSkillRequest]) (*connect.Response[taskguildv1.GetSkillResponse], error)
- func (s *Server) ListSkills(ctx context.Context, req *connect.Request[taskguildv1.ListSkillsRequest]) (*connect.Response[taskguildv1.ListSkillsResponse], error)
- func (s *Server) SyncSkillsFromDir(ctx context.Context, ...) (*connect.Response[taskguildv1.SyncSkillsFromDirResponse], error)
- func (s *Server) UpdateSkill(ctx context.Context, req *connect.Request[taskguildv1.UpdateSkillRequest]) (*connect.Response[taskguildv1.UpdateSkillResponse], error)
- type Skill
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeNotifier ¶
type ChangeNotifier interface {
NotifySkillChange(projectID string)
}
ChangeNotifier is called after skill CRUD operations to notify connected agents that they should re-sync their local skill definitions.
type Repository ¶
type Repository interface {
Create(ctx context.Context, s *Skill) error
Get(ctx context.Context, id string) (*Skill, error)
List(ctx context.Context, projectID string, limit, offset int) ([]*Skill, int, error)
FindByName(ctx context.Context, projectID, name string) (*Skill, error)
Update(ctx context.Context, s *Skill) 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) *Server
func (*Server) CreateSkill ¶
func (s *Server) CreateSkill(ctx context.Context, req *connect.Request[taskguildv1.CreateSkillRequest]) (*connect.Response[taskguildv1.CreateSkillResponse], error)
func (*Server) DeleteSkill ¶
func (s *Server) DeleteSkill(ctx context.Context, req *connect.Request[taskguildv1.DeleteSkillRequest]) (*connect.Response[taskguildv1.DeleteSkillResponse], error)
func (*Server) GetSkill ¶
func (s *Server) GetSkill(ctx context.Context, req *connect.Request[taskguildv1.GetSkillRequest]) (*connect.Response[taskguildv1.GetSkillResponse], error)
func (*Server) ListSkills ¶
func (s *Server) ListSkills(ctx context.Context, req *connect.Request[taskguildv1.ListSkillsRequest]) (*connect.Response[taskguildv1.ListSkillsResponse], error)
func (*Server) SyncSkillsFromDir ¶
func (s *Server) SyncSkillsFromDir(ctx context.Context, req *connect.Request[taskguildv1.SyncSkillsFromDirRequest]) (*connect.Response[taskguildv1.SyncSkillsFromDirResponse], error)
SyncSkillsFromDir scans a directory for .claude/skills/*/SKILL.md files and syncs them.
func (*Server) UpdateSkill ¶
func (s *Server) UpdateSkill(ctx context.Context, req *connect.Request[taskguildv1.UpdateSkillRequest]) (*connect.Response[taskguildv1.UpdateSkillResponse], error)
type Skill ¶
type Skill struct {
ID string `yaml:"id"`
ProjectID string `yaml:"project_id"`
Name string `yaml:"name"`
Description string `yaml:"description"`
Content string `yaml:"content"`
DisableModelInvocation bool `yaml:"disable_model_invocation"`
UserInvocable bool `yaml:"user_invocable"`
AllowedTools []string `yaml:"allowed_tools"`
Model string `yaml:"model"`
Context string `yaml:"context"`
Agent string `yaml:"agent"`
ArgumentHint string `yaml:"argument_hint"`
IsSynced bool `yaml:"is_synced"`
CreatedAt time.Time `yaml:"created_at"`
UpdatedAt time.Time `yaml:"updated_at"`
}
Click to show internal directories.
Click to hide internal directories.