UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

18 lines (17 loc) • 712 B
//#region src/agents/channel-tool-metadata.ts const channelAgentToolMeta = /* @__PURE__ */ new WeakMap(); /** Read channel metadata attached to a channel-owned agent tool. */ function getChannelAgentToolMeta(e) { return channelAgentToolMeta.get(e); } /** Attach channel ownership metadata to a concrete agent tool. */ function setChannelAgentToolMeta(e, t) { channelAgentToolMeta.set(e, t); } /** Copy channel metadata when wrapping or replacing a channel-owned tool. */ function copyChannelAgentToolMeta(e, t) { const n = channelAgentToolMeta.get(e); if (n) channelAgentToolMeta.set(t, n); } //#endregion export { getChannelAgentToolMeta as n, setChannelAgentToolMeta as r, copyChannelAgentToolMeta as t };