Commit graph

164 commits

Author SHA1 Message Date
xmanrui
d044f1b0aa fix: preserve session titles without context enhancement 2026-09-01 22:30:35 +08:00
evanfang0054
1a165822ac fix(feishu): rotate the streaming card before presenting in-turn interactions 2026-09-01 17:53:42 +08:00
evanfang0054
bf03b7e696 feat(feishu): add stream card rotation to keep answers below mid-turn interactions 2026-09-01 17:53:42 +08:00
xmanrui
fd303b6c78 Merge main into feat/conversation-title 2026-09-01 17:22:49 +08:00
曜 星
7a68e94f54 feat: add conversationTitle to context enhancement
Pass inbound group titles into <dsh_im_source> without extra platform API lookups.
DingTalk uses conversationTitle; Telegram groups use chat.title.
2026-09-01 17:15:17 +08:00
xmanrui
959e5b9ad2 fix(feishu): document numbered workspace switching 2026-09-01 15:47:27 +08:00
xmanrui
840e5aa857 feat: add unified IM access policies 2026-09-01 10:46:41 +08:00
evanfang0054
fb3d6750c3 test(feishu): cover card-action and watch-completion topic threading 2026-09-01 10:02:11 +08:00
evanfang0054
adc0a89f13 fix(feishu): honor NO_PROXY before proxying the long connection
webSocketProxyUrl() picks up https_proxy/HTTPS_PROXY/http_proxy/
HTTP_PROXY and forces the Feishu WSS long connection through the proxy,
without consulting NO_PROXY/no_proxy. With a local proxy exported in
the shell (Clash/V2Ray setups), every long-connection attempt is
rejected by Feishu's server and the runtime force-closes and retries
in a loop, so the bot never reaches a stable connected state.

Resolve NO_PROXY/no_proxy for the long-connection endpoints
(open.feishu.cn / open.larksuite.com) before falling back to the proxy
env: exact host, parent-domain (.cn, feishu.cn) and * entries follow
the common NO_PROXY semantics.

- production.mjs: NO_PROXY gate in front of the proxy lookup
- feishu-proxy.test.mjs: NO_PROXY exclusion and fallthrough cases
- lib/index.js: regenerated host bundle
2026-09-01 09:46:49 +08:00
xmanrui
75ebaebf2e feat: split group and direct context enhancement 2026-09-01 02:06:22 +08:00
evanfang0054
fd6e0af81b feat(feishu): thread command replies, cards, and approvals to the triggering message
Plain command replies (menu cards, session/workspace/watch lists, /new,
/status, /compact, /archived, model and preset commands) and Harness
approval prompts were sent as fresh messages keyed only by chat_id, so
in topic groups they landed in the group's default area instead of the
topic the conversation belongs to.

Deliver them as replies to the triggering message, mirroring how stream
answers already thread:

- #sendCard accepts { replyTo } and replies interactively, falling back
  to a plain card when the referenced message is gone
- command replies, status text, menu/session/workspace/watch cards,
  approval prompts and resolved-question notices all carry the
  triggering message id
- batch-input failure notices follow the same rule

- bridge.test.mjs: /new in a topic group must thread the confirmation
  text and the menu card to the command message
- lib/index.js: regenerated host bundle
2026-08-31 20:06:04 +08:00
evanfang0054
3b810fea6b fix(feishu): present Harness questions as threaded replies in topic groups
Regular answers reuse the stream card, which is created through the
reply API targeting the triggering message, so they land in the right
Feishu thread. Pending Harness questions (ask_user_question) were sent
through a fresh message.create with only the chat_id, so in topic
groups they appeared in the group's default area instead of the topic
the conversation belongs to.

Thread question delivery the same way as answers:

- #send accepts { replyTo } and uses im.v1.message.reply, falling back
  to a plain message when the referenced one is gone
- the triggering message id now travels into the interaction context
  and pending state, and #presentInteraction replies to it
- resolved-question notices reply to the user's answer message

- bridge.test.mjs: assert the question is delivered via the reply API
  targeting the triggering message inside a topic group
