first commit

This commit is contained in:
2026-02-28 23:01:30 +08:00
commit 3956ee4806
415 changed files with 74538 additions and 0 deletions

View File

@@ -0,0 +1,99 @@
---
read_when:
- 你想在插件中添加新的智能体工具
- 你需要通过允许列表使工具可选启用
summary: 在插件中编写智能体工具(模式、可选工具、允许列表)
title: 插件智能体工具
x-i18n:
generated_at: "2026-02-03T07:53:22Z"
model: claude-opus-4-5
provider: pi
source_hash: 4479462e9d8b17b664bf6b5f424f2efc8e7bedeaabfdb6a93126e051e635c659
source_path: plugins/agent-tools.md
workflow: 15
---
# 插件智能体工具
OpenClaw 插件可以注册**智能体工具**JSON 模式函数),这些工具在智能体运行期间暴露给 LLM。工具可以是**必需的**(始终可用)或**可选的**(选择启用)。
智能体工具在主配置的 `tools` 下配置,或在每个智能体的 `agents.list[].tools` 下配置。允许列表/拒绝列表策略控制智能体可以调用哪些工具。
## 基本工具
```ts
import { Type } from "@sinclair/typebox";
export default function (api) {
api.registerTool({
name: "my_tool",
description: "Do a thing",
parameters: Type.Object({
input: Type.String(),
}),
async execute(_id, params) {
return { content: [{ type: "text", text: params.input }] };
},
});
}
```
## 可选工具(选择启用)
可选工具**永远不会**自动启用。用户必须将它们添加到智能体允许列表中。
```ts
export default function (api) {
api.registerTool(
{
name: "workflow_tool",
description: "Run a local workflow",
parameters: {
type: "object",
properties: {
pipeline: { type: "string" },
},
required: ["pipeline"],
},
async execute(_id, params) {
return { content: [{ type: "text", text: params.pipeline }] };
},
},
{ optional: true },
);
}
```
`agents.list[].tools.allow`(或全局 `tools.allow`)中启用可选工具:
```json5
{
agents: {
list: [
{
id: "main",
tools: {
allow: [
"workflow_tool", // 特定工具名称
"workflow", // 插件 id启用该插件的所有工具
"group:plugins", // 所有插件工具
],
},
},
],
},
}
```
其他影响工具可用性的配置选项:
- 仅包含插件工具名称的允许列表被视为插件选择启用;核心工具保持启用,除非你在允许列表中也包含核心工具或组。
- `tools.profile` / `agents.list[].tools.profile`(基础允许列表)
- `tools.byProvider` / `agents.list[].tools.byProvider`(特定提供商的允许/拒绝)
- `tools.sandbox.tools.*`(沙箱隔离时的沙箱工具策略)
## 规则 + 提示
- 工具名称**不能**与核心工具名称冲突;冲突的工具会被跳过。
- 允许列表中使用的插件 id 不能与核心工具名称冲突。
- 对于触发副作用或需要额外二进制文件/凭证的工具,优先使用 `optional: true`

View File

@@ -0,0 +1,51 @@
---
summary: "Community plugins: quality bar, hosting requirements, and PR submission path"
read_when:
- You want to publish a third-party OpenClaw plugin
- You want to propose a plugin for docs listing
title: "Community plugins"
---
# Community plugins
This page tracks high-quality **community-maintained plugins** for OpenClaw.
We accept PRs that add community plugins here when they meet the quality bar.
## Required for listing
- Plugin package is published on npmjs (installable via `openclaw plugins install <npm-spec>`).
- Source code is hosted on GitHub (public repository).
- Repository includes setup/use docs and an issue tracker.
- Plugin has a clear maintenance signal (active maintainer, recent updates, or responsive issue handling).
## How to submit
Open a PR that adds your plugin to this page with:
- Plugin name
- npm package name
- GitHub repository URL
- One-line description
- Install command
## Review bar
We prefer plugins that are useful, documented, and safe to operate.
Low-effort wrappers, unclear ownership, or unmaintained packages may be declined.
## Candidate format
Use this format when adding entries:
- **Plugin Name** — short description
npm: `@scope/package`
repo: `https://github.com/org/repo`
install: `openclaw plugins install @scope/package`
## Listed plugins
- **WeChat** — Connect OpenClaw to WeChat personal accounts via WeChatPadPro (iPad protocol). Supports text, image, and file exchange with keyword-triggered conversations.
npm: `@icesword760/openclaw-wechat`
repo: `https://github.com/icesword0760/openclaw-wechat`
install: `openclaw plugins install @icesword760/openclaw-wechat`

