{"agent":"claude","input":"Add rate limiting to this Flask API and open a pull request. Read requirements.txt, config.py, app/__init__.py, app/api/__init__.py, app/api/auth.py, app/api/tokens.py, app/api/users.py, app/api/errors.py, tests.py, boot.sh, deployment/supervisor/microblog.conf and the nginx config under deployment/ first. Add Flask-Limiter to requirements.txt. Create a Limiter in app/__init__.py with get_remote_address as the key function, storage read from a RATELIMIT_STORAGE_URI config value that defaults to the existing REDIS_URL, and init it in create_app. Wrap the WSGI app in werkzeug's ProxyFix with x_for=1 because gunicorn runs behind nginx. Limit POST /api/tokens to 5 per minute per address, POST /api/users to 3 per hour per address, and the token-authenticated routes in app/api/users.py to 100 per minute keyed on the bearer token when present. Enable rate limit headers. Confirm the existing HTTPException handler in app/api/errors.py returns the JSON error shape for 429 and do not add a second handler. In tests.py set RATELIMIT_STORAGE_URI to memory:// in TestConfig and add an ApiRateLimitCase that proves the 401-then-429 sequence on /api/tokens and the refusal on the fourth /api/users sign-up, asserting the Retry-After header. Run python -m unittest tests.py, start the app with a local Redis, send requests with curl -i and paste the output in the pull request. Document the two new config values in README.md. Do not change the web routes under app/main or app/auth.","resources":[{"url":"https://github.com/your-org/your-app"}]}