{"agent":"claude","input":"Add per-user rate limiting to this grammY bot. Read package.json, tsconfig.json, stats.ts and scaling/index.ts first. Add @grammyjs/ratelimiter and register limit() in stats.ts before session(), keyed on ctx.from?.id, with timeFrame and limit as named constants and an onLimitExceeded that replies once per window. Let updates with no from through. Do not change the counting handlers or the /stats reply text. Run npm install and npx tsc --noEmit, then write a node:test file that drives bot.handleUpdate with the same user's message past the limit inside one window and asserts the handler count and a single onLimitExceeded, and that another user's message still passes. Add a test script to package.json and run it. Open a pull request whose description quotes the tsc and test output.","resources":[{"url":"https://github.com/your-org/your-app"}]}