openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
14 lines (13 loc) • 694 B
JavaScript
import { a as resolveGlobalSingleton } from "./global-singleton-D7yf05nR.mjs";
import { AsyncLocalStorage } from "node:async_hooks";
//#region src/infra/gateway-service-installation-context.ts
const installations = resolveGlobalSingleton(Symbol.for("openclaw.gatewayServiceInstallation"), () => new AsyncLocalStorage());
/** A CLI invocation and its SQLite workers share observed service facts, never write authority. */
function withGatewayServiceInstallation(e, t) {
return installations.run(e, t);
}
function getGatewayServiceInstallation() {
return installations.getStore()?.installation;
}
//#endregion
export { withGatewayServiceInstallation as n, getGatewayServiceInstallation as t };