feat: auto-regenerate flows.schema.json type enum on agent type changes #1227
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/agent-hooks#1227
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
As an operator, I want editor autocompletion for
resolve_agent type:in flow YAML so the valid values always reflect the types registered in the DB.Background
flows.schema.jsonis static.resolve_agent type:accepts any string — typos surface only at dispatch time. Fix: generate the enum from DB and regenerate on every agent type change.Acceptance criteria
Schema generator
generateFlowsSchema()function reads agent type names from DB, injects them as anenumonresolve_agentargstypefield inflows.schema.jsontypefalls back to plainstring(valid on blank install)Auto-trigger
Runtime validation
resolve_agentop validatesargs.typeagainst live DB at execution timeresolve_agent: unknown agent type "foo" — registered: [...]Tests
Out of scope
References
flows.schema.json— current static schemaresolve_agentop args —typefield currently plainstringconfig-agent-types.ts— CRUD handlers where trigger hooks