feat: add payment-aware client runtime#170
Draft
parvahuja wants to merge 15 commits into
Draft
Conversation
parvahuja
force-pushed
the
parv/agent-payment-runtime
branch
2 times, most recently
from
July 7, 2026 18:22
0e4bad5 to
945682b
Compare
parvahuja
changed the base branch from
parv/fix-mcp-challenge-core-metadata
to
main
July 7, 2026 18:23
parvahuja
force-pushed
the
parv/agent-payment-runtime
branch
from
July 21, 2026 00:37
945682b to
25e5c19
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This was referenced Jul 21, 2026
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
PaymentRuntimefor payment methods, events, origin policy, and uncertain-outcome state across synchronous HTTP, asynchronous HTTP, and explicit MCP clientsmethod_factories, manage them with sync/async runtime contexts, and preserve the existing caller-loop behavior for direct asyncmethods=APIsSyncPaymentTransport, wrappers for existing HTTPX clients, and scoped globalinstrument(runtime)support for standard HTTPX clientsWWW-Authenticatefields, replay failures, invalid expirations, redirects, hooks, streaming bodies, and response cleanup0.27.xand0.28.xmonkey-patching adapters with fail-fast version/shape checks and an exact patch-version CI matrixRuntime boundaries
methodsare borrowed and must be loop-independentscope="process"is explicit, and ambiguous process bindings fail closedIntentionally not included
McpClient(runtime=...)and follows the-32042error flow in the published MCP payment transport draftValidation
946 passed, 41 skipped,92.11%coverageruff check,ruff format --check,pyright, andactionlint0.27.0,0.27.1,0.27.2,0.28.0,0.28.1The PR remains draft.