agent

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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

func HasLocalSkillDir(a Agent, projectRoot, home string) bool

HasLocalSkillDir reports whether the agent's skills directory exists locally.

func MCPEntityDir

func MCPEntityDir(a Agent) string

MCPEntityDir returns the agent-specific directory that contains MCP config files.

func MatchesAgent

func MatchesAgent(skillPath, root string, agent Agent) bool

MatchesAgent checks if this skill path belongs to the given agent.

func ResolveAgentIDs

func ResolveAgentIDs(skillDir, projectRoot, home string) []string

ResolveAgentIDs returns all agent IDs whose skill dir contains the given path.

func ResolveAgentIDsForDir added in v0.1.1

func ResolveAgentIDsForDir(skillDir, projectRoot, home string) ([]string, string)

ResolveAgentIDsForDir returns agent IDs plus the symlink-resolved directory.

func ResolveMCPAgentIDs

func ResolveMCPAgentIDs(configDir, projectRoot, home string) []string

ResolveMCPAgentIDs returns agent IDs whose MCP config dir contains the given path.

func UniqueSkillDirs

func UniqueSkillDirs(agents []Agent) []string

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 AgentByID

func AgentByID(id string) (Agent, bool)

func AgentBySkillsDir

func AgentBySkillsDir(dir string) []Agent

func AgentsWithLocalSkillDir

func AgentsWithLocalSkillDir(agents []Agent, projectRoot, home string) []Agent

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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL