Documentation
¶
Index ¶
- Constants
- func InitCommonConfig(cmd *cli.Command)
- func SaveConnection(alias string, server string, token string, cmd *cli.Command) error
- func SetAgentConfig(config *AgentConfig)
- func SetServerConfig(config *ServerConfig)
- type AgentConfig
- type AuditConfig
- type BadgerDBConfig
- type ChatConfig
- type ClusterConfig
- type DockerConfig
- type LogOutputConfig
- type MCPConfig
- type MCPRemoteServerConfig
- type MySQLConfig
- type NomadConfig
- type OriginConfig
- type PodmanConfig
- type PortConfig
- type RedisConfig
- type ServerAddr
- type ServerConfig
- type TLSConfig
- type TOTPConfig
- type UIConfig
Constants ¶
const CONFIG_DIR = "knot"
const CONFIG_ENV_PREFIX = "KNOT"
const CONFIG_FILE = "knot.toml"
Variables ¶
This section is empty.
Functions ¶
func InitCommonConfig ¶ added in v0.18.0
func SaveConnection ¶ added in v0.18.0
func SetAgentConfig ¶ added in v0.18.0
func SetAgentConfig(config *AgentConfig)
SetAgentConfig sets the global agent configuration
func SetServerConfig ¶ added in v0.18.0
func SetServerConfig(config *ServerConfig)
SetServerConfig sets the global server configuration
Types ¶
type AgentConfig ¶ added in v0.18.0
type AgentConfig struct {
Endpoint string
SpaceID string
UpdateAuthorizedKeys bool
ServicePassword string
VSCodeTunnel string
SyslogPort int
APIPort int
DisableTerminal bool
DisableSpaceIO bool
MethodsFile string
DNSResolver bool
Port PortConfig
TLS TLSConfig
}
func GetAgentConfig ¶ added in v0.18.0
func GetAgentConfig() *AgentConfig
GetAgentConfig returns the global agent configuration
type AuditConfig ¶ added in v0.18.0
type BadgerDBConfig ¶ added in v0.18.0
type ChatConfig ¶ added in v0.19.0
type ChatConfig struct {
Enabled bool
Type string // API type: openai, anthropic, google, ollama. Defaults to openai. Maps to Provider.
Provider string
APIKey string
BaseURL string
OpenAIAPIKey string // Deprecated: use APIKey
OpenAIBaseURL string // Deprecated: use BaseURL
Model string
MaxTokens int
Temperature float32
SystemPromptFile string
SystemPrompt string
ReasoningEffort string
UIStyle string
}
type ClusterConfig ¶ added in v0.18.0
type DockerConfig ¶ added in v0.18.0
type DockerConfig struct {
Host string
}
type LogOutputConfig ¶ added in v0.24.0
type LogOutputConfig struct {
URL string
Format string
Stream string
Headers map[string]string
Username string // optional HTTP basic auth username
Password string // optional HTTP basic auth password
Token string // optional bearer token (Authorization: Bearer <token>); takes precedence over basic auth
}
type MCPConfig ¶ added in v0.19.0
type MCPConfig struct {
Enabled bool `toml:"enabled"`
RemoteServers []MCPRemoteServerConfig `toml:"remote_servers"`
}
type MCPRemoteServerConfig ¶ added in v0.23.0
type MCPRemoteServerConfig struct {
Namespace string `toml:"namespace"`
URL string `toml:"url"` // HTTP(S) URL of the remote server (empty for stdio)
Command string `toml:"command"` // stdio: executable to launch as a subprocess (empty for HTTP)
Args []string `toml:"args"` // stdio: command-line arguments
Env []string `toml:"env"` // stdio: extra KEY=VALUE environment variables (merged on top of the parent environment)
Token string `toml:"token"` // HTTP bearer token
ToolVisibility string `toml:"tool_visibility"` // "native" or "on-demand"
Notifications bool `toml:"notifications"` // accept listChanged notifications from this server and propagate them
}
type MySQLConfig ¶ added in v0.18.0
type NomadConfig ¶ added in v0.18.0
type OriginConfig ¶ added in v0.18.0
type PodmanConfig ¶ added in v0.18.0
type PodmanConfig struct {
Host string
}
type PortConfig ¶ added in v0.18.0
type RedisConfig ¶ added in v0.18.0
type ServerAddr ¶ added in v0.12.2
func GetServerAddr ¶ added in v0.12.2
func GetServerAddr(alias string, cmd *cli.Command) *ServerAddr
Read the server configuration information and generate the websocket address
type ServerConfig ¶ added in v0.18.0
type ServerConfig struct {
Listen string
ListenAgent string
URL string
AgentEndpoint string
WildcardDomain string
HTMLPath string
TemplatePath string
AgentPath string
PackagePath string
PrivateFilesPath string
PublicFilesPath string
DownloadPath string
DisableSpaceCreate bool
ListenTunnel string
TunnelDomain string
TunnelServer string
TerminalWebGL bool
EncryptionKey string
Zone string
Hostname string
Timezone string
LeafNode bool
AuthIPRateLimiting bool
DNSEnabled bool
DNSListen string
Nameservers []string
LocalContainerRuntimePref []string
MCPToolTimeout int
Origin OriginConfig
TOTP TOTPConfig
UI UIConfig
Cluster ClusterConfig
MySQL MySQLConfig
BadgerDB BadgerDBConfig
Redis RedisConfig
Audit AuditConfig
LogOutput LogOutputConfig
Docker DockerConfig
Podman PodmanConfig
Nomad NomadConfig
TLS TLSConfig
MCP MCPConfig
Chat ChatConfig
MCPToolsPath string
MCPToolsDisabled []string
LibDir string
KnotLibPath string
BaseImageRegistry string
BaseImagesManifest string
BaseImageRegistryUser string
BaseImageRegistryPassword string
BaseImagesUpdateEnabled bool
BaseImagesUpdateURL string
}
func GetServerConfig ¶ added in v0.18.0
func GetServerConfig() *ServerConfig
GetServerConfig returns the global server configuration
func (*ServerConfig) SessionCookieDomain ¶ added in v0.30.1
func (cfg *ServerConfig) SessionCookieDomain() string
SessionCookieDomain returns the domain to set on the web session cookie so that it is shared with wildcard subdomains (e.g. the "<owner>--<space>--vnc" subdomain used by web VNC). It is derived from WildcardDomain with any leading "*" (and optional ".") stripped. Returns "" when no wildcard domain is configured or when the server URL does not live under that domain (in which case the browser would reject the cookie), leaving the cookie host-only.