AOR-106: Add webhook pipeline action to bridge-sdk#18
Merged
freddie-poolsideai merged 23 commits intomainfrom Mar 13, 2026
Merged
Conversation
Introduces Webhook model (name, provider, filter_expression, transform_expression, idempotency_key_expression) and WebhookProvider constants. Adds webhooks field to Pipeline and PipelineData, and passes them through in the DSL output.
Tests Webhook model, WebhookProvider constants, Pipeline with webhooks, PipelineData serialization, DSL output format, and repr.
Adds Webhooks section documenting Webhook class, WebhookProvider constants, CEL expressions, and available providers.
…ion to filter/transform/idempotency_key Shorter kwarg names to match the RFC. Added model_validator to reject idempotency_key for non-generic HMAC providers.
Generic providers (generic_*) now require idempotency_key. Named providers
reject it. Validator uses startswith('generic_') for future extensibility.
andreibratu
reviewed
Feb 20, 2026
tkpoolside
approved these changes
Feb 21, 2026
Collaborator
tkpoolside
left a comment
There was a problem hiding this comment.
Let's update README and add some examples
Add Webhooks section to README covering named and generic providers, CEL filter/transform/idempotency_key expressions, and provider list. Update API Reference with Webhook and WebhookProvider imports. Add two example files: - webhook_example.py: Linear and GitHub triggers with agent triage - webhook_generic_example.py: generic HMAC provider with idempotency key
Vary branch values across webhooks (main, production, staging) to show that branch controls which version of the pipeline code runs. Add inline comments explaining the branch field in examples, README, and SKILL.md.
The webhook branch field determines where the webhook is discovered (indexed) from and which version of the pipeline code runs when it fires. Previous wording only mentioned the execution side.
…e-pipeline-webhooks-3-bridge-sdk-webhook-class
…ction The updated RFC (PID034) makes webhook endpoints provider-agnostic — signature verification, secrets, and idempotency are configured in Console. The SDK now only declares pipeline actions that reference endpoints by name. - Remove WebhookProvider class and Webhook model - Add WebhookPipelineAction with fields: name, branch, webhook_endpoint, on (CEL filter), transform - Remove provider, filter, idempotency_key fields and model validator - Update exports, examples, tests, README, and SKILL.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Validate (webhook_endpoint, pipeline, name) uniqueness at Pipeline construction time - Order keyword arguments as: name first, then alphabetical (branch, on, transform, webhook_endpoint) across all call sites - Add tests for duplicate rejection and allowed combinations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…e-pipeline-webhooks-3-bridge-sdk-webhook-class
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Validate `on` and `transform` CEL expressions at model instantiation time using cel-python. The CEL environment declares `payload` (dynamic) and `headers` (map) matching the runtime webhook context. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use List with default_factory instead of Optional[None] so both types consistently default to an empty list. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split the single fetch_issue step into fetch_issue (Linear) and fetch_pr (GitHub), each with optional inputs. Transform expressions now provide input to both DAG root steps, with an empty object for the inactive path so the step returns None. The shared triage_item step picks whichever source produced data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PipelineData.webhooks now defaults to [] instead of None, so update the test assertion accordingly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tkpoolside
reviewed
Mar 13, 2026
tkpoolside
reviewed
Mar 13, 2026
tkpoolside
approved these changes
Mar 13, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WebhookPipelineActionmodel — a provider-agnostic webhook action that references endpoints configured in Console by nameon) and payload transformation (transform)cel-pythondependency for CEL syntax validation at model instantiation timewebhooksfield toPipelineandPipelineData, included in DSL output(webhook_endpoint, name)pairs per pipelineWebhookPipelineActionfrombridge_sdkNew packages
cel-python>=0.5.0— CEL expression parsing/validation (pure Python, cross-platform)google-re2,jmespath,lark,pendulum,python-dateutil,six,tzdataChanged files
bridge_sdk/models.pyWebhookPipelineActionPydantic model with CEL validationbridge_sdk/pipeline.pywebhooksparam onPipeline, uniqueness check,PipelineData.webhooksfieldbridge_sdk/__init__.pyWebhookPipelineActionbridge_sdk/cli.pywebhooksin DSL outputpyproject.toml/uv.lockcel-pythondependencytests/test_pipeline.pyexamples/webhook_example.pyexamples/webhook_generic_example.pyREADME.mdskills/bridge-pipelines/SKILL.mdTest plan
uv run pytest -v)onandtransformCloses AOR-106
🤖 Generated with Claude Code