{"agent":"codex","input":"Replace the setTimeout polling in this Chrome extension's background service worker with the chrome.alarms API and open a pull request. Read public/manifest.json, src/background.ts, webpack/webpack.common.js, jest.config.js, tsconfig.json, tsconfig.test.json, src/__tests__/sum.ts and .github/workflows/build.yml first. In src/background.ts, export a poll() function with the work the poll does, create a named alarm in a chrome.runtime.onInstalled listener with chrome.alarms.create and a periodInMinutes no shorter than the API minimum, and run poll() from a chrome.alarms.onAlarm listener only for that alarm name. Remove the setTimeout loop. Add alarms to permissions in public/manifest.json. Add src/__tests__/background.ts that mocks global.chrome with jest.fn() for runtime.onInstalled.addListener, alarms.create and alarms.onAlarm.addListener, and asserts the alarm is created on install with the expected name and period, that another alarm name is ignored, and that poll() runs for the right one. Run npm ci, npm run build and npm test, load dist/ as an unpacked extension in a browser, confirm chrome.alarms.getAll() lists the alarm and the poll runs after the worker restarts, and paste the output in the pull request. Do not change the popup, options page or content script.","resources":[{"url":"https://github.com/your-org/your-app"}]}