{"agent":"claude","input":"Add an audit log to this Express and Mongoose API. Read package.json, src/app.js, src/models/user.model.js, src/models/token.model.js, src/models/plugins/toJSON.plugin.js, src/models/plugins/paginate.plugin.js, src/services/user.service.js, src/services/auth.service.js, src/controllers/user.controller.js, src/middlewares/auth.js, src/config/roles.js, src/routes/v1/user.route.js, src/validations/user.validation.js, tests/utils/setupTestDB.js, tests/fixtures/user.fixture.js and tests/integration/user.test.js first. Add an AuditLog model with actor, action, target, changes, ip and userAgent, using the toJSON and paginate plugins and an index on target and createdAt. Add an audit service whose record function never throws. Record create, update and delete in the user service with the actor passed from the controller, redact password values, and record password reset and email verification from the auth service. Add GET /v1/users/:userId/audit for manageUsers with a Joi validator. Write integration tests for each action and the 403, and a unit test for the failing insert. Start MongoDB, run lint, test and coverage, then open a pull request that says why recording happens in the service layer and why a failed audit insert does not fail the request.","resources":[{"url":"https://github.com/your-org/your-app"}]}