Documentation
¶
Index ¶
- Constants
- func ConfigToMap(cfg Config) map[string]any
- func DefaultWorkspaceDir() string
- func FixedConfigPath() string
- func LoadRaw(path string) ([]byte, error)
- func MCPServerEnabled(server MCPServer) bool
- func MCPServerIsRemote(server MCPServer) bool
- func PatchYAML(path string, updates map[string]any) error
- func ResolveConfigPath(raw string) string
- func SaveRaw(path string, content []byte) error
- func TarsHomeDir() string
- type APIConfig
- type AssistantConfig
- type AutomationConfig
- type BrowserConfig
- type ChannelConfig
- type Config
- type ExtensionConfig
- type FieldMeta
- type GatewayAgent
- type GatewayConfig
- type LLMConfig
- type MCPServer
- type MemoryConfig
- type RuntimeConfig
- type ToolConfig
- type UsageConfig
- type UsagePrice
- type VaultConfig
Constants ¶
const ( MCPTransportStdio = "stdio" MCPTransportStreamableHTTP = "streamable_http" MCPTransportSSE = "sse" MCPTransportWebSocket = "websocket" )
const ( MCPAuthModeNone = "none" MCPAuthModeBearer = "bearer" MCPAuthModeOAuth = "oauth" )
const DefaultConfigFilename = "config/standalone.yaml"
Variables ¶
This section is empty.
Functions ¶
func ConfigToMap ¶ added in v0.14.0
ConfigToMap converts a Config to a flat map keyed by YAML keys.
func DefaultWorkspaceDir ¶ added in v0.15.2
func DefaultWorkspaceDir() string
DefaultWorkspaceDir returns the default workspace directory (~/.tars/workspace).
func FixedConfigPath ¶ added in v0.15.2
func FixedConfigPath() string
FixedConfigPath returns the fixed config file path (~/.tars/config/config.yaml). This path is not user-overridable; all commands use it.
func MCPServerEnabled ¶ added in v0.11.0
func MCPServerIsRemote ¶ added in v0.11.0
func PatchYAML ¶ added in v0.14.0
PatchYAML reads the YAML file at path, merges the given key-value updates, and writes the result back. Unknown keys are ignored.
func ResolveConfigPath ¶
func SaveRaw ¶ added in v0.14.0
SaveRaw writes raw content to the config file at the given path. It validates that the content is valid YAML before writing.
func TarsHomeDir ¶ added in v0.15.2
func TarsHomeDir() string
TarsHomeDir returns the base directory for TARS data (~/.tars).
Types ¶
type AssistantConfig ¶ added in v0.6.0
type AutomationConfig ¶ added in v0.6.0
type BrowserConfig ¶ added in v0.6.0
type ChannelConfig ¶ added in v0.6.0
type Config ¶
type Config struct {
RuntimeConfig
APIConfig
LLMConfig
MemoryConfig
UsageConfig
AutomationConfig
AssistantConfig
ToolConfig
VaultConfig
BrowserConfig
GatewayConfig
ChannelConfig
ExtensionConfig
}
Config holds top-level runtime settings grouped by concern.
type ExtensionConfig ¶ added in v0.6.0
type ExtensionConfig struct {
SkillsEnabled bool
SkillsWatch bool
SkillsWatchDebounceMS int
SkillsExtraDirs []string
SkillsBundledDir string
PluginsEnabled bool
PluginsWatch bool
PluginsWatchDebounceMS int
PluginsExtraDirs []string
PluginsBundledDir string
PluginsAllowMCPServers bool
MCPServers []MCPServer
MCPCommandAllowlist []string
}
type FieldMeta ¶ added in v0.14.0
type FieldMeta struct {
Key string `json:"key"`
Section string `json:"section"`
Type string `json:"type"` // "string", "int", "float", "bool", "json"
Label string `json:"label"`
Description string `json:"description"`
Sensitive bool `json:"sensitive,omitempty"`
Options []string `json:"options,omitempty"`
}
FieldMeta describes a single configuration field for UI rendering.
type GatewayAgent ¶
type GatewayAgent struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Command string `json:"command"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
WorkingDir string `json:"working_dir,omitempty"`
TimeoutSeconds int `json:"timeout_seconds,omitempty"`
Enabled bool `json:"enabled,omitempty"`
}
type GatewayConfig ¶ added in v0.6.0
type GatewayConfig struct {
GatewayEnabled bool
GatewayDefaultAgent string
GatewayAgents []GatewayAgent
GatewayAgentsWatch bool
GatewayAgentsWatchDebounceMS int
GatewayPersistenceEnabled bool
GatewayRunsPersistenceEnabled bool
GatewayChannelsPersistenceEnabled bool
GatewayRunsMaxRecords int
GatewayChannelsMaxMessagesPerChannel int
GatewaySubagentsMaxThreads int
GatewaySubagentsMaxDepth int
GatewayPersistenceDir string
GatewayRestoreOnStartup bool
GatewayReportSummaryEnabled bool
GatewayArchiveEnabled bool
GatewayArchiveDir string
GatewayArchiveRetentionDays int
GatewayArchiveMaxFileBytes int
}
type MCPServer ¶
type MCPServer struct {
Name string `json:"name"`
Command string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
Transport string `json:"transport,omitempty"`
URL string `json:"url,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
AuthMode string `json:"auth_mode,omitempty"`
AuthTokenEnv string `json:"auth_token_env,omitempty"`
OAuthProvider string `json:"oauth_provider,omitempty"`
Source string `json:"source,omitempty"`
}
func NormalizeMCPServer ¶ added in v0.11.0
type MemoryConfig ¶ added in v0.6.0
type RuntimeConfig ¶ added in v0.6.0
type ToolConfig ¶ added in v0.6.0
type ToolConfig struct {
ToolsWebSearchEnabled bool
ToolsWebFetchEnabled bool
ToolsDefaultSet string
ToolsAllowHighRiskUser bool
ToolsWebSearchAPIKey string
ToolsWebSearchProvider string
ToolsWebSearchPerplexityAPIKey string
ToolsWebSearchPerplexityModel string
ToolsWebSearchPerplexityBaseURL string
ToolsWebSearchCacheTTLSeconds int
ToolsWebFetchPrivateHostAllowlist []string
ToolsWebFetchAllowPrivateHosts bool
ToolsApplyPatchEnabled bool
ToolsMessageEnabled bool
ToolsBrowserEnabled bool
ToolsNodesEnabled bool
ToolsGatewayEnabled bool
}