Skip to content

Rename trigger → inputs, bump to 1.0.0#32

Merged
pallaoro merged 1 commit intomainfrom
worktree-inputs
May 1, 2026
Merged

Rename trigger → inputs, bump to 1.0.0#32
pallaoro merged 1 commit intomainfrom
worktree-inputs

Conversation

@pallaoro
Copy link
Copy Markdown
Member

@pallaoro pallaoro commented May 1, 2026

Summary

  • FlowDefinition.trigger removed; replaced by optional inputs: Record<string, InputSpec> declaration block — flows are now trigger-agnostic
  • Runtime state key triggerinputs; {{ inputs.X }} replaces {{ trigger.X }} in all templates
  • startWebhookServer / WebhookServerOptsstartFlowServer / FlowServerOpts; HTTP endpoint /:flowName/webhook/:flowName/run
  • FlowTrigger type removed; InputSpec type added (forward-compatible with JSON Schema)
  • Required inputs declared with required: true are validated at flow start (fail-fast before any node runs); extras pass through silently
  • flow_create plugin tool: trigger param → inputs param
  • Migration script: npm run migrate <dir> [--dry] rewrites 0.x flow files in-place

Test plan

  • npm run lint — clean
  • npm test — 117/117 passing
  • npm run build — clean
  • Migration script smoke-tested against a real multi-node flow

Flows are now trigger-agnostic: the platform (Clawnify) resolves
webhooks/cron/manual triggers externally and passes a generic payload.
Runtime state uses `inputs` as the top-level key; `{{ inputs.X }}`
replaces `{{ trigger.X }}` in templates.

Breaking changes:
- `FlowDefinition.trigger` removed; replaced by optional `inputs:
  Record<string, InputSpec>` declaration block
- `FlowState.trigger` → `FlowState.inputs`
- `startWebhookServer` / `WebhookServerOpts` → `startFlowServer` /
  `FlowServerOpts`; HTTP endpoint `/:flowName/webhook` → `/:flowName/run`
- `FlowTrigger` type removed; `InputSpec` type added
- `flow_create` plugin tool: `trigger` param → `inputs` param
- Required inputs declared with `required: true` are validated at flow
  start (fail-fast before any node runs); extras pass through silently

Migration: `npm run migrate <dir> [--dry]` rewrites 0.x flow files
in-place (drops trigger block, rewrites all template/path/expression
references).
@pallaoro pallaoro force-pushed the worktree-inputs branch from 0117eaf to a8185a6 Compare May 1, 2026 13:02
@pallaoro pallaoro merged commit 35fd5d3 into main May 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant