{"agent":"claude","input":"Add rate limiting to the callable functions in this Firebase project. Read functions/index.js, functions/sanitizer.js, functions/package.json, functions/eslint.config.js, firebase.json, the root package.json, pnpm-workspace.yaml and .github/workflows/test_node.yml first. For the authenticated callable, add a per-user fixed window stored under a rateLimits node in the Realtime Database the function already uses, updated with a transaction, with the limit and window as named constants, and throw a resource-exhausted HttpsError that says when the window resets. Turn on App Check enforcement with limited-use token consumption on that function and set a maxInstances cap. Leave the unauthenticated callable alone and explain why in the pull request. Add a note about security rules for the rateLimits node, since the sample has no rules file. Write a test with firebase-functions-test that calls the function past the limit as one user and once as another, run it with the database emulator, and run the lint and compile scripts the CI workflow runs. Open a pull request that pastes the test output and the lint result. Do not add a dependency for the limiter.","resources":[{"url":"https://github.com/your-org/your-app"}]}