config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Budget

type Budget struct {
	Tokens  int     `yaml:"tokens"`
	Dollars float64 `yaml:"dollars"`
}

type File

type File struct {
	Models      []ModelManifest              `yaml:"models"`
	Tools       []ToolManifest               `yaml:"tools"`
	Include     []string                     `yaml:"include"` // Add include support for role files
	Memory      string                       `yaml:"memory"`
	Store       string                       `yaml:"store"`
	Vector      VectorManifest               `yaml:"vector_store"`
	Theme       string                       `yaml:"theme"`
	Themes      map[string]string            `yaml:"themes"`
	Keybinds    map[string]string            `yaml:"keybinds"`
	Credentials map[string]map[string]string `yaml:"credentials"`
	MCPServers  map[string]string            `yaml:"mcp_servers"`
	Collector   string                       `yaml:"collector"`
	Port        string                       `yaml:"port"`
	Sandbox     Sandbox                      `yaml:"sandbox"`
	Permissions Permissions                  `yaml:"permissions"`
	Budget      Budget                       `yaml:"budget"`
}

func Load

func Load(path string) (*File, error)

func (*File) Validate

func (f *File) Validate() error

Validate performs basic sanity checks on the loaded configuration.

type ModelManifest

type ModelManifest struct {
	Name     string            `yaml:"name"`
	Provider string            `yaml:"provider"`
	Options  map[string]string `yaml:"options,omitempty"`
}

type Permissions

type Permissions struct {
	Tools []string `yaml:"tools"`
}

type Sandbox

type Sandbox struct {
	Engine string `yaml:"engine"`
}

type ToolManifest

type ToolManifest struct {
	Name        string          `yaml:"name"`
	Description string          `yaml:"description"`
	Type        string          `yaml:"type,omitempty"`
	Command     string          `yaml:"command,omitempty"`
	HTTP        string          `yaml:"http,omitempty"`
	Args        map[string]any  `yaml:"args,omitempty"`
	Privileged  bool            `yaml:"privileged,omitempty"`
	Net         string          `yaml:"net,omitempty"`
	CPULimit    string          `yaml:"cpu_limit,omitempty"`
	MemLimit    string          `yaml:"mem_limit,omitempty"`
	Engine      string          `yaml:"engine,omitempty"`
	Permissions ToolPermissions `yaml:"permissions,omitempty"`
}

type ToolPermissions

type ToolPermissions struct {
	Allow *bool `yaml:"allow"`
}

type VectorManifest

type VectorManifest struct {
	Type       string `yaml:"type"`
	URL        string `yaml:"url"`
	Collection string `yaml:"collection,omitempty"`
}

VectorManifest describes a VectorStore backend.

Jump to

Keyboard shortcuts

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