@ascegu/teamily 1.0.17 → 1.0.19

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Teamily Channel Plugin for OpenClaw
2
2
 
3
- Integrates [Teamily](https://teamily.ai/) (based on OpenIM) with OpenClaw as a self-hosted team messaging channel.
3
+ Integrates [Teamily](https://teamily.ai/) with OpenClaw as a self-hosted team messaging channel.
4
4
 
5
5
  ## Installation
6
6
 
@@ -28,9 +28,9 @@ openclaw channel configure teamily
28
28
 
29
29
  | Field | Description | Default |
30
30
  |---------------|--------------------------|---------------------------|
31
- | `platformUrl` | Teamily platform URL | `http://localhost:10002` |
32
- | `apiURL` | Teamily REST API URL | `http://localhost:10002` |
33
- | `wsURL` | Teamily WebSocket URL | `ws://localhost:10001` |
31
+ | `platformUrl` | Teamily platform URL | `https://imserver-test.teamily.ai/im_api` |
32
+ | `apiURL` | Teamily REST API URL | `https://imserver-test.teamily.ai/im_api` |
33
+ | `wsURL` | Teamily WebSocket URL | `wss://imserver-test.teamily.ai/msg_gateway` |
34
34
 
35
35
  ### Bot Account Settings
36
36
 
@@ -57,9 +57,9 @@ channels:
57
57
  teamily:
58
58
  enabled: true
59
59
  server:
60
- platformUrl: http://your-server:10002
61
- apiURL: http://your-server:10002
62
- wsURL: ws://your-server:10001
60
+ platformUrl: https://imserver-test.teamily.ai/im_api
61
+ apiURL: https://imserver-test.teamily.ai/im_api
62
+ wsURL: wss://imserver-test.teamily.ai/msg_gateway
63
63
  accounts:
64
64
  default:
65
65
  userID: "bot-user-id"
@@ -100,8 +100,8 @@ Supported media types are auto-detected by file extension:
100
100
 
101
101
  ## Group Chat Behavior
102
102
 
103
- - The bot only **replies** to messages where it is **@-mentioned** (`@BotName`).
104
- - Non-@-mention group messages are **buffered in memory** (up to 50 per group) and injected as conversation context when an @-mention triggers a reply. The buffer is cleared after each dispatch so context doesn't repeat.
103
+ - All group messages are received and dispatched to the agent for context accumulation.
104
+ - The bot only **replies** when it is **@-mentioned** in the group (`@BotName`).
105
105
  - In direct messages, the bot always replies.
106
106
  - Both regular groups (`sessionType=3`) and super groups (`sessionType=2`) are supported.
107
107
 
@@ -114,7 +114,6 @@ Supported media types are auto-detected by file extension:
114
114
  | Text messages | Yes |
115
115
  | Media (image/video/audio/file) | Yes |
116
116
  | @-mention gating (groups) | Yes |
117
- | Group history context (50 msg buffer) | Yes |
118
117
  | WebSocket real-time monitoring | Yes |
119
118
  | Automatic reconnection | Yes |
120
119
  | Connection health probes | Yes |
@@ -122,12 +121,6 @@ Supported media types are auto-detected by file extension:
122
121
  | Threads | No |
123
122
  | Polls | No |
124
123
 
125
- ## Setting Up Teamily Server
126
-
127
- 1. **Deploy OpenIM server** -- follow the [OpenIM Quick Start](https://docs.openim.io/guides/gettingStarted/introduction) guide.
128
- 2. **Create a bot user** -- use the Teamily management API to create a bot account and obtain its `userID` and `token`.
129
- 3. **Configure OpenClaw** -- run `openclaw channel configure teamily` and provide the server URLs and bot credentials.
130
-
131
124
  ## Architecture
132
125
 
133
126
  ```
@@ -144,10 +137,6 @@ src/
144
137
  send.ts REST API message/media send (fallback path)
145
138
  ```
146
139
 
147
- ## Compatibility
148
-
149
- Designed for OpenIM API v2/v3. Requires `@openim/client-sdk` ^3.8.3.
150
-
151
140
  ## License
152
141
 
153
142
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ascegu/teamily",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "OpenClaw Teamily channel plugin - Team instant messaging server integration",
5
5
  "keywords": [
6
6
  "channel",
package/src/channel.ts CHANGED
@@ -262,9 +262,17 @@ export const teamilyPlugin: ChannelPlugin<ResolvedTeamilyAccount> = {
262
262
 
263
263
  const historyKey = isGroup ? `teamily:group:${message.recvID}` : undefined;
264
264
 
265
- // In group chats, buffer non-@-mention messages for context and skip dispatch.
266
- // Only @-mention messages are dispatched to the agent, with the buffer injected.
267
- if (isGroup && !message.isAtSelf) {
265
+ // In group chats, buffer non-@-mention text-only messages for context.
266
+ // Media messages (picture/video/audio) are always dispatched OpenIM sends
267
+ // @-mention text and media as separate messages, so a PICTURE following an
268
+ // AT_TEXT won't have isAtSelf=true. Dispatching media keeps group image
269
+ // handling consistent with DM behavior.
270
+ const hasMedia = !!(
271
+ message.content?.picture ||
272
+ message.content?.video ||
273
+ message.content?.audio
274
+ );
275
+ if (isGroup && !message.isAtSelf && !hasMedia) {
268
276
  if (historyKey && rawText) {
269
277
  recordPendingHistoryEntryIfEnabled({
270
278
  historyMap: groupHistories,