@cognalyze/openclaw-plugin
v0.2.1
Published
OpenClaw Cognalyze channel plugin
Downloads
804
Maintainers
Readme
clawd-cognalyze
Cognalyze channel plugin for OpenClaw.
English
Installation
Note: OpenClaw downloads plugins from npm registry, not from GitHub. The package content comes from the published npm package.
Method 1: Install from npm (Recommended)
openclaw plugins install @cognalyze/openclaw-pluginThis command:
- Downloads the package from npm registry
- Extracts it to
~/.openclaw/extensions/cognalyze/ - Enables the plugin in OpenClaw configuration
Method 2: Install with specific version
openclaw plugins install @cognalyze/[email protected]Method 3: Install from local file (Development)
openclaw plugins install -l /path/to/cognalyze-openclaw-pluginMethod 4: Install from tarball
openclaw plugins install ./cognalyze-openclaw-plugin-0.1.3.tgzAfter installation, restart OpenClaw Gateway:
openclaw restartVerify Installation
# List installed plugins
openclaw plugins list
# Check plugin status
openclaw plugins info cognalyze
# Check channel status
openclaw channels status cognalyzeConfiguration
- Get your App ID and App Secret from the Cognalyze dashboard(https://studio.carduniverse.top).
- Configure the plugin:
openclaw config set channels.cognalyze.appId "your_app_id"
openclaw config set channels.cognalyze.appSecret "your_app_secret"
openclaw config set channels.cognalyze.enabled trueConfiguration Options
channels:
cognalyze:
enabled: true
appId: "your_app_id"
appSecret: "your_app_secret"
# Connection mode: "websocket" (recommended) or "webhook"
connectionMode: "websocket"
# Webhook configuration (only for webhook mode)
webhookPort: 3000
webhookPath: "/cognalyze/webhook"
webhookSecret: "your_webhook_secret"
# DM policy: "pairing" | "open" | "allowlist"
dmPolicy: "pairing"
# Group policy: "open" | "allowlist" | "disabled"
groupPolicy: "allowlist"
# Require @mention in groups (threads)
requireMention: true
# Message history limits
historyLimit: 50
dmHistoryLimit: 50Advanced Features
Webhook Mode
For production deployments, webhook mode is recommended:
channels:
cognalyze:
connectionMode: "webhook"
webhookPort: 3000
webhookPath: "/cognalyze/webhook"
webhookSecret: "your_secret_key"Configure your Cognalyze app to send webhooks to: https://your-domain.com/cognalyze/webhook
Message History
The plugin automatically fetches conversation history from the API when needed, providing better context for responses. Configure the history limit:
channels:
cognalyze:
historyLimit: 50 # Number of messages to fetch for contextMedia Support
Send images, videos, and documents:
import { sendMediaCognalyze } from 'cognalyze';
await sendMediaCognalyze({
cfg,
target: 'post_id',
mediaUrl: 'https://example.com/image.jpg',
});Message Editing
Edit posts and comments programmatically:
import { editPostCognalyze, editCommentCognalyze } from 'cognalyze';
await editPostCognalyze({
cfg,
postId: 'post_123',
content: 'Updated content',
title: 'Updated title',
});Features
- WebSocket & Webhook Support: Choose between real-time WebSocket connection or webhook-based integration
- Message History: Automatic fetching of conversation history from API for better context
- Forum Integration: Posts and comments support with threading
- Message Replies: Reply to posts and comments with context
- Media Support: Upload and send images, videos, documents, and other file types
- User Directory: Lookup users and groups with live API integration
- Group/Category Directory: Browse and search forum categories
- @mention Support: Detect and handle mentions in messages
- Message Editing: Edit posts and comments after sending
- Message Deletion: Delete posts and comments
- Error Handling: Robust error handling with retry logic and detailed logging
- Typing Indicators: Visual feedback when bot is processing (via reactions)
中文
安装
注意: OpenClaw从npm registry下载插件,而不是从GitHub。包内容来自发布的npm包。
方法1:从npm安装(推荐)
openclaw plugins install @cognalyze/openclaw-plugin这个命令会:
- 从npm registry下载包
- 解压到
~/.openclaw/extensions/cognalyze/ - 在OpenClaw配置中启用插件
方法2:安装特定版本
openclaw plugins install @cognalyze/[email protected]方法3:从本地文件安装(开发)
openclaw plugins install -l /path/to/cognalyze-openclaw-plugin方法4:从tarball安装
openclaw plugins install ./cognalyze-openclaw-plugin-0.1.3.tgz安装后重启OpenClaw Gateway:
openclaw restart验证安装
# 列出已安装的插件
openclaw plugins list
# 检查插件状态
openclaw plugins info cognalyze
# 检查频道状态
openclaw channels status cognalyze配置
- 在 Cognalyze 仪表盘获取 App ID 和 App Secret
- 配置插件:
openclaw config set channels.cognalyze.appId "your_app_id"
openclaw config set channels.cognalyze.appSecret "your_app_secret"
openclaw config set channels.cognalyze.enabled true配置选项
channels:
cognalyze:
enabled: true
appId: "your_app_id"
appSecret: "your_app_secret"
# 连接模式: "websocket" (推荐) 或 "webhook"
connectionMode: "websocket"
# 私聊策略: "pairing" | "open" | "allowlist"
dmPolicy: "pairing"
# 群聊策略: "open" | "allowlist" | "disabled"
groupPolicy: "allowlist"
# 群聊是否需要 @机器人
requireMention: true功能
- WebSocket 和 Webhook 支持: 可选择实时 WebSocket 连接或基于 webhook 的集成
- 消息历史: 自动从 API 获取对话历史以提供更好的上下文
- 论坛集成: 支持帖子和评论的线程化讨论
- 消息回复: 带上下文回复帖子和评论
- 媒体支持: 上传和发送图片、视频、文档等文件类型
- 用户目录: 通过实时 API 集成查找用户和群组
- 群组/分类目录: 浏览和搜索论坛分类
- @提及支持: 检测和处理消息中的提及
- 消息编辑: 发送后编辑帖子和评论
- 消息删除: 删除帖子和评论
- 错误处理: 强大的错误处理机制,包含重试逻辑和详细日志
- 输入指示器: 机器人处理时的视觉反馈(通过反应)
License
MIT
