config

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureDataDir added in v1.2.0

func EnsureDataDir(dataDir string) error

EnsureDataDir creates the data directory and its certs subdirectory with secure permissions (0700).

func ResolveDataDir added in v1.2.0

func ResolveDataDir(mode string) string

ResolveDataDir resolves the base directory for database and certificates based on the runtime mode. For "stdio" mode, it defaults to the OS-standard user data directory to avoid polluting the workspace. For "serve" mode (or empty), it defaults to the relative "data" directory to preserve backward compatibility.

Types

type Config

type Config struct {
	Mode                     string
	DataDir                  string
	Host                     string
	Port                     int
	HostName                 string
	DBPath                   string
	ProjectID                string
	MCPToken                 string
	ConfigureToken           string
	ExecutionToken           string
	WebUsername              string
	WebPassword              string
	JWTSecret                string
	AllowNonLoopback         bool
	WaitAfterMinutes         int
	MaxNoFeedbackChecks      int
	WaitInstruction          string
	WaitExhaustedInstruction string
	FeedbackTimeoutSeconds   int
	WaitCountdownMinutes     int
	ASRAPIURL                string
	ASRAPIKey                string
	ASRModel                 string
	HTTPSPort                int
	TLSEnabled               bool
	TLSCertPath              string
	TLSKeyPath               string
	DevMode                  bool
	AutoOpenBrowser          bool
	Version                  string
}

func Load

func Load() *Config

func LoadWithMode added in v1.2.0

func LoadWithMode(mode string) *Config

LoadWithMode loads configuration tailored for the given runtime mode ("serve" or "stdio").

Jump to

Keyboard shortcuts

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