/** * 环境类型 (与 optima-agent token.json 的 env 字段保持一致) * * `cn-prod` 是阿里云 cn-prod 环境(gateway/agent-runtime 设 OPTIMA_ENV=cn-prod, * token.json.env 由 runtime 写入该值)。环境 → 端点映射由 scout 自己维护, * 通用宿主 (agent-runtime) 不承载 SCOUT_API_URL(optima-gateway#843)。 */ export type Environment = 'ci' | 'stage' | 'prod' | 'cn-prod'; /** * Scout API URL 配置(环境 → 端点) */ declare const SCOUT_API_URLS: Record; /** * 解析当前环境:SCOUT_ENV > token.json.env > 默认 prod。 * * 未知环境 fail-loud(optima-gateway#843):以前未知 env 静默回退 prod, * cn-prod 下表现为把 cn 签发的 token 发给 AWS scout-api,报误导性的 * "Signature verification failed"。现在直接抛错指明根因。 * 完全没有环境信息(无 SCOUT_ENV、无 token.json)仍默认 prod。 */ declare function getCurrentEnv(): Environment; /** * 获取当前环境的 API URL */ declare function getApiUrl(): string; export declare const CONFIG: { readonly apiUrl: string; readonly env: Environment; readonly accessToken: string | undefined; }; export { getCurrentEnv, getApiUrl, SCOUT_API_URLS }; //# sourceMappingURL=config.d.ts.map