index.ts 971 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * Plugin entry point for @fmode/openclaw-wechat-agent.
  3. *
  4. * OpenClaw loads this file and calls register(api) with its PluginApi.
  5. * We stash api.runtime into our runtime singleton (used later in
  6. * outbound/monitor hot paths) and register the channel plugin.
  7. *
  8. * Mirrors the shape used by @openclaw/zalo and @openclaw/msteams.
  9. */
  10. import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
  11. import { emptyPluginConfigSchema } from "openclaw/plugin-sdk";
  12. import { wechatAgentPlugin } from "./src/channel.js";
  13. import { setRuntime } from "./src/runtime.js";
  14. const plugin = {
  15. id: "wechat-agent",
  16. name: "WeChat (Agent Backend)",
  17. description:
  18. "OpenClaw channel plugin that bridges a third-party WeChat HTTP bot (xbot/wcf) into the OpenClaw agent pipeline.",
  19. configSchema: emptyPluginConfigSchema(),
  20. register(api: OpenClawPluginApi) {
  21. setRuntime(api.runtime);
  22. api.registerChannel({ plugin: wechatAgentPlugin });
  23. },
  24. };
  25. export default plugin;