metatron-open-seo/wrangler.jsonc

98 lines
3.1 KiB
JSON

{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "open-seo",
"main": "src/server.ts",
"compatibility_date": "2025-09-02",
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
"observability": {
"enabled": true,
},
// Uncomment when deploying to the openseo.so Cloudflare account. Self-hosters
// should leave this commented (or replace with their own zone) — otherwise
// `wrangler deploy` fails with "Could not find zone for app.openseo.so".
// "routes": [
// { "pattern": "app.openseo.so", "custom_domain": true },
// { "pattern": "www.app.openseo.so", "custom_domain": true },
// ],
"workflows": [
{
"name": "site-audit-workflow",
"binding": "SITE_AUDIT_WORKFLOW",
"class_name": "SiteAuditWorkflow",
},
{
"name": "rank-check-workflow",
"binding": "RANK_CHECK_WORKFLOW",
"class_name": "RankCheckWorkflow",
},
],
// Durable Object backing the onboarding strategy chat (Agents SDK
// AIChatAgent). One instance per project; messages persist in the DO's
// SQLite. SQLite-backed classes must be declared in `migrations` below.
"durable_objects": {
"bindings": [
{
"name": "ONBOARDING_CHAT",
"class_name": "OnboardingChatAgent",
},
// SAM in-app agent. One instance per chat session; messages persist in the
// DO's SQLite. SQLite-backed classes must be declared in `migrations`.
{
"name": "SAM_CHAT",
"class_name": "SamChatAgent",
},
],
},
"migrations": [
{
"tag": "v1",
"new_sqlite_classes": ["OnboardingChatAgent"],
},
{
"tag": "v2",
"new_sqlite_classes": ["SamChatAgent"],
},
],
"triggers": {
"crons": ["*/15 * * * *"],
},
"kv_namespaces": [
{
"binding": "KV",
"id": "4abd52f3f2c549ac83cc2cb4ceec8620",
},
{
"binding": "OAUTH_KV",
"id": "bd1759494309474a9b423b029967b0db",
},
],
"d1_databases": [
{
"binding": "DB",
"database_name": "open-seo",
"database_id": "37bee90a-e1aa-404f-b01e-b0d1d479bda1",
"migrations_dir": "drizzle",
},
],
// Postgres scale path. Production runs on Postgres: DATABASE_PROVIDER is set as
// a worker *secret* (`wrangler secret put DATABASE_PROVIDER` -> "postgres") so it
// survives `wrangler deploy` — which resets plain vars/bindings and is what
// reverted prod to the D1 default before. This Hyperdrive binding points the
// pooled connection at that Postgres. Without Hyperdrive, POSTGRES_DATABASE_URL
// is the direct-connection fallback (no edge pooling/caching).
//
// SELF-HOSTERS on the free D1 default: DELETE this hyperdrive block before
// deploying. The id below lives in OpenSEO's Cloudflare account, so `wrangler
// deploy` will fail without access to it. D1 stays the default when
// DATABASE_PROVIDER is unset.
"hyperdrive": [
{ "binding": "HYPERDRIVE", "id": "9d64ccfb559f44449ce52a143912f898" },
],
"r2_buckets": [
{
"bucket_name": "open-seo",
"binding": "R2",
},
],
}