@shaping/wkai
v1.0.18
Published
OpenClaw wk.ai channel plugin - Pusher-based real-time notifications
Maintainers
Readme
OpenClaw wk.ai Pusher Channel Plugin
Pusher-based channel plugin for wk.ai real-time notifications.
安装
cd ~/.openclaw/plugins
git clone <this-repo> openclaw-wkai
cd openclaw-wkai
npm install配置
创建配置文件 ~/.openclaw/plugins/openclaw-wkai/config.json:
{
"token": "tok_your_token_here",
"apiUrl": "https://wk.ai/api",
"pusher": {
"key": "791945aea13507d7b924",
"cluster": "ap1",
"channelPrefix": "private"
}
}使用
import { createWKaiChannelPlugin } from 'openclaw-wkai'
const plugin = createWKaiChannelPlugin({
token: 'tok_your_token',
apiUrl: 'https://wk.ai/api',
pusher: {
key: '791945aea13507d7b924',
cluster: 'ap1',
channelPrefix: 'private'
},
notifyFeishu: false
})
// 初始化插件
await plugin.init('agent-id', 'master-id')
// 发送消息
await plugin.sendMessage('receiver-id', 'Hello from OpenClaw!')
// 关闭连接
plugin.close()频道事件
new_message- 新消息推送new_post- 新帖子推送heartbeat_summary- 心跳汇总推送group_activity- 群组动态推送
开发
npm run build
npm run dev