@clawrent/openclaw-channel 0.3.3 → 0.3.5
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 +12 -0
- package/dist/provider.js +7 -6
- package/openclaw.plugin.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -176,6 +176,18 @@ After that the official package is the only `clawrent` resolution source. `plugi
|
|
|
176
176
|
|
|
177
177
|
之后官方包成为唯一 `clawrent` 解析源。`plugins.entries.clawrent.config` **无需改动**(官方包 manifest `id` 仍为 `clawrent`,配置 key 兼容)。
|
|
178
178
|
|
|
179
|
+
### Upgrade / 升级
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
openclaw plugins uninstall clawrent --force
|
|
183
|
+
openclaw plugins install @clawrent/openclaw-channel@<version>
|
|
184
|
+
openclaw gateway restart
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
> ⚠️ **`openclaw plugins uninstall --force` removes the `channels.clawrent` config block** from `~/.openclaw/openclaw.json` (including `agentId` / `autoApproveSessions` / `guardrailsFile` — **not the token**: the token always stays in `~/.clawrent/config.json`, credentials are unaffected). The subsequent `install` **does not recreate** that block. After upgrading, **verify `channels.clawrent` is still present**; if it was removed, restore it from the pre-uninstall backup (`openclaw.json.bak.*`) or re-fill it per the [Configuration](#configuration--配置) section (`agentId` can be left empty to auto-resolve from the token). Missing the block does not affect the provider coming online, but `autoApproveSessions` / `guardrailsFile` fall back to their defaults. This behavior stems from the OpenClaw CLI's `uninstall` design (reported upstream); the plugin cannot intercept it.
|
|
188
|
+
>
|
|
189
|
+
> ⚠️ **`openclaw plugins uninstall --force` 会删除 `channels.clawrent` 配置块**(含 `agentId` / `autoApproveSessions` / `guardrailsFile`,**不含 token** —— token 始终在 `~/.clawrent/config.json`,凭据不受影响),随后的 `install` **不会重建**该块。升级后**请检查 `channels.clawrent` 是否还在**;若被删,从卸载前的备份(`openclaw.json.bak.*`)恢复,或按[配置](#configuration--配置)章节重新填写(`agentId` 可留空由 token 自动解析)。缺失该块不影响 provider 上线,但 `autoApproveSessions` / `guardrailsFile` 会回退默认值。此行为源自 OpenClaw CLI 的 uninstall 设计(已向上游反馈),插件侧无法干预。
|
|
190
|
+
|
|
179
191
|
## Design notes / 设计要点
|
|
180
192
|
|
|
181
193
|
- **WS push inbound**: receives pushes via `@clawrent/provider`'s `ProviderClient`; no polling, no CLI daemon.
|
package/dist/provider.js
CHANGED
|
@@ -50,6 +50,13 @@ export async function startProvider(opts) {
|
|
|
50
50
|
cursorStore: new FileCursorStore(opts.cursorPath),
|
|
51
51
|
autoApprove: opts.autoApprove,
|
|
52
52
|
});
|
|
53
|
+
// Surface presence self-heal events (SDK EventEmitter). These replace the dead
|
|
54
|
+
// onDisconnect/onError args previously passed to client.start() — ProviderCallbacks
|
|
55
|
+
// never had those fields, so they were silently ignored.
|
|
56
|
+
client.on('agent:reconnecting', (delay) => log(`presence reconnecting in ${delay}ms`));
|
|
57
|
+
client.on('agent:activated', () => log(`presence activated (online)`));
|
|
58
|
+
client.on('agent:activation:failed', (_aid, err) => log(`presence activation FAILED (terminal): ${err?.message ?? err}`));
|
|
59
|
+
client.on('agent:dead', (_aid, reason) => log(`presence DEAD — terminal close, will not reconnect: ${reason}`));
|
|
53
60
|
await client.start({
|
|
54
61
|
agentId: opts.agentId,
|
|
55
62
|
onPendingApproval: async (session) => {
|
|
@@ -72,12 +79,6 @@ export async function startProvider(opts) {
|
|
|
72
79
|
onSessionEnded: (session, reason) => {
|
|
73
80
|
log(`session ended: ${session?.sessionId} reason=${reason ?? ""}`);
|
|
74
81
|
},
|
|
75
|
-
onDisconnect: (info) => {
|
|
76
|
-
log(`disconnected: ${info?.reason ?? JSON.stringify(info)}`);
|
|
77
|
-
},
|
|
78
|
-
onError: (err) => {
|
|
79
|
-
log(`provider error: ${err?.message ?? JSON.stringify(err)}`);
|
|
80
|
-
},
|
|
81
82
|
onMessage: async (session, message) => {
|
|
82
83
|
const sessionId = session?.sessionId;
|
|
83
84
|
const rawType = String(message?.type ?? message?.messageType ?? "?");
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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.3.
|
|
5
|
+
"version": "0.3.5",
|
|
6
6
|
"channels": ["clawrent"],
|
|
7
7
|
"activation": {
|
|
8
8
|
"onStartup": false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clawrent/openclaw-channel",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
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",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"prepublishOnly": "npm run build"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@clawrent/provider": "^0.
|
|
49
|
+
"@clawrent/provider": "^0.2.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"openclaw": ">=2026.6.11"
|