closedhumanPR #210Transport

soham109: Prava multi-principal group mandates

This contribution adds nanda-town-prava-group, a native NANDA Town payments plugin for multi-principal merchant purchases.

Author

Status
Closed without merging
Opened on
Aug 2
Branch
hackathon/soham109-prava-group-mandates

Description

The pitch.

## What this adds

This contribution adds `nanda-town-prava-group`, a native NANDA Town payments plugin for multi-principal merchant purchases.

NANDA Town's default `prepaid_credits` rail moves pooled simulation balances between agents. This plugin deliberately models a different authority boundary: several humans independently approve merchant-scoped, amount-capped Prava mandates, while the coordinating agent can distribute approval links but cannot approve for anyone.

## Why this is distinct

This is the group-payment layer rather than a single-payer Prava adapter:

- `pay_group()` binds N principals to one cart and one commit policy;
- supports `all_of`, quorum, required/veto behavior, roles and backstop capacity;
- never pools participant funds or exposes card material to NANDA agents;
- follows requotes through fresh consent when a share exceeds an old cap;
- reconciles unknown transport outcomes before retrying, preventing silent double charge;
- reports partial and refund boundaries honestly instead of simulating rollback;
- includes an in-process deterministic mode for CI and an HTTP live mode for human Prava approval.

The default mode is simulated and prominently labels that no card was charged. Live mode returns hosted approval actions and never impersonates a human approval.

## Included evidence

- Python entry point: `nest.plugins.payments -> prava_mandates`
- four-agent Town scenario with a mid-flight decline and backstop
- baseline comparison against `prepaid_credits`
- conservation, concurrency, unknown-state, redaction and protocol-conformance tests
- live-check script plus external sandbox evidence in the [Sutra evidence pack](https://github.com/Soham109/sutra/blob/main/docs/NANDA-EVIDENCE.md)
- running product and discovery surface: https://sutra-gmp.vercel.app/nanda

## Validation

Run against this branch:

```text
uv run ruff check .                         # pass
uv run ruff format --check .                # pass (259 files formatted)
uv run pyright                              # 0 errors
uv run pytest -q                            # 1429 passed, 1 skipped, 1 deselected
uv run pytest packages/nest-plugins-prava-group/tests -q
                                               118 passed
```

No production credentials or card data are included. Default CI is deterministic and moves no real money.

Try it

Open PR on GitHubView diff

Checkout locally

git fetch origin pull/210/head:pr-210
git checkout pr-210