mesh-rate-limiter — Per-agent request throttling for Mesh Protocol
mesh ratelimit [args]
check, set, remove, list, status, reset, log
# mesh-rate-limiter
Per-agent request throttling for the Mesh Protocol.
## Layer
L2 (Capability/Infrastructure)
## Commands
- `mesh rl check <agent>` — check + increment (JSON, exit 1 if blocked)
- `mesh rl set <agent> <limit>` — set custom limit (req/min, 0=unlimited)
- `mesh rl remove <agent>` — remove custom limit
- `mesh rl list` — show all limits and tiers
- `mesh rl status [agent]` — current window usage
- `mesh rl reset [agent]` — reset counters
- `mesh rl log [count]` — recent rate limit events
## Integration
- Uses `ledger-write.sh` for standardized event logging
- Integrates with `mesh-acl` for role-based tier detection
- Tiers: admin=unlimited, builder=120/min, trader=60/min, reader=30/min, default=60/min
## Location
`tools/mesh-rate-limiter/ratelimit.sh`