@cloudrise/openclaw-channel-rocketchat 0.1.16 → 0.2.0
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/CHANGELOG.md +28 -0
- package/README.md +23 -4
- package/index.ts +1 -1
- package/openclaw.plugin.json +2 -2
- package/package.json +1 -1
- package/src/channel.ts +25 -4
- package/src/rocketchat/send.ts +9 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.2.0] - 2026-02-15
|
|
4
|
+
|
|
5
|
+
### ⚠️ Breaking Changes
|
|
6
|
+
|
|
7
|
+
- **Plugin id changed** from `rocketchat` to `openclaw-channel-rocketchat` to align with OpenClaw's package-derived id convention and fix the "plugin id mismatch" warning spam ([#1](https://github.com/cloudrise-network/openclaw-channel-rocketchat/issues/1))
|
|
8
|
+
|
|
9
|
+
**Required config update:**
|
|
10
|
+
```yaml
|
|
11
|
+
plugins:
|
|
12
|
+
entries:
|
|
13
|
+
openclaw-channel-rocketchat: # ← was "rocketchat"
|
|
14
|
+
enabled: true
|
|
15
|
+
|
|
16
|
+
channels:
|
|
17
|
+
rocketchat: # ← stays the same
|
|
18
|
+
...
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## [0.1.16] - 2026-02-08
|
|
22
|
+
|
|
23
|
+
- DM delivery fix: subscribe to all rooms including DMs (removed `open !== false` filter)
|
|
24
|
+
- Various stability improvements
|
|
25
|
+
|
|
26
|
+
## [0.1.0] - 2026-01-31
|
|
27
|
+
|
|
28
|
+
- Initial OpenClaw release (ported from @cloudrise/clawdbot-channel-rocketchat)
|
package/README.md
CHANGED
|
@@ -8,7 +8,26 @@ Neutral, self-host friendly Rocket.Chat channel plugin for **OpenClaw** (Cloudri
|
|
|
8
8
|
- **Inbound:** Rocket.Chat Realtime (DDP/WebSocket) subscribe to `stream-room-messages`
|
|
9
9
|
- **Outbound:** Rocket.Chat REST `chat.postMessage`
|
|
10
10
|
|
|
11
|
-
## Upgrade
|
|
11
|
+
## Upgrade notices
|
|
12
|
+
|
|
13
|
+
### v0.2.0+ — plugin id change
|
|
14
|
+
|
|
15
|
+
The plugin id changed from `rocketchat` to `openclaw-channel-rocketchat` to align with OpenClaw's package-derived id convention and eliminate the "plugin id mismatch" warning.
|
|
16
|
+
|
|
17
|
+
**Update your config:**
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
plugins:
|
|
21
|
+
entries:
|
|
22
|
+
openclaw-channel-rocketchat: # ← was "rocketchat"
|
|
23
|
+
enabled: true
|
|
24
|
+
|
|
25
|
+
channels:
|
|
26
|
+
rocketchat: # ← stays the same (channel id ≠ plugin id)
|
|
27
|
+
...
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Clawdbot → OpenClaw migration
|
|
12
31
|
|
|
13
32
|
If you were using the old Clawdbot-era package:
|
|
14
33
|
|
|
@@ -37,7 +56,7 @@ plugins:
|
|
|
37
56
|
source: npm
|
|
38
57
|
spec: "@cloudrise/openclaw-channel-rocketchat"
|
|
39
58
|
entries:
|
|
40
|
-
rocketchat:
|
|
59
|
+
openclaw-channel-rocketchat:
|
|
41
60
|
enabled: true
|
|
42
61
|
|
|
43
62
|
channels:
|
|
@@ -125,7 +144,7 @@ plugins:
|
|
|
125
144
|
source: npm
|
|
126
145
|
spec: "@cloudrise/openclaw-channel-rocketchat"
|
|
127
146
|
entries:
|
|
128
|
-
rocketchat:
|
|
147
|
+
openclaw-channel-rocketchat:
|
|
129
148
|
enabled: true
|
|
130
149
|
```
|
|
131
150
|
|
|
@@ -137,7 +156,7 @@ plugins:
|
|
|
137
156
|
paths:
|
|
138
157
|
- /absolute/path/to/node_modules/@cloudrise/openclaw-channel-rocketchat
|
|
139
158
|
entries:
|
|
140
|
-
rocketchat:
|
|
159
|
+
openclaw-channel-rocketchat:
|
|
141
160
|
enabled: true
|
|
142
161
|
```
|
|
143
162
|
|
package/index.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { setRocketChatRuntime } from "./src/runtime.js";
|
|
|
15
15
|
export { reactMessageRocketChat, sendMessageRocketChat } from "./src/rocketchat/send.js";
|
|
16
16
|
|
|
17
17
|
const plugin = {
|
|
18
|
-
id: "rocketchat",
|
|
18
|
+
id: "openclaw-channel-rocketchat",
|
|
19
19
|
name: "Rocket.Chat",
|
|
20
20
|
description: "Rocket.Chat channel plugin for OpenClaw",
|
|
21
21
|
configSchema: emptyPluginConfigSchema(),
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
package/src/channel.ts
CHANGED
|
@@ -52,17 +52,38 @@ function formatAllowEntry(entry: string): string {
|
|
|
52
52
|
|
|
53
53
|
function looksLikeRocketChatTargetId(value: string): boolean {
|
|
54
54
|
const trimmed = value.trim();
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
const lower = trimmed.toLowerCase();
|
|
56
|
+
|
|
57
|
+
// Rocket.Chat room IDs vary by deployment.
|
|
58
|
+
// Common lengths are 17 (token-ish) and 24 (Mongo ObjectId), but allow growth.
|
|
59
|
+
if (/^[A-Za-z0-9]{17,64}$/.test(trimmed)) return true;
|
|
60
|
+
|
|
57
61
|
if (trimmed.startsWith("#") || trimmed.startsWith("@")) return true;
|
|
58
|
-
if (
|
|
59
|
-
if (
|
|
62
|
+
if (lower.startsWith("room:")) return true;
|
|
63
|
+
if (lower.startsWith("user:")) return true;
|
|
64
|
+
|
|
65
|
+
// OpenClaw may provide channel-local targets like "rocketchat:<rid>"
|
|
66
|
+
if (lower.startsWith("rocketchat:")) {
|
|
67
|
+
const rest = trimmed.slice("rocketchat:".length).trim();
|
|
68
|
+
if (/^[A-Za-z0-9]{17,64}$/.test(rest)) return true;
|
|
69
|
+
}
|
|
70
|
+
|
|
60
71
|
return false;
|
|
61
72
|
}
|
|
62
73
|
|
|
63
74
|
function normalizeRocketChatMessagingTarget(raw: string): string {
|
|
64
75
|
const trimmed = raw.trim();
|
|
65
76
|
if (!trimmed) return "";
|
|
77
|
+
|
|
78
|
+
// Normalize OpenClaw-style prefixed targets to Rocket.Chat canonical forms.
|
|
79
|
+
// e.g. "rocketchat:<rid>" -> "room:<rid>"
|
|
80
|
+
const lower = trimmed.toLowerCase();
|
|
81
|
+
if (lower.startsWith("rocketchat:")) {
|
|
82
|
+
const rest = trimmed.slice("rocketchat:".length).trim();
|
|
83
|
+
if (/^[A-Za-z0-9]{17,64}$/.test(rest)) return `room:${rest}`;
|
|
84
|
+
return rest;
|
|
85
|
+
}
|
|
86
|
+
|
|
66
87
|
return trimmed;
|
|
67
88
|
}
|
|
68
89
|
|
package/src/rocketchat/send.ts
CHANGED
|
@@ -84,6 +84,13 @@ function parseRocketChatTarget(raw: string): RocketChatTarget {
|
|
|
84
84
|
|
|
85
85
|
const lower = trimmed.toLowerCase();
|
|
86
86
|
|
|
87
|
+
// rocketchat:ID (OpenClaw sometimes uses this format)
|
|
88
|
+
if (lower.startsWith("rocketchat:")) {
|
|
89
|
+
const id = trimmed.slice("rocketchat:".length).trim();
|
|
90
|
+
if (!id) throw new Error("Room id is required for Rocket.Chat sends");
|
|
91
|
+
return { kind: "room", id };
|
|
92
|
+
}
|
|
93
|
+
|
|
87
94
|
// room:ID format
|
|
88
95
|
if (lower.startsWith("room:")) {
|
|
89
96
|
const id = trimmed.slice("room:".length).trim();
|
|
@@ -113,8 +120,8 @@ function parseRocketChatTarget(raw: string): RocketChatTarget {
|
|
|
113
120
|
}
|
|
114
121
|
|
|
115
122
|
// Default to channel name (could also be room ID)
|
|
116
|
-
|
|
117
|
-
|
|
123
|
+
// Room IDs vary by deployment; commonly 17-char tokens or 24-char Mongo ObjectIds, but allow growth.
|
|
124
|
+
if (trimmed.includes("/") || /^[A-Za-z0-9]{17,64}$/.test(trimmed)) {
|
|
118
125
|
return { kind: "room", id: trimmed };
|
|
119
126
|
}
|
|
120
127
|
|