UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

23 lines (22 loc) 916 B
import { s as CLAUDE_CLI_NATIVE_AUTH_MARKER, t as CLAUDE_CLI_BACKEND_ID } from "./cli-constants-Dsp5krT8.js"; import { t as probeClaudeCliAuthStatus } from "./cli-auth-seam-DnRSnbNO.js"; //#region extensions/anthropic/provider-discovery.ts async function prepareClaudeCliSyntheticAuth(config, params) { params?.signal?.throwIfAborted(); if (!config) return; if ((await probeClaudeCliAuthStatus(params)).status !== "available") return; return { apiKey: CLAUDE_CLI_NATIVE_AUTH_MARKER, source: "Claude CLI native auth", mode: "oauth" }; } const anthropicProviderDiscovery = { id: CLAUDE_CLI_BACKEND_ID, label: "Claude CLI", docsPath: "/providers/models", auth: [], prepareSyntheticAuth: ({ config, provider, ...params }) => prepareClaudeCliSyntheticAuth(provider === "claude-cli" ? config : void 0, params) }; //#endregion export { prepareClaudeCliSyntheticAuth as n, anthropicProviderDiscovery as t };