{"agent":"claude","input":"Add a configurable CORS allowlist to this Socket.IO server. Read server/lib/index.ts, server/lib/app.ts, server/package.json, server/tsconfig.json, server/test/todo-management/todo.tests.ts, common/events.ts, server-postgres-cluster/lib/index.js and the two clients' environment files first. Replace the hard-coded origin list with CORS_ORIGINS, a comma-separated environment variable, defaulting to http://localhost:4200 when unset, passed as the cors option with GET and POST and no credentials; make the same change in the cluster server. Add an allowRequest that checks the handshake's Origin header against the same list so a websocket-only client from another origin is refused too, and lets a request with no Origin through. Run the existing suite first; if it does not compile, fix only what blocks it in a separate commit and say so. Add test/cors.tests.ts that sends plain HTTP requests to /socket.io/?EIO=4&transport=polling and asserts the access-control-allow-origin and vary headers for an allowed origin, their absence for another, the preflight answer, and a 403 on a raw websocket upgrade from a stray origin. Run npm test and tsc --noEmit, and open a pull request with the output, the curl of the handshake from both origins, and what each client's production config needs.","resources":[{"url":"https://github.com/your-org/your-app"}]}