mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-22 23:41:07 +00:00
Merged via squash.
Prepared head SHA: ffa45893e0
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
51 lines
1.6 KiB
TypeScript
51 lines
1.6 KiB
TypeScript
export type PluginEntryConfig = {
|
|
enabled?: boolean;
|
|
hooks?: {
|
|
/** Controls prompt mutation via before_prompt_build and prompt fields from legacy before_agent_start. */
|
|
allowPromptInjection?: boolean;
|
|
};
|
|
subagent?: {
|
|
/** Explicitly allow this plugin to request per-run provider/model overrides for subagent runs. */
|
|
allowModelOverride?: boolean;
|
|
/**
|
|
* Allowed override targets as canonical provider/model refs.
|
|
* Use "*" to explicitly allow any model for this plugin.
|
|
*/
|
|
allowedModels?: string[];
|
|
};
|
|
config?: Record<string, unknown>;
|
|
};
|
|
|
|
export type PluginSlotsConfig = {
|
|
/** Select which plugin owns the memory slot ("none" disables memory plugins). */
|
|
memory?: string;
|
|
/** Select which plugin owns the context-engine slot. */
|
|
contextEngine?: string;
|
|
};
|
|
|
|
export type PluginsLoadConfig = {
|
|
/** Additional plugin/extension paths to load. */
|
|
paths?: string[];
|
|
};
|
|
|
|
export type PluginInstallRecord = Omit<InstallRecordBase, "source"> & {
|
|
source: InstallRecordBase["source"] | "marketplace";
|
|
marketplaceName?: string;
|
|
marketplaceSource?: string;
|
|
marketplacePlugin?: string;
|
|
};
|
|
|
|
export type PluginsConfig = {
|
|
/** Enable or disable plugin loading. */
|
|
enabled?: boolean;
|
|
/** Optional plugin allowlist (plugin ids). */
|
|
allow?: string[];
|
|
/** Optional plugin denylist (plugin ids). */
|
|
deny?: string[];
|
|
load?: PluginsLoadConfig;
|
|
slots?: PluginSlotsConfig;
|
|
entries?: Record<string, PluginEntryConfig>;
|
|
installs?: Record<string, PluginInstallRecord>;
|
|
};
|
|
import type { InstallRecordBase } from "./types.installs.js";
|