config

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package config provides configuration types and loading for omniagent.

Package config provides configuration types and loading for omniagent.

Package config provides configuration types and loading for omniagent.

Index

Constants

View Source
const DefaultRecallMax = 5

DefaultRecallMax is the default maximum memories to recall per request.

Variables

This section is empty.

Functions

func ExpandEnvVars

func ExpandEnvVars(s string) string

ExpandEnvVars expands environment variables in string values. Supports ${VAR} and $VAR syntax.

Types

type AgentConfig

type AgentConfig struct {
	ID           string   `json:"id,omitempty" yaml:"id,omitempty"`
	Name         string   `json:"name,omitempty" yaml:"name,omitempty"`
	Description  string   `json:"description,omitempty" yaml:"description,omitempty"`
	Provider     string   `json:"provider" yaml:"provider"`
	Model        string   `json:"model" yaml:"model"`
	APIKey       string   `json:"api_key" yaml:"api_key"` //nolint:gosec // G117: APIKey loaded from config file
	BaseURL      string   `json:"base_url" yaml:"base_url"`
	Temperature  float64  `json:"temperature" yaml:"temperature"`
	MaxTokens    int      `json:"max_tokens" yaml:"max_tokens"`
	SystemPrompt string   `json:"system_prompt" yaml:"system_prompt"`
	Timezone     string   `json:"timezone,omitempty" yaml:"timezone,omitempty"` // IANA timezone for temporal context (empty = UTC)
	AllowedTools []string `json:"allowed_tools,omitempty" yaml:"allowed_tools,omitempty"`
	DeniedTools  []string `json:"denied_tools,omitempty" yaml:"denied_tools,omitempty"`
	Enabled      *bool    `json:"enabled,omitempty" yaml:"enabled,omitempty"`
}

AgentConfig configures the AI agent.

func (*AgentConfig) IsEnabled added in v0.11.0

func (c *AgentConfig) IsEnabled() bool

IsEnabled returns whether the agent is enabled. Defaults to true if Enabled is nil.

type AuthConfig added in v0.16.0

type AuthConfig struct {
	// Enabled requires login for the web UI even in personal (single-user)
	// mode, reusing the cookie-session machinery minus the allowlist and
	// multi-user bootstrap. Defaults to false: personal/localhost use stays
	// no-auth. team.enabled=true implies this is true regardless of the
	// configured value — see Config.Capabilities.
	Enabled bool `json:"enabled" yaml:"enabled"`

	// OwnerEmail is the sole account permitted to log in in personal
	// single-account mode (auth.enabled=true, team.enabled=false); it
	// becomes the superadmin on first login (TRD §4 "the sole account is
	// the configured owner"). Ignored when team.enabled=true — team mode's
	// superadmin_email governs instead.
	OwnerEmail string `json:"owner_email,omitempty" yaml:"owner_email,omitempty"`

	// BaseURL is the externally visible origin used to build the magic
	// link and select the session cookie's Secure attribute. Ignored when
	// team.enabled=true — team.base_url governs instead.
	BaseURL string `json:"base_url,omitempty" yaml:"base_url,omitempty"`

	// SMTP delivers the magic-link email. Ignored when team.enabled=true.
	// When unset, links are logged instead of emailed (dev only).
	SMTP TeamSMTPConfig `json:"smtp,omitempty" yaml:"smtp,omitempty"`
}

AuthConfig gates browser-facing login, independent of team (multi-user) mode (TRD §1a/§4). It is the login-required axis for the web UI, distinct from the existing gateway.APIKeys on/off auth used for programmatic/WS clients.

func (*AuthConfig) Validate added in v0.16.0

func (c *AuthConfig) Validate() error

Validate checks the personal single-account auth configuration. Only meaningful when Enabled and team mode is off — team mode validates itself via TeamConfig.Validate and ignores these fields.

type BrowserToolConfig

