update the archive options
Some checks failed
CI / test (push) Failing after 4m40s
CI / fixture (push) Failing after 7s

This commit is contained in:
2026-09-10 19:30:46 +05:30
parent 74089eb3e9
commit 4e1f746b22
5 changed files with 388 additions and 0 deletions

View File

@@ -55,6 +55,7 @@ type Config struct {
HTTP HTTPConfig
DB DBConfig
Seed SeedConfig
Agents AgentsConfig
Model ModelConfig
Knowledge KnowledgeConfig
}
@@ -148,6 +149,23 @@ type SeedConfig struct {
FixturePath string
}
// AgentsConfig locates the curated agent specs that ship with the deployment.
//
// The same directory `importagents` publishes from — Dockerfile.api copies
// `agents/` to /app/agents beside the binary, and the importer's own `-dir`
// default is the same path. Pointing both at one directory is what makes the
// protected set and the published set the same set: an agent is built-in
// because the product ships its spec, not because a column says so.
//
// A missing directory is not a boot failure. This service runs in development
// checkouts and test binaries whose working directory has no `agents/`, and
// refusing to start over a protection list would take the API down to defend
// rows that deployment never created. The consequence is stated where it is
// loaded: the protected set is empty, and that is logged.
type AgentsConfig struct {
CuratedPath string
}
type LogConfig struct {
Level string
}
@@ -279,6 +297,9 @@ func Load() (*Config, error) {
Seed: SeedConfig{
FixturePath: withDefault("SEED_FIXTURE_PATH", "./seed/fixtures/seed.json"),
},
Agents: AgentsConfig{
CuratedPath: withDefault("CURATED_AGENTS_PATH", "./agents"),
},
Knowledge: KnowledgeConfig{
EmbedProvider: strings.ToLower(strings.TrimSpace(os.Getenv("EMBED_PROVIDER"))),
EmbedAPIKey: strings.TrimSpace(os.Getenv("VOYAGE_API_KEY")),