Help us shape the future of Go! Take the 2026 Go Developer Survey

generate

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package generate provides code generation from multi-agent-spec to Go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentTemplateData

type AgentTemplateData struct {
	Name        string
	NamePascal  string
	Description string
	Model       string
	Tools       []string
	Requires    []string // CLI tools required by this agent
}

AgentTemplateData holds data for agent template rendering.

type CredentialTemplateData

type CredentialTemplateData struct {
	Description string
	Required    bool
	Source      string
}

CredentialTemplateData holds data for credential template rendering.

type Generator

type Generator struct {
	// SpecDir is the directory containing the spec files.
	SpecDir string

	// OutputDir is the directory where generated code will be written.
	OutputDir string

	// ProgramName is the name of the generated CLI.
	ProgramName string

	// ModulePath is the Go module path for the generated code.
	ModulePath string
}

Generator generates Go code from multi-agent-spec definitions.

func (*Generator) Generate

func (g *Generator) Generate() error

Generate generates Go code from the spec directory.

type GeneratorConfig

type GeneratorConfig struct {
	// Team is the loaded team spec.
	Team *local.TeamSpec

	// Agents is a map of agent name to agent spec.
	Agents map[string]*local.AgentSpec

	// ProgramName is the CLI program name.
	ProgramName string

	// Version is the generated code version.
	Version string

	// DefaultProvider is the default LLM provider.
	DefaultProvider string

	// DefaultModel is the default model tier.
	DefaultModel string

	// DefaultTimeout is the default execution timeout.
	DefaultTimeout time.Duration

	// SpecDir is the source spec directory.
	SpecDir string

	// GeneratedAt is when the code was generated.
	GeneratedAt time.Time
}

GeneratorConfig holds configuration for code generation.

type TemplateData

type TemplateData struct {
	ProgramName     string
	Version         string
	TeamName        string
	TeamDescription string
	Orchestrator    string
	DefaultProvider string
	DefaultModel    string
	DefaultTimeout  string
	SpecDir         string
	GeneratedAt     string
	Agents          []AgentTemplateData
	Workflow        *local.WorkflowSpec
	UniqueRequires  []string                          // All unique CLI tools required across all agents
	Credentials     map[string]CredentialTemplateData // All credentials required across all agents
}

TemplateData holds all data for template rendering.

Jump to

Keyboard shortcuts

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