type BrowserToolConfig struct {
	Enabled  bool   `json:"enabled" yaml:"enabled"`
	Headless bool   `json:"headless" yaml:"headless"`
	UserData string `json:"user_data" yaml:"user_data"`
}

BrowserToolConfig configures the browser automation tool.

type Capabilities added in v0.16.0

type Capabilities struct {
	// MultiUser is true in team mode: more than one account, RLS isolation,
	// group chats, and admin all become meaningful.
	MultiUser bool `json:"multiUser"`
	// AuthRequired is true when the web UI must show a login screen: either
	// team mode (which implies auth) or personal mode with auth.enabled set.
	AuthRequired bool `json:"authRequired"`
	// GroupChats, Admin, and Catalog are team-only surfaces: a single
	// implicit user has no one to group-chat with, administer, or browse an
	// agent catalog for.
	GroupChats bool `json:"groupChats"`
	Admin      bool `json:"admin"`
	Catalog    bool `json:"catalog"`
	// GoogleSSO and GitHubSSO tell the login screen which SSO buttons to
	// render — true only in team mode when the corresponding provider has
	// both a client ID and secret configured.
	GoogleSSO bool `json:"googleSso"`
	GitHubSSO bool `json:"githubSso"`
	// Translate is true when a deployment-wide LLM (cfg.Agent.APIKey) is
	// configured, so the composer's translate button has something to call
	// (POST /api/translate) — false hides it rather than showing a dead
	// button.
	Translate bool `json:"translate"`
}

Capabilities describes which browser-facing surfaces are active for the current deployment mode. The web UI reads this once (GET /api/capabilities) and renders accordingly — there is no separate personal/team build (TRD §1a/§6).

type ChannelsConfig

type ChannelsConfig struct {
	Telegram  TelegramConfig  `json:"telegram" yaml:"telegram"`
	Discord   DiscordConfig   `json:"discord" yaml:"discord"`
	WhatsApp  WhatsAppConfig  `json:"whatsapp" yaml:"whatsapp"`
	TwilioSMS TwilioSMSConfig `json:"twilio_sms" yaml:"twilio_sms"`
}

ChannelsConfig configures messaging channels.

type Config

type Config struct {
	Gateway       GatewayConfig       `json:"gateway" yaml:"gateway"`
	Agent         AgentConfig         `json:"agent" yaml:"agent"`
	Agents        []AgentConfig       `json:"agents,omitempty" yaml:"agents,omitempty"` // Multi-agent configs
	Sessions      SessionsConfig      `json:"sessions" yaml:"sessions"`
	Auth          AuthConfig          `json:"auth" yaml:"auth"`
	Web           WebConfig           `json:"web" yaml:"web"`
	Team          TeamConfig          `json:"team" yaml:"team"`
	Channels      ChannelsConfig      `json:"channels" yaml:"channels"`
	Tools         ToolsConfig         `json:"tools" yaml:"tools"`
	Skills        SkillsConfig        `json:"skills" yaml:"skills"`
	Memory        MemoryConfig        `json:"memory" yaml:"memory"`
	Voice         VoiceConfig         `json:"voice" yaml:"voice"`
	Image         ImageConfig         `json:"image" yaml:"image"`
	Observability ObservabilityConfig `json:"observability" yaml:"observability"`
	Tokens        TokenConfig         `json:"tokens" yaml:"tokens"`
	// Secrets holds global secret bindings available to all skills —
	// env-var name -> plain value or vault URI (op://, bw://, file://,
	// env://) — resolved in place by ResolveCredentials. Per-skill
	// overrides live in Skills.Config[name].Secrets and take precedence
	// (RMI-OMNIAGENT-201/202).
	Secrets map[string]string `json:"secrets,omitempty" yaml:"secrets,omitempty"`
}

Config is the root configuration for omniagent.

func Default

func Default() Config

Default returns a Config with sensible defaults.

func Load

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

