feat(config): AT-5 — remove types[] from WebhookConfig; agents.json is factory-image only (#747) #791
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!791
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev/747"
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
WebhookConfig(the runtime singleton) no longer carriestypes: Record<string, AgentTypeConfig>— any futurecfg.types[…]read is a compile-time errortypes{}map stored in a private module variable inwebhook-config.ts, exposed viagetTypeConfig(name)andlistAgentTypeNames()getAgentType()resolver or the new accessors acrossmain.ts,board.ts,pipeline.ts,event-handlers.ts,config.ts,config-agent-types.ts,agent-type-rename.tsand their testsrefreshRoutingFromDb()drops itscfgparameter, readsagentTypesdirectlyreloadWebhookConfig()so operators know live changes need the dashboard orPATCH /api/agent-types/:nameagents-config-schema.tsdocuments eachtypes[]field as boot-time onlydocs/agents-architecture.mdgets an AT-5 section;docs/modules.mdupdatedTest plan
bun run typecheckpasses (full turbo — no TS errors)bun x biome checkpasses (only pre-existing warnings inworkdir.test.ts/db.ts/003-add-only-inheritance.ts)webhook-config.test.ts— allcfg.types.*reads replaced withgetTypeConfig()/listAgentTypeNames(), existing boot tests unaffectedconfig.test.ts—getWebhookConfig()import removed (no longer needed);getTypeConfig("dev")used in its placeagent-type-rename.test.ts— idempotency + atomicity tests usegetTypeConfig()to verify pre/post rename state🤖 Generated with Claude Code
All ACs met.
types{}cleanly excised fromWebhookConfig; privateagentTypesmodule var +getTypeConfig()/listAgentTypeNames()accessors are a correct replacement.reloadWebhookConfigdeprecation warning points at the dashboard. Docs updated. CI green.