Files
openclaw/src/plugins/runtime-workspace-state.ts
2026-05-30 00:02:24 +02:00

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