Skip to content

v1.0.0 — trigger → inputs (breaking)

Choose a tag to compare

@pallaoro pallaoro released this 01 May 13:02
· 31 commits to main since this release
35fd5d3

Breaking changes

ClawFlow 1.0.0 removes the trigger concept from the flow format. Flows are now trigger-agnostic — the Clawnify platform resolves webhooks, cron, and manual triggers externally and passes a generic inputs payload.

What changed

  • FlowDefinition.trigger removed → replaced by optional inputs: Record<string, InputSpec> declaration block
  • {{ trigger.X }} → {{ inputs.X }} in all templates
  • FlowState.trigger → FlowState.inputs
  • HTTP server: startWebhookServer / WebhookServerOpts → startFlowServer / FlowServerOpts; endpoint /:flowName/webhook → /:flowName/run
  • FlowTrigger type removed → InputSpec type added
  • Plugin tool flow_create: trigger param → inputs param

Input validation

Declare inputs with required: true and they are validated at flow start (fail-fast before any node runs). Undeclared keys pass through silently. No declaration = anything-goes mode.

{
  "flow": "my-flow",
  "inputs": {
    "body": { "type": "string", "required": true },
    "id":   { "type": "string", "required": true }
  },
  "nodes": [...]
}

Migrating from 0.x

npx @clawnify/clawflow migrate <flows-dir> --dry   # preview
npx @clawnify/clawflow migrate <flows-dir>          # apply

The script rewrites flow files in-place: drops trigger: blocks, rewrites all {{ trigger.X }} templates, bare paths, and condition expressions.