openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
46 lines • 1.76 kB
TypeScript
import { L as PluginEntryConfig, P as OpenClawConfig } from "./types-D3g9JHH2.js";
import { t as SchemaContract } from "./schema-contract-v05QRSzC.js";
//#region src/plugins/config-normalization-shared.d.ts
/** Canonical plugin config shape consumed by runtime policy and loaders. */
type NormalizedPluginsConfig = {
/** Prepared metadata owner; null means the engine has no unambiguous permitted owner. */
contextEngineOwnerId?: string | null;
enabled: boolean;
allow: string[];
deny: string[];
loadPaths: string[];
slots: {
memory?: string | null;
contextEngine?: string | null;
};
entries: Record<string, {
enabled?: boolean;
hooks?: SchemaContract<NonNullable<PluginEntryConfig["hooks"]>>;
subagent?: SchemaContract<NonNullable<PluginEntryConfig["subagent"]>> & {
hasAllowedModelsConfig?: boolean;
};
llm?: SchemaContract<NonNullable<PluginEntryConfig["llm"]>> & {
hasAllowedModelsConfig?: boolean;
hasAllowedCompletionModelsConfig?: boolean;
};
config?: unknown;
}>;
};
/** Plugin id normalizer used while loading aliases or raw config. */
type NormalizePluginId = (id: string) => string;
//#endregion
//#region src/plugins/config-activation-shared.d.ts
type PluginActivationSource = "disabled" | "explicit" | "auto" | "default";
type PluginActivationStateLike = {
enabled: boolean;
activated: boolean;
explicitlyEnabled: boolean;
source: PluginActivationSource;
reason?: string;
};
type PluginActivationConfigSourceLike = {
plugins: NormalizedPluginsConfig;
rootConfig?: OpenClawConfig;
};
//#endregion
export { NormalizedPluginsConfig as a, NormalizePluginId as i, PluginActivationSource as n, PluginActivationStateLike as r, PluginActivationConfigSourceLike as t };