Flows YAML — REST CRUD endpoints + SSE flow.changed broadcast #1070
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#1070
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?
User story
As the dashboard, I want a complete REST surface for listing, reading, creating, updating, deleting, disabling, dry-running, and reloading flows, plus an SSE channel for change notifications, so that the editor can manage flow files without ssh-ing into the host.
Acceptance criteria
Endpoints (in
apps/server/src/http/flows-yaml-routes.ts)GET /flows— list with{name, source, trigger_summary, enabled, mtime}.GET /flows/:name— raw YAML text + parsed metadata + last-run summary.POST /flows— create underflows/custom/. 409 if name exists.PUT /flows/:name— update. Body includesexpected_mtime; mismatch → 409 with current contents.DELETE /flows/:name— 409 ifsource: "default"; otherwise remove file.POST /flows/:name/disable— toggleenabled: falseoverlay (flows/custom/.disabled.json).POST /flows/:name/dry-run— synthetic event input; per-step trace; no side effects.POST /flows/reload— full re-scan.GET /flows/runs— recent runs across all flows (paginated).GET /flows/runs/:id— single run trace.GET /schemas/flows.schema.json— served fromapps/web/public/schemas/.Default-fork behavior
PUT /flows/:nameon asource: "default"flow writes a copy toflows/custom/<name>.ymland serves the custom version thereafter.DELETE /flows/:nameon a custom-shadowed default removes the custom file (resets to factory).SSE
flow.changed { name, source, mtime }broadcast on every file watcher event and successful CRUD write.Auth + audit
Tests
flow_runs.Out of scope
References
docs/specs/flows-yaml.md§10.3.5, §10.3.7.