/**
 * OAuth constants stub.
 *
 * The original `constants/oauth.ts` held Claude.ai-specific OAuth endpoints,
 * client IDs, and scopes that have no place in sandcode. This stub preserves
 * the shape that remaining callers expect (base URL, header, file suffix) so
 * the tree can compile while those callers are rewritten/removed in later
 * phases.
 */

export const SANDCODE_PROFILE_SCOPE = 'user:profile'

/** Inference scope used to gate authenticated remote calls. */
export const SANDCODE_AI_INFERENCE_SCOPE = 'inference:write'

/**
 * URL the MCP OAuth flow advertises as the client's metadata document
 * (RFC 7591 §3.2.1, §3.2.2). Empty in sandcode — we never publish a
 * canonical sandcode-hosted metadata doc, so the MCP client falls back to
 * dynamic registration with inline metadata.
 */
export const MCP_CLIENT_METADATA_URL = ''

/**
 * Header name historically used to opt into the first-party OAuth beta. The
 * remote API no longer requires it; kept as an empty marker so call sites
 * that push it into an upstream beta-header list still type-check without
 * changing outbound traffic.
 */
export const OAUTH_BETA_HEADER = ''

/**
 * Optional filename suffix applied when pointing at alternate oauth backends
 * (staging, local). The stub returns empty so callers writing paths like
 * `.sandcode${suffix}.json` land on the default file.
 */
export function fileSuffixForOauthConfig(): string {
  return ''
}

/**
 * Minimal config shape used by the last callers of the OAuth surface. The
 * base URL is driven off `SANDCODE_BASE_URL`; everything else is an empty
 * default.
 */
export function getOauthConfig(): {
  BASE_API_URL: string
  OAUTH_FILE_SUFFIX: string
  SANDCODE_AI_ORIGIN: string
} {
  return {
    BASE_API_URL: process.env.SANDCODE_BASE_URL || '',
    OAUTH_FILE_SUFFIX: '',
    SANDCODE_AI_ORIGIN: process.env.SANDCODE_BASE_URL || '',
  }
}
