import {
  getConfig
} from "./chunk-2MAQ6JFL.js";

// src/backends/opencode/auth.ts
function buildOpencodeAuthEnv() {
  const cfg = getConfig();
  const env = {};
  if (cfg.anthropicApiKey) {
    env.ANTHROPIC_API_KEY = cfg.anthropicApiKey;
  }
  if (cfg.openAiApiKey) {
    env.OPENAI_API_KEY = cfg.openAiApiKey;
  }
  if (cfg.claudeToken && !cfg.anthropicApiKey) {
    console.warn(
      "[opencode] CLAUDE_CODE_OAUTH_TOKEN cannot drive opencode \u2014 set ANTHROPIC_API_KEY"
    );
  }
  return env;
}
function validateOpencodeRuntime() {
  return null;
}

export {
  buildOpencodeAuthEnv,
  validateOpencodeRuntime
};
