{"agent":"claude","input":"Migrate the 1st gen Cloud Functions in this repository to 2nd gen and open a pull request. Read the root package.json and its pnpm scripts, tsconfig.template.json, the 1st gen workflow, and every functions/index.js and functions/package.json under the 1st gen directory first; where a 2nd gen version of the same sample already exists, read it and match its conventions. For each function: switch the import from firebase-functions/v1 to the 2nd gen subpath the trigger belongs to (https, firestore, database, pubsub, scheduler, storage), rewrite the handler to the single event argument (event.data, event.params), move runWith and region settings into the options object or setGlobalOptions, replace hand-rolled cors middleware with the cors option on onRequest, and rename the export so it does not collide with the deployed 1st gen function. Keep Admin SDK calls unchanged. For every directory you change, run pnpm install, the lint script and the compile script, and any test script, and paste the output. Do not deploy. List old and new function names in the pull request and say which background triggers must run side by side before the old ones are deleted.","resources":[{"url":"https://github.com/your-org/your-app"}]}