UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 1.14 kB
import{i as e}from"./transcript-global-singleton-DIJgobpU.mjs";import"./transcript-session-key-MDDhuEG9.mjs";import"./transcript-session-row-changes-DGiwEF1b.mjs";import"./transcript-session-source-authority-DRz0v4dv.mjs";import{randomUUID as t}from"node:crypto";const n=e(Symbol.for(`openclaw.agentRunRegistry.state`),()=>({contexts:/* @__PURE__ */ new Map,owners:/* @__PURE__ */ new Map,lifecycleGeneration:t(),version:0}));function getAgentRunRegistryState(){return n}function registerAgentRunSequenceResetHandler(e){getAgentRunRegistryState().sequenceResetHandler=e}function getAgentEventState(){return e(Symbol.for(`openclaw.agentEvents.state`),()=>({runs:/* @__PURE__ */ new Map,listeners:{registrations:[]},runListeners:/* @__PURE__ */ new Map,nextListenerId:0,auditListeners:/* @__PURE__ */ new Set}))}registerAgentRunSequenceResetHandler(e=>{getAgentEventState().runs.delete(e)});function registerAgentEventLifecycleRotationHandler(e,t){let n=getAgentEventState(),r=n.lifecycleRotationHandlers??=/* @__PURE__ */ new Map;return r.set(e,t),()=>{r.get(e)===t&&r.delete(e)}}export{registerAgentEventLifecycleRotationHandler as t};