diff --git a/src/plugins/runtime.ts b/src/plugins/runtime.ts new file mode 100644 index 000000000..f814a0811 --- /dev/null +++ b/src/plugins/runtime.ts @@ -0,0 +1,17 @@ +import type { PluginRegistry } from "./registry.js"; + +let activeRegistry: PluginRegistry | null = null; +let activeRegistryKey: string | null = null; + +export function setActivePluginRegistry(registry: PluginRegistry, cacheKey?: string) { + activeRegistry = registry; + activeRegistryKey = cacheKey ?? null; +} + +export function getActivePluginRegistry(): PluginRegistry | null { + return activeRegistry; +} + +export function getActivePluginRegistryKey(): string | null { + return activeRegistryKey; +}