Flows YAML — op registry with per-op typed context #1063
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#1063
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 a maintainer, I want each flow operation to declare its own dependencies via a typed
ctxparameter, so that adding a new op is a single new file with no edits to a central injection bundle.Resolves audit finding §1.1.2 (injection bundle bloat,
defaultArgInjections100-line god function).Acceptance criteria
Op interface
Operationtype inapps/server/src/domain/flows-yaml/op-types.tswith:name,argsSchema(Zod),outputsSchema(Zod),run(ctx, args) => Promise<output>,deps(string array of capability keys).apps/server/src/domain/flows-yaml/ops/<name>.ts, one per file.Record<string, Operation>registry.Context composition
buildOpContext(op, env)returns only the capabilities listed inop.deps.Wiring
op.run(ctx, parsedArgs)withargsSchemaparse + interpolation already applied.outputsSchemabefore being stored understeps.<id>.outputs.Migration shim
defaultArgInjectionskeeps working unchanged for the existing JSON node engine during shadow mode.Tests
Out of scope
References
docs/specs/flows-yaml.md§9.defaultArgInjections()atapps/server/src/domain/flows/flow-dispatch.ts:113–218.