Deployment
Readiness first
Section titled “Readiness first”Do not treat this as production until T10 is dated in VERIFICATION.md. Put Cloudflare Access on the Worker, with a bypass only for /api/slack/events, /api/slack/command, and /api/github/webhook. Read Security and Readiness first.
Live operation requires a Cloudflare account with Workers, Durable Objects, Workers AI, and Containers/Sandbox access. Check current eligibility, quotas, and pricing in the Containers and Sandbox documentation. No provisioning time is guaranteed.
AI Gateway setup
Section titled “AI Gateway setup”- Create or select an account-owned AI Gateway. Its ID is GATEWAY_ID.
- Review the Google AI Studio provider guide and configure supported stored BYOK credentials or Unified Billing.
- The current internal helper uses AI.gateway(GATEWAY_ID).run with the native Google endpoint and provider-native JSON. It does not use CF_ACCOUNT_ID or AI_GATEWAY_TOKEN. The Worker AI binding supplies account access.
- Keep real provider credentials outside the container. OpenCode uses a dummy Google key.
- Confirm a live coding run against a throwaway repo before claiming it works. Provider keys stay in AI Gateway BYOK; the container never sees them.
For direct HTTP integrations outside this code, authenticated gateways use cf-aig-authorization, not an interchangeable generic Authorization header. Consult gateway authentication and stored BYOK. Do not copy obsolete token-proxy instructions into this implementation.
Prepare locally
Section titled “Prepare locally”pnpm installpnpm typecheckpnpm lintpnpm testpnpm docs:checkpnpm buildnpx wrangler deploy --dry-runThe dry run is packaging validation, not deployment. Record missing Docker, image, or runtime limitations honestly. Building the docs does not require live coding credentials.
Deployment commands after blockers are resolved
Section titled “Deployment commands after blockers are resolved”npx wrangler login# Configure optional GitHub secrets described in Configuration.pnpm buildpnpm deployThese commands change your Cloudflare account. pnpm deploy does not automatically build assets. Wrangler uses ./Dockerfile for the image and ./public for assets; the dashboard is at / and docs at /docs/. Static missing paths use 404-page rather than an SPA catch-all.
Protect every reachable hostname, including alternate workers.dev routes, with reviewed authentication. Browser login alone does not authenticate service callbacks. Never expose the Worker origin outside Access. Complete the acceptance procedure in an isolated test installation before inviting users.
Updates and recovery
Section titled “Updates and recovery”Preserve the previous revision and lockfile. Re-run checks, review Durable Object migrations, and validate in a test installation. Code rollback does not automatically restore Durable Object data or undo GitHub branches/PRs. Avoid deleting runtime data as part of a routine docs update.