{"agent":"claude","input":"Write tests for this Cloudflare Worker. Read wrangler.toml, package.json, README.md and all of src/chat.mjs first; there are no tests today. Add vitest, @cloudflare/vitest-pool-workers and wrangler as dev dependencies, a vitest.config.mjs using defineWorkersConfig with the wrangler.toml path so the tests run inside workerd with the rooms and limiters Durable Object bindings and the HTML Data rule, and a test script. Write test/worker.test.mjs for the HTTP routes through SELF.fetch (HTML at /, a 64-hex id from POST /api/room, 405 on GET, 404 on a 33-character name, 400 on /websocket without Upgrade), test/chat-room.test.mjs that opens two WebSockets to one room with a CF-Connecting-IP header, joins each with a name and asserts the joined broadcast, the ready frame, the 256-character message limit and the backlog a reconnecting socket receives in order, and test/rate-limiter.test.mjs that uses runInDurableObject to POST five times and read a positive cooldown. Do not change src/chat.mjs unless a test cannot be written otherwise, and say so. Run npm install and npm test in your sandbox and open a pull request with the output.","resources":[{"url":"https://github.com/your-org/your-app"}]}