UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

15 lines (14 loc) • 649 B
import { a as resolveGlobalSingleton } from "./global-singleton-D7yf05nR.mjs"; import { AsyncLocalStorage } from "node:async_hooks"; //#region src/plugins/load-diagnostics.ts const diagnostics = resolveGlobalSingleton(Symbol.for("openclaw.pluginLoadDiagnostics"), () => new AsyncLocalStorage()); /** Retain observed failures after temporary inspection registries have been released. */ function withPluginLoadDiagnostics(e) { const t = []; return diagnostics.run(t, () => e(t)); } function recordPluginLoadDiagnostic(e) { diagnostics.getStore()?.push(e); } //#endregion export { withPluginLoadDiagnostics as n, recordPluginLoadDiagnostic as t };