Documentation
¶
Index ¶
- func HasLocalEntityDir(a Agent, entity EntityType, projectRoot, home string) bool
- func HasLocalSkillDir(a Agent, projectRoot, home string) bool
- func MCPEntityDir(a Agent) string
- func MatchesAgent(skillPath, root string, agent Agent) bool
- func ResolveAgentIDs(skillDir, projectRoot, home string) []string
- func ResolveAgentIDsForDir(skillDir, projectRoot, home string) ([]string, string)
- func ResolveMCPAgentIDs(configDir, projectRoot, home string) []string
- func UniqueSkillDirs(agents []Agent) []string
- type Agent
- type EntityIDResolver
- type EntityType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasLocalEntityDir ¶
func HasLocalEntityDir(a Agent, entity EntityType, projectRoot, home string) bool
HasLocalEntityDir reports whether the agent's entity directory exists under projectRoot or home.
func HasLocalSkillDir ¶
HasLocalSkillDir reports whether the agent's skills directory exists locally.
func MCPEntityDir ¶
MCPEntityDir returns the agent-specific directory that contains MCP config files.
func MatchesAgent ¶
MatchesAgent checks if this skill path belongs to the given agent.
func ResolveAgentIDs ¶
ResolveAgentIDs returns all agent IDs whose skill dir contains the given path.
func ResolveAgentIDsForDir ¶ added in v0.1.1
ResolveAgentIDsForDir returns agent IDs plus the symlink-resolved directory.
func ResolveMCPAgentIDs ¶
ResolveMCPAgentIDs returns agent IDs whose MCP config dir contains the given path.
func UniqueSkillDirs ¶
UniqueSkillDirs returns deduplicated skill directory paths for the given agents.
Types ¶
type Agent ¶
type Agent struct {
Name string
ID string
SkillsDir string // deprecated: use EntityDirs[EntitySkill]
EntityDirs map[EntityType]string
}
func AgentBySkillsDir ¶
func AgentsWithLocalSkillDir ¶
AgentsWithLocalSkillDir returns agents whose skill directory exists under projectRoot or home.
func DefaultAgents ¶
func DefaultAgents() []Agent
type EntityIDResolver ¶ added in v0.1.1
type EntityIDResolver struct {
// contains filtered or unexported fields
}
EntityIDResolver resolves which agent IDs own a path under project/home roots. It groups agents by entity directory and caches results per resolved target path.
func NewEntityIDResolver ¶ added in v0.1.1
func NewEntityIDResolver(projectRoot, home string, entity EntityType) *EntityIDResolver
NewEntityIDResolver builds a resolver for one scan pass (skills or MCP entity dirs).
func (*EntityIDResolver) ResolveIDs ¶ added in v0.1.1
func (r *EntityIDResolver) ResolveIDs(targetDir string) (ids []string, resolvedDir string)
ResolveIDs returns agent IDs for targetDir and its symlink-resolved path.
type EntityType ¶
type EntityType string
const ( EntitySkill EntityType = "skill" EntityMCP EntityType = "mcp" )