Files
qqbot/index.ts
rianli f078f0d2f5 fix: preload.cjs 改为同步 require 加载 ESM,修复框架检测不到 register/activate 的问题
- preload.cjs: 移除异步 import() + Proxy 方案,改用 Node 22 原生 CJS require ESM
- package.json: 添加 postbuild 脚本,build 后自动同步产物到 extensions 目录
- upgrade-via-source.sh: 安装后将 extensions 副本替换为 symlink 指向源码目录
2026-03-25 23:41:08 +08:00

32 lines
1.0 KiB
TypeScript

import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk";
import { qqbotPlugin } from "./src/channel.js";
import { setQQBotRuntime } from "./src/runtime.js";
import { registerChannelTool } from "./src/tools/channel.js";
import { registerRemindTool } from "./src/tools/remind.js";
const plugin = {
id: "openclaw-qqbot",
name: "QQ Bot",
description: "QQ Bot channel plugin",
configSchema: emptyPluginConfigSchema(),
register(api: OpenClawPluginApi) {
setQQBotRuntime(api.runtime);
api.registerChannel({ plugin: qqbotPlugin as any });
registerChannelTool(api);
registerRemindTool(api);
},
};
export default plugin;
export { qqbotPlugin } from "./src/channel.js";
export { setQQBotRuntime, getQQBotRuntime } from "./src/runtime.js";
export { qqbotOnboardingAdapter } from "./src/onboarding.js";
export * from "./src/types.js";
export * from "./src/api.js";
export * from "./src/config.js";
export * from "./src/gateway.js";
export * from "./src/outbound.js";