| 1 | export interface RateLimiter { |
| 2 | limit(opts: { key: string }): Promise<{ success: boolean }>; |
| 3 | } |
| 4 | |
| 5 | export interface Env { |
| 6 | DB: D1Database; |
| 7 | // Skill/MCP registry database — the folded registry API + moderation console |
| 8 | // read and write it; the crash tables stay in DB. |
| 9 | REGISTRY_DB: D1Database; |
| 10 | RATE_LIMITER: RateLimiter; |
| 11 | PING_LIMITER: RateLimiter; |
| 12 | METRICS_LIMITER: RateLimiter; |
| 13 | WRITE_LIMITER?: RateLimiter; |
| 14 | ADMIN_EMAILS?: string; |
| 15 | // Shared identity service (id.reasonix.io) and the site that hosts its login |
| 16 | // page (reasonix.io). Overridable for local dev. |
| 17 | ID_ORIGIN?: string; |
| 18 | APP_ORIGIN?: string; |
| 19 | // Browsers allowed to call the registry API with credentials (comma-separated). |
| 20 | ALLOWED_ORIGINS?: string; |
| 21 | // Optional incident webhook for the ingest sentinel, mirrored from the |
| 22 | // GitHub repo secret of the same name by deploy-crash-worker.yml. Feishu/ |
| 23 | // Lark bot URLs get their native payload shape; any other receiver gets |
| 24 | // Slack-style {"text": ...}. Unset = log-only. |
| 25 | ALERT_WEBHOOK?: string; |
| 26 | } |
| 27 |