Load reads configuration from a file and environment variables. Environment variables override file values. Vault-backed credentials (op://, bw://, file://, env://) are resolved automatically.

func LoadWithContext added in v0.9.0

func LoadWithContext(ctx context.Context, path string) (*Config, error)

LoadWithContext reads configuration with a context for vault operations.

func (*Config) Capabilities added in v0.16.0

func (c *Config) Capabilities() Capabilities

Capabilities derives the active capability set from the team and auth config axes (TRD §1a). team.enabled implies auth.enabled regardless of the configured Auth.Enabled value.

func (*Config) ResolveCredentials added in v0.9.0

func (c *Config) ResolveCredentials(ctx context.Context) error

ResolveCredentials resolves all vault-backed credentials in the config. Values starting with op://, bw://, file://, or env:// are resolved using omnivault. Plain string values are left unchanged. This also resolves the global Secrets map and each skill's Skills.Config[name].Secrets map in place (RMI-OMNIAGENT-201/202), reusing the same resolution machinery.

func (*Config) WebUIEnabled added in v0.16.0

func (c *Config) WebUIEnabled() bool

WebUIEnabled reports whether the embedded web UI (SPA + capabilities endpoint) should be served: explicit web.enabled, or implied by team mode.

type DiscordConfig

type DiscordConfig struct {
	Enabled bool   `json:"enabled" yaml:"enabled"`
	Token   string `json:"token" yaml:"token"`
	GuildID string `json:"guild_id" yaml:"guild_id"`
}

DiscordConfig configures the Discord channel.

type Duration added in v0.16.0

type Duration time.Duration

Duration wraps time.Duration so config files can use human-readable duration strings ("4h", "30s") in both YAML and JSON. Plain integers are accepted as nanoseconds for backward compatibility.

func (Duration) Duration added in v0.16.0

func (d Duration) Duration() time.Duration

Duration returns the wrapped time.Duration.

func (Duration) MarshalJSON added in v0.16.0

func (d Duration) MarshalJSON() ([]byte, error)

MarshalJSON encodes the duration as a string.

func (Duration) MarshalYAML added in v0.16.0

func (d Duration) MarshalYAML() (any, error)

MarshalYAML encodes the duration as a string.

func (Duration) String added in v0.16.0

func (d Duration) String() string

String returns the canonical duration string.

func (*Duration) UnmarshalJSON added in v0.16.0

func (d *Duration) UnmarshalJSON(b []byte) error

UnmarshalJSON decodes a duration string or integer nanoseconds.

func (*Duration) UnmarshalYAML added in v0.16.0

func (d *Duration) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML decodes a duration string or integer nanoseconds.

type EmbedderConfig added in v0.11.0

type EmbedderConfig struct {
	Provider string `json:"provider" yaml:"provider"` // openai, bedrock, etc.
	Model    string `json:"model" yaml:"model"`       // text-embedding-3-small, etc.
	APIKey   string `json:"api_key" yaml:"api_key"`   //nolint:gosec // G117: APIKey loaded from config file
}

EmbedderConfig configures the embedding model for semantic memory.

type GatewayConfig

type GatewayConfig struct {
	Address      string        `json:"address" yaml:"address"`
	ReadTimeout  time.Duration `json:"read_timeout" yaml:"read_timeout"`
	WriteTimeout time.Duration `json:"write_timeout" yaml:"write_timeout"`
	PingInterval time.Duration `json:"ping_interval" yaml:"ping_interval"`
}

GatewayConfig configures the WebSocket gateway.

type ImageConfig added in v0.12.0

type ImageConfig struct {
	Enabled  bool   `json:"enabled" yaml:"enabled"`
	Provider string `json:"provider" yaml:"provider"` // openai, fal
	Model    string `json:"model" yaml:"model"`       // Default model (e.g., gpt-image-2, fal-ai/flux-pro)
	APIKey   string `json:"api_key" yaml:"api_key"`   //nolint:gosec // G117: APIKey loaded from config file
	BaseURL  string `json:"base_url" yaml:"base_url"` // Optional custom base URL
}

ImageConfig configures image generation via OmniImage.

type MemoryConfig added in v0.11.0

type MemoryConfig struct {
	Enabled   bool           `json:"enabled" yaml:"enabled"`
	Provider  string         `json:"provider" yaml:"provider"`     // memory, postgres, kvs, mem0, twilio
	DSN       string         `json:"dsn" yaml:"dsn"`               // Database connection string (postgres)
	APIKey    string         `json:"api_key" yaml:"api_key"`       // API key (mem0, twilio) //nolint:gosec // G117: APIKey loaded from config file
	Endpoint  string         `json:"endpoint" yaml:"endpoint"`     // API endpoint (mem0, twilio)
	TenantID  string         `json:"tenant_id" yaml:"tenant_id"`   // Default tenant for this agent
	AgentID   string         `json:"agent_id" yaml:"agent_id"`     // Agent identifier
	Options   map[string]any `json:"options" yaml:"options"`       // Provider-specific options
	Embedder  EmbedderConfig `json:"embedder" yaml:"embedder"`     // Optional embedder configuration
	RecallMax int            `json:"recall_max" yaml:"recall_max"` // Max memories to recall per request
}

MemoryConfig configures the omnimemory integration.

func (*MemoryConfig) GetRecallMax added in v0.11.0

func (c *MemoryConfig) GetRecallMax() int

GetRecallMax returns the recall max, defaulting to DefaultRecallMax if not set.

func (*MemoryConfig) ToClientConfig added in v0.11.0

func (c *MemoryConfig) ToClientConfig() core.ClientConfig

ToClientConfig converts MemoryConfig to omnimemory ClientConfig.

type ObservabilityConfig

type ObservabilityConfig struct {
	Enabled  bool   `json:"enabled" yaml:"enabled"`
	Provider string `json:"provider" yaml:"provider"`
	Endpoint string `json:"endpoint" yaml:"endpoint"`
	APIKey   string `json:"api_key" yaml:"api_key"` //nolint:gosec // G117: APIKey loaded from config file
}

ObservabilityConfig configures observability features.

type RolloverConfig added in v0.16.0

type RolloverConfig struct {
	// Enabled turns automatic rollover on. At least one of IdleTimeout or
	// Daily must be set when enabled.
	Enabled bool `json:"enabled" yaml:"enabled"`

	// IdleTimeout rolls a session over when it has been inactive longer
	// than this duration (e.g. "4h"). Zero disables idle rollover.
	IdleTimeout Duration `json:"idle_timeout" yaml:"idle_timeout"`

	// Daily rolls a session over when a calendar-day boundary is crossed.
	Daily bool `json:"daily" yaml:"daily"`

	// Timezone resolves the day boundary (IANA name). Empty falls back to
	// the agent's timezone, then UTC.
	Timezone string `json:"timezone" yaml:"timezone"`
}

RolloverConfig configures automatic session rollover: when triggered, a session's conversation ends (persisted to memory when memory is enabled) and continues fresh under the same session ID.

type STTConfig

type STTConfig struct {
	Provider string `json:"provider" yaml:"provider"`
	APIKey   string `json:"api_key" yaml:"api_key"` //nolint:gosec // G117: APIKey loaded from config file
	Model    string `json:"model" yaml:"model"`
	Language string `json:"language" yaml:"language"`
}

STTConfig configures speech-to-text.

type ServiceTokenConfig added in v0.9.0

type ServiceTokenConfig struct {
	// CredentialsName is the name of the credentials in the vault.
	// If empty, defaults to the service name.
	CredentialsName string `json:"credentials_name" yaml:"credentials_name"`

	// Scopes are the OAuth scopes to request (for Google, etc.).
	Scopes []string `json:"scopes" yaml:"scopes"`
}

ServiceTokenConfig configures a single OAuth service.

type SessionsConfig added in v0.16.0

type SessionsConfig struct {
	// Rollover configures automatic session rollover.
	Rollover RolloverConfig `json:"rollover" yaml:"rollover"`
}

SessionsConfig configures session behavior.

type ShellToolConfig

type ShellToolConfig struct {
	Enabled    bool     `json:"enabled" yaml:"enabled"`
	WorkingDir string   `json:"working_dir" yaml:"working_dir"`
	Allowlist  []string `json:"allowlist" yaml:"allowlist"`
}

ShellToolConfig configures the shell execution tool.

type SkillConfig added in v0.18.0

type SkillConfig struct {
	// Secrets binds this skill's declared secret env-var names to plain
	// values or vault URIs, resolved in place by ResolveCredentials.
	// Takes precedence over the same key in the root Config.Secrets.
	Secrets map[string]string `json:"secrets,omitempty" yaml:"secrets,omitempty"`
}

SkillConfig is one skill's config.yaml overrides.

type SkillsConfig

type SkillsConfig struct {
	Enabled     bool     `json:"enabled" yaml:"enabled"`
	Packs       []string `json:"packs" yaml:"packs"`       // Skill pack names (e.g., "omniagent-skills")
	Paths       []string `json:"paths" yaml:"paths"`       // Directories to search (alias: dirs)
	Includes    []string `json:"includes" yaml:"includes"` // Only load these skills
	Excludes    []string `json:"excludes" yaml:"excludes"` // Skip these skills
	Disabled    []string `json:"disabled" yaml:"disabled"` // Deprecated: use excludes
	MaxInjected int      `json:"max_injected" yaml:"max_injected"`
	// Config holds per-skill settings keyed by skill name, mirroring
	// Tokens.Services' map-by-name shape (RMI-OMNIAGENT-202).
	Config map[string]SkillConfig `json:"config,omitempty" yaml:"config,omitempty"`
}

SkillsConfig configures skill loading.

type TTSConfig

type TTSConfig struct {
	Provider string `json:"provider" yaml:"provider"`
	APIKey   string `json:"api_key" yaml:"api_key"` //nolint:gosec // G117: APIKey loaded from config file
	Model    string `json:"model" yaml:"model"`
	VoiceID  string `json:"voice_id" yaml:"voice_id"`
}

TTSConfig configures text-to-speech.

type TeamConfig added in v0.16.0

type TeamConfig struct {
	// Enabled turns team mode on.
	Enabled bool `json:"enabled" yaml:"enabled"`

	// Database is the PostgreSQL connection configuration.
	Database TeamDatabaseConfig `json:"database" yaml:"database"`

	// BaseURL is the externally visible origin (e.g. https://team.example.com),
	// used to build magic links and cookies.
	BaseURL string `json:"base_url" yaml:"base_url"`

	// SuperadminEmail bootstraps the superadmin on first login.
	SuperadminEmail string `json:"superadmin_email" yaml:"superadmin_email"`

	// SuperadminPassword, when set, seeds the superadmin's email+password
	// credential on startup (set-once: applied only if that account has no
	// password yet, so it never clobbers a later change). Lets an operator log
	// in without SMTP. Prefer supplying it via OMNIAGENT_TEAM_SUPERADMIN_PASSWORD
	// or a vault reference rather than a literal in a committed config file.
	SuperadminPassword string `json:"superadmin_password,omitempty" yaml:"superadmin_password,omitempty"` //nolint:gosec // G117: loaded from config/env, not a hardcoded credential

	// AgentHandle is the @-mention handle of the agent in group chats
	// (default "omniagent").
	AgentHandle string `json:"agent_handle,omitempty" yaml:"agent_handle,omitempty"`

	// SMTP configures magic-link email delivery.
	SMTP TeamSMTPConfig `json:"smtp" yaml:"smtp"`

	// Secrets configures the per-agent secret vault. When set, an @-mentioned
	// agent's runtime instance is built with its own agent-scoped secrets
	// injected into secrets-aware skills (per-agent MCP subprocess env). When
	// unset, agents run without injected secrets.
	Secrets TeamSecretsConfig `json:"secrets,omitempty" yaml:"secrets,omitempty"`

	// SSO configures optional OAuth/OIDC sign-in providers, additive to
	// magic-link email. Each provider is independent; a provider is
	// "configured" when both its client ID and secret are set. Redirect URIs
	// are not configurable — derived as
	// {base_url}/api/auth/{provider}/callback.
	SSO TeamSSOConfig `json:"sso,omitempty" yaml:"sso,omitempty"`
}

TeamConfig configures team (multi-user) mode: PostgreSQL-backed users, allowlist-closed magic-link auth, and private/group chats. Disabled by default — single-operator deployments are unaffected.

func (*TeamConfig) Validate added in v0.16.0

func (c *TeamConfig) Validate() error

Validate checks the team configuration. A disabled config is always valid.

type TeamDatabaseConfig added in v0.16.0

type TeamDatabaseConfig struct {
	// AppDSN is the non-owner application role connection string.
	AppDSN string `json:"app_dsn" yaml:"app_dsn"`

	// MigrateDSN is the owner role used only for migrations-on-start.
	MigrateDSN string `json:"migrate_dsn" yaml:"migrate_dsn"`

	// AppRole is the application role name granted access by migrations
	// (default "omniagent_app").
	AppRole string `json:"app_role,omitempty" yaml:"app_role,omitempty"`
}

TeamDatabaseConfig holds the two-role PostgreSQL connection strings.

type TeamOAuthProviderConfig added in v0.17.0

type TeamOAuthProviderConfig struct {
	ClientID     string `json:"client_id,omitempty" yaml:"client_id,omitempty"`
	ClientSecret string `json:"client_secret,omitempty" yaml:"client_secret,omitempty"` //nolint:gosec // G117: loaded from config file
}

TeamOAuthProviderConfig holds one SSO provider's OAuth client credentials.

type TeamSMTPConfig added in v0.16.0

type TeamSMTPConfig struct {
	Host     string `json:"host" yaml:"host"`
	Port     int    `json:"port" yaml:"port"`
	Username string `json:"username,omitempty" yaml:"username,omitempty"`
	Password string `json:"password,omitempty" yaml:"password,omitempty"` //nolint:gosec // G117: loaded from config file
	From     string `json:"from" yaml:"from"`
}

TeamSMTPConfig configures outbound email for magic links.

type TeamSSOConfig added in v0.17.0

type TeamSSOConfig struct {
	Google TeamOAuthProviderConfig `json:"google,omitempty" yaml:"google,omitempty"`
	GitHub TeamOAuthProviderConfig `json:"github,omitempty" yaml:"github,omitempty"`
}

TeamSSOConfig configures optional Google OIDC and GitHub OAuth sign-in.

type TeamSecretsConfig added in v0.16.0

type TeamSecretsConfig struct {
	// Provider selects the OmniVault backing provider: "memory" or "file".
	// Empty disables secret injection.
	Provider string `json:"provider,omitempty" yaml:"provider,omitempty"`

	// Dir is the storage directory for the "file" provider (required for it).
	Dir string `json:"dir,omitempty" yaml:"dir,omitempty"`
}

TeamSecretsConfig configures the OmniVault-backed team secret store. Secrets are namespaced per agent ("agents/<id>/<ENV_VAR>") so two agents load disjoint secrets with no cross-leak. Encryption-at-rest is not yet provided here (the mechanism ships first); "memory" suits tests and "file" a simple local store.

type TelegramConfig

type TelegramConfig struct {
	Enabled bool   `json:"enabled" yaml:"enabled"`
	Token   string `json:"token" yaml:"token"`
}

TelegramConfig configures the Telegram channel.

type TokenConfig added in v0.9.0

type TokenConfig struct {
	// VaultURI is the vault URI for storing credentials and tokens.
	// Examples: "op://MyVault", "bw://org-id"
	VaultURI string `json:"vault_uri" yaml:"vault_uri"`

	// Services maps service names to their credential configuration.
	// The credential name in the vault defaults to the service name.
	Services map[string]ServiceTokenConfig `json:"services" yaml:"services"`
}

TokenConfig configures OAuth token management for services that require access token refresh (Google, Zoom, RingCentral, etc.).

type TokenManager added in v0.9.0

type TokenManager struct {
	// contains filtered or unexported fields
}

TokenManager provides OAuth token management with automatic refresh. It wraps omnitoken.TokenManager and provides vault-backed credential storage.

func NewTokenManager added in v0.9.0

func NewTokenManager(ctx context.Context, config TokenConfig) (*TokenManager, error)

NewTokenManager creates a token manager from configuration. The token manager handles OAuth token lifecycle including automatic refresh and vault coordination for multi-process scenarios.

func (*TokenManager) Close added in v0.9.0

func (m *TokenManager) Close() error

Close releases resources held by the token manager.

func (*TokenManager) HTTPClient added in v0.9.0

func (m *TokenManager) HTTPClient(ctx context.Context, service string) (*http.Client, error)

HTTPClient returns an HTTP client for the service with automatic token refresh. The client automatically: 1. Adds Authorization header with access token 2. Refreshes token when expired 3. Coordinates with vault for multi-process token sharing

Example:

client := tm.HTTPClient(ctx, "google")
resp, err := client.Get("https://www.googleapis.com/...")

func (*TokenManager) LoadGoogleServiceAccount added in v0.9.0

func (m *TokenManager) LoadGoogleServiceAccount(ctx context.Context, name, serviceAccountFile string, scopes []string) error

LoadGoogleServiceAccount loads a Google service account from a JSON file and stores it in the vault for token management.

func (*TokenManager) RefreshToken added in v0.9.0

func (m *TokenManager) RefreshToken(ctx context.Context, service string) error

RefreshToken forces a token refresh for the service. This is useful when you know the token is invalid and want to refresh immediately.

type ToolsConfig

type ToolsConfig struct {
	Browser BrowserToolConfig `json:"browser" yaml:"browser"`
	Shell   ShellToolConfig   `json:"shell" yaml:"shell"`
}

ToolsConfig configures available tools.

type TwilioSMSConfig added in v0.6.0

type TwilioSMSConfig struct {
	Enabled             bool   `json:"enabled" yaml:"enabled"`
	AccountSID          string `json:"account_sid" yaml:"account_sid"`
	AuthToken           string `json:"auth_token" yaml:"auth_token"` //nolint:gosec // G101: Auth token loaded from config file
	PhoneNumber         string `json:"phone_number" yaml:"phone_number"`
	MessagingServiceSid string `json:"messaging_service_sid" yaml:"messaging_service_sid"` // For RCS
	WebhookPath         string `json:"webhook_path" yaml:"webhook_path"`                   // Default: /webhook/twilio/sms
}

TwilioSMSConfig configures the Twilio SMS channel.

type VoiceConfig

type VoiceConfig struct {
	Enabled      bool      `json:"enabled" yaml:"enabled"`
	ResponseMode string    `json:"response_mode" yaml:"response_mode"`
	STT          STTConfig `json:"stt" yaml:"stt"`
	TTS          TTSConfig `json:"tts" yaml:"tts"`
}

VoiceConfig configures voice processing.

type WebConfig added in v0.16.0

type WebConfig struct {
	// Enabled serves the embedded SPA and GET /api/capabilities at the
	// gateway's HTTP address. Defaults to false in personal mode.
	Enabled bool `json:"enabled" yaml:"enabled"`
}

WebConfig controls the embedded browser UI (TRD §6), independent of team mode. Team mode always implies the web UI (it is the whole point of a hosted team deployment); personal mode opts in explicitly so the existing zero-dependency single-operator experience is unaffected by default.

type WhatsAppConfig

type WhatsAppConfig struct {
	Enabled bool   `json:"enabled" yaml:"enabled"`
	DBPath  string `json:"db_path" yaml:"db_path"`
}

WhatsAppConfig configures the WhatsApp channel.

Jump to

Keyboard shortcuts

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