Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3f9cdc5
Add BlockRun.AI to x402 ecosystem (#936)
1bcMax Jan 19, 2026
5a7bd7d
feat(extensions): add facilitator-fees extension for fee-aware routing
Kbhat1 Jan 20, 2026
fb09c29
docs: add GitHub issue template for facilitator-fees RFC
Kbhat1 Jan 20, 2026
3f3b513
docs: update facilitator-fees RFC template for clarity and usability
Kbhat1 Jan 20, 2026
6348021
Update facilitator_fee_issue.md
Kbhat1 Jan 20, 2026
7a83a1d
chore(x402-go): facilitator errors as constants (#993)
avidreder Jan 20, 2026
2ae2937
Update Signature Verification
Kbhat1 Jan 20, 2026
5bf7cae
SettlementResponse Extension
Kbhat1 Jan 20, 2026
9434f77
fix: rename vitest configs to .mts for ESM compatibility
Kbhat1 Jan 20, 2026
4bb8552
fix: add JSDoc to InvalidFeeQuoteError constructor
Kbhat1 Jan 20, 2026
e9944f7
fix ecdsa v (#997)
manifoldfrs Jan 20, 2026
98487d5
Rename title
Kbhat1 Jan 20, 2026
e58204a
Add x402r to ecosystem (#994)
vraspar Jan 20, 2026
fb6527d
chore: Add 1Pay.ing to ecosystem (#624)
zensh Jan 20, 2026
23e2593
Remove resolved questions
Kbhat1 Jan 20, 2026
2af7210
Move patience to open questions
Kbhat1 Jan 21, 2026
0c2da0b
Update some open questions
Kbhat1 Jan 21, 2026
23a4491
Update sig verification
Kbhat1 Jan 21, 2026
30a847d
feat: New Python SDK with v2 support (#841)
CarsonRoscoe Jan 22, 2026
ca7f38e
chore: version python package (#1005)
CarsonRoscoe Jan 22, 2026
415d0b6
Update gitignore and json
Kbhat1 Jan 22, 2026
d2a18fb
Remove git issue
Kbhat1 Jan 22, 2026
0bba14b
Migrate to mintlify (#925)
manifoldfrs Jan 22, 2026
547ce37
Revert "fix: rename vitest configs to .mts for ESM compatibility"
Kbhat1 Jan 23, 2026
89cfd50
Merge upstream/main, resolve uv.lock conflict
Kbhat1 Jan 23, 2026
825c692
Feature/examples cloudfront and lambda as x402 seller middleware (#980)
arditti Jan 23, 2026
1de4da2
fix: (Kobaru Facilitator) removed stray character causing JSON parsin…
fabriciogava Jan 23, 2026
29aa413
New hooks for extensions to enrich payment-required and payment-respo…
phdargen Jan 23, 2026
bed69f3
OnPaymentRequired client-side hook (#1012)
phdargen Jan 23, 2026
5dfdbf2
feat: adding slinkylayer to ecosystem (#618)
sudomon Jan 23, 2026
08beaa3
Add SocioLogic to the x402 ecosystem (#998)
SocioLogicAI Jan 23, 2026
91a208c
docs: update facilitator_fees spec to reflect PR #1003 resolved Settl…
Kbhat1 Jan 23, 2026
dfed6d2
Merge upstream/main, resolve spec conflict
Kbhat1 Jan 23, 2026
6294713
Facilitator Quote Endpoint
Kbhat1 Jan 26, 2026
3beb25b
Fee Quote network field
Kbhat1 Jan 26, 2026
40af0ef
Split server vs client side facilitator selection
Kbhat1 Jan 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/check_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: uv sync --all-extras --dev

- name: Run Tests
run: uv run python -m pytest
run: uv run pytest

lint-python:
runs-on: ubuntu-latest
Expand Down
173 changes: 173 additions & 0 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
name: Update Docs

on:
push:
branches: [main]
paths-ignore:
- 'docs/**'
- '**/*.test.ts'
- '**/*.test.js'
- '**/__tests__/**'
- '**/test/**'
- '**/tests/**'
- '**/typescript/site/**'
- 'typescript/packages/legacy/**'
- 'go/legacy/**'
- 'python/legacy/**'

jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
env:
MINTLIFY_API_KEY: ${{ secrets.MINTLIFY_API_KEY }}
PROJECT_ID: ${{ secrets.MINTLIFY_PROJECT_ID }}
with:
script: |
const { owner, repo } = context.repo;
const projectId = process.env.PROJECT_ID;
const apiKey = process.env.MINTLIFY_API_KEY;

if (!projectId || !apiKey) {
core.setFailed('Missing MINTLIFY_PROJECT_ID or MINTLIFY_API_KEY secrets');
return;
}

// Get SHAs from push payload
const beforeSha = context.payload.before;
const afterSha = context.payload.after;

// Skip initial commits (no previous SHA to compare against)
if (/^0+$/.test(beforeSha)) {
core.notice('Initial commit detected. Skipping documentation update.');
return;
}

// Get changed files using GitHub Compare API (reliable for all merge types)
let uniqueFiles = [];

try {
const compareResponse = await github.rest.repos.compareCommits({
owner,
repo,
base: beforeSha,
head: afterSha
});

// Extract filenames, excluding test files and legacy packages
const excludePattern = /\.(test|spec)\.(ts|js|tsx|jsx)$|__tests__|\/test\/|\/tests\/|typescript\/packages\/legacy\/|go\/legacy\/|python\/legacy\//;
uniqueFiles = (compareResponse.data.files || [])
.map(f => f.filename)
.filter(f => !excludePattern.test(f));

} catch (error) {
core.setFailed('Failed to compare commits: ' + error.message);
return;
}

// Log changed files for debugging
console.log('Changed files (' + uniqueFiles.length + '):', uniqueFiles.slice(0, 10));
if (uniqueFiles.length > 10) {
console.log('... and ' + (uniqueFiles.length - 10) + ' more');
}

// Skip if no non-test files changed
if (uniqueFiles.length === 0) {
core.notice('No documentation-relevant files changed. Skipping agent trigger.');
return;
}

// Get commit message from head commit
const headCommit = context.payload.head_commit;
const commitMessage = headCommit
? '- ' + headCommit.message.split('\n')[0]
: '- No commit message available';

// Compare URL for reference
const compareUrl = context.payload.compare || '';

// Build the system prompt
const systemPrompt = [
'You are a documentation updater that ONLY updates docs directly related to specific code changes.',
'',
'CRITICAL RULES:',
'- ONLY update documentation that is directly affected by the code changes provided',
'- DO NOT perform general documentation audits or sync operations',
'- DO NOT add documentation for unrelated features, ecosystem partners, or missing content',
'- If the code changes do not require documentation updates, report "No documentation updates needed" and exit without creating a PR',
'- Focus on the specific files and commits mentioned, not the entire repository state',
'- Read the AGENTS.md file in the docs directory for additional guidance'
].join('\n');

// Build the user prompt
const userPrompt = [
'Review these SPECIFIC code changes and update documentation ONLY if directly related:',
'',
'**Repository:** ' + owner + '/' + repo,
'**Compare URL:** ' + compareUrl,
'',
'**Changed Files (' + uniqueFiles.length + '):**',
uniqueFiles.join('\n'),
'',
'**Commit Message:**',
commitMessage,
'',
'IMPORTANT: Only update documentation that is directly impacted by these specific file changes. Do not add documentation for unrelated features or perform general audits. If these changes do not affect documentation, do NOT create a PR.'
].join('\n');

const url = 'https://api.mintlify.com/v1/agent/' + projectId + '/job';
const payload = {
branch: 'mintlify/docs-update-' + Date.now(),
messages: [
{
role: 'system',
content: systemPrompt
},
{
role: 'user',
content: userPrompt
}
],
asDraft: false
};

try {
const response = await fetch(url, {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + apiKey,
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
});

if (!response.ok) {
const errorText = await response.text();
throw new Error('API request failed with status ' + response.status + ': ' + errorText);
}

const reader = response.body.getReader();
const decoder = new TextDecoder();
let buffer = '';

while (true) {
const { done, value } = await reader.read();
if (done) break;
buffer += decoder.decode(value, { stream: true });
const lines = buffer.split('\n');
buffer = lines.pop() || '';
for (const line of lines) {
if (line.trim()) {
console.log(line);
}
}
}
if (buffer.trim()) {
console.log(buffer);
}

core.notice('Documentation update job triggered for ' + owner + '/' + repo);
} catch (error) {
core.setFailed('Failed to create documentation update job: ' + error.message);
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ __pycache__/
**/.DS_Store
e2e/facilitators/external-proxies/*
!e2e/facilitators/external-proxies/README.md
typescript/package-lock.json
typescript/package-lock.json
.pnpm-store/
107 changes: 107 additions & 0 deletions docs/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Documentation Agent Instructions

## Package Identity
- Mintlify documentation source for docs.x402.org
- MDX/Markdown files with `docs.json` as navigation configuration

## Directory Structure
- `core-concepts/` — Protocol explanations (HTTP 402, client-server, facilitator, wallet)
- `getting-started/` — Quickstart guides for buyers and sellers (MDX files with tabs)
- `guides/` — How-to guides (MCP server, v1→v2 migration)
- `README.md` — Welcome/landing page
- `docs.json` — Mintlify navigation and configuration

## Code-to-Doc Mapping
- Changes to `typescript/packages/core/src/` affect Core Concepts docs
- Changes to `typescript/packages/*/src/` affect SDK references and quickstart guides
- Changes to `python/x402/` affect Python SDK references
- Changes to `go/` affect Go SDK references
- Changes to facilitator endpoints affect quickstart guides
- Changes to `specs/` may require updates to core-concepts docs

## Style Guidelines
- Use TypeScript for primary code examples (it's the reference SDK)
- Include error handling in all API examples
- Write for developers with 2-5 years experience
- Use MDX components (`<Tabs>`, `<Tab>`, `<Callout>`, `<Card>`) for interactive content
- Show both success and error response examples for API endpoints
- Use real-world parameter values in examples (not foo/bar placeholders)

## Conventions
- DO: Add new pages to `docs.json` navigation
- DO: Include code examples from real SDK files (not made-up snippets)
- DO: Link to relevant specs in `specs/` for protocol details
- DO: Use `<Tabs>` for multi-language code examples
- DO: Add frontmatter (title, description) to all pages
- DON'T: Duplicate protocol details from `specs/` — link instead
- DON'T: Add pages without updating `docs.json`
- **Git: Create PRs for review; NEVER commit directly to main**

## Touch Points / Key Files
- `README.md` — Landing page
- `docs.json` — Navigation and configuration (MUST update when adding pages)
- `core-concepts/*.md` — Conceptual documentation
- `getting-started/*.mdx` — Quickstart guides (MDX for tab components)
- `guides/*.md` — How-to guides

## File Extensions
- Use `.md` for standard markdown pages
- Use `.mdx` for pages with React components (Tabs, Cards, etc.)

## Common Gotchas
- `docs.json` controls Mintlify navigation; pages not listed won't appear
- Images/diagrams go in project root `static/` directory
- Code examples should reference actual SDK file paths
- Links between pages should omit file extensions (e.g., `../core-concepts/http-402` not `../core-concepts/http-402.md`)

## Pre-PR Checks
- All links work (no broken references)
- New pages added to `docs.json` navigation
- Code examples are from actual SDK files and compile
- Frontmatter present on all pages (title, description)
- MDX syntax is valid (run `mint dev` to verify)

## Agent Behavior Rules (Automated Workflows)

When triggered by GitHub Actions or other automated workflows:

### DO
- ONLY update documentation directly related to the specific code changes
- Focus on the files and commits mentioned in the trigger
- Update SDK references if API signatures change
- Update quickstart guides if SDK usage patterns change
- Update core-concepts if protocol behavior changes

### DO NOT
- Perform general documentation audits or sync operations
- Add documentation for ecosystem partners not mentioned in the code change
- Add documentation for features unrelated to the trigger
- Create PRs for trivial changes (comment removal, formatting, etc.)
- Sync ecosystem partner data from `typescript/site/app/ecosystem/` unless explicitly changed

### Code-to-Doc Mapping (for automated updates)

| Code Change | Doc Update Required |
|-------------|---------------------|
| `typescript/packages/*/src/*.ts` API changes | SDK reference, quickstart guides |
| `python/x402/*.py` API changes | Python SDK reference |
| `go/*.go` API changes | Go SDK reference |
| `java/src/**/*.java` API changes | Java SDK reference |
| `specs/*.md` protocol changes | core-concepts docs |
| Comment removal, formatting | NO update needed |
| Test file changes | NO update needed |
| Build/CI config changes | NO update needed |
| Ecosystem partner metadata only | NO update needed (site handles this) |

### When to Skip (No PR)

If the code changes are limited to:
- Removing or adding code comments
- Formatting/style changes (prettier, linting)
- Test files only (`*.test.ts`, `__tests__/`, etc.)
- CI/build configuration only (`.github/`, `turbo.json`, etc.)
- Dependency updates without API changes (`package.json`, `go.mod`, etc.)
- Ecosystem partner metadata (`typescript/site/app/ecosystem/partners-data/`)
- Legacy packages (`typescript/packages/legacy/*`, `go/legacy`, `python/legacy`)

Then report "No documentation updates needed" and **do not create a PR**.
26 changes: 0 additions & 26 deletions docs/SUMMARY.md

This file was deleted.

Loading
Loading