- lib/index.js: regenerated host bundle
2026-08-31 17:12:55 +08:00
evanfang0054
da4114dfe3 feat(feishu): isolate Harness sessions per topic in topic groups
conversationKey derived the group session key from chat_id alone, so in
Feishu topic groups every topic shared one Harness session: context,
/new, pending approvals, and batch-input state all leaked across topics.

Append the event's thread_id to the session key when present. Topic
groups stamp every message with a thread_id, so each topic now maps to
its own group:<chat_id>🧵<thread_id> session. Regular group chats
carry no thread_id and keep the single shared group:<chat_id> key; p2p
keys are untouched.

- message-utils.mjs: thread-aware conversationKey
- message-utils.test.mjs: topic isolation + regular-group fallback cases
- lib/index.js: regenerated host bundle
2026-08-31 13:54:35 +08:00
Diluka
5efcfa6725 feat(qq): parse inbound QQ face/emoji tags into readable text
QQ delivers emoji messages as opaque <faceType=..,faceId="..",ext="..">
markup fragments (the ext field holds a base64 JSON blob with the face
name, e.g. {"text":"吃瓜"}). Without translation, the Harness receives
only this unusable tag and loses what the sender actually meant.

Register the SDK's contentSanitizer({ parseFaceTags: true }) middleware,
mirroring tencent-connect/dsh-qqbot, so C2C and group inbound messages
surface as e.g. 【表情: 吃瓜】 instead of the raw tag.

- qq-runtime.mjs: register contentSanitizer before the typing indicator
- runtime.test.mjs: assert sanitizer registration and update middleware order
- lib/index.js: regenerated host bundle
2026-08-31 09:07:55 +08:00
xmanrui
14519060f0 fix(telegram): isolate long polling transport 2026-08-31 03:31:07 +08:00
xmanrui
347acceffb fix(feishu): integrate slash command permissions 2026-08-31 01:21:38 +08:00
xmanrui
29aa138b3b Merge remote-tracking branch 'origin/main' into codex/pr94-updated
# Conflicts:
#	CHANGELOG.md
2026-08-31 01:21:34 +08:00
xmanrui
4d18cc4de0 fix(qq): respond to all mentioned group members 2026-08-31 00:45:59 +08:00
C3H3-AI
64ba1463a8 feat(feishu): register native Slash Command panel on startup
The Feishu bot now calls the app_slash_commands OpenAPI at startup to register its common commands (menu, new, help, status, compact, sessionlist, workspacelist, watch, unwatch, watchlist, archived) as native Slash Commands, so typing / in a Feishu direct-message input box pops the command panel and tapping a command triggers it.

The command list is owned and pushed by dsh-im; it does not depend on the dsh/Harness backend. Registration is best-effort and runs asynchronously, so it never blocks the long-connection startup or message delivery when the app lacks the application:app_slash_command:read/write scopes.

Adds src/channels/feishu/slash-command-registry.mjs (manifest, list/create/delete, idempotent sync), wires it into feishu-runtime.mjs (slashCommands config flag + status fields), and covers it with tests.
2026-08-30 23:40:59 +08:00
xmanrui
31792d7bc8 feat: add stable proactive delivery 2026-08-30 11:24:53 +08:00
MikhailB
98c1e48271 feat: add session and preset list aliases 2026-08-30 02:34:40 +03:00
xmanrui
6b9118fe95 fix: support legacy and current DSH hosts 2026-08-29 20:22:07 +08:00
xmanrui
0cb79f74e9 feat: add message source context enhancement 2026-08-29 10:46:06 +08:00
xmanrui
5928b33057 fix(dingtalk): mention senders in streamed group replies
Reuse sender metadata and the existing AI Card lifecycle to include native mentions in ordinary group answers. Preserve mentions across progress, completion, and cleanup without sending a separate reminder.

