Documentation
¶
Index ¶
Constants ¶
View Source
const FileMode fs.FileMode = 0o600
FileMode is the permission of config.toml. The file can hold API keys in plaintext (like ~/.aws/credentials or ~/.netrc), so only the owner may read it. Environment variables (INODE_LLM_API_KEY, ...) avoid storing keys at all.
View Source
const FileName = "config.toml"
FileName is the config file inside the config directory.
Variables ¶
This section is empty.
Functions ¶
func LooseMode ¶
LooseMode reports the permissions of <dir>/config.toml when group or other users can read or write it. ok is false when the file is private or absent.
Types ¶
type Config ¶
type Config struct {
LLM LLMConfig `mapstructure:"llm"`
Embedding EmbeddingConfig `mapstructure:"embedding"`
DB DBConfig `mapstructure:"db"`
Defaults DefaultsConfig `mapstructure:"defaults"`
Search SearchConfig `mapstructure:"search"`
MCP MCPConfig `mapstructure:"mcp"`
Log LogConfig `mapstructure:"log"`
}
type DBConfig ¶
type DBConfig struct {
// Backend selects the storage engine: "sqlite" (default) or "postgres".
Backend string `mapstructure:"backend"`
// Path is the SQLite database file. Used only when Backend = sqlite.
Path string `mapstructure:"path"`
// DSN is the Postgres connection string (e.g. postgres://user:pass@host:5432/db?sslmode=disable).
// Used only when Backend = postgres.
DSN string `mapstructure:"dsn"`
}
type DefaultsConfig ¶
type DefaultsConfig struct {
Sensitive bool `mapstructure:"sensitive"`
}
type EmbeddingConfig ¶
type MCPConfig ¶
type MCPConfig struct {
// RevealSensitive, when true, lets the MCP server include plaintext
// content of notes marked sensitive (search_notes will surface them
// to the LLM, get_note will return unmasked content). Default false:
// sensitive notes are excluded from search candidates and masked in
// get_note responses.
RevealSensitive bool `mapstructure:"reveal_sensitive"`
}
MCPConfig tunes the `inode mcp` Model Context Protocol server.
type SearchConfig ¶
type SearchConfig struct {
// MaxDistance drops notes whose L2 distance exceeds this value (0 = use built-in default, <0 = disable).
MaxDistance float32 `mapstructure:"max_distance"`
// TopK is the number of nearest-neighbour candidates fetched before threshold filtering (0 = use built-in default).
TopK int `mapstructure:"top_k"`
}
SearchConfig tunes the RAG retrieval pipeline.
Click to show internal directories.
Click to hide internal directories.