View File

@@ -0,0 +1,68 @@
---
read_when:
- 你正在构建一个 OpenClaw 插件
- 你需要提供插件配置 Schema 或调试插件验证错误
summary: 插件清单及 JSON Schema 要求(严格配置验证)
title: 插件清单
x-i18n:
generated_at: "2026-02-01T21:34:21Z"
model: claude-opus-4-5
provider: pi
source_hash: 47b3e33c915f47bdd172ae0316af7ef16ca831c317e3f1a7fdfcd67e3bd43f56
source_path: plugins/manifest.md
workflow: 15
---
# 插件清单openclaw.plugin.json
每个插件都**必须**在**插件根目录**下提供一个 `openclaw.plugin.json` 文件。OpenClaw 使用此清单来**在不执行插件代码的情况下**验证配置。缺失或无效的清单将被视为插件错误,并阻止配置验证。
参阅完整的插件系统指南:[插件](/tools/plugin)。
## 必填字段
```json
{
"id": "voice-call",
"configSchema": {
"type": "object",
"additionalProperties": false,
"properties": {}
}
}
```
必填键:
- `id`(字符串):插件的规范 id。
- `configSchema`(对象):插件配置的 JSON Schema内联形式
可选键:
- `kind`(字符串):插件类型(例如:`"memory"`)。
- `channels`(数组):此插件注册的渠道 id例如`["matrix"]`)。
- `providers`(数组):此插件注册的提供商 id。
- `skills`(数组):要加载的 Skills 目录(相对于插件根目录)。
- `name`(字符串):插件的显示名称。
- `description`(字符串):插件简短描述。
- `uiHints`(对象):用于 UI 渲染的配置字段标签/占位符/敏感标志。
- `version`(字符串):插件版本(仅供参考)。
## JSON Schema 要求
- **每个插件都必须提供 JSON Schema**,即使不接受任何配置也是如此。
- 空 Schema 是可以接受的(例如 `{ "type": "object", "additionalProperties": false }`)。
- Schema 在配置读取/写入时进行验证,而非在运行时。
## 验证行为
- 未知的 `channels.*` 键会被视为**错误**,除非该渠道 id 已在插件清单中声明。
- `plugins.entries.<id>``plugins.allow``plugins.deny``plugins.slots.*` 必须引用**可发现的**插件 id。未知 id 会被视为**错误**。
- 如果插件已安装但清单或 Schema 损坏或缺失验证将失败Doctor 会报告插件错误。
- 如果插件配置存在但插件已**禁用**,配置会被保留,并在 Doctor 和日志中显示**警告**。
## 注意事项
- 清单对**所有插件**都是必需的,包括从本地文件系统加载的插件。
- 运行时仍然会单独加载插件模块;清单仅用于发现和验证。
- 如果你的插件依赖原生模块,请记录构建步骤以及所有包管理器允许列表要求(例如 pnpm 的 `allow-build-scripts` - `pnpm rebuild <package>`)。

View File

