mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 19:42:55 +00:00
14 lines
408 B
TypeScript
14 lines
408 B
TypeScript
const PLUGIN_REGISTRY_STATE = Symbol.for("openclaw.pluginRegistryState");
|
|
|
|
type GlobalRegistryWorkspaceState = typeof globalThis & {
|
|
[PLUGIN_REGISTRY_STATE]?: {
|
|
workspaceDir?: string | null;
|
|
};
|
|
};
|
|
|
|
export function getActivePluginRegistryWorkspaceDirFromState(): string | undefined {
|
|
return (
|
|
(globalThis as GlobalRegistryWorkspaceState)[PLUGIN_REGISTRY_STATE]?.workspaceDir ?? undefined
|
|
);
|
|
}
|