Event model
Rainrail routes normalized events, not raw provider payloads. A source adapter
accepts provider input, extracts the safe routing fields, and returns a
RainrailEventEnvelope.
Envelope shape
Section titled “Envelope shape”Every event uses schemaVersion: "rainrail.event.v1" and carries:
idfor deterministic duplicate handling.sourcefor the provider or local input surface.namesuch asgithub.issue,github.pull_request, orcloudflare.error.deliveryandoccurredAttimestamps for replay and audit.subjectfor the route target, such as an issue, pull request, worker, or conversation.payloadfor normalized provider-specific facts a workflow may need.rawPayloadas a redacted marker or external reference, not a committed raw webhook body.
Why this boundary matters
Section titled “Why this boundary matters”Workflow plugins should match stable event names, subjects, and normalized payload fields. They should not depend on GitHub webhook body details or Cloudflare tail log structure directly.
Source spec
Section titled “Source spec”Full contract details live in docs/plugin-runtime-contract.md.