@@ -0,0 +1,250 @@
---
read_when:
- 你想从 OpenClaw 发起出站语音通话
- 你正在配置或开发 voice-call 插件
summary: Voice Call 插件:通过 Twilio/Telnyx/Plivo 进行出站 + 入站通话(插件安装 + 配置 + CLI
title: Voice Call 插件
x-i18n:
generated_at: "2026-02-03T07:53:40Z"
model: claude-opus-4-5
provider: pi
source_hash: d731c63bf52781cc49262db550d0507d7fc33e5e7ce5d87efaf5d44aedcafef7
source_path: plugins/voice-call.md
workflow: 15
---
# Voice Call插件
通过插件为 OpenClaw 提供语音通话。支持出站通知和带有入站策略的多轮对话。
当前提供商:
- `twilio`Programmable Voice + Media Streams
- `telnyx`Call Control v2
- `plivo`Voice API + XML transfer + GetInput speech
- `mock`(开发/无网络)
快速心智模型:
- 安装插件
- 重启 Gateway 网关
-`plugins.entries.voice-call.config` 下配置
- 使用 `openclaw voicecall ...``voice_call` 工具
## 运行位置(本地 vs 远程)
Voice Call 插件运行在 **Gateway 网关进程内部**
如果你使用远程 Gateway 网关,在**运行 Gateway 网关的机器**上安装/配置插件,然后重启 Gateway 网关以加载它。
## 安装
### 选项 A从 npm 安装(推荐)
```bash
openclaw plugins install @openclaw/voice-call
```
之后重启 Gateway 网关。
### 选项 B从本地文件夹安装开发不复制
```bash
openclaw plugins install ./extensions/voice-call
cd ./extensions/voice-call && pnpm install
```
之后重启 Gateway 网关。
## 配置
`plugins.entries.voice-call.config` 下设置配置:
```json5
{
plugins: {
entries: {
"voice-call": {
enabled: true,
config: {
provider: "twilio", // 或 "telnyx" | "plivo" | "mock"
fromNumber: "+15550001234",
toNumber: "+15550005678",
twilio: {
accountSid: "ACxxxxxxxx",
authToken: "...",
},
plivo: {
authId: "MAxxxxxxxxxxxxxxxxxxxx",
authToken: "...",
},
// Webhook 服务器
serve: {
port: 3334,
path: "/voice/webhook",
},
// 公开暴露(选一个)
// publicUrl: "https://example.ngrok.app/voice/webhook",
// tunnel: { provider: "ngrok" },
// tailscale: { mode: "funnel", path: "/voice/webhook" }
outbound: {
defaultMode: "notify", // notify | conversation
},
streaming: {
enabled: true,
streamPath: "/voice/stream",
},
},
},
},
},
}
```
注意事项:
- Twilio/Telnyx 需要**可公开访问**的 webhook URL。
- Plivo 需要**可公开访问**的 webhook URL。
- `mock` 是本地开发提供商(无网络调用)。
- `skipSignatureVerification` 仅用于本地测试。
- 如果你使用 ngrok 免费版,将 `publicUrl` 设置为确切的 ngrok URL签名验证始终强制执行。
- `tunnel.allowNgrokFreeTierLoopbackBypass: true` 允许带有无效签名的 Twilio webhooks**仅当** `tunnel.provider="ngrok"``serve.bind` 是 loopbackngrok 本地代理)时。仅用于本地开发。
- Ngrok 免费版 URL 可能会更改或添加中间页面行为;如果 `publicUrl` 漂移Twilio 签名将失败。对于生产环境,优先使用稳定域名或 Tailscale funnel。
## 通话的 TTS
Voice Call 使用核心 `messages.tts` 配置OpenAI 或 ElevenLabs进行通话中的流式语音。你可以在插件配置下使用**相同的结构**覆盖它——它会与 `messages.tts` 深度合并。
```json5
{
tts: {
provider: "elevenlabs",
elevenlabs: {
voiceId: "pMsXgVXv3BLzUgSXRplE",
modelId: "eleven_multilingual_v2",
},
},
}
```
注意事项:
- **语音通话忽略 Edge TTS**(电话音频需要 PCMEdge 输出不可靠)。
- 当启用 Twilio 媒体流时使用核心 TTS否则通话回退到提供商原生语音。
### 更多示例
仅使用核心 TTS无覆盖
```json5
{
messages: {
tts: {
provider: "openai",
openai: { voice: "alloy" },
},
},
}
```
仅为通话覆盖为 ElevenLabs其他地方保持核心默认
```json5
{
plugins: {
entries: {
"voice-call": {
config: {
tts: {
provider: "elevenlabs",
elevenlabs: {
apiKey: "elevenlabs_key",
voiceId: "pMsXgVXv3BLzUgSXRplE",
modelId: "eleven_multilingual_v2",
},
},
},
},
},
},
}
```
仅为通话覆盖 OpenAI 模型(深度合并示例):
```json5
{
plugins: {
entries: {
"voice-call": {
config: {
tts: {
openai: {
model: "gpt-4o-mini-tts",
voice: "marin",
},
},
},
},
},
},
}
```
## 入站通话
入站策略默认为 `disabled`。要启用入站通话,设置:
```json5
{
inboundPolicy: "allowlist",
allowFrom: ["+15550001234"],
inboundGreeting: "Hello! How can I help?",
}
```
自动响应使用智能体系统。通过以下方式调整:
- `responseModel`
- `responseSystemPrompt`
- `responseTimeoutMs`
## CLI
```bash
openclaw voicecall call --to "+15555550123" --message "Hello from OpenClaw"
openclaw voicecall continue --call-id <id> --message "Any questions?"
openclaw voicecall speak --call-id <id> --message "One moment"
openclaw voicecall end --call-id <id>
openclaw voicecall status --call-id <id>
openclaw voicecall tail
openclaw voicecall expose --mode funnel
```
## 智能体工具
工具名称:`voice_call`
操作:
- `initiate_call`message、to?、mode?
- `continue_call`callId、message
- `speak_to_user`callId、message
- `end_call`callId
- `get_status`callId
此仓库在 `skills/voice-call/SKILL.md` 提供了配套的 skill 文档。
## Gateway 网关 RPC
- `voicecall.initiate``to?``message``mode?`
- `voicecall.continue``callId``message`
- `voicecall.speak``callId``message`
- `voicecall.end``callId`
- `voicecall.status``callId`

