Documentation
¶
Overview ¶
Package specialist provides the specialist framework for hawk-eco. Specialists are sub-agents with specific tool permissions and scopes.
Index ¶
- Constants
- type Manager
- func (m *Manager) Delete(name string)
- func (m *Manager) FindSpecialist(name string) *Specialist
- func (m *Manager) Get(name string) *Specialist
- func (m *Manager) List() []*Specialist
- func (m *Manager) ListByScope(scope string) []*Specialist
- func (m *Manager) LoadAllSpecialists() error
- func (m *Manager) LoadProjectSpecialists(dir string) error
- func (m *Manager) LoadUserSpecialists(dir string) error
- func (m *Manager) Register(s *Specialist)
- func (m *Manager) RegisterBuiltin()
- type Specialist
- type SpecialistManifest
Constants ¶
const ( ScopeBuiltin = "builtin" ScopeUser = "user" ScopeProject = "project" )
Scope constants define specialist scopes.
const ( PermissionReadOnly = "read-only" PermissionPlan = "plan" PermissionDeny = "deny" PermissionAllow = "allow" )
Permission constants define tool permissions.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages specialists across different scopes.
func (*Manager) FindSpecialist ¶
func (m *Manager) FindSpecialist(name string) *Specialist
FindSpecialist finds a specialist by name with scope priority.
func (*Manager) Get ¶
func (m *Manager) Get(name string) *Specialist
Get retrieves a specialist by name.
func (*Manager) List ¶
func (m *Manager) List() []*Specialist
List returns all registered specialists.
func (*Manager) ListByScope ¶
func (m *Manager) ListByScope(scope string) []*Specialist
ListByScope lists specialists filtered by scope.
func (*Manager) LoadAllSpecialists ¶
LoadAllSpecialists loads all specialists from default locations.
func (*Manager) LoadProjectSpecialists ¶
LoadProjectSpecialists loads specialists from every known project location that exists, merging their contents (later locations take precedence for a given name).
func (*Manager) LoadUserSpecialists ¶
LoadUserSpecialists loads specialists from user config directory.
func (*Manager) Register ¶
func (m *Manager) Register(s *Specialist)
Register adds a specialist to the manager.
func (*Manager) RegisterBuiltin ¶
func (m *Manager) RegisterBuiltin()
RegisterBuiltin registers all built-in specialists.
type Specialist ¶
Specialist represents a specialized review agent with specific permissions.
func BuiltinSpecialists ¶
func BuiltinSpecialists() []*Specialist
BuiltinSpecialists returns the default built-in specialists.
func NewSpecialist ¶
func NewSpecialist(name, description, prompt string, tools []string, scope string) *Specialist
NewSpecialist creates a new specialist.
func (*Specialist) HasTool ¶
func (s *Specialist) HasTool(tool string) bool
HasTool checks if the specialist has a specific tool.
type SpecialistManifest ¶
type SpecialistManifest struct {
Description string `yaml:"description"`
Tools []string `yaml:"tools"`
}
SpecialistManifest represents a specialist's manifest file.