From 0ffa23821b1f921ebc4a8cdb1f253efcb6029735 Mon Sep 17 00:00:00 2001 From: yaowenc2 Date: Wed, 15 Jul 2026 22:16:54 +0800 Subject: [PATCH] fix(config): default cloud API to api.instacloud.com (not legacy beta-api.insta.insforge.dev) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Onboarding is agents.instacloud.com but the CLI's hardcoded DEFAULT_API still pointed at the legacy beta host beta-api.insta.insforge.dev — so a fresh install talked to an insforge.dev domain, not the instacloud.com brand. Verified same backend: identical 401 {"error":"unauthorized"} on /orgs and 400 on /auth/cli/authorize on both hosts. Only affects FRESH installs: a persisted apiUrl (prior login) or INSTA_API_URL still wins, so existing logins are undisturbed. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01GMbAe5K1RfwaAcge5inX7P --- src/config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index d0573f7..a7edf1d 100644 --- a/src/config.ts +++ b/src/config.ts @@ -18,7 +18,10 @@ export type GlobalConfig = { export type ProjectConfig = { projectId: string; orgId: string; branch: string } -const DEFAULT_API = 'https://beta-api.insta.insforge.dev' +// The cloud API default. Uses the instacloud.com brand domain (matches the agents.instacloud.com +// onboarding), NOT the legacy beta-api.insta.insforge.dev host — same backend, branded domain. +// Only affects fresh installs: a persisted apiUrl (from a prior login) or INSTA_API_URL wins below. +const DEFAULT_API = 'https://api.instacloud.com' export async function readGlobal(): Promise { // INSTA_API_URL overrides the persisted apiUrl, not just the default — otherwise the