Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/unitlib/data/128/   (GAP Algebra Version 4.15.1©)  Datei vom 12.5.2025 mit Größe 6 kB image not shown  

 provider-registry.ts

  Interaktion und
PortierbarkeitJAVA
 

import { normalizeProviderId } from "../agents/model-selection.js";
import type { OpenClawConfig } from "../config/types.js";
import { isBlockedObjectKey } from "../infra/prototype-keys.js";
import { resolvePluginCapabilityProviders } from "../plugins/capability-provider-runtime.js";
import type { MusicGenerationProviderPlugin } from "../plugins/types.js";

const BUILTIN_MUSIC_GENERATION_PROVIDERS: readonly MusicGenerationProviderPlugin[] = [];
const UNSAFE_PROVIDER_IDS = new Set(["__proto__""constructor""prototype"]);

function normalizeMusicGenerationProviderId(id: string | undefined): string | undefined {
  const normalized = normalizeProviderId(id ?? "");
  if (!normalized || isBlockedObjectKey(normalized)) {
    return undefined;
  }
  return normalized;
}

function isSafeMusicGenerationProviderId(id: string | undefined): id is string {
  return Boolean(id && !UNSAFE_PROVIDER_IDS.has(id));
}

function resolvePluginMusicGenerationProviders(
  cfg?: OpenClawConfig,
): MusicGenerationProviderPlugin[] {
  return resolvePluginCapabilityProviders({
    key: "musicGenerationProviders",
    cfg,
  });
}

function buildProviderMaps(cfg?: OpenClawConfig): {
  canonical: Map<string, MusicGenerationProviderPlugin>;
  aliases: Map<string, MusicGenerationProviderPlugin>;
} {
  const canonical = new Map<string, MusicGenerationProviderPlugin>();
  const aliases = new Map<string, MusicGenerationProviderPlugin>();
  const register = (provider: MusicGenerationProviderPlugin) => {
    const id = normalizeMusicGenerationProviderId(provider.id);
    if (!isSafeMusicGenerationProviderId(id)) {
      return;
    }
    canonical.set(id, provider);
    aliases.set(id, provider);
    for (const alias of provider.aliases ?? []) {
      const normalizedAlias = normalizeMusicGenerationProviderId(alias);
      if (isSafeMusicGenerationProviderId(normalizedAlias)) {
        aliases.set(normalizedAlias, provider);
      }
    }
  };

  for (const provider of BUILTIN_MUSIC_GENERATION_PROVIDERS) {
    register(provider);
  }
  for (const provider of resolvePluginMusicGenerationProviders(cfg)) {
    register(provider);
  }

  return { canonical, aliases };
}

export function listMusicGenerationProviders(
  cfg?: OpenClawConfig,
): MusicGenerationProviderPlugin[] {
  return [...buildProviderMaps(cfg).canonical.values()];
}

export function getMusicGenerationProvider(
  providerId: string | undefined,
  cfg?: OpenClawConfig,
): MusicGenerationProviderPlugin | undefined {
  const normalized = normalizeMusicGenerationProviderId(providerId);
  if (!normalized) {
    return undefined;
  }
  return buildProviderMaps(cfg).aliases.get(normalized);
}

Messung V0.5 in Prozent
C=100 H=87 G=93

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.10Angebot  (Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-06-09) ¤

*Eine klare Vorstellung vom Zielzustand






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.