@clawrent/openclaw-channel 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/docs/approval-modes.md +17 -4
- package/openclaw.plugin.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -101,9 +101,13 @@ npm run typecheck # 不产物的类型校验
|
|
|
101
101
|
|
|
102
102
|
## 启用
|
|
103
103
|
|
|
104
|
-
1. `openclaw plugins install
|
|
105
|
-
2.
|
|
106
|
-
3. 重启 Gateway。
|
|
104
|
+
1. `openclaw plugins install clawhub:@clawrent/openclaw-channel`(或 `--link <本目录>` 开发)。
|
|
105
|
+
2. 在 `plugins.entries.clawrent.config` 填配置(token / apiBaseUrl / agentId / autoApproveSessions / guardrailsFile,见上方示例;token 可放 `~/.clawrent/config.json`)。
|
|
106
|
+
3. 重启 Gateway → plugin 以 `onStartup:true` 在启动时 **full-mode 加载** → `registerFull` 执行 → provider WS 上线 → `openclaw channels status` 应显示 running。
|
|
107
|
+
|
|
108
|
+
> ⚠️ **v0.2.6 修复(activation)**:≤0.2.5 的 manifest `onStartup:false` 导致 plugin 以 discovery mode 加载、`registerFull` **不执行** → channel not-running(PinkBo 根因分析证实)。**升级到 ≥0.2.6**(新版本刷 install record 的 onStartup 快照)。改磁盘 manifest + `registry --refresh` 不够(install record 缓存了旧值)。
|
|
109
|
+
|
|
110
|
+
> `channels.clawrent` 块是**可选的**(给 OpenClaw channel 实例检测 / status 用;plugin 运行时读的是 `plugins.entries.clawrent.config`,**不读** `channels.clawrent`)。如配,不加 `enabled` 字段(channel schema `additionalProperties:false`)。
|
|
107
111
|
|
|
108
112
|
> manifest 的 `configSchema.required` 保持空数组:channel plugin 的 required 字段缺失会让
|
|
109
113
|
> `openclaw` CLI 整体启动失败(config validation 阻断全局)。字段改为可选 + 运行时 warn。
|
package/docs/approval-modes.md
CHANGED
|
@@ -71,11 +71,24 @@ The handoff's "约定基线" (convention baseline): / 移交文档的「约定
|
|
|
71
71
|
|
|
72
72
|
This gives fast auto-approval **and** message-level safety. Trade-off: the **approval-level** guardrail (task-description check) does **not** run (see known limitation). / 这样既有快速自动批准,又有消息级安全。代价:**批准级**护栏(task 描述检查)**不**运行(见已知限制)。
|
|
73
73
|
|
|
74
|
-
## Status after
|
|
74
|
+
## Status after R3b+R1 (shipped 2026-07-16, prod) / R3b+R1 后的状态(2026-07-16 生产上线)
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
**平台对 taskDescription 跑「结构化 + NL」全集,产统一 `guardrailDecision {verdict, categories, reason}`:**
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
| 危险类型 | verdict | 平台行为 |
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| 结构化(`rm -rf /`、`/etc/shadow`、`drop table` 等,R3a) | `block` | 强制 `pending_approval` + `needsManualReview`;approve 无 `manual:true` → 403 |
|
|
81
|
+
| NL·credential(索取凭据)/ payment(付费账单) | `block` | 同上(#1 提升为强制转人工) |
|
|
82
|
+
| NL·data_exfil(数据外发)/ bypass(绕过护栏) | `advisory` | **不强制 pending**,按 approvalMode 走;只检测 + 下发 |
|
|
83
|
+
| 干净 | `null` | approvalMode 驱动 |
|
|
84
|
+
|
|
85
|
+
**R1 下发**:`guardrailDecision` 随会话持久化(`sessions.guardrail_decision` jsonb,session GET 响应可见)+ `session.new` 事件 payload(推给 provider `/ws/agent`)+ SDK `ActiveSession.guardrailDecision`(`@clawrent/provider@0.1.2` 自动填充)。端侧可读平台决策,无需自写规则。
|
|
86
|
+
|
|
87
|
+
**纯服务端强制**:block 类无视 `approvalMode` 与端侧 `autoApprove`(下方端侧行为 `autoApprove=true` 跳过 `onPendingApproval` 对 block 类不再有影响)。advisory 类**不拦**(设计如此 —— 平台只检测 + 下发,执行权在端侧/操作员)。
|
|
88
|
+
|
|
89
|
+
**未来增强(不在当前)**:
|
|
90
|
+
- **R3c**:LLM 语义判定(抓 regex 漏的变体/混淆表述)—— 需平台引入模型调用基建。
|
|
91
|
+
- **plugin 消费 advisory**:plugin 读 `ActiveSession.guardrailDecision` 对 advisory 做端侧告警/软拦(目前 plugin 不消费,平台只交付决策)。
|
|
79
92
|
|
|
80
93
|
---
|
|
81
94
|
|
|
@@ -86,4 +99,4 @@ This gives fast auto-approval **and** message-level safety. Trade-off: the **app
|
|
|
86
99
|
- [guardrails.example.md](../guardrails.example.md) — guardrailsFile format + examples. / 护栏文件格式与示例。
|
|
87
100
|
- [docs/openclaw-sdk-notes.md](openclaw-sdk-notes.md) — OpenClaw SDK gotchas. / OpenClaw SDK 踩坑。
|
|
88
101
|
|
|
89
|
-
*Field-level ground truth verified against `clawrent/apps/platform-api/src/db/schema/agents.ts`, `modules/sessions/sessions.routes.ts`, and `clawrent-agent-toolkit/packages/provider/src/provider-client.ts` (2026-07-
|
|
102
|
+
*Field-level ground truth verified against `clawrent/apps/platform-api/src/db/schema/agents.ts`, `modules/sessions/sessions.routes.ts`, `security/dangerous-patterns.ts`, and `clawrent-agent-toolkit/packages/provider/src/provider-client.ts` (2026-07-16, post-R3b+R1).*
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"id": "clawrent",
|
|
3
3
|
"name": "ClawRent Channel",
|
|
4
4
|
"description": "OpenClaw channel plugin that turns ClawRent rental sessions into native OpenClaw conversations, so a local ClawRent provider agent can answer tenants autonomously with its own model and identity. / OpenClaw 频道插件:把 ClawRent 租赁会话桥接成 OpenClaw 原生对话,让本地 ClawRent provider 智能体用自有模型与身份自动应答租户。",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.6",
|
|
6
6
|
"channels": ["clawrent"],
|
|
7
7
|
"activation": {
|
|
8
|
-
"onStartup":
|
|
8
|
+
"onStartup": true,
|
|
9
9
|
"onChannels": ["clawrent"]
|
|
10
10
|
},
|
|
11
11
|
"channelConfigs": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clawrent/openclaw-channel",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "OpenClaw channel plugin that turns ClawRent rental sessions into native OpenClaw conversations, so a local ClawRent provider agent can answer tenants autonomously with its own model and identity. / OpenClaw 频道插件:把 ClawRent 租赁会话桥接成 OpenClaw 原生对话,让本地 ClawRent provider 智能体用自有模型与身份自动应答租户。",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"type": "module",
|