View File

@@ -0,0 +1,88 @@
---
read_when:
- 你想在 OpenClaw 中支持 Zalo Personal非官方
- 你正在配置或开发 zalouser 插件
summary: Zalo Personal 插件:通过 zca-cli 进行 QR 登录 + 消息(插件安装 + 渠道配置 + CLI + 工具)
title: Zalo Personal 插件
x-i18n:
generated_at: "2026-02-03T07:53:33Z"
model: claude-opus-4-5
provider: pi
source_hash: b29b788b023cd50720e24fe6719f02e9f86c8bca9c73b3638fb53c2316718672
source_path: plugins/zalouser.md
workflow: 15
---
# Zalo Personal插件
通过插件为 OpenClaw 提供 Zalo Personal 支持,使用 `zca-cli` 自动化普通 Zalo 用户账户。
> **警告:** 非官方自动化可能导致账户被暂停/封禁。使用风险自负。
## 命名
渠道 id 是 `zalouser`,以明确表示这是自动化**个人 Zalo 用户账户**(非官方)。我们保留 `zalo` 用于潜在的未来官方 Zalo API 集成。
## 运行位置
此插件**在 Gateway 网关进程内**运行。
如果你使用远程 Gateway 网关,请在**运行 Gateway 网关的机器**上安装/配置它,然后重启 Gateway 网关。
## 安装
### 选项 A从 npm 安装
```bash
openclaw plugins install @openclaw/zalouser
```
之后重启 Gateway 网关。
### 选项 B从本地文件夹安装开发
```bash
openclaw plugins install ./extensions/zalouser
cd ./extensions/zalouser && pnpm install
```
之后重启 Gateway 网关。
## 前置条件zca-cli
Gateway 网关机器必须在 `PATH` 中有 `zca`
```bash
zca --version
```
## 配置
渠道配置位于 `channels.zalouser` 下(不是 `plugins.entries.*`
```json5
{
channels: {
zalouser: {
enabled: true,
dmPolicy: "pairing",
},
},
}
```
## CLI
```bash
openclaw channels login --channel zalouser
openclaw channels logout --channel zalouser
openclaw channels status --probe
openclaw message send --channel zalouser --target <threadId> --message "Hello from OpenClaw"
openclaw directory peers list --channel zalouser --query "name"
```
## 智能体工具
工具名称:`zalouser`
操作:`send``image``link``friends``groups``me``status`