refactor(config): split agents.json into agents/service/env (#540) #542
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!542
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev/540"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
config/agents.jsonis now fleet-only:types+default_reviewer_typeonly. The dashboard'sPUT /config/agentshas a narrower blast radius — it can only touch fleet config.config/service.json(new) carries all service-infra fields: forge URL, container image, MCP commands, watchdogs, node_flows, auth, penpot, pipeline, janitor, shutdown, session/usage tuning, webhook secret rotation.PUBLIC_BASE_URL,WEBHOOK_SECRET. Env wins over any on-disk value.agents.jsonstill work during the migration window — they emit one deprecation warning per field and are promoted to the service config. Operators can runjust config-splitto migrate without a hard cutover.PUT /config/agentsnow pre-checks content for service/secret fields and returns400with a per-field pointer to the correct home before the Zod pass runs.Changes
service-config-schema.ts— new Zod schema forservice.json+SERVICE_FIELDS_HOME/LEGACY_SERVICE_FIELDS/LEGACY_SECRET_FIELDSagents-config-schema.ts— narrowed to fleet-only;reposremovedwebhook-config.ts— dual-file loader: readsservice.jsonalongsideagents.json; env-var overrides for all secrets; migration loopconfig.ts—PUT /config/agentspre-check for misplaced fields with actionable 400 responsesauth.ts—autheliaLogoutUrlmade optional (deprecated)scripts/config-split.ts— one-shot migration helperjustfile—config-splitrecipedocs/configuration.md— full field reference for all three locationsTest plan
just config-split --dry-runpreview on existing deploymentconfig/agents.json+config/service.jsonCloses #540
🤖 Generated with Claude Code
1e49fd5d9cc31626ea65