{"agent":"claude","input":"Our bot crashes on its first database call with \"TypeError: db.collection(...).ensureIndex is not a function\" after the mongodb package was upgraded. Find every call to a removed driver method in the project (ensureIndex, insert, update, remove, save, findAndModify, count) with file and line, and every place that reads the old result shape such as result.n or result.ok. Read package.json and the lock to say which driver was locked and which is installed now, and confirm by installing releases which major removed each method. Replace each call with its named replacement (createIndex, insertOne or insertMany, updateOne or updateMany, deleteOne or deleteMany, findOneAndUpdate, countDocuments), choosing one-document or many-document forms from how each call was used, and change each caller that read the old result to read deletedCount, insertedId or the matching field. Keep the index keys and options identical. Start a MongoDB in the sandbox and drive each changed function against it, including a duplicate insert against the unique index. If a promise wrapper swallows rejections from the connection step, say so and fix it. Open a pull request with the diff, the version findings and the output of the database checks.","resources":[{"url":"https://github.com/your-org/your-app"}]}