config

package
v0.44.5 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveWingConfig added in v0.34.0

func SaveWingConfig(dir string, cfg *WingConfig) error

SaveWingConfig writes wing.yaml to dir.

Types

type AllowKey added in v0.34.0

type AllowKey struct {
	Key    string `yaml:"key,omitempty"`     // base64 raw P-256 public key (optional)
	UserID string `yaml:"user_id,omitempty"` // relay user ID
	Email  string `yaml:"email,omitempty"`   // auto-set from relay, for display
}

AllowKey is an allowed user for wing access control.

type Config

type Config struct {
	Dir               string            `yaml:"-"`
	DefaultAgent      string            `yaml:"default_agent"`
	DefaultEmbedder   string            `yaml:"default_embedder"`
	WingID            string            `yaml:"wing_id"`
	Hostname          string            `yaml:"-"` // os.Hostname(), not persisted
	PollInterval      string            `yaml:"poll_interval"`
	DefaultMaxRetries int               `yaml:"max_retries"`
	RoostURL          string            `yaml:"roost_url"`
	Vars              map[string]string `yaml:"vars"`
}

func Load

func Load() (*Config, error)

func (*Config) DBPath

func (c *Config) DBPath() string

func (*Config) MemoryDir

func (c *Config) MemoryDir() string

func (*Config) RelayDBPath added in v0.16.1

func (c *Config) RelayDBPath() string

func (*Config) ResolveVars

func (c *Config) ResolveVars(s string) string

func (*Config) SkillsDir

func (c *Config) SkillsDir() string

type WingConfig added in v0.34.0

type WingConfig struct {
	WingID    string     `yaml:"wing_id"`
	Roost     string     `yaml:"roost,omitempty"`
	Org       string     `yaml:"org,omitempty"`
	Root      string     `yaml:"root,omitempty"`
	Labels    []string   `yaml:"labels,omitempty"`
	EggConfig string     `yaml:"egg_config,omitempty"`
	Conv      string     `yaml:"conv,omitempty"`
	Audit     bool       `yaml:"audit,omitempty"`
	Debug     bool       `yaml:"debug,omitempty"`
	Locked    bool       `yaml:"locked,omitempty"`   // explicit lock mode toggle
	AuthTTL   string     `yaml:"auth_ttl,omitempty"` // passkey auth token duration (default "1h")
	AllowKeys []AllowKey `yaml:"allow_keys,omitempty"`

	PinnedCompat bool `yaml:"pinned,omitempty"` // backwards compat: old "pinned" key
}

WingConfig holds wing-specific settings persisted in ~/.wingthing/wing.yaml.

func LoadWingConfig added in v0.34.0

func LoadWingConfig(dir string) (*WingConfig, error)

LoadWingConfig reads wing.yaml from dir. If the file doesn't exist, it returns a zero-value config (no error). If a legacy wing-id file exists, the wing_id is seeded from it.

Jump to

Keyboard shortcuts

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