{"agent":"claude","input":"A Linear issue labeled agent says: \"Rate limit the /api routes of the basic Worker: 60 requests per minute per client IP, with RateLimit-Limit and RateLimit-Remaining headers on every response and a 429 with Retry-After over the limit. Leave the other routes alone.\" Work in the basic workspace. Read the root package.json, basic/package.json, basic/wrangler.toml, basic/vitest.config.ts, basic/src/index.ts and basic/src/index.test.ts first. Write the middleware in basic/src/rate-limit.ts keyed on CF-Connecting-IP with a fallback for local dev, mount it on /api/* only, add Vitest tests that cover the limit, the headers, a second client and the window reset with fake timers, run npm -w basic run test, confirm the headers with wrangler dev, and open a pull request that links the issue.","resources":[{"url":"https://github.com/your-org/your-app"}]}