@acedatacloud/skills 2026.703.13 → 2026.703.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acedatacloud/skills",
3
- "version": "2026.703.13",
3
+ "version": "2026.703.15",
4
4
  "description": "Agent Skills for AceDataCloud AI services — music, image, video generation, LLM chat, web search. Compatible with Claude Code, GitHub Copilot, Gemini CLI, OpenAI Codex, and 30+ AI coding agents.",
5
5
  "keywords": [
6
6
  "agent-skills",
@@ -22,20 +22,33 @@ Privacy and Security → App Passwords**, NOT the account login password) and
22
22
  `$BLUESKY_SERVICE` (the PDS base URL, default `https://bsky.social`).
23
23
 
24
24
  Errors come back as JSON `{"error":"<name>","message":"<detail>"}` — show it
25
- verbatim. A `401 {"error":"AuthenticationRequired"}` on session creation means
26
- the handle or App Password is wrong/revoked the user must re-connect the
27
- Bluesky connector (or generate a fresh App Password).
25
+ verbatim. A `401 {"error":"AuthenticationRequired","message":"Invalid identifier
26
+ or password"}` on session creation means the identifier or App Password is
27
+ wrong/revoked. The **#1 cause is a bare handle**: the identifier must be the
28
+ FULL handle (`alice.bsky.social`), a DID, or the account email — a bare
29
+ `alice` will NOT resolve. Step 1 auto-appends `.bsky.social` to a bare handle
30
+ on the default PDS; if it still fails, the user must re-connect the Bluesky
31
+ connector with the full handle (or generate a fresh App Password).
28
32
 
29
33
  ## Step 1 — always create a session first
30
34
 
31
35
  Everything needs a short-lived `accessJwt` and your account `did`. Do this once
32
- per task and reuse the values:
36
+ per task and reuse the values. The identifier must be a full handle, DID or
37
+ email — normalize a bare username (no `.` / `@`) to `<name>.bsky.social` when
38
+ using the default PDS, otherwise `createSession` returns `AuthenticationRequired`:
33
39
 
34
40
  ```bash
35
41
  SVC="${BLUESKY_SERVICE:-https://bsky.social}"
42
+ ID="$BLUESKY_HANDLE"
43
+ # Bare username → full handle on the default bsky.social PDS. A dotted handle
44
+ # (custom domain), a DID (`did:...`) or an email are already valid — leave them.
45
+ case "$ID" in
46
+ *.* | *@* | did:*) : ;;
47
+ *) [ "$SVC" = "https://bsky.social" ] && ID="$ID.bsky.social" ;;
48
+ esac
36
49
  SESSION=$(curl -sS -X POST "$SVC/xrpc/com.atproto.server.createSession" \
37
50
  -H "Content-Type: application/json" \
38
- -d "$(jq -n --arg id "$BLUESKY_HANDLE" --arg pw "$BLUESKY_APP_PASSWORD" \
51
+ -d "$(jq -n --arg id "$ID" --arg pw "$BLUESKY_APP_PASSWORD" \
39
52
  '{identifier:$id, password:$pw}')")
40
53
  echo "$SESSION" | jq '{did, handle, active}'
41
54
  JWT=$(echo "$SESSION" | jq -r .accessJwt)
@@ -43,7 +56,9 @@ DID=$(echo "$SESSION" | jq -r .did)
43
56
  ```
44
57
 
45
58
  If `JWT` / `DID` are empty or `null`, print the raw `$SESSION` (it contains the
46
- error) and stop — do not continue to post.
59
+ error) and stop — do not continue to post. On `AuthenticationRequired`, tell the
60
+ user to reconnect the connector using their **full** handle (e.g.
61
+ `name.bsky.social`, not `name`) and a valid App Password.
47
62
 
48
63
  ## Post to Bluesky
49
64
 
@@ -64,8 +79,9 @@ curl -sS -X POST "$SVC/xrpc/com.atproto.repo.createRecord" \
64
79
  ```
65
80
 
66
81
  The returned `uri` looks like `at://did:plc:xxxx/app.bsky.feed.post/<rkey>`. The
67
- public web URL is `https://bsky.app/profile/$BLUESKY_HANDLE/post/<rkey>` where
68
- `<rkey>` is the last path segment of the `uri`.
82
+ public web URL is `https://bsky.app/profile/$ID/post/<rkey>` where `$ID` is the
83
+ normalized handle from Step 1 (or use the `did`) and `<rkey>` is the last path
84
+ segment of the `uri`.
69
85
 
70
86
  ### Clickable links, mentions and hashtags (facets)
