feat(boot): seed agentbinaryfetcher from env on first run #59

Merged
David merged 1 commit from feat/VS-38-env-seed-agent-fetcher into main 2026-06-16 14:59:03 +02:00
Owner

A fresh vervain-server deploy has no config.json and an empty settings overlay, so settings.agentbinaryfetcher is absent and the agent catalog stays empty until an admin configures the fetcher by hand. This seeds that section from VERVAIN_AGENT_FETCHER_* env vars on first boot so a Docker-only deployment fetches and serves agents with no manual UI step.

New agent_fetcher_seed module builds a Forgejo agentbinaryfetcher section from VERVAIN_AGENT_FETCHER_BASE_URL (the trigger), OWNER, PACKAGE, VERSION, PUBLIC_KEY (required) plus optional TOKEN, AGENT_IDS, and REFRESH_INTERVAL_SECS. The token and public key support the Docker *_FILE secret convention; setting both the plain var and the *_FILE var for one field is a hard error, and the token value is never logged or placed in an error message.

The seed only fills the section when the persisted overlay has none, so a site admin's runtime edits always win; it is held in memory for that boot and never written to the database. Because a brand-new deploy has no config.json (config is None), the boot merge now stands up a minimal config from the seeded overlay instead of short-circuiting on None. A misconfigured seed surfaces as an admin warning and boots without the fetcher rather than blocking startup.

Documents the env vars and a ready compose snippet in README.md and .env.example.

#VS-38

A fresh vervain-server deploy has no config.json and an empty settings overlay, so settings.agentbinaryfetcher is absent and the agent catalog stays empty until an admin configures the fetcher by hand. This seeds that section from VERVAIN_AGENT_FETCHER_* env vars on first boot so a Docker-only deployment fetches and serves agents with no manual UI step. New agent_fetcher_seed module builds a Forgejo agentbinaryfetcher section from VERVAIN_AGENT_FETCHER_BASE_URL (the trigger), OWNER, PACKAGE, VERSION, PUBLIC_KEY (required) plus optional TOKEN, AGENT_IDS, and REFRESH_INTERVAL_SECS. The token and public key support the Docker *_FILE secret convention; setting both the plain var and the *_FILE var for one field is a hard error, and the token value is never logged or placed in an error message. The seed only fills the section when the persisted overlay has none, so a site admin's runtime edits always win; it is held in memory for that boot and never written to the database. Because a brand-new deploy has no config.json (config is None), the boot merge now stands up a minimal config from the seeded overlay instead of short-circuiting on None. A misconfigured seed surfaces as an admin warning and boots without the fetcher rather than blocking startup. Documents the env vars and a ready compose snippet in README.md and .env.example. #VS-38
feat(boot): seed agentbinaryfetcher from env on first run
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 1m56s
Create release / Create release from merged PR (pull_request) Has been skipped
0cff9f2289
A fresh vervain-server deploy has no config.json and an empty settings overlay, so settings.agentbinaryfetcher is absent and the agent catalog stays empty until an admin configures the fetcher by hand. This seeds that section from VERVAIN_AGENT_FETCHER_* env vars on first boot so a Docker-only deployment fetches and serves agents with no manual UI step.

New agent_fetcher_seed module builds a Forgejo agentbinaryfetcher section from VERVAIN_AGENT_FETCHER_BASE_URL (the trigger), OWNER, PACKAGE, VERSION, PUBLIC_KEY (required) plus optional TOKEN, AGENT_IDS, and REFRESH_INTERVAL_SECS. The token and public key support the Docker *_FILE secret convention; setting both the plain var and the *_FILE var for one field is a hard error, and the token value is never logged or placed in an error message.

The seed only fills the section when the persisted overlay has none, so a site admin's runtime edits always win; it is held in memory for that boot and never written to the database. Because a brand-new deploy has no config.json (config is None), the boot merge now stands up a minimal config from the seeded overlay instead of short-circuiting on None. A misconfigured seed surfaces as an admin warning and boots without the fetcher rather than blocking startup.

Documents the env vars and a ready compose snippet in README.md and .env.example.

#VS-38
David merged commit e37c5adc49 into main 2026-06-16 14:59:03 +02:00
David deleted branch feat/VS-38-env-seed-agent-fetcher 2026-06-16 14:59:03 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/vervain-server!59
No description provided.