Thank you for your interest in contributing! This document covers how to report bugs, propose features, and submit pull requests.
- Check existing issues before opening a new one
- For security vulnerabilities, follow the process in SECURITY.md — do not open a public issue
- For questions, open a Discussion rather than an Issue
This is an npm workspace monorepo:
packages/sdk—@p402/sdkTypeScript SDKpackages/cli—@p402/cliCLI tool
git clone https://github.com/Z333Q/p402-protocol.git
cd p402-protocol
npm installType-check all packages:
npm run typecheckBuild all packages:
npm run buildRun the CLI in dev mode (no build needed):
cd packages/cli
npx tsx src/index.ts --help- Fork the repo and create a branch:
git checkout -b fix/your-fix-name - Make your changes
- Run
npm run typecheck— no TypeScript errors allowed - Update relevant docs if you changed public API
- Add or update examples if behavior changed
- Commit with a descriptive message
- Keep PRs focused — one logical change per PR
- Reference the issue your PR addresses (e.g.,
Closes #42) - Include a brief description of what changed and why
- Make sure
npm run typecheckpasses - Don't bump version numbers in PRs — maintainers handle releases
Use the Bug Report template. Include:
- SDK/CLI version (
npm list @p402/sdk) - Node.js version (
node --version) - Minimal reproduction steps
- Expected vs actual behavior
Use the Feature Request template. Describe:
- The use case you're solving
- Your proposed API shape (TypeScript interface preferred)
- Alternatives you've considered
- TypeScript strict mode — no
any, guard all index access - No external runtime dependencies added to the SDK (it has only
viemas a peer dep) - CLI dependencies must be justified — keep the install size minimal
- Match existing code formatting — the repo uses default TypeScript/ESLint settings
Maintainers publish new versions by pushing a tag:
sdk/v1.2.3→ triggers publish of@p402/sdk@1.2.3cli/v1.2.3→ triggers publish of@p402/cli@1.2.3
By contributing, you agree your contributions are licensed under MIT.