export function createEnvironmentVariableQuery(environment) {
    return {
        hasEnvironmentVariable(name) {
            return Boolean(environment[name]);
        },
    };
}
export function createProviderRuntimeInspectionQuery(providers) {
    return {
        listProviderIds() {
            return providers.listProviderIds();
        },
        async inspectAll() {
            const result = await providers.queryRuntimeMetadata({ scope: 'all' });
            return result.scope === 'all' ? result.snapshots : [];
        },
        async inspect(providerId) {
            const result = await providers.queryRuntimeMetadata({ scope: 'provider', providerId });
            return result.scope === 'provider' ? result.snapshot : null;
        },
    };
}
