mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 04:30:43 +00:00
* refactor(plugins): prefer setup descriptors for setup lookup * fix(plugins): harden setup descriptor lookup * fix(plugins): keep sync cli backend setup results * fix(plugins): resolve setup registry rebase * fix(plugins): preserve fail-closed cli backend lookup * fix(plugins): fail closed on shadowed setup owners * fix(plugins): swallow async setup register rejections
12 lines
489 B
TypeScript
12 lines
489 B
TypeScript
import type { PluginManifestRecord } from "./manifest-registry.js";
|
|
|
|
type SetupDescriptorRecord = Pick<PluginManifestRecord, "providers" | "cliBackends" | "setup">;
|
|
|
|
export function listSetupProviderIds(record: SetupDescriptorRecord): readonly string[] {
|
|
return record.setup?.providers?.map((entry) => entry.id) ?? record.providers;
|
|
}
|
|
|
|
export function listSetupCliBackendIds(record: SetupDescriptorRecord): readonly string[] {
|
|
return record.setup?.cliBackends ?? record.cliBackends;
|
|
}
|