From 1b24b6a02b84ddc3df02a539844e98be1f8198b9 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 15 Jan 2026 02:44:45 +0000 Subject: [PATCH] fix: add plugin runtime registry --- src/plugins/runtime.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/plugins/runtime.ts 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; +}