Verified with npm run check (1671 tests) and a real ordinary Q&A in the existing DingTalk test group.
2026-08-28 23:08:52 +08:00
xmanrui
092d2cbb9c test(dingtalk): cover PR #76 mentions and credit contributor
Add regression coverage for group mention chunks, private replies, mention payloads, and batch reply failure handling. Credit divingleee in package contributors and rebuild the checked-in bundles.
2026-08-28 21:51:03 +08:00
xmanrui
6c6d4af936 fix(feishu): preserve long streaming replies
Keep a bounded streaming preview, then deliver the complete final answer across multiple cards. Preserve all provider message IDs and cover long snapshots and Unicode boundaries with regression tests.

Fixes #78
2026-08-28 10:50:35 +08:00
xmanrui
8c6c31a1b6 feat: add bounded history previews across nine channels
Add shared /history parsing, read-only session access, message filtering, and bounded replies. Default to three messages, cap at five, and exclude saved history commands.

Include channel integration tests, translations, command help, and the Issue #62 implementation plan.
2026-08-28 03:01:53 +08:00
xmanrui
f0b6b38b45 fix: use in-process Harness API for local plugin connections 2026-08-28 01:24:17 +08:00
xmanrui
91e2d5962a fix(weixin): report safe delivery diagnostics 2026-08-26 22:18:48 +08:00
xmanrui
dc66366ac0 fix(weixin): trust international WeChat hosts 2026-08-26 18:46:55 +08:00
xmanrui
25d0b2fb0b Revert "fix(whatsapp): handle group mentions and caller allowlists"
This reverts commit 9664e85599.
2026-08-26 18:01:08 +08:00
xmanrui
422fd34aa4 fix(wecom): separate thinking from answers 2026-08-26 17:31:20 +08:00
xmanrui
2d395860b3 fix(ui): keep bot status in card top-right 2026-08-26 17:27:48 +08:00
xmanrui
9664e85599 fix(whatsapp): handle group mentions and caller allowlists 2026-08-26 17:07:29 +08:00
xmanrui
ea5176be93 fix(qq): harden markdown reply delivery 2026-08-26 01:26:47 +08:00
xiemanR
8f03c66775
Merge pull request #60 from LAN-SHH/fix/qq-c2c-markdown-replies
fix(qq): deliver C2C replies as markdown
2026-08-25 23:40:41 +08:00
xmanrui
c62032f2c3 fix: contain Telegram card layout 2026-08-25 23:28:26 +08:00
xmanrui
1ce8126edb feat(settings): move IM bot to top-level menu
Remove the legacy Plugins-tab registrations, keep the channel-logo navigation, and harden upgrade/package verification.
2026-08-25 22:42:41 +08:00
LAN-SHH
9d3700b1cd fix(qq): deliver C2C replies as markdown 2026-08-25 21:52:49 +08:00
Evilh2019
adeab2dec8
fix(feishu): treat single-text-paragraph posts as commands (#57)
Treat attachment-free Feishu rich-text posts containing bot commands like ordinary text commands instead of forwarding them to the Harness.

Co-authored-by: OpenClaw Agent <agent@openclaw.ai>
2026-08-25 19:28:20 +08:00
xmanrui
1445b93891 fix: preserve error reactions for failed interactions 2026-08-25 17:15:06 +08:00
xmanrui
da01e3acee feat: add status reactions across messaging channels 2026-08-25 17:12:28 +08:00
xmanrui
cb34e3f8de feat(weixin): show typing indicator during turns 2026-08-25 13:53:21 +08:00
xmanrui
ad3c08ace3 feat: add structured message failure reporting 2026-08-25 13:42:43 +08:00
xmanrui
c5becbe379 feat: add plugin version command 2026-08-25 12:25:01 +08:00
xmanrui
10ca7eec2c fix(feishu): complete permissions repair flow 2026-08-25 04:25:21 +08:00
xmanrui
068cf57259 feat: add private chat batch input commands 2026-08-25 02:39:31 +08:00
xmanrui
2cc3a42d45 fix(whatsapp): respond to linked-account group messages 2026-08-25 01:12:55 +08:00
xmanrui
9e39333ff6 feat: add reasoning effort commands 2026-08-25 00:41:44 +08:00
xmanrui
36cbbe48e7 Merge pull request #48 from luochen211/fix/weixin-long-reply-chunking
fix: chunk long WeChat replies for iLink
2026-08-24 21:53:51 +08:00