Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type A2AAgent ¶
type A2AAgent struct {
Name string `yaml:"name"` // Local alias for this remote agent
URL string `yaml:"url"` // Base URL for the remote agent's A2A endpoint
Auth *A2AAuth `yaml:"auth,omitempty"` // Authentication configuration
}
A2AAgent defines an external A2A agent reference.
type A2AAuth ¶
type A2AAuth struct {
Type string `yaml:"type,omitempty"` // "bearer", "api_key", or "none"
TokenEnv string `yaml:"token_env,omitempty"` // Environment variable containing the token
HeaderName string `yaml:"header_name,omitempty"` // Header name for API key auth (default: "Authorization")
}
A2AAuth contains authentication configuration for A2A connections.
type A2AConfig ¶
type A2AConfig struct {
Enabled bool `yaml:"enabled,omitempty"` // Enable A2A exposure (default: true when block present)
Version string `yaml:"version,omitempty"` // Agent version (default: "1.0.0")
Skills []A2ASkill `yaml:"skills,omitempty"` // Skills this agent exposes
}
A2AConfig defines A2A protocol settings for exposing an agent via A2A.
type A2ASkill ¶
type A2ASkill struct {
ID string `yaml:"id"`
Name string `yaml:"name"`
Description string `yaml:"description,omitempty"`
Tags []string `yaml:"tags,omitempty"`
}
A2ASkill represents a capability the agent can perform.
type Agent ¶
type Agent struct {
Name string `yaml:"name"`
Image string `yaml:"image,omitempty"`
Source *Source `yaml:"source,omitempty"`
Description string `yaml:"description,omitempty"`
Capabilities []string `yaml:"capabilities,omitempty"`
Uses []string `yaml:"uses"` // References mcp-servers or agents by name
EquippedSkills []string `yaml:"equipped_skills,omitempty"` // Alias for Uses (merged during load)
Env map[string]string `yaml:"env,omitempty"`
BuildArgs map[string]string `yaml:"build_args,omitempty"`
Network string `yaml:"network,omitempty"` // Network to join (for multi-network mode)
Command []string `yaml:"command,omitempty"` // Override container entrypoint
Runtime string `yaml:"runtime,omitempty"` // Headless runtime (e.g., "claude-code")
Prompt string `yaml:"prompt,omitempty"` // System prompt for headless agents
A2A *A2AConfig `yaml:"a2a,omitempty"` // A2A protocol configuration
}
Agent defines an active agent container that consumes MCP tools.
func (*Agent) IsA2AEnabled ¶
IsA2AEnabled returns true if the agent is exposed via A2A protocol.
func (*Agent) IsHeadless ¶
IsHeadless returns true if the agent uses a headless runtime.
type MCPServer ¶
type MCPServer struct {
Name string `yaml:"name"`
Image string `yaml:"image,omitempty"`
Source *Source `yaml:"source,omitempty"`
URL string `yaml:"url,omitempty"` // External server URL (no container)
Port int `yaml:"port,omitempty"` // For HTTP transport (container-based)
Transport string `yaml:"transport,omitempty"` // "http" (default), "stdio", or "sse"
Command []string `yaml:"command,omitempty"` // Override container command or remote command for SSH
Env map[string]string `yaml:"env,omitempty"`
BuildArgs map[string]string `yaml:"build_args,omitempty"`
Network string `yaml:"network,omitempty"` // Network to join (for multi-network mode)
SSH *SSHConfig `yaml:"ssh,omitempty"` // SSH connection config for remote servers
}
MCPServer defines an MCP server (container-based or external).
func (*MCPServer) IsExternal ¶
IsExternal returns true if this is an external MCP server (URL-only, no container).
func (*MCPServer) IsLocalProcess ¶
IsLocalProcess returns true if this is a local process MCP server (command-only, no container).
type Resource ¶
type Resource struct {
Name string `yaml:"name"`
Image string `yaml:"image"`
Env map[string]string `yaml:"env,omitempty"`
Ports []string `yaml:"ports,omitempty"`
Volumes []string `yaml:"volumes,omitempty"`
Network string `yaml:"network,omitempty"` // Network to join (for multi-network mode)
}
Resource defines a supporting container (database, cache, etc).
type SSHConfig ¶
type SSHConfig struct {
Host string `yaml:"host"` // Required: hostname or IP address
User string `yaml:"user"` // Required: SSH username
Port int `yaml:"port,omitempty"` // Optional: SSH port (default 22)
IdentityFile string `yaml:"identityFile,omitempty"` // Optional: path to SSH private key
}
SSHConfig defines SSH connection parameters for remote MCP servers.
type Source ¶
type Source struct {
Type string `yaml:"type"` // "git" or "local"
URL string `yaml:"url,omitempty"`
Ref string `yaml:"ref,omitempty"`
Path string `yaml:"path,omitempty"`
Dockerfile string `yaml:"dockerfile,omitempty"`
}
Source defines how to build an MCP server from source code.
type Topology ¶
type Topology struct {
Version string `yaml:"version"`
Name string `yaml:"name"`
Network Network `yaml:"network"` // Single network (simple mode)
Networks []Network `yaml:"networks,omitempty"` // Multiple networks (advanced mode)
MCPServers []MCPServer `yaml:"mcp-servers"`
Agents []Agent `yaml:"agents,omitempty"` // Active agents that consume MCP tools
Resources []Resource `yaml:"resources,omitempty"`
A2AAgents []A2AAgent `yaml:"a2a-agents,omitempty"` // External A2A agents for agent-to-agent communication
}
Topology represents the complete gridctl configuration.
func LoadTopology ¶
LoadTopology reads and parses a topology file.
func (*Topology) SetDefaults ¶
func (t *Topology) SetDefaults()
SetDefaults applies default values to the topology.
type ValidationError ¶
ValidationError represents a configuration validation error.
func (ValidationError) Error ¶
func (e ValidationError) Error() string
type ValidationErrors ¶
type ValidationErrors []ValidationError
ValidationErrors is a collection of validation errors.
func (ValidationErrors) Error ¶
func (e ValidationErrors) Error() string