JuliusBrussee/caveman · error

Caveman Cloud platform is still in beta.

Error message

Caveman Cloud platform is still in beta.

What it means

Caveman Cloud hosted login is gated while the platform is in beta. blockCloudLoginWhileBeta() unconditionally throws to block any `login` invocation that does not explicitly target a private instance via --instance. Explicit private instances bypass the gate.

Solutions

  1. Pass --instance=https://your-private-instance to target a private instance
  2. Wait for the Caveman Cloud beta gate to be lifted, then run plain `login`
  3. Check CLI release notes / docs for the current hosted-login availability

Example fix

// before
caveman login
// after
caveman login --instance=https://caveman.example.com
Defensive patterns

Strategy: fallback

Validate before calling

if (!process.argv.includes("--instance") && !process.argv.some(a => a.startsWith("--instance="))) console.warn("Hosted login is beta-gated; pass --instance");

Try / catch

try { await login() } catch (e) { if (e.message.includes("still in beta")) await login(["--instance=" + privateInstanceURL]); }

Prevention

When it happens

Trigger: Running `caveman login` (or login()) without any --instance or --instance=... argument while the beta gate is active.

Common situations: Developer following pre-beta docs and running plain `login`; CI scripts that omit --instance; expecting hosted cloud login to work before the platform exits beta.

Related errors


AI-assisted analysis of JuliusBrussee/caveman@3ee70a1026 (2026-09-20). Data as JSON: /api/errors/fb632947ee799697. Report an issue: GitHub.

Appendix: source

Thrown at packages/cli/src/index.ts:9666

      const body = await response.json().catch(() => null) as { error?: { code?: unknown } } | null;
      const code = typeof body?.error?.code === "string" ? body.error.code : `HTTP ${response.status}`;
      lastError = code;
      // Invalid/expired grants are terminal. Infrastructure responses remain
      // retryable so a committed ACK whose response was dropped can converge.
      if (response.status < 500 && response.status !== 429) break;
    } catch (error) {
      lastError = error instanceof Error ? error.message : String(error);
    }
    if (attempt < 4) await sleep(Math.min(2000, 200 * 2 ** attempt));
  }
  throw new Error(`device credential delivery acknowledgement failed (${lastError}); credentials were persisted locally but the server may revoke them after the delivery window`);
}

// 0600 credentials file) — never in plaintext config. organization_id is bound
// from the returned token, never from any local input.
// Hosted login remains gated; explicit private instances use project access.
function blockCloudLoginWhileBeta(): void {
  throw new Error("Caveman Cloud platform is still in beta.");
}

async function login(argv: string[] = []) {
  if (!argv.some((arg) => arg === "--instance" || arg.startsWith("--instance="))) blockCloudLoginWhileBeta();
  const { noBrowser, instance } = validateLoginArgs(argv);
  const baseURL = instance ?? resolveLoginBaseUrl(argv);

  const codeResp = await fetch(`${baseURL}/api/v1/auth/device/code`, {
    method: "POST",
    redirect: "error",
    headers: { "content-type": "application/json" },
    body: "{}",
    signal: AbortSignal.timeout(5000),
  });
  if (!codeResp.ok) throw new Error(`device authorization failed: HTTP ${codeResp.status}`);
  const code = await codeResp.json();
  if (!code.device_code) throw new Error("device authorization failed: missing device code");

View on GitHub (pinned to 3ee70a1026)