mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-29 06:53:34 +00:00
14 lines
695 B
TypeScript
14 lines
695 B
TypeScript
// Runtime bridge for plugin-provided text transforms.
|
|
import { mergePluginTextTransforms } from "../agents/plugin-text-transforms.js";
|
|
import { getActiveRuntimePluginRegistry } from "./active-runtime-registry.js";
|
|
import type { PluginTextTransforms } from "./types.js";
|
|
|
|
/** Resolves merged text transforms from the active runtime plugin registry. */
|
|
export function resolveRuntimeTextTransforms(): PluginTextTransforms | undefined {
|
|
const registry = getActiveRuntimePluginRegistry();
|
|
const pluginTextTransforms = Array.isArray(registry?.textTransforms)
|
|
? registry.textTransforms.map((entry) => entry.transforms)
|
|
: [];
|
|
return mergePluginTextTransforms(...pluginTextTransforms);
|
|
}
|