openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
15 lines (14 loc) • 501 B
JavaScript
//#region src/cli/gateway-cli/runtime-hooks.ts
let activeGatewayRunRuntimeHooks = {};
function getGatewayRunRuntimeHooks() {
return activeGatewayRunRuntimeHooks;
}
function installGatewayRunRuntimeHooks(hooks) {
const previous = activeGatewayRunRuntimeHooks;
activeGatewayRunRuntimeHooks = hooks;
return () => {
if (activeGatewayRunRuntimeHooks === hooks) activeGatewayRunRuntimeHooks = previous;
};
}
//#endregion
export { installGatewayRunRuntimeHooks as n, getGatewayRunRuntimeHooks as t };