-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
131 lines (104 loc) · 6.36 KB
/
Copy path.env.example
File metadata and controls
131 lines (104 loc) · 6.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# =============================================================================
# PART 1 — Frontend (Vite)
# =============================================================================
# Where to set:
# - Local dev: copy this section into `.env.local`
# - Production: configure in Vercel Project Settings → Environment Variables
#
# These variables ship to the browser bundle. Only `VITE_*` prefixed vars are
# exposed to client code; `CONVEX_DEPLOYMENT` is read by the Convex CLI.
# Convex CLI bookkeeping (auto-written by `npx convex dev`).
CONVEX_DEPLOYMENT=dev:your-deployment-name
# Convex client URL — read by `ConvexReactClient` in src/App.tsx.
VITE_CONVEX_URL=https://your-deployment.convex.cloud
# Convex HTTP-actions host. Not consumed by code; kept here as the canonical
# value to paste into Daytona / GitHub webhook configuration:
# ${VITE_CONVEX_SITE_URL}/api/daytona/webhook
VITE_CONVEX_SITE_URL=https://your-deployment.convex.site
# WorkOS auth client ID — read by the AuthKit React provider. MUST exactly
# match `WORKOS_CLIENT_ID` in the backend section below.
VITE_WORKOS_CLIENT_ID=client_xxx
# =============================================================================
# PART 2 — Backend (Convex)
# =============================================================================
# Where to set:
# - Convex Dashboard → Settings → Environment Variables, OR
# - `npx convex env set NAME value`
#
# NEVER put these in `.env` / `.env.local`. Convex server functions read from
# their own environment, not from disk. Putting backend secrets in `.env`
# creates a stale duplicate and increases the surface area for accidental
# disclosure.
# ─── Auth (WorkOS) ──────────────────────────────────────────────────────────
# Server-side WorkOS credentials. WORKOS_CLIENT_ID MUST match the frontend's
# VITE_WORKOS_CLIENT_ID exactly — they identify the same WorkOS application.
WORKOS_CLIENT_ID=client_xxx
WORKOS_API_KEY=sk_xxx
# Public origin used by WorkOS for OAuth callback construction.
SITE_URL=https://yourdomain.com
# Comma-separated whitelist of origins users can be redirected back to after
# authentication. Used by `convex/lib/returnTo.ts` to reject open-redirect
# attacks. Always include localhost for dev.
ALLOWED_RETURN_TO_ORIGINS=https://yourdomain.com,http://localhost:5173
# ─── GitHub App (repo imports) ──────────────────────────────────────────────
# GitHub App credentials for installation auth and webhook verification.
# `GITHUB_APP_CLIENT_ID` / `GITHUB_APP_CLIENT_SECRET` are the app's OAuth
# credentials, used only during callback verification to prove the GitHub user
# can access the installation_id GitHub sent to the setup URL.
# `GITHUB_APP_PRIVATE_KEY` is the raw PEM (including BEGIN/END lines).
GITHUB_APP_ID=your-app-id
GITHUB_APP_CLIENT_ID=Iv1.your-client-id
GITHUB_APP_CLIENT_SECRET=your-client-secret
GITHUB_APP_SLUG=your-app-slug
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----"
GITHUB_APP_WEBHOOK_SECRET=your-webhook-secret
# ─── OpenAI (LLM) ───────────────────────────────────────────────────────────
OPENAI_API_KEY=sk-xxx
# Model choices are controlled by `convex/lib/llmCatalog.ts` and the composer
# picker, not by env vars. Add or disable catalog entries there when changing
# model availability.
# Embedding model for artifact RAG. Defaults to OpenAI's recommended small
# embedding model; override only if you need a different dimension / pricing.
# ARTIFACT_EMBEDDING_MODEL=text-embedding-3-small
# ─── Anthropic (LLM) ────────────────────────────────────────────────────────
# Optional — required to actually serve replies from Claude models
# (claude-opus-4-8, claude-sonnet-4-6, claude-haiku-4-5). The composer always
# shows the Anthropic group; without this key, picking a Claude model falls
# through to the heuristic Discuss reply path instead of the SDK. Embeddings
# always go through OpenAI; Anthropic is not used for artifact RAG.
ANTHROPIC_API_KEY=sk-ant-xxx
# ─── Daytona (sandbox provider) ─────────────────────────────────────────────
DAYTONA_API_KEY=dtn_xxx
DAYTONA_API_URL=https://app.daytona.io/api
# Daytona webhook for sandbox state sync (avoids polling). The endpoint in
# the Daytona dashboard should point at:
# ${VITE_CONVEX_SITE_URL}/api/daytona/webhook
DAYTONA_WEBHOOK_SIGNING_SECRET=whsec_xxx
DAYTONA_WEBHOOK_ORGANIZATION_ID=your-daytona-org-uuid
# Post-clone egress block. After `git clone` finishes, the sandbox's
# outbound traffic is dropped at iptables — this is the load-bearing defense
# against LLM prompt-injection-driven data exfil. Requires Daytona Tier 3+;
# the SDK rejects this call on Tier 1/2. Set false for dev / Tier 1-2.
DAYTONA_POST_CLONE_BLOCK_NETWORK=false
# Optional Daytona resource / lifecycle overrides. Defaults live in
# `convex/lib/constants.ts` and `convex/daytona.ts`; uncomment to override.
# DAYTONA_TARGET=
# DAYTONA_AUTO_STOP_MINUTES=10
# DAYTONA_AUTO_ARCHIVE_MINUTES=1440
# DAYTONA_AUTO_DELETE_MINUTES=1440
# DAYTONA_CPU_LIMIT=2
# DAYTONA_MEMORY_GIB=4
# DAYTONA_DISK_GIB=10
# ─── Sandbox cost cap ───────────────────────────────────────────────────────
# Daily $ ceilings for sandbox-mode spend. The cost-cap gate disables Sandbox
# mode when either ceiling is hit; buckets reset at midnight UTC. Set to 0
# as an emergency kill switch (no env-var feature flag exists — cost cap IS
# the kill switch).
# SANDBOX_DAILY_CAP_PER_USER_USD=5
# SANDBOX_DAILY_CAP_PER_REPOSITORY_USD=20
# SANDBOX_REPLY_ESTIMATE_USD=0.05
# ─── Sandbox sessions (optional) ────────────────────────────────────────────
# Idle minutes before a sandbox session auto-pauses to release the sandbox.
# SANDBOX_SESSION_IDLE_AUTO_PAUSE_MINUTES=10