{"_id":"@archermindim/openclaw-channel","name":"@archermindim/openclaw-channel","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@archermindim/openclaw-channel","version":"1.0.0","description":"OpenIM channel plugin for OpenClaw gateway","license":"AGPL-3.0-only","author":{"name":"blooming"},"repository":{"type":"git","url":"git+https://github.com/openimsdk/openclaw-channel.git"},"homepage":"https://github.com/openimsdk/openclaw-channel#readme","bugs":{"url":"https://github.com/openimsdk/openclaw-channel/issues"},"publishConfig":{"access":"public"},"type":"module","main":"./dist/index.js","exports":"./dist/index.js","openclaw":{"extensions":["./dist/index.js"],"channel":{"id":"openim","label":"OpenIM","selectionLabel":"OpenIM","docsPath":"/channels/openim","blurb":"OpenIM protocol channel via @openim/client-sdk","order":86,"aliases":["openim","archermindim","im"]}},"scripts":{"build":"tsc","test:connect":"tsx scripts/test-connect.ts","prepublishOnly":"npm run build"},"dependencies":{"@clack/prompts":"^1.0.0","@openim/client-sdk":"^3.8.3"},"peerDependencies":{"clawdbot":"*","openclaw":"*"},"peerDependenciesMeta":{"clawdbot":{"optional":true},"openclaw":{"optional":true}},"devDependencies":{"@types/node":"^22.0.0","tsx":"^4.0.0","typescript":"^5.4.0"},"engines":{"node":">=22"},"_id":"@archermindim/openclaw-channel@1.0.0","gitHead":"6abfd099c180de5767eab289cc4b2b7d58cf6266","types":"./dist/index.d.ts","_nodeVersion":"22.22.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-7cWrH8PLb1zDU0Tdno+BxvlR7Fc4N0vnsEoagh59Q737RSw71EyczyreDk/+B1/vX54H1BqdDWUvezZR9O+J+w==","shasum":"e603bf689cdec3f9e50c2c1fe6af2457447664e5","tarball":"https://registry.npmjs.org/@archermindim/openclaw-channel/-/openclaw-channel-1.0.0.tgz","fileCount":29,"unpackedSize":60490,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBUtA/EjHv3dptCs5IY9wRURW4nzX2XkTQl1RYSYcHGgAiEAuJEA5zWhh4K8pyqcjz7dq+hTxrMq2Ay+Rn6S1S3/+/g="}]},"_npmUser":{"name":"justrewo","email":"99001718@qq.com"},"directories":{},"maintainers":[{"name":"justrewo","email":"99001718@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/openclaw-channel_1.0.0_1774012080271_0.8741498204479348"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-20T13:08:00.203Z","1.0.0":"2026-03-20T13:08:00.432Z","modified":"2026-03-20T13:08:00.611Z"},"maintainers":[{"name":"justrewo","email":"99001718@qq.com"}],"description":"OpenIM channel plugin for OpenClaw gateway","homepage":"https://github.com/openimsdk/openclaw-channel#readme","repository":{"type":"git","url":"git+https://github.com/openimsdk/openclaw-channel.git"},"author":{"name":"blooming"},"bugs":{"url":"https://github.com/openimsdk/openclaw-channel/issues"},"license":"AGPL-3.0-only","readme":"# @archermindim/openclaw-channel\n\nOpenClaw Gateway 的 OpenIM 渠道插件。\n\nEnglish documentation: [README.md](https://github.com/openimsdk/openclaw-channel/blob/main/README.md)\n\n## 功能\n\n- 支持私聊与群聊\n- 支持文本/图片/文件消息的收发\n- `openim_send_video` 按文件消息发送（不使用 OpenIM 视频消息）\n- 支持引用消息解析（用于入站上下文）\n- 支持多账号并发（`channels.openim.accounts.<id>`）\n- 支持群聊仅 @ 触发\n- 提供交互式配置命令：`openclaw archermindim setup`\n\n## 安装\n\n从 npm 安装：\n\n```bash\nopenclaw plugins install @archermindim/openclaw-channel\n```\n\n本地路径安装：\n\n```bash\nopenclaw plugins install /path/to/openclaw-channel\n```\n\n仓库地址：https://github.com/openimsdk/openclaw-channel\n\n## 标识说明\n\n- npm 包名：`@archermindim/openclaw-channel`\n- 插件 id：`openclaw-channel`（用于 `plugins.entries` / `plugins.allow`）\n- 渠道 id：`openim`（用于 `channels.openim`）\n- 配置命令：`openclaw archermindim setup`\n\n## 配置\n\n### 方式一：交互式配置（推荐）\n\n```bash\nopenclaw archermindim setup\n```\n\n### 方式二：手动编辑 `~/.openclaw/openclaw.json`\n\n```json\n{\n  \"channels\": {\n    \"openim\": {\n      \"accounts\": {\n        \"default\": {\n          \"enabled\": true,\n          \"token\": \"your_token\",\n          \"wsAddr\": \"ws://127.0.0.1:10001\",\n          \"apiAddr\": \"http://127.0.0.1:10002\"\n        }\n      }\n    }\n  }\n}\n```\n\n`userID` 和 `platformID` 为可选项，未填写时会自动从 JWT token 的 `UserID` / `PlatformID` 声明解析。\n\n`requireMention` 为可选项，默认 `true`。\n\n`inboundWhitelist` 为可选项，不填或为空时保持当前逻辑；填了后仅处理白名单用户触发的消息：\n- 给账号发单聊消息\n- 在群里 @ 账号的消息\n\n支持单账号兜底写法（不使用 `accounts`）。\n\n`default` 账号支持环境变量兜底：\n\n- `OPENIM_TOKEN`\n- `OPENIM_WS_ADDR`\n- `OPENIM_API_ADDR`\n\n可选环境变量覆盖项：\n\n- `OPENIM_USER_ID`\n- `OPENIM_PLATFORM_ID`\n\n## Agent 工具\n\n- `openim_send_text`\n  - `target`: `user:<id>` 或 `group:<id>`\n  - `text`: 文本内容\n  - `accountId`（可选）：指定发送账号\n\n- `openim_send_image`\n  - `target`: `user:<id>` 或 `group:<id>`\n  - `image`: 本地路径（支持 `file://`）或 `http(s)` URL\n  - `accountId`（可选）：指定发送账号\n\n- `openim_send_video`\n  - `target`: `user:<id>` 或 `group:<id>`\n  - `video`: 本地路径（支持 `file://`）或 `http(s)` URL\n  - 行为：按文件消息发送（不是视频消息）\n  - `name`（可选）：URL 输入时覆盖文件名\n  - `accountId`（可选）：指定发送账号\n\n- `openim_send_file`\n  - `target`: `user:<id>` 或 `group:<id>`\n  - `file`: 本地路径（支持 `file://`）或 `http(s)` URL\n  - `name`（可选）：URL 输入时覆盖文件名\n  - `accountId`（可选）：指定发送账号\n\n## 开发\n\n```bash\npnpm run build\npnpm run test:connect\n```\n\n运行 `test:connect` 前请先配置 `.env`（参考 `.env.example`）。\n\n## 许可证\n\n本项目采用 `AGPL-3.0-only` 许可证。详见 [LICENSE](https://github.com/openimsdk/openclaw-channel/blob/main/LICENSE)。\n","readmeFilename":"README.zh-CN.md","_rev":"1-ba6d7de3fc08d0758c86476aed60fef2"}