{"agent":"claude","input":"Add structured logging to this Socket.IO and Express chat server. Read package.json, package-lock.json, index.js, index.html, .codesandbox/Dockerfile and .gitignore first. Add pino and a logger.js that sets the level from LOG_LEVEL, adds pid, cluster worker id and port as base fields, and uses pino-pretty as a transport outside production. Move the per-worker setup into app.js exporting createApp({ db, logger }) that returns app, server and io, keeping the cluster primary in index.js. Log worker forks and exits in the primary, listen in each worker, connection with socket id, recovered flag, client serverOffset and address, disconnect with its reason, the insert with its id and content length, the SQLITE_CONSTRAINT duplicate at debug, any other insert error at error with errno and code, the replay count and offset, and engine connection_error events. Never log message text. Add socket.io-client as a dev dependency and a node:test suite that starts the server on port 0 with an in-memory database and a pino instance writing to an array, sends the same message twice and asserts the lines. Add a test script, run npm test and npm start, and open a pull request that quotes the output and shows a few log lines in both formats.","resources":[{"url":"https://github.com/your-org/your-app"}]}