clawgram 2.19.3 → 2.19.4

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/dist/channel.js CHANGED
@@ -200,9 +200,25 @@ exports.CORE_ACTION_SYNONYMS = {
200
200
  "channel-info": "chatInfo",
201
201
  "member-info": "participants",
202
202
  "download-file": "fetch-media",
203
+ // Chat management. `kick` was already accepted; the rest were advertised
204
+ // under names core does not know and were therefore never callable from the
205
+ // tool at all — 2.19.4 gives them core's nearest name. `transferOwnership`
206
+ // and `inviteLink` have no counterpart in that vocabulary and stay
207
+ // gateway-only, as does `joins`.
208
+ "channel-create": "createGroup",
209
+ addParticipant: "addMembers",
210
+ kick: "removeMember",
211
+ "role-add": "promoteAdmin",
212
+ "role-remove": "demoteAdmin",
203
213
  };
204
214
  /** Canonical management action for every accepted spelling. */
205
215
  const MANAGE_ACTION_ALIASES = {
216
+ // Core's spellings first — these are the only ones the agent's tool can
217
+ // reach; see CORE_ACTION_SYNONYMS.
218
+ "channel-create": "createGroup",
219
+ addParticipant: "addMembers",
220
+ "role-add": "promoteAdmin",
221
+ "role-remove": "demoteAdmin",
206
222
  createGroup: "createGroup",
207
223
  createChat: "createGroup",
208
224
  "create-group": "createGroup",
@@ -429,12 +445,12 @@ const createChannelPlugin = (runtimes, pluginRuntime) => {
429
445
  "Explicit targets may be @username, numeric Telegram user id, phone/contact resolvable by Telegram, group chat ids, or clawgram:<target>.",
430
446
  "For Telegram forum topics, send to the group chat id and pass the topic id separately as `threadId`.",
431
447
  "Use the `react` action to acknowledge a message with an emoji instead of sending a reply; pass an empty `emoji` (or `remove: true`) to take the reaction back.",
432
- "Use the `channel-info` action (clawgram also answers to `chatInfo`) to learn what a chat is — title, type, member count, description, pinned message — instead of guessing from its id.",
448
+ "Use the `channel-info` action to learn what a chat is — title, type, member count, description, pinned message — instead of guessing from its id. Name the chat with `chatId` and do not pass `target`: core refuses it for this action, and the descriptive spelling `chatInfo` is not callable from this tool at all.",
433
449
  "Use the `thread-list` action to list a forum's topics by name (optional `query` narrows by title); that is where a `threadId` comes from when someone names a topic instead of quoting a message in it. Name the chat with `chatId` and do not pass `target` — core refuses it for this action. `topics` is the same call under a name core does not know, and is only reachable through the gateway RPC.",
434
450
  "Pass that `threadId` to `read` as well: without it a forum read returns every topic interleaved rather than the one that was asked about.",
435
- "Use the `download-file` action (or its alias `fetch-media`) to fetch the attachment on a message `read` reported. Name the chat with `chatId` and the message with `messageId`; do not pass `target` — core refuses it for this action: `mode: \"read\"` returns a description of an image or a transcript of a voice note, `\"file\"` returns a path to reuse, `\"both\"` (default) returns both. `read` only says an attachment exists; this is what brings it.",
436
- "Use the `channel-list` action (clawgram also answers to `dialogs`) to find out which group chats this account is actually in — including ones nobody has configured yet. It reports id, title and type only, never direct chats, and only when the account enables `discoverChats`.",
437
- "Use `member-info` with a `chatId` to list who is in a chat; `joins` has no name in core's vocabulary and is reachable only through the gateway RPC.",
451
+ "Use the `download-file` action to fetch the attachment on a message `read` reported. Name the chat with `chatId` and the message with `messageId`; do not pass `target` — core refuses it for this action: `mode: \"read\"` returns a description of an image or a transcript of a voice note, `\"file\"` returns a path to reuse, `\"both\"` (default) returns both. `read` only says an attachment exists; this is what brings it.",
452
+ "Use the `channel-list` action to find out which group chats this account is actually in — including ones nobody has configured yet. It reports id, title and type only, never direct chats, and only when the account enables `discoverChats`.",
453
+ "Use `member-info` with a `chatId` to list who is in a chat, and `kick` with a `chatId` and `userId` to remove someone from a managed chat. The rest of the chat-management family and `joins` have no name core knows, so they are reachable only through the gateway RPC, not from this tool.",
438
454
  "Use `createGroup` (title, optional about, optional users) to create a new Telegram supergroup; `addMembers`/`removeMember` change who is in a managed chat, `promoteAdmin`/`demoteAdmin` grant or revoke admin rights, `transferOwnership` hands the chat over, `inviteLink` issues an invite link for people Telegram refused to add directly.",
439
455
  ],
440
456
  messageToolCapabilities: () => [
@@ -442,10 +458,10 @@ const createChannelPlugin = (runtimes, pluginRuntime) => {
442
458
  "clawgram can send text messages to direct chats and groups from the connected personal account.",
443
459
  "clawgram supports Telegram forum topics via the `threadId` parameter on group sends.",
444
460
  "clawgram can add and clear emoji reactions on messages. A plain Telegram account holds one reaction per message, so a new emoji replaces the previous one.",
445
- "clawgram can describe a chat via `chatInfo`: title, type (direct/group/supergroup/channel), member count, description, whether it is a forum, and the pinned message id.",
446
- "clawgram can list the topics of a forum supergroup via `topics`: id, title, last message, and whether a topic is closed, hidden or pinned.",
447
- "clawgram can fetch the attachment on any message inside its read scope via `fetch-media`: images come back described, voice notes transcribed, and either can be returned as a file path for reuse.",
448
- "clawgram can list the group chats the account belongs to via `dialogs`, when the account sets discoverChats. Metadata only, no direct chats — it answers \"where am I\", not \"what was said\".",
461
+ "clawgram can describe a chat via `channel-info`: title, type (direct/group/supergroup/channel), member count, description, whether it is a forum, and the pinned message id.",
462
+ "clawgram can list the topics of a forum supergroup via `thread-list`: id, title, last message, and whether a topic is closed, hidden or pinned.",
463
+ "clawgram can fetch the attachment on any message inside its read scope via `download-file`: images come back described, voice notes transcribed, and either can be returned as a file path for reuse.",
464
+ "clawgram can list the group chats the account belongs to via `channel-list`, when the account sets discoverChats. Metadata only, no direct chats — it answers \"where am I\", not \"what was said\".",
449
465
  "clawgram can manage chats where the account's manageChats config allows it: create supergroups, add and remove members, promote and demote admins, transfer ownership, and export invite links.",
450
466
  ],
451
467
  },
@@ -1412,32 +1428,40 @@ const createChannelPlugin = (runtimes, pluginRuntime) => {
1412
1428
  // Leaving it out does not degrade to a text send: the agent simply
1413
1429
  // never sees a way to send the file, announces it in words, and the
1414
1430
  // file stays on disk. That is exactly what happened on 2026-08-07.
1431
+ // Only names core already knows. An action outside
1432
+ // `CHANNEL_MESSAGE_ACTION_NAMES` cannot be called from the agent's
1433
+ // `message` tool at all — it is simultaneously "requires a target"
1434
+ // and "does not accept a target" — so advertising one is handing the
1435
+ // agent a trap. It cost a broken reply in a live chat on 2026-08-31:
1436
+ // the agent picked the descriptive `chatInfo`, got both halves of
1437
+ // the contradiction, and the turn ended in `✉️ Message failed`.
1438
+ //
1439
+ // The descriptive spellings (`topics`, `dialogs`, `chatInfo`,
1440
+ // `participants`, `joins`, `fetch-media`, the manage family) still
1441
+ // work in `handleAction`, so gateway RPC and existing skills keep
1442
+ // calling them — RPC does not consult this list. They are simply not
1443
+ // offered to the agent, which has no way to use them.
1444
+ //
1445
+ // `upload-file` is what core dispatches when an agent has an
1446
+ // attachment to deliver — a generated image is the common case.
1447
+ // Leaving it out does not degrade to a text send: the agent simply
1448
+ // never sees a way to send the file, announces it in words, and the
1449
+ // file stays on disk. That is exactly what happened on 2026-08-07.
1450
+ //
1451
+ // `kick` is core's name for `removeMember`; the rest of the manage
1452
+ // family has no core equivalent and stays gateway-only until it gets
1453
+ // one. `joins` likewise.
1415
1454
  actions: [
1416
- "send", "read", "participants", "joins", "react", "chatInfo", "topics", "dialogs", "upload-file",
1417
- // Core's own names for four of the above. Without them the
1418
- // action is advertised and unreachable — see CORE_ACTION_SYNONYMS.
1419
- "thread-list", "channel-list", "channel-info", "member-info",
1455
+ "send", "read", "react", "upload-file",
1420
1456
  // Reading an attachment that is already in a chat. `read` reports
1421
1457
  // that a photo exists; this is what turns it into something the
1422
1458
  // agent can look at or pass on.
1423
- //
1424
- // Two names on purpose. `download-file` is core's own vocabulary
1425
- // (`CHANNEL_MESSAGE_ACTION_NAMES`), and core's target policy is
1426
- // keyed by that vocabulary: an action it does not know is both
1427
- // "requires a target" (`MESSAGE_ACTION_TARGET_MODE[action] !==
1428
- // "none"` is true for `undefined`) and "does not accept a target"
1429
- // (the same lookup defaults to `"none"` when a target is passed).
1430
- // That contradiction is unresolvable from the caller's side —
1431
- // measured on 2026-08-24, when the agent tried every combination
1432
- // and got one of the two errors each time. `download-file` is
1433
- // mapped to `"none"`, so it has no such contradiction;
1434
- // `fetch-media` stays as the descriptive name and is made usable
1435
- // by the alias declaration below.
1436
- "fetch-media", "download-file",
1459
+ "download-file",
1460
+ // Core's names for the chat-shaped reads see CORE_ACTION_SYNONYMS.
1461
+ "thread-list", "channel-list", "channel-info", "member-info",
1437
1462
  // Chat management (2.12.0) — gated by the account's manageChats
1438
1463
  // scope; without it every one of these is refused.
1439
- "createGroup", "addMembers", "removeMember",
1440
- "promoteAdmin", "demoteAdmin", "transferOwnership", "inviteLink",
1464
+ "channel-create", "addParticipant", "kick", "role-add", "role-remove",
1441
1465
  ],
1442
1466
  capabilities: [],
1443
1467
  mediaSourceParams: {
@@ -2,7 +2,7 @@
2
2
  "id": "clawgram",
3
3
  "name": "Clawgram",
4
4
  "description": "Clawgram — personal Telegram (MTProto userbot) channel for OpenClaw. Your AI assistant reads and responds as you.",
5
- "version": "2.19.3",
5
+ "version": "2.19.4",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawgram",
3
- "version": "2.19.3",
3
+ "version": "2.19.4",
4
4
  "description": "Clawgram — personal Telegram (MTProto userbot) channel for OpenClaw. Your AI assistant reads and responds as you.",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {