const managedMcpOAuthProviders = new Map();
export function registerManagedMcpOAuthProvider(providerId) {
    managedMcpOAuthProviders.set(providerId, (managedMcpOAuthProviders.get(providerId) ?? 0) + 1);
}
export function unregisterManagedMcpOAuthProvider(providerId) {
    const registrations = managedMcpOAuthProviders.get(providerId);
    if (!registrations) {
        return;
    }
    if (registrations <= 1) {
        managedMcpOAuthProviders.delete(providerId);
        return;
    }
    managedMcpOAuthProviders.set(providerId, registrations - 1);
}
export function isManagedMcpOAuthProvider(providerId) {
    return providerId.startsWith('mcp:') || managedMcpOAuthProviders.has(providerId);
}
//# sourceMappingURL=managed-oauth-providers.js.map