POC: Add --events-from flag to model event source#1764
Draft
yahanxing-stripe wants to merge 2 commits into
Draft
POC: Add --events-from flag to model event source#1764yahanxing-stripe wants to merge 2 commits into
yahanxing-stripe wants to merge 2 commits into
Conversation
This is a v2 breaking change that removes the separate --thin-events, --forward-thin-to, and --forward-thin-connect-to flags. Instead, the unified --events flag accepts both snapshot event types (e.g. charge.captured) and thin event types (e.g. v1.billing.meter.no_meter_found), auto-detecting the payload style from the event name pattern (v[0-9]+. prefix). The --forward-to flag now forwards both snapshot and thin events to the same destination. Internally, events are still split into two channels (webhooks + v2_events) for the proxy layer. Key behavior changes: - `stripe listen` with default --events "*" now opens BOTH websocket channels (snapshot + thin) - `--forward-to` forwards both payload styles to the same URL - `--forward-connect-to` forwards both payload styles for connect events Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Committed-By-Agent: claude
Adds --events-from <self|accounts|all> to separate the "where events come from" concern from "where events go". This replaces the pattern of using --forward-connect-to as the only way to receive connect events. Examples: stripe listen --events-from accounts --forward-to localhost:4242/webhook stripe listen --events-from self -e charge.captured --forward-to ... stripe listen --events-from all --forward-to ... (default) --forward-connect-to is kept as syntactic sugar for routing connect events to a different URL than direct events. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Committed-By-Agent: claude
b895f2b to
8169684
Compare
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
Builds on #1763. Adds
--events-from <self|accounts|all>to separate the "where events come from" concern from "where events go to."--events-from self— only direct/platform events--events-from accounts— only connected account events--events-from all— both (default)--forward-connect-tois kept as syntactic sugar for routing connect events to a different URL.🤖 Generated with Claude Code