Files
clawdbot/src/plugins/runtime.ts
2026-01-15 02:44:45 +00:00

18 lines
496 B
TypeScript

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;
}