fix(agents): normalize Windows runtime imports (#72731)

* fix(agents): normalize Windows runtime imports

* test(providers): align manifest contract coverage
This commit is contained in:
Peter Steinberger
2026-04-27 10:34:25 +01:00
committed by GitHub
parent 8b85f2c163
commit cf499101a2
10 changed files with 160 additions and 25 deletions

View File

@@ -12,6 +12,14 @@ type ProviderContractEntry = {
provider: ProviderPlugin;
};
function providerMatchesManifestId(provider: ProviderPlugin, providerId: string): boolean {
return (
provider.id === providerId ||
(provider.aliases ?? []).includes(providerId) ||
(provider.hookAliases ?? []).includes(providerId)
);
}
function resolveProviderContractProvidersFromPublicArtifact(
pluginId: string,
): ProviderContractEntry[] | null {
@@ -46,7 +54,9 @@ export function describeProviderContracts(pluginId: string) {
// does not race provider contract collection against other file imports.
installProviderPluginContractSuite({
provider: () => {
const entry = resolveProviderEntries().find((entry) => entry.provider.id === providerId);
const entry = resolveProviderEntries().find((entry) =>
providerMatchesManifestId(entry.provider, providerId),
);
if (!entry) {
throw new Error(`provider contract entry missing for ${pluginId}:${providerId}`);
}