docs: sync mppx request preparation - #976
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring alerts on:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e91e124872
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,153 @@ | |||
| # `Mppx.prepareRequest` [Prepare a request-bound payment] | |||
There was a problem hiding this comment.
Add the required social-card frontmatter
Add description and imageDescription frontmatter before this H1. Without these fields, sharing the new reference page uses generic metadata and the OG-description generator has no page-specific card text to render.
AGENTS.md reference: AGENTS.md:L241-L246
Useful? React with 👍 / 👎.
| console.log(payment.challenge.request) | ||
| console.log(payment.redirects) |
There was a problem hiding this comment.
Add expected output for the inspection logs
Add a // @log: result after each of these calls, or remove the calls if their output isn't useful. As written, readers can't see what the documented Challenge request and redirect records look like, and the repository requires console output in examples to be shown inline.
AGENTS.md reference: AGENTS.md:L297-L300
Useful? React with 👍 / 👎.
| url: 'https://api.example.com', | ||
| }) | ||
|
|
||
| console.log(result.summary.suggested) |
There was a problem hiding this comment.
Show the validation summary output
Add a // @log: comment showing an expected suggested count after this call. The example introduces programmatic validation specifically to demonstrate the structured result, but currently omits the required inline output and leaves readers without a concrete result shape.
AGENTS.md reference: AGENTS.md:L297-L300
Useful? React with 👍 / 👎.
| const payment = await mppx.prepareRequest( | ||
| 'https://api.example.com/paid', | ||
| undefined, | ||
| { | ||
| acceptPayment: 'tempo/charge;q=1, tempo/session;q=0', |
There was a problem hiding this comment.
Highlight the request-local options
Add block highlight markers around the request-local options argument being demonstrated here. This long snippet currently has no highlighted lines, so the relevant override is buried among setup code despite the repository requirement that code blocks longer than five lines highlight their critical section.
AGENTS.md reference: AGENTS.md:L311-L315
Useful? React with 👍 / 👎.
|
@SocketSecurity ignore npm/mppx@0.0.0-main-20260914191442 |
Motivation
Keep the TypeScript docs aligned with upstream request-aware payment preparation and validation output.
Summary
Mppx.prepareRequestand safe redirect handling/llms.txtvalidation suggestionsKey design considerations
preparePaymentfor transport-level Challenge inspection