{ "$schema": "./node_modules/wrangler/config-schema.json", "name": "open-artifacts", "main": "src/index.ts", "compatibility_date": "2026-07-03", "workers_dev": true, "assets": { "directory": "./public", "binding": "ASSETS", "run_worker_first": ["/", "/api/*", "/a/*", "/og/*", "/fonts/*", "/vendor/*"] }, // "1" opts this deploy into the web-font surface: the /fonts proxy, // allowlisted font CDNs, and an allow-same-origin sandbox so the browser can // cache fonts. Runtime libraries (mermaid) are self-hosted at /vendor/* and // always served; this flag only lifts the opaque-origin sandbox for fonts. // Self-hosters who don't want the opaque-origin protection lifted omit it. // OPEN_ARTIFACTS_HANDOFF=1 opts this deploy into the handoff recording // surface: the host-chrome Record/Play dock, the /api/artifacts/:id/handoffs* // routes, and the frame record/play shims. Self-hosters who don't want the // camera/mic surface omit it; the viewer stays unchanged. "vars": { "OPEN_ARTIFACTS_WEB_FONTS": "1", "OPEN_ARTIFACTS_HANDOFF": "1" }, "d1_databases": [ { "binding": "DB", "database_name": "open-artifacts", "database_id": "a01d21cd-86cb-4832-872d-d196e6918a3b" } ], "r2_buckets": [ { "binding": "CONTENT", "bucket_name": "open-artifacts-content" } ], "rules": [ { "type": "Text", "globs": ["**/*.txt"], "fallthrough": true }, { "type": "CompiledWasm", "globs": ["**/*.wasm"], "fallthrough": true } ], // Live editing is OPT-IN: a deploy binds a LIVE_DO Durable Object // namespace whose class_name is the engine's LiveObject (src/live-do.ts). // The engine ships without the binding — self-hosters keep today's viewer // (no Live button, /api/artifacts/:id/live* 404). A SaaS deploy (coda0) // adds it under durable_objects + a new_sqlite_classes migration. See // docs/plans and skills/using-open-artifacts/references/live.md. // For LOCAL DEV with Live + owner perms, use wrangler.dev.jsonc: // wrangler dev -c wrangler.dev.jsonc "observability": { "enabled": true } }