Files
2026-07-13 13:00:08 +08:00

60 lines
2.0 KiB
TOML

# Deploy: wrangler d1 create reasonix-crash → paste database_id → wrangler deploy.
name = "reasonix-crash-report"
main = "src/index.ts"
compatibility_date = "2026-06-01"
routes = [{ pattern = "crash.reasonix.io", custom_domain = true }]
[vars]
# Emails force-promoted to dashboard admin — the owner is never locked out even
# if the role migration misses them.
ADMIN_EMAILS = "359807859@qq.com"
# Shared identity service (resolves the session) and the site hosting its login
# page. Override for local dev.
ID_ORIGIN = "https://id.reasonix.io"
APP_ORIGIN = "https://reasonix.io"
# Browsers allowed to call the folded registry API with credentials.
ALLOWED_ORIGINS = "https://reasonix.io,https://www.reasonix.io"
[[d1_databases]]
binding = "DB"
database_name = "reasonix-crash"
database_id = "54825184-366f-4877-80fc-924efab0239b"
# Skill/MCP registry data plane, folded in from the standalone worker. Before
# merging (the crash worker auto-deploys on push to main-v2):
# wrangler d1 create reasonix-registry # paste the id below
# wrangler d1 execute reasonix-registry --remote --file=registry-schema.sql
[[d1_databases]]
binding = "REGISTRY_DB"
database_name = "reasonix-registry"
database_id = "83786761-5cc5-487d-8624-5cf565d1a57c"
[[unsafe.bindings]]
name = "RATE_LIMITER"
type = "ratelimit"
namespace_id = "1001"
simple = { limit = 5, period = 60 }
# Looser than RATE_LIMITER: many installs can share one office/campus NAT IP.
[[unsafe.bindings]]
name = "PING_LIMITER"
type = "ratelimit"
namespace_id = "1002"
simple = { limit = 30, period = 60 }
# Opt-in metrics flush fires once per launch like the ping; its own bucket so it
# never eats the ping budget on a shared NAT IP.
[[unsafe.bindings]]
name = "METRICS_LIMITER"
type = "ratelimit"
namespace_id = "1003"
simple = { limit = 30, period = 60 }
# Per-IP throttle for registry writes (publish / install-ping / star).
[[unsafe.bindings]]
name = "WRITE_LIMITER"
type = "ratelimit"
namespace_id = "3001"
simple = { limit = 30, period = 60 }