Documentation
¶
Index ¶
- Constants
- func EnsureTinyMemDirs(tinyMemDir string) error
- func FindProjectRoot() (string, error)
- func GenerateProjectID(projectRoot string) string
- func GetTinyMemDir(projectRoot string) string
- func SaveAgentContractChoice(projectRoot, contract string) error
- func WithConfig(ctx context.Context, cfg *Config) context.Context
- type Config
Constants ¶
const ( DefaultProxyPort = 8080 DefaultExtractionBufferBytes = 16384 // 16KB default DefaultLLMBaseURL = "http://localhost:11434/v1" DefaultCoVeConfidenceThreshold = 0.6 DefaultCoVeMaxCandidates = 20 DefaultCoVeTimeoutSeconds = 30 DefaultCoVeModel = "" // Empty = use default LLM DefaultDBAutoMaintenance = true DefaultDBMaintenanceIntervalHours = 24 DefaultDBRetentionMaxAgeDays = 0 // 0 = unlimited DefaultDBRetentionMaxCount = 0 // 0 = unlimited )
Variables ¶
This section is empty.
Functions ¶
func EnsureTinyMemDirs ¶
EnsureTinyMemDirs creates the necessary .tinyMem subdirectories
func FindProjectRoot ¶
FindProjectRoot looks for the .tinyMem directory starting from the current working directory and moving up the directory tree
func GenerateProjectID ¶
GenerateProjectID creates a consistent project ID from the project root path. It uses the absolute path to ensure uniqueness across different working directories but normalizes it to be filesystem-agnostic for consistency (e.g., replaces backslashes with forward slashes).
func GetTinyMemDir ¶
GetTinyMemDir returns the path to the .tinyMem directory relative to the project root
func SaveAgentContractChoice ¶ added in v0.5.3
SaveAgentContractChoice records the selected agent contract type in config.toml.
Types ¶
type Config ¶
type Config struct {
ProxyPort int
LLMBaseURL string
LLMAPIKey string
LLMModel string
EvidenceAllowCommand bool
EvidenceAllowedCommands []string
EvidenceCommandTimeoutSeconds int
SearchEnabled bool
Streaming bool
LogLevel string
LogFile string
DBPath string
ConfigPath string
TinyMemDir string
ProjectRoot string
ExtractionBufferBytes int
RecallMaxItems int
RecallMaxTokens int
AlwaysIncludeUserPrompt bool
// Metrics configuration
MetricsEnabled bool
// CoVe (Chain-of-Verification) configuration
CoVeEnabled bool
CoVeConfidenceThreshold float64
CoVeMaxCandidates int
CoVeTimeoutSeconds int
CoVeModel string
CoVeRecallFilterEnabled bool
// Database maintenance configuration
DBAutoMaintenance bool
DBMaintenanceIntervalHours int
DBRetentionMaxAgeDays int
DBRetentionMaxCount int
DBRetentionExcludeTypes []string
// Agent contract selection (`large` or `small`)
AgentContract string
}
Config holds the application configuration
func FromContext ¶
FromContext retrieves the config from the context
func LoadConfig ¶
LoadConfig loads configuration from file, environment variables, and defaults