diff --git a/apps/api/src/lib/stripe.ts b/apps/api/src/lib/stripe.ts index b9d5e80..873bbd2 100644 --- a/apps/api/src/lib/stripe.ts +++ b/apps/api/src/lib/stripe.ts @@ -10,9 +10,20 @@ import { getRedis } from './redis.js'; */ export const stripe: Stripe | null = config.STRIPE_SECRET_KEY ? new Stripe(config.STRIPE_SECRET_KEY, { - // biome-ignore lint/suspicious/noExplicitAny: SDK type lags behind real API version strings - apiVersion: '2025-10-29.acacia' as any, + // Must match the version the installed SDK (stripe@22) is built against — + // its types expose ui_mode: 'embedded_page', which only exists from this + // version on. Pinning the older '2025-10-29.acacia' made Stripe reject the + // embedded checkout create call (acacia still used ui_mode: 'embedded'). + apiVersion: '2026-04-22.dahlia', typescript: true, + // Fail fast + visibly. Without a tight timeout, a wedged Stripe call (bad + // version, egress hiccup) hangs past Cloudflare's ~100s edge limit, and + // CF returns its own 5xx WITHOUT our CORS headers — which surfaces in the + // browser as an opaque "No Access-Control-Allow-Origin" error instead of + // the real failure. 20s keeps us well inside the edge limit so the handler + // returns a proper 502 (with CORS) the client can actually read. + timeout: 20_000, + maxNetworkRetries: 2, }) : null; diff --git a/apps/web/app/(dashboard)/servers/new/page.tsx b/apps/web/app/(dashboard)/servers/new/page.tsx index 7818f77..6702af4 100644 --- a/apps/web/app/(dashboard)/servers/new/page.tsx +++ b/apps/web/app/(dashboard)/servers/new/page.tsx @@ -480,7 +480,11 @@ function NewServerPageInner() { />
Next step we'll show you exactly which tools we'll expose and let you tweak - the spec before we build. + the spec before we build.{' '} + + Don't paste API keys or access tokens here — you'll add each one in its own + encrypted field in the next step. +
- AES-256-GCM encrypted at rest, injected as env vars at runtime. Remove if your - implementation doesn't actually use one. + One field per key or access token — entered here, separately from your prompt. + AES-256-GCM encrypted at rest, injected as env vars at runtime only. Remove any your + implementation doesn't use; add any we missed.
- No credentials. This server runs self-contained. + None detected. If your tool calls an API that needs a key or access token, add it + below with + Add credential — never put secrets in + the prompt.
)} {editable.requiredSecrets.map((key, idx) => (