Logo Octo Messaging

Octo Messaging

Tổ chức
Mininglamp-OSS
octo-messaging

Lĩnh vực nhắn tin — gửi/chỉnh sửa/đồng bộ tin nhắn, xác nhận đã đọc, tìm kiếm tin nhắn (search/all/files/media/around/groups, trong một kênh hoặc trên nhiều kênh), nhóm và chuỗi hội thoại (User Bot), cùng việc thăm dò sự kiện. Bao gồm các giới hạn chỉ nhắn tin trực tiếp của App Bot. Tải sau octo-shared.

Add to TypingMind

Tổng quan

Nhà phát hànhMininglamp-OSS
Kho mãocto-cli
Tên kỹ năngocto-messaging
Sao
918
Bản fork
130
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được Mininglamp-OSS công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Octo Messaging trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Mininglamp-OSS/octo-cli/tree/main/skills/octo-messaging
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Mininglamp-OSS/octo-cli.git /tmp/octo-cli
mkdir -p .claude/skills
cp -r /tmp/octo-cli/skills/octo-messaging .claude/skills/octo-messaging
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Octo Messaging trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Octo Messaging ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Octo Messaging với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

octo-messaging — messages, groups, threads, events

Three related domains live here. They all call $OCTO_API_BASE_URL/v1/bot/* — except the message search family under a uk_ (user API key) token, which the CLI routes to /v1/user/* (real-person mount; see the message search section).

DomainApp BotUser Bot
messageyes (DM only)yes (DM + group + thread)
groupread-onlyfull
threadblockedfull
eventyesyes

Search capability (the message search family) is a separate axis by token kind:

TokenCan search?Notes
app_*noCLI rejects locally with a validation error (not a server FORBIDDEN).
bf_*yesSearches as the bot; add --on-behalf-of <uid> for a real-person (OBO) view.
uk_*yesReal-person identity; routed to /v1/user/*.

Before attempting a write, confirm the token type with octo-cli config show — App Bot writes outside DM get FORBIDDEN from the server ("app bot does not support group operations").

1. message — 4 core commands (+ 6 search subcommands, see below)

bash
# Send a message. payload is a JSON object (not a flag) — pass it inside --data.
# payload.type is an INTEGER code (1=text); see the payload table below.
octo-cli message send --channel-id <cid> --channel-type 1 \
  --data '{"payload":{"type":1,"content":"hello"}}' \
  [--stream-no <n>] [--on-behalf-of <uid>]

# Edit by (message-id, channel-id, channel-type). content-edit is the new
# content, stored opaquely server-side — carry the new payload, same shape as send.
octo-cli message edit --message-id <mid> --message-seq <seq> \
  --channel-id <cid> --channel-type <t> \
  --content-edit '{"type":1,"content":"updated"}'

# Pull history for a channel. Use --data for non-trivial filters.
octo-cli message sync --data '{"channel_id":"ch_abc","channel_type":1,"limit":50}'

# Mark messages read.
octo-cli message read-receipt --channel-id <cid> --channel-type 1 \
  --message-ids m1 --message-ids m2

channel-type values

1 = direct (DM), 2 = group, 5 = thread.

App Bot restrictions (enforced server-side)

  • send accepts only channel-type=1; group/thread are rejected, and even for DM the bot must have a friend relationship with the recipient.
  • sync explicitly blocks channel-type=2.
  • edit and read-receipt work in DM; other scopes follow bot-kind rules.

payload shape

payload is an object (never auto-promoted to a flag). Wrap it under the top-level payload key and pass the whole body via --data '{"channel_id":"…","channel_type":1,"payload":{…}}' (or --data @file.json, --data @-).

payload.type is an integer code (NOT a string like "text"). Authoritative source: common.ContentType in octo-lib/common/msg.go (the server reads it as an int).

Chat content types:

typemeaningcommon payload fields
1Textcontent
2Imageurl, width, height
3GIFurl, width, height
4Voiceurl, duration
5Videourl, width, height, duration
6Locationlatitude, longitude
7Carduid, name
8Fileurl, name, size
11MultipleForward(merged-forward)
12VectorSticker(sticker)
13EmojiSticker(emoji sticker)
14RichText(rich text)
16InviteJoinOrg(org invite)

(System/notification types — 1000+ for group events, 2000 Tip — are server-generated, not sent by bots.) Text example: {"type":1,"content":"hello"}.

--on-behalf-of <uid> makes send/typing act as a user persona (OBO) — requires an active OBO grant + channel scope, else the server returns OBO not authorized.

message search — 6 subcommands

Full-text search over messages and files. Registered as message search, message search all|files|media|around|groups.

bash
# In-channel message search (payload.type in [1,11,14]).
octo-cli message search --chat-id <cid> --keyword "quarterly report" [--sort time_desc]

# Cross-channel message search (omit --chat-id). NOTE: without --chat-id the CLI
# routes to the cross-channel _search_global_messages endpoint, which is a MIXED
# feed (messages + files), so results may include file hits.
octo-cli message search --keyword "quarterly report"

# Messages + files (mixed feed) — in-channel or (no --chat-id) cross-channel.
octo-cli message search all --chat-id <cid> --keyword invoice

# Files only (payload.type=8), by filename / caption.
octo-cli message search files --chat-id <cid> --keyword "*.pdf"

# Images + videos (payload.type in [2,5]) — IN-CHANNEL ONLY, keyword NOT allowed.
octo-cli message search media --chat-id <cid> [--sort time_desc]

# Context window around an anchor message — IN-CHANNEL ONLY.
octo-cli message search around --chat-id <cid> --anchor-message-id <mid>

# Cross-channel aggregated overview (which channels matched) — CROSS-CHANNEL ONLY.
# Use it as level 1 of a two-step search: find matching channels, then pull
# messages per channel with `message search` / `message search all`.
octo-cli message search groups --keyword "quarterly report"

--chat-id decides in-channel vs cross-channel

  • With --chat-id → scoped to that channel.
  • Without --chat-id → search / search all / search files route to their cross-channel _search_global_* endpoints (CLI-side, in internal/client/search_route.go — not backend dispatch). Plain search cross-channel degrades to the mixed messages+files feed.
  • media and around require --chat-id (no cross-channel endpoint; the backend rejects a request without a channel_id). around also requires --anchor-message-id; media does not accept --keyword.
  • groups is cross-channel only and does not accept --chat-id.

Token subjects

  • bf_ (User Bot) — searches as the bot.
  • bf_ + --on-behalf-of <uid> — OBO: searches with that real person's visibility; requires an active OBO grant.
  • uk_ (user API key) — real-person identity; the CLI rewrites the path to /v1/user/*.
  • app_ (App Bot) — cannot search. The CLI rejects this locally (validation), before any request — distinct from a server-side FORBIDDEN.

Filters and pagination

Rich filters (sender_ids, member_uids, content_types, sent_at_from/sent_at_to, file_exts, …) go through --data '{"filters":{…}}'. All families except around and groups paginate; the cursor travels in the request body (--page-all handles this).

2. group — 9 commands (both 5 / User Bot only 4)

Available to both bot types (5):

bash
octo-cli group list      [--space-id <sid>]               # groups the bot is a member of
octo-cli group get       <group_no>
octo-cli group members   <group_no>                        # paginated
octo-cli group md-get    <group_no>                        # group markdown description
octo-cli group md-update <group_no> --content "# Updated description"  # write, but bot_admin gate — not App-Bot-blocked

User Bot only (4):

bash
octo-cli group create        --members u1 --members u2 --name "eng" --creator u0
octo-cli group update        <group_no> --data '{"name":"new name"}'
octo-cli group member-add    <group_no> --members u3 --members u4
octo-cli group member-remove <group_no> --members u3

App Bot attempting any of the four write operations gets FORBIDDEN with message "app bot does not support group operations".

3. thread — 8 commands, User Bot only

Every thread operation calls validateBotGroupAccess() on the backend and rejects App Bot unconditionally. Don't attempt these with an app_* token.

bash
octo-cli thread create    <group_no> --name "Incident #42"
octo-cli thread list      <group_no>                          # paginated
octo-cli thread get       <group_no> <short_id>
octo-cli thread members   <group_no> <short_id>
octo-cli thread join      <group_no> <short_id>
octo-cli thread leave     <group_no> <short_id>
octo-cli thread md-get    <group_no> <short_id>
octo-cli thread md-update <group_no> <short_id> --content "# …"

The User Bot must be a member of the parent group.

4. event — polling for inbound events

bash
octo-cli event list                          # newest page
octo-cli event list --event-id 1234 --limit 50   # cursor = highest event-id seen
octo-cli event ack  <event_id>

Important: event list is a POST

Even though the semantics are "list", the handler is POST /v1/bot/events — the cursor travels in the body, not the query string. The CLI handles this; agents calling octo-cli api must use POST.

Standard poll loop

bash
cursor=0
while :; do
  batch=$(octo-cli event list --event-id "$cursor" --limit 100)
  # response shape: {ok, data:{status, results:[{event_id, event_type, message{...}}]}}
  echo "$batch" | jq -c '.data.results[]' | while read -r ev; do
    id=$(jq -r '.event_id' <<<"$ev")
    process "$ev"
    octo-cli event ack "$id"
    cursor=$id
  done
  sleep 2
done

--limit defaults to 20, caps at 100.

5. Error recovery cheatsheet

SymptomLikely cause / fix
FORBIDDEN + app bot does not support group…Switch to a User Bot (bf_*) or fall back to DM.
send → permission on DMNo friend relationship; add the bot as a friend first.
sync rejected with channel-type=2App Bot cannot sync groups — use User Bot.
VALIDATION_ERROR on sendpayload must be an object, not a string.
event list returns data.results: []No events since the cursor; keep the cursor and poll again.
validation on any message search with an app_* tokenApp Bots cannot search — use bf_* or uk_*. (CLI-side reject, before the request.)
media search rejected with a non-empty keywordsearch media does not accept --keyword; drop it.
sort=relevance rejectedrelevance requires a non-empty --keyword.
OBO not authorized on search --on-behalf-ofNo active OBO grant for that uid; grant it or drop --on-behalf-of.

6. Schema lookup

bash
octo-cli schema message.send
octo-cli schema message.search
octo-cli schema message.search.all
octo-cli schema group.members
octo-cli schema thread.create
octo-cli schema event.list

Câu hỏi thường gặp

Kỹ năng AI Octo Messaging làm được gì?

Lĩnh vực nhắn tin — gửi/chỉnh sửa/đồng bộ tin nhắn, xác nhận đã đọc, tìm kiếm tin nhắn (search/all/files/media/around/groups, trong một kênh hoặc trên nhiều kênh), nhóm và chuỗi hội thoại (User Bot), cùng việc thăm dò sự kiện. Bao gồm các giới hạn chỉ nhắn tin trực tiếp của App Bot. Tải sau octo-shared.

Vì sao nên dùng Octo Messaging trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Octo Messaging là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Octo Messaging trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Mininglamp-OSS/octo-cli/tree/main/skills/octo-messaging. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Octo Messaging?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Octo Messaging với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Octo Messaging với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Octo Messaging có miễn phí không?

Có. Kỹ năng này được Mininglamp-OSS phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