Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadProjectConfig ¶
LoadProjectConfig loads the optional per-project config file and overlays the registry's RepoPath. It also injects the registry's databaseURL. Project config supplies indexing/provider settings; identity (repo_path, storage_schema) always comes from the registry.
func ValidateSlug ¶
ValidateSlug enforces the project slug shape used in CLI flags and MCP URL paths.
func ValidateStorageSchema ¶
ValidateStorageSchema enforces a safe Postgres identifier and rejects reserved names.
Types ¶
type Project ¶
type Project struct {
Slug string `yaml:"slug"`
StorageSchema string `yaml:"storage_schema"`
RepoPath string `yaml:"repo_path"`
ConfigPath string `yaml:"config_path,omitempty"`
}
Project is a single registry entry.
type Registry ¶
type Registry struct {
DatabaseURL string `yaml:"database_url"`
DefaultProject string `yaml:"default_project,omitempty"`
Projects []Project `yaml:"projects"`
}
Registry is the parsed projects.yaml.
func LoadRegistry ¶
LoadRegistry reads and validates a YAML project registry from path.
type Runtime ¶
type Runtime struct {
Slug string
StorageSchema string
RepoPath string
Config *config.Config
DB *storage.DB
}
Runtime is everything a CLI command or MCP handler needs to operate on one project: the resolved config, the project-scoped DB pool, and the identity fields used for logs and surfaces.