Deployment
arbe runs on three Cloudflare Workers under the oskar@rough.dk account (b29de5cf62555d67d57242aeddc91344):
- App worker (
packages/www) — SvelteKit UI + API routes.https://arbe.0sk.ar - Agents worker (
packages/worker) — Hosts theHusAgentDurable Object runtime.https://hus-agents.0skar.workers.dev - Docs worker (
packages/www-docs) — Astro docs site.https://docs.arbe.0sk.ar/https://arbe-docs.0skar.workers.dev
The app worker dispatches bot activations to the agents worker over authenticated HTTP. The HUS_AGENT binding in packages/www/wrangler.jsonc still exists for RPC-only paths like setup and introspection.
Setup
- Copy secrets template and fill in values:
cp packages/www/.env.example packages/www/.env.localSee environment-variables.md for the full list — public vars, local dev secrets, and production secrets.
- Install dependencies:
bun installBuild
bun run buildDeploy
The agents worker must be deployed before (or alongside) the app worker, since dispatch targets the deployed worker URL and the app’s HUS_AGENT binding still references the hus-agents script for RPC-only paths.
Agents worker
- Set Wrangler secrets (one-time):
cd packages/workerbunx wrangler secret put DURABLE_STREAMS_SECRETbunx wrangler secret put ANTHROPIC_API_KEYbunx wrangler secret put SUPABASE_PUBLISHABLE_KEY- Deploy:
cd packages/workerbunx wrangler deployDocs worker
cd packages/www-docsbunx wrangler deployApp worker
- Set Wrangler secrets (one-time):
cd packages/wwwbunx wrangler secret put SUPABASE_JWT_SECRETbunx wrangler secret put DURABLE_STREAMS_SECRETbunx wrangler secret put ELECTRIC_SOURCE_IDbunx wrangler secret put ELECTRIC_SOURCE_SECRET- Deploy:
cd packages/wwwbunx wrangler deploySupabase auth
GitHub OAuth is configured in the Supabase Dashboard, not in code:
- Auth > URL Configuration: add redirect URLs —
http://localhost:5173/auth/callback(local dev),https://arbe.0sk.ar/auth/callback(production) - Auth > Providers > GitHub: enable, add Client ID and Secret from your GitHub OAuth App
- GitHub OAuth App (github.com/settings/developers): set callback URL to
https://<project-ref>.supabase.co/auth/v1/callback