Repository navigation
Contributing
The repo's own guide is CONTRIBUTING.md (added at 980da3e). Summary:
Authority only narrows. No code path may widen what an agent can spend. If a change touches permit/ or settlement/, the PR description must say why it cannot widen authority. Caps, allowlists, expiries and approval thresholds can be narrowed live, never widened.
git clone https://github.com/marsojuji-cmyk/permit && cd permit
python -m pip install pytest # tests only; runtime is stdlib
python -m pytest -q # must stay green (mock rail)
python demo.py # CI also runs thisThe sandbox rail (--sandbox) needs PERMIT_PAYPAL_CLIENT_ID / PERMIT_PAYPAL_CLIENT_SECRET and interactive payer approval. See PayPal Sandbox Runbook. Live agent demos need PERMIT_GROK_CLI.
- One behaviour per PR. Keep it small, reversible and tested.
- Tests are the spec. Refusal-path and race-path tests are valued over happy-path tests.
- Every change that moves money or authority writes a receipt (
permit/ledger.py). - Production-shaped code must work against the sandbox client too, not just the mock.
- Target
main. CI must pass. - Look for issues labelled
good first issue, or open an issue first to scope the work.
- The four clauses stay exact.
settlement/verifier.pystays the only capture caller.permit/permit.pystays free of PayPal imports (a test enforces this). - Amounts are positive integer cents. Capture idempotency key:
{permit_id}:{auth_id}:capture. - Timeouts go UNKNOWN and are never guessed.
Use GitHub private vulnerability reporting (Security tab). There is no bug bounty. See SECURITY.md.
MIT.
Permit · payment authority for AI agents · MIT · Wiki facts verified against commit 9900817 on 2026-10-07 (America/Edmonton). Where this wiki and the code disagree, the code wins.
Concepts
- Overview and Problem
- The Four-Clause Gate
- Spend Pipeline
- Delegation and Sub-Permits
- Principal Approvals
- Tighten-Only Narrowing
- E-Stop and Revocation
- Claim Ledger
- UNKNOWN and Reconcile
Using it
Design and status
Reference