Documentation
¶
Index ¶
- Constants
- func ComputeMCPConfigPath(target *MCPConfigTarget) (configDir string, configPath string)
- func NewProjectManifest(agentName, language, framework, modelProvider, modelName, description string, ...) *models.AgentManifest
- func RefreshMCPConfig(target *MCPConfigTarget, servers []PythonMCPServer, verbose bool) error
- type AgentConfig
- type BaseGenerator
- type MCPConfigTarget
- type Manager
- type PythonMCPServer
Constants ¶
const ManifestFileName = "agent.yaml"
Variables ¶
This section is empty.
Functions ¶
func ComputeMCPConfigPath ¶
func ComputeMCPConfigPath(target *MCPConfigTarget) (configDir string, configPath string)
ComputeMCPConfigPath returns the config directory and file path for an agent. If BaseDir or AgentName is empty, both returned paths are empty.
func NewProjectManifest ¶
func NewProjectManifest(agentName, language, framework, modelProvider, modelName, description string, mcpServers []models.McpServerType) *models.AgentManifest
NewProjectManifest creates a new AgentManifest with the given values.
func RefreshMCPConfig ¶
func RefreshMCPConfig(target *MCPConfigTarget, servers []PythonMCPServer, verbose bool) error
RefreshMCPConfig cleans any existing MCP config for the target and optionally writes a new one. If servers is empty or nil, it performs cleanup only.
Types ¶
type AgentConfig ¶
type AgentConfig struct {
Name string
Version string
Description string
Image string
Directory string
Verbose bool
Instruction string
ModelProvider string
ModelName string
Framework string
Language string
CLIVersion string
TelemetryEndpoint string
McpServers []models.McpServerType
EnvVars []string
InitGit bool
}
AgentConfig captures the data required to render an agent project from templates.
func (AgentConfig) ShouldSkipPath ¶
func (c AgentConfig) ShouldSkipPath(path string) bool
ShouldSkipPath allows template walkers to skip specific directories.
type BaseGenerator ¶
type BaseGenerator struct {
// contains filtered or unexported fields
}
BaseGenerator renders template trees into a destination directory.
func NewBaseGenerator ¶
func NewBaseGenerator(templateFiles fs.FS) *BaseGenerator
NewBaseGenerator returns a template renderer rooted at "templates".
func (*BaseGenerator) GenerateProject ¶
func (g *BaseGenerator) GenerateProject(config AgentConfig) error
GenerateProject walks the template tree and renders files to disk.
func (*BaseGenerator) ReadTemplateFile ¶
func (g *BaseGenerator) ReadTemplateFile(templatePath string) ([]byte, error)
ReadTemplateFile reads a raw template file from the generator's embedded filesystem.
func (*BaseGenerator) RenderTemplate ¶
func (g *BaseGenerator) RenderTemplate(tmplContent string, data any) (string, error)
RenderTemplate renders a template string with the provided data.
type MCPConfigTarget ¶
type MCPConfigTarget struct {
BaseDir string
AgentName string
Version string // optional; when set, path includes sanitized version
}
MCPConfigTarget describes where to place the resolved MCP config for an agent.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles loading and saving of agent manifests.
func NewManifestManager ¶
NewManifestManager creates a new manifest manager for the given project root.
func (*Manager) Load ¶
func (m *Manager) Load() (*models.AgentManifest, error)
Load reads and parses the agent.yaml file.
type PythonMCPServer ¶
type PythonMCPServer struct {
Name string `json:"name"`
Type string `json:"type"` // "remote" or "command"
URL string `json:"url,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
}
PythonMCPServer represents the JSON structure expected by the Python MCP tools template Equal to the type used in the python mcp_tools.py template.
func PythonServersFromManifest ¶
func PythonServersFromManifest(manifest *models.AgentManifest) []PythonMCPServer
PythonServersFromManifest converts resolved MCP servers in a manifest into Python MCP server structs. Registry-type servers are skipped because they are not directly runnable.