openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 1.01 kB
JavaScript
import{v as requireActivePluginRegistry}from"./runtime-Cl6PvJHC.mjs";import{t as listRegisteredPluginCommands}from"./plugin-command-registry-BBUDyKPd.mjs";import"./command-registration-DXBvKP0N.mjs";import{t as executeRegisteredPluginCommand}from"./plugin-command-execution-Dwy_wVYy.mjs";import{t as matchRegisteredPluginCommand}from"./plugin-command-matcher-CC1MgX1v.mjs";
//!src/plugins/commands.ts
function matchPluginCommand(e,t={}){const n=requireActivePluginRegistry();return matchRegisteredPluginCommand({commands:listRegisteredPluginCommands(n),commandBody:e,channel:t.channel,aliasScope:{kind:`all`}})}async function executePluginCommand(e){return await executeRegisteredPluginCommand(requireActivePluginRegistry(),e)}function listPluginCommands(){return listRegisteredPluginCommands(requireActivePluginRegistry()).map(e=>({name:e.name,description:e.description,pluginId:e.pluginId,acceptsArgs:e.acceptsArgs??false}))}export{listPluginCommands as n,matchPluginCommand as r,executePluginCommand as t};