openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
20 lines (19 loc) • 922 B
JavaScript
import { i as getGatewayPluginMetadataSnapshot } from "./current-plugin-metadata-state-OtNMKJ1-.mjs";
import { t as buildPluginManifestRegistry } from "./manifest-registry-build-DXs77261.mjs";
import { i as loadInstalledPluginIndexInstallRecordsSync } from "./installed-plugin-index-record-reader--X-E60FV.mjs";
//#region src/plugins/manifest-registry.ts
function loadPluginManifestRegistryCore(params = {}) {
if (!params.candidates && !params.discovery && !params.installRecords) {
const gatewaySnapshot = getGatewayPluginMetadataSnapshot();
if (gatewaySnapshot) return gatewaySnapshot.manifestRegistry;
}
const env = params.env ?? process.env;
let installRecords = params.installRecords;
return buildPluginManifestRegistry({
...params,
env,
getInstallRecords: () => installRecords ??= loadInstalledPluginIndexInstallRecordsSync({ env })
});
}
//#endregion
export { loadPluginManifestRegistryCore as t };