mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 11:00:42 +00:00
fix(plugins): keep registry lookup types acyclic
This commit is contained in:
@@ -379,6 +379,10 @@
|
||||
"source": "Plugin SDK",
|
||||
"target": "插件 SDK"
|
||||
},
|
||||
{
|
||||
"source": "Plugins",
|
||||
"target": "插件"
|
||||
},
|
||||
{
|
||||
"source": "Building plugins",
|
||||
"target": "构建插件"
|
||||
@@ -439,6 +443,14 @@
|
||||
"source": "Migrate",
|
||||
"target": "迁移"
|
||||
},
|
||||
{
|
||||
"source": "Migrating",
|
||||
"target": "迁移"
|
||||
},
|
||||
{
|
||||
"source": "Migrating from Hermes",
|
||||
"target": "从 Hermes 迁移"
|
||||
},
|
||||
{
|
||||
"source": "Migration",
|
||||
"target": "迁移"
|
||||
|
||||
@@ -4,7 +4,7 @@ const mocks = vi.hoisted(() => ({
|
||||
loadPluginManifestRegistryForPluginRegistry: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock("./plugin-registry.js", () => ({
|
||||
vi.mock("./plugin-registry-contributions.js", () => ({
|
||||
loadPluginManifestRegistryForPluginRegistry: (...args: unknown[]) =>
|
||||
mocks.loadPluginManifestRegistryForPluginRegistry(...args),
|
||||
}));
|
||||
|
||||
@@ -12,7 +12,6 @@ import type {
|
||||
PluginManifestRecord,
|
||||
PluginManifestRegistry,
|
||||
} from "./manifest-registry.js";
|
||||
import type { PluginLookUpTable } from "./plugin-lookup-table.js";
|
||||
import type { PluginOrigin } from "./plugin-origin.types.js";
|
||||
import {
|
||||
loadPluginRegistrySnapshot,
|
||||
@@ -20,6 +19,23 @@ import {
|
||||
type PluginRegistrySnapshot,
|
||||
} from "./plugin-registry-snapshot.js";
|
||||
|
||||
export type PluginLookUpTable = {
|
||||
index: PluginRegistrySnapshot;
|
||||
manifestRegistry: PluginManifestRegistry;
|
||||
plugins: readonly PluginManifestRecord[];
|
||||
normalizePluginId: (pluginId: string) => string;
|
||||
owners: {
|
||||
channels: ReadonlyMap<string, readonly string[]>;
|
||||
channelConfigs: ReadonlyMap<string, readonly string[]>;
|
||||
providers: ReadonlyMap<string, readonly string[]>;
|
||||
modelCatalogProviders: ReadonlyMap<string, readonly string[]>;
|
||||
cliBackends: ReadonlyMap<string, readonly string[]>;
|
||||
setupProviders: ReadonlyMap<string, readonly string[]>;
|
||||
commandAliases: ReadonlyMap<string, readonly string[]>;
|
||||
contracts: ReadonlyMap<string, readonly string[]>;
|
||||
};
|
||||
};
|
||||
|
||||
export type PluginRegistryContributionOptions = LoadPluginRegistryParams & {
|
||||
includeDisabled?: boolean;
|
||||
lookUpTable?: PluginLookUpTable;
|
||||
|
||||
Reference in New Issue
Block a user