{ "$schema": "node_modules/wrangler/config-schema.json", "name": "comic-chat-web", "main": "worker/index.ts", "compatibility_date": "2026-07-01", "workers_dev": false, // per-room schema files under worker/do_migrations import as strings "rules": [{ "type": "Text", "globs": ["**/*.sql"], "fallthrough": false }], "assets": { "directory": "./dist", "binding": "ASSETS", "not_found_handling": "single-page-application", // unlisted routes get asset handling, so every dynamic route must appear here "run_worker_first": [ "/api/*", "/mcp", "/mcp/*", "/studio/s/*", "/studio/strip.svg" ] }, // bounded default room set: only these rooms accept connections; keep it small to cap how many DOs a public deploy can create "vars": { "ROOMS": ["lobby", "tech-news", "weather-chat"], // "off" drops the profanity screen from the chat room and the studio alike "MODERATION": "on", "SHORTLINK_CAP": 100 }, // temporary studio short links, 24h TTL "kv_namespaces": [ { "binding": "SHORTLINKS", "id": "9355ffc000694c72818b5e28ad5a9a68" } ], "durable_objects": { "bindings": [ { "name": "CHAT_ROOM", "class_name": "ChatRoomDO" }, { "name": "ROOM_DIRECTORY", "class_name": "RoomDirectoryDO" } ] }, "migrations": [ { "tag": "v1", "new_sqlite_classes": ["ChatRoomDO"] }, { "tag": "v2", "new_sqlite_classes": ["RoomDirectoryDO"] } ], // invocation logs record a client IP per connection into this account; kept off by default, console output and exceptions still land "observability": { "enabled": true, "logs": { "invocation_logs": false } } }