Documentation
¶
Overview ¶
Package agents is the in-repo alias shim for the agent-definition discovery adapter that graduated into the importable engine module (engine/adapter/agentfs, issue #328). The discovery, parsing, registry, and resolution bodies live once, in agentfs; this package re-exports them via thin type/func/const aliases so every existing caller (internal/app, cmd/mecated, internal/adapter/server, internal/adapter/grpcdriver) keeps compiling unchanged. See alias.go and the agentfs package doc for the real contract.
Index ¶
- Constants
- func Discover(dir string) ([]Discovered, []SkipError, error)
- func NewFSSource(ctx context.Context, sources ...AgentSource) (*FSSource, []SkipError, error)
- func NormalizeHeaders(in map[string]string) map[string]string
- func NormalizeHooks(in map[string]string) map[string]string
- type AgentDef
- type AgentMCPServer
- type AgentSource
- type DirSource
- type Discovered
- type FSSource
- type MultiSource
- type Registry
- type ResolveOptions
- type SkipError
Constants ¶
const AgentFileExt = agentfs.AgentFileExt
AgentFileExt is the conventional extension of an agent-definition file. See agentfs.AgentFileExt.
const ProjectDirClaude = agentfs.ProjectDirClaude
ProjectDirClaude is the Claude-Code-compatible project-level agents dir. See agentfs.ProjectDirClaude.
const ProjectDirMecatl = agentfs.ProjectDirMecatl
ProjectDirMecatl is the project-level agents dir under the workspace. See agentfs.ProjectDirMecatl.
Variables ¶
This section is empty.
Functions ¶
func Discover ¶
func Discover(dir string) ([]Discovered, []SkipError, error)
Discover scans dir for agent defs. See agentfs.Discover.
func NewFSSource ¶
NewFSSource resolves the given sources ONCE and returns the snapshot source plus the aggregated discovery diagnostics. See agentfs.NewFSSource.
func NormalizeHeaders ¶
NormalizeHeaders trims keys/values and drops empties. See agentfs.NormalizeHeaders.
Types ¶
type AgentDef ¶
AgentDef is the pure value object for one agent definition. It is the engine/tool.AgentDef value object (agentfs aliases it); re-aliased here so every existing literal and signature keeps compiling. See agentfs.AgentDef.
type AgentMCPServer ¶
type AgentMCPServer = agentfs.AgentMCPServer
AgentMCPServer is one entry of a def's mcpServers (reference or inline streamable-HTTP server). See agentfs.AgentMCPServer.
type AgentSource ¶
type AgentSource = agentfs.AgentSource
AgentSource is the pluggable EXTENSIBILITY POINT for where agent definitions come from. See agentfs.AgentSource.
func ResolveSources ¶
func ResolveSources(opts ResolveOptions) []AgentSource
ResolveSources builds the ORDERED, highest-precedence-first Source list from the conventional locations plus any explicit paths. See agentfs.ResolveSources.
type DirSource ¶
DirSource is the local-OS-filesystem implementation of AgentSource. See agentfs.DirSource.
type Discovered ¶
type Discovered = agentfs.Discovered
Discovered is one discovered agent definition together with its adapter-private locator string. See agentfs.Discovered.
type FSSource ¶
FSSource is the FILESYSTEM implementation of the tool.AgentDefSource port. See agentfs.FSSource.
type MultiSource ¶
type MultiSource = agentfs.MultiSource
MultiSource composes an ORDERED list of Sources into one. See agentfs.MultiSource.
func NewMultiSource ¶
func NewMultiSource(sources ...AgentSource) MultiSource
NewMultiSource builds a MultiSource over the given ordered sources. See agentfs.NewMultiSource.
type Registry ¶
Registry is an immutable, name-indexed view of the discovered agent definitions. See agentfs.Registry.
func NewRegistry ¶
NewRegistry builds a Registry from the given defs. See agentfs.NewRegistry.
func NewRegistryDiscovered ¶
func NewRegistryDiscovered(discovered []Discovered) *Registry
NewRegistryDiscovered builds a Registry from Discovered entries, retaining each def's adapter-private Detail. See agentfs.NewRegistryDiscovered.
type ResolveOptions ¶
type ResolveOptions = agentfs.ResolveOptions
ResolveOptions configures the known-path resolver. See agentfs.ResolveOptions.