71
87
 
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: telegram-bot
3
+ description: Publish to your Telegram channel/group via a bot using the official Telegram Bot API — send text or photo posts, edit and delete messages, and verify the bot's access to a chat. Use when the user wants to broadcast to a Telegram channel/group with a bot token (BotFather), cross-post an article, or manage the bot's posts. Distinct from the personal-account Telegram connector.
4
+ when_to_use: |
5
+ Trigger when the user wants a Telegram BOT to post to their channel / group:
6
+ send a text or photo message, edit or delete a message, or check that the bot
7
+ is an admin of the target chat. Auth is a bot token from @BotFather; the bot
8
+ must be an admin (with post rights) in the target channel/group. This acts as
9
+ the bot, so confirm the text and target chat_id before sending publicly.
10
+ connections: [telegrambot]
11
+ allowed_tools: [Bash]
12
+ license: Apache-2.0
13
+ metadata:
14
+ author: acedatacloud
15
+ version: "1.0"
16
+ ---
17
+
18
+ Call the **official Telegram Bot API** with `curl + jq`. The bot token is
19
+ injected as `$TELEGRAMBOT_BOT_TOKEN`; an optional default target chat is
20
+ `$TELEGRAMBOT_CHAT_ID` (e.g. `@your_channel` or a numeric id). Base URL:
21
+ `https://api.telegram.org/bot$TELEGRAMBOT_BOT_TOKEN/<METHOD>`.
22
+
23
+ Every response is JSON `{"ok":true,"result":...}` on success, or
24
+ `{"ok":false,"error_code":<n>,"description":"<msg>"}` on failure — always check
25
+ `.ok` and show `description` verbatim. Common failures: `401 Unauthorized` = bad/
26
+ revoked token (reconnect the connector), `400 Bad Request: chat not found` = wrong
27
+ chat_id, `403 Forbidden: bot is not a member of the channel chat` / `... need
28
+ administrator rights` = add the bot to the channel as an admin with post rights,
29
+ `429` with `parameters.retry_after` = rate-limited, wait that many seconds.
30
+
31
+ `chat_id` is `@channelusername` (public) or the numeric id (private channels/
32
+ groups, often negative like `-1001234567890`). Resolve/verify it with `getChat`.
33
+
34
+ ## Step 1 — verify the bot + target
35
+
36
+ ```bash
37
+ BOT="https://api.telegram.org/bot$TELEGRAMBOT_BOT_TOKEN"
38
+ curl -sS "$BOT/getMe" | jq '{ok, bot: .result.username, name: .result.first_name}'
39
+ # confirm the bot can post to the target chat (must be admin in the channel):
40
+ CHAT="${TELEGRAMBOT_CHAT_ID:-@your_channel}"
41
+ curl -sS -G "$BOT/getChat" --data-urlencode "chat_id=$CHAT" \
42
+ | jq '{ok, type: .result.type, title: .result.title, error: .description}'
43
+ ```
44
+
45
+ ## Send a text post
46
+
47
+ **Confirm the text and target chat with the user before posting publicly.** Text
48
+ is 1-4096 chars. Use `parse_mode=HTML` (simplest) or `MarkdownV2`.
49
+
50
+ ```bash
51
+ CHAT="${TELEGRAMBOT_CHAT_ID:-@your_channel}"
52
+ curl -sS -G "$BOT/sendMessage" \
53
+ --data-urlencode "chat_id=$CHAT" \
54
+ --data-urlencode "text=<b>Hello</b> from the bot 👋 #ai" \
55
+ --data-urlencode "parse_mode=HTML" \
56
+ --data-urlencode "disable_web_page_preview=false" \
57
+ | jq '{ok, message_id: .result.message_id, error: .description}'
58
+ ```
59
+
60
+ The public post URL for a channel is `https://t.me/<channelusername>/<message_id>`.
61
+
62
+ - **HTML mode** supports `<b> <i> <u> <s> <a href> <code> <pre> <blockquote>`.
63
+ Escape literal `< > &` as `&lt; &gt; &amp;`.
64
+ - **MarkdownV2** requires escaping `_ * [ ] ( ) ~ \` > # + - = | { } . !` with `\`.
65
+ - Always send `text` via `--data-urlencode` so newlines/Cyrillic/emoji aren't mangled.
66
+
67
+ ## Send a photo with caption
68
+
69
+ ```bash
70
+ CHAT="${TELEGRAMBOT_CHAT_ID:-@your_channel}"
71
+ curl -sS -G "$BOT/sendPhoto" \
72
+ --data-urlencode "chat_id=$CHAT" \
73
+ --data-urlencode "photo=https://cdn.example.com/pic.jpg" \
74
+ --data-urlencode "caption=<b>Caption</b> text" \
75
+ --data-urlencode "parse_mode=HTML" \
76
+ | jq '{ok, message_id: .result.message_id, error: .description}'
77
+ ```
78
+
79
+ `photo` accepts an HTTPS URL (≤5 MB, Telegram fetches it), a Telegram `file_id`,
80
+ or an uploaded file. Caption is 0-1024 chars. For an album use `sendMediaGroup`.
81
+
82
+ ## Edit / delete a message
83
+
84
+ ```bash
85
+ # edit text (same chat_id + message_id)
86
+ curl -sS -G "$BOT/editMessageText" \
87
+ --data-urlencode "chat_id=$CHAT" --data-urlencode "message_id=123" \
88
+ --data-urlencode "text=Updated text" --data-urlencode "parse_mode=HTML" \
89
+ | jq '{ok, error: .description}'
90
+
91
+ # delete a message
92
+ curl -sS -G "$BOT/deleteMessage" \
93
+ --data-urlencode "chat_id=$CHAT" --data-urlencode "message_id=123" \
94
+ | jq '{ok, error: .description}'
95
+ ```
96
+
97
+ `deleteMessage` works for the bot's own channel posts within 48 hours (and needs
98
+ `can_delete_messages`/post rights).
99
+
100
+ ## Gotchas
101
+
102
+ - **The bot must be added to the channel/group as an admin** with post rights, or
103
+ sends return `403`. `getChat` first to confirm access.
104
+ - Channel numeric ids are large negative numbers (`-100...`); prefer `@username`
105
+ for public channels.
106
+ - Free broadcast limit is ~30 msg/s; space out bulk sends or you'll hit `429`
107
+ (respect `parameters.retry_after`).
108
+ - This is the **bot** speaking (not your personal account) — for reading your own
109
+ DMs / groups as yourself, use the `telegram` (MTProto) connector instead.