core

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterInterface

func RegisterInterface(name string, iface Interface)

func ResolveClient

func ResolveClient(modelID string, models []config.ModelConfig, providers []config.ProviderConfig, verbose bool) (*provider.Client, string, error)

func Run

func Run(def Definition)

func RunArgs

func RunArgs(args []string, def Definition) error

Types

type Definition

type Definition struct {
	Name       string
	Tools      []tools.Tool
	ToolConfig func(services map[string]map[string]any, storeDir, configDir string) []tools.Tool
}

type Deps

type Deps struct {
	AgentName    string
	Client       *provider.Client
	Registry     *tools.Registry
	SystemPrompt string
	MaxRounds    int
	CWD          string
	Store        *session.Store
	Subagents    map[string]*agent.SubagentDef
	Skills       *skills.Store
	Config       config.Config
}

type Interface

type Interface interface {
	Name() string
	Run(ctx context.Context, deps Deps) error
}

func Local

func Local() Interface

func LookupInterface

func LookupInterface(name string) (Interface, bool)

type LocalInterface

type LocalInterface struct{}

func (LocalInterface) Name

func (LocalInterface) Name() string

func (LocalInterface) Run

func (LocalInterface) Run(_ context.Context, deps Deps) error

type Option

type Option func(*initConfig)

func WithConfigDir

func WithConfigDir(dir string) Option

func WithVerbose

func WithVerbose(v bool) Option

type Result

type Result struct {
	Config       config.Config
	ConfigDir    string
	Client       *provider.Client
	ModelName    string
	Registry     *tools.Registry
	SystemPrompt string
	CWD          string
	Templates    []prompts.Template
	Store        *session.Store
	Subagents    map[string]*agent.SubagentDef
}

func Init

func Init(opts ...Option) (*Result, error)

Jump to

Keyboard shortcuts

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