1/// <reference types="@cloudflare/workers-types" />2/**3 * Worker bindings. Keep in sync with wrangler.jsonc.4 * SESSION_SECRET is a secret (`wrangler secret put SESSION_SECRET`); in local5 * dev with DEV_AUTH=1 a fixed fallback is used instead.6 */7export interface Env {8 DB: D1Database;9 /** R2: script sources (src/<hash>.js) + sim metrics (metrics/<key>.json.gz). */10 BLOBS: R2Bucket;11 ASSETS: Fetcher;12 DEV_AUTH: string;13 SESSION_SECRET?: string;14 /** e.g. ".tribes.pub" — scopes the session cookie across prod release hosts. */15 COOKIE_DOMAIN?: string;16 /**17 * Canonical sign-in origin, e.g. "https://tribes.pub". shoo identities are18 * origin-bound, so all prod hosts send users here to authenticate; the19 * COOKIE_DOMAIN-scoped session then works on every *.tribes.pub host.20 */21 AUTH_ORIGIN?: string;22 /** This deployment's own public origin — used by cron jobs to dispatch23 * sim computes as fresh self-invocations (each with its own CPU budget). */24 SELF_ORIGIN?: string;25}