{"agent":"claude","input":"Add a scheduled job to this Medusa backend that flags abandoned carts. Read AGENTS.md, apps/backend/medusa-config.ts, apps/backend/package.json, apps/backend/jest.config.js, apps/backend/integration-tests/setup.js and the README files in apps/backend/src/jobs, src/workflows and src/subscribers first. Create apps/backend/src/jobs/flag-abandoned-carts.ts with config name flag-abandoned-carts and schedule 0 * * * *. In the job resolve the logger and Query from the container, read carts with query.graph (fields id, email, metadata, updated_at) where updated_at is older than 24 hours, completed_at is null and email is set, 100 at a time, skip carts whose metadata.abandoned_at is already set, and run a workflow in apps/backend/src/workflows/flag-abandoned-carts.ts that uses updateCartsStep from @medusajs/medusa/core-flows to set metadata.abandoned_at to an ISO timestamp; log the count. Add a unit test under src/jobs/__tests__ matching the jest unit pattern, with a stub container and a mocked workflow. Install Postgres in the sandbox, run the migrations, start medusa develop with the schedule set to every minute to confirm the job runs and logs, restore the hourly schedule, run pnpm run test:unit and pnpm run lint, then open a pull request that quotes the log line and the test output and notes that a deployment with workerMode set to server runs no scheduled jobs.","resources":[{"url":"https://github.com/your-org/your-app"}]}