Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"WebFetch(domain:www.npmjs.com)",
"WebFetch(domain:docs.stripe.com)",
"Bash(npx vitest:*)",
"Bash(mpp-inspector flow:*)"
"Bash(mpp-inspector flow:*)",
"Bash(npx husky:*)",
"Bash(MPP_REAL_ENDPOINT_TESTS=true npm run test:integration)",
"Bash(ls C:/Users/AlexandreBenoit/Documents/Personal/MPP-Inspector/eslint.config.*)"
]
}
}
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
groups:
dev-deps:
dependency-type: development
production-deps:
dependency-type: production
open-pull-requests-limit: 10

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
71 changes: 64 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ on:
branches: [main]

jobs:
build:
lint-and-unit:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18, 20, 22]
node-version: [20, 22]

steps:
- uses: actions/checkout@v4
Expand All @@ -26,11 +25,69 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Lint
- name: Lint (typecheck)
run: npm run lint

- name: Test
run: npm run test
- name: Lint (eslint)
run: npm run lint:eslint

- name: Format check
run: npm run format:check

- name: Unit tests with coverage
run: npm run test:coverage

- name: Build all packages
run: npm run build:all

- name: Security audit
run: npm audit --omit=dev --audit-level=high
continue-on-error: true

integration-mock:
runs-on: ubuntu-latest
needs: lint-and-unit
steps:
- uses: actions/checkout@v4

- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Install dependencies
run: npm ci

- name: Build mock server
run: npm run build:mock

- name: Build CLI
run: npm run build

- name: Run integration tests (mock server)
run: npm run test:integration

integration-real:
runs-on: ubuntu-latest
needs: lint-and-unit
continue-on-error: true
steps:
- uses: actions/checkout@v4

- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Install dependencies
run: npm ci

- name: Build
- name: Build CLI
run: npm run build

- name: Run integration tests (real mpp.dev endpoint)
run: npm run test:integration:real
env:
MPP_REAL_ENDPOINT_TESTS: "true"
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ jobs:
- name: Publish Plugin (depends on CLI being available on npm)
run: npm publish --workspace=packages/plugin --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
node_modules
coverage
*.md
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"singleQuote": false,
"trailingComma": "all",
"printWidth": 100,
"tabWidth": 2
}
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0] - 2026-03-27

### Added

- `inspect` command — parse and display 402 Payment Required challenges
- `scan` command — discover MPP endpoints on a domain
- `compare` command — side-by-side pricing comparison across endpoints
- `validate` command — decode and verify receipts and credentials
- `flow` command — dry-run the full MPP payment cycle
- `benchmark` command — load test MPP endpoints (preview)
- `session` command — payment channel testing (preview)
- Spec-compliant challenge parsing (`id`, `realm`, `method`, `request` base64url)
- RFC 9457 Problem Details body parsing with challengeId cross-reference
- Payment method detection: Tempo, Stripe, Lightning, Solana, Card, Custom
- Tempo chain resolution (mainnet 42431, testnet 4218)
- `description` field extraction from both header and Problem Details
- `@mpp-inspector/mock-server` — local mock server with 4 demo endpoints
- `@mpp-inspector/plugin` — Claude Code MCP plugin with 5 tools
- JSON output mode (`--json`) for all commands
- 121 unit tests with vitest
- CI pipeline (GitHub Actions) on Node 18/20/22
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<a href="https://www.tempo.xyz"><img src="https://img.shields.io/badge/chain-Tempo_(42431)-00e5ff?style=flat-square&labelColor=0d1117" alt="chain" /></a>
<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/402"><img src="https://img.shields.io/badge/HTTP-402_Payment_Required-00e5ff?style=flat-square&labelColor=0d1117" alt="402" /></a>
<a href="https://github.com/AlexandreBenoit/mpp-inspector/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/AlexandreBenoit/mpp-inspector/ci.yml?style=flat-square&labelColor=0d1117&color=00e5ff&label=CI" alt="CI" /></a>
<a href="#testing"><img src="https://img.shields.io/badge/coverage-80%25+-00e5ff?style=flat-square&labelColor=0d1117" alt="coverage" /></a>
</p>

<br />
Expand Down
27 changes: 27 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import prettier from "eslint-config-prettier";

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
prettier,
{
ignores: [
"**/dist/**",
"**/node_modules/**",
"**/*.js",
"**/*.mjs",
],
},
{
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/consistent-type-imports": "error",
},
},
);
Loading
Loading