378 Commits

Author SHA1 Message Date
Byungsker
e60bbc09fb
Merge 10551a093781b2b29c2761eb0786019632d347e1 into 5e417b44e1540f528d2ae63e3e20229a902d1db2 2026-03-21 10:52:00 +09:00
Peter Steinberger
62ddc9d9e0 refactor: consolidate plugin sdk surface 2026-03-20 19:24:10 +00:00
Peter Steinberger
18fa2992f9 fix: restore plugin sdk runtime barrels 2026-03-20 16:46:34 +00:00
Peter Steinberger
50ce9ac1c6 refactor: privatize bundled sdk facades 2026-03-20 15:56:14 +00:00
Shakker
f2849c2417 fix(feishu): stabilize lifecycle replay tests 2026-03-20 06:13:27 +00:00
Vincent Koc
14eb49c18a test(feishu): fix lifecycle mock typing 2026-03-19 15:26:14 -07:00
Tak Hoffman
2884ac13b2
test: add Zalo pairing lifecycle regression 2026-03-19 17:13:38 -05:00
Tak Hoffman
da8fb70525
test: fix Feishu lifecycle type checks 2026-03-19 16:54:39 -05:00
Vincent Koc
a54d3dc679 test(feishu): fix bot-menu binding mock typing 2026-03-19 14:49:01 -07:00
Tak Hoffman
628b55a825
test: add Feishu ACP failure lifecycle regression 2026-03-19 16:33:04 -05:00
Tak Hoffman
c7cebd608b
test: add Feishu broadcast lifecycle regression 2026-03-19 16:33:03 -05:00
Tak Hoffman
7d50e7fa85
test: add Feishu card-action lifecycle regression 2026-03-19 16:33:03 -05:00
Vincent Koc
83a267e2f3 fix(ci): reset deep test runtime state 2026-03-19 14:23:32 -07:00
Tak Hoffman
0e825ece05
test: add Feishu bot-menu lifecycle regression 2026-03-19 16:16:46 -05:00
Tak Hoffman
ca757b6b77
test: add Feishu reply-once lifecycle regression 2026-03-19 16:04:53 -05:00
lbo728
10551a0937 fix(feishu): use structured mention metadata to detect @所有人 (CWE-807)
The respondToAtAll check in handleFeishuMessage was using a raw substring
match on event.message.content to detect @所有人 (@_all):

    if (!ctx.mentionedBot && (event.message.content ?? "").includes("@_all"))

This allows spoofing: any user who types the literal text "@_all" in a
normal message (in a code block, quote, or plain text) will have their
message treated as a real @所有人 broadcast when respondToAtAll is enabled,
bypassing the requireMention gate (CWE-807 — decision via unverified data).

Fix:
- Extract a new exported helper hasAtAllMention() in bot-content.ts that
  checks the structured event.message.mentions array for an entry with
  key === "@_all" or id.user_id/open_id === "all".  Feishu only inserts a
  mention entry with key "@_all" when the sender actually used the
  @所有人 mention button — unlike raw message content which is user-controlled.
- Update handleFeishuMessage to call hasAtAllMention(event) instead of the
  raw content substring check.
- Add 4 focused unit tests for hasAtAllMention() covering: key match,
  user_id match, empty mentions (raw text cannot spoof), and non-@all
  regular user mentions.

Total tests: 21/21 (17 existing + 4 new)
2026-03-19 18:29:06 +09:00
Peter Steinberger
510f4276b5 refactor: tighten sdk reply pipeline contract 2026-03-19 03:13:15 +00:00
lbo728
433041c44e fix(feishu): @所有人 (@all) no longer triggers every bot unconditionally
Previously checkBotMentioned() returned true for any message containing
'@_all', causing ALL bots in a Feishu group to respond simultaneously
whenever a user broadcast to @所有人 (#49761).

Fix: remove the unconditional @_all -> true early-return from
checkBotMentioned().  Opt-in is now controlled by a new respondToAtAll
config flag (boolean, default false) that can be set at the account level
(channels.feishu.respondToAtAll or channels.feishu.accounts.<id>.respondToAtAll)
or per-group (channels.feishu.groups.<chatId>.respondToAtAll).

The check is applied in handleFeishuMessage after groupConfig is resolved
so that per-group and per-account settings are both honoured.  Bots that
do not opt in remain silent when @所有人 is used, preserving the pre-existing
behaviour for single-bot deployments and groups that do not want broadcast
responses.

Changes:
- extensions/feishu/src/bot-content.ts: drop @_all -> true, add comment
- extensions/feishu/src/bot.ts: add respondToAtAll opt-in check after
  groupConfig is resolved, before the requireMention gate
- extensions/feishu/src/config-schema.ts: add respondToAtAll?:boolean to
  FeishuSharedConfigShape (account+global level) and FeishuGroupSchema
- extensions/feishu/src/bot.checkBotMentioned.test.ts: two new tests
  confirming mentionedBot=false for @_all via parseFeishuMessageEvent
2026-03-19 10:42:09 +09:00
Vincent Koc
f19cb738af fix(plugin-sdk): restore public runtime subpaths 2026-03-18 17:38:49 -07:00
Peter Steinberger
d7018aaf19 refactor: move bundled extension deps to plugin packages 2026-03-19 00:04:50 +00:00
Peter Steinberger
07d9f725b6 refactor: unify plugin sdk primitives 2026-03-18 23:58:56 +00:00
Peter Steinberger
46f49eb6eb refactor: shrink plugin sdk public surface 2026-03-18 23:31:08 +00:00
Peter Steinberger
62edfdffbd refactor: deduplicate reply payload handling 2026-03-18 18:14:57 +00:00
Peter Steinberger
8d73bc77fa refactor: deduplicate reply payload helpers 2026-03-18 17:30:25 +00:00
Peter Steinberger
27f655ed11 refactor: deduplicate channel runtime helpers 2026-03-18 16:37:27 +00:00
Onur Solmaz
d41c9ad4cb
Release: add plugin npm publish workflow (#47678)
* Release: add plugin npm publish workflow

* Release: make plugin publish scope explicit
2026-03-18 13:44:23 +01:00
Vincent Koc
9b6859e5db Feishu: break plugin-sdk setup cycle 2026-03-18 01:02:16 -07:00
Peter Steinberger
05603e4e6c refactor: deduplicate channel config adapters 2026-03-18 04:51:29 +00:00
Peter Steinberger
b86bc9de95
refactor: split remaining monitor runtime helpers 2026-03-17 21:27:21 -07:00
Gustavo Madeira Santana
2a02337be2
Feishu: move outbound session routing behind plugin boundary 2026-03-18 04:09:49 +00:00
Peter Steinberger
1a9114a169 refactor: deduplicate setup wizard helpers 2026-03-18 03:58:22 +00:00
Peter Steinberger
005b25e9d4
refactor: split remaining monitor runtime helpers 2026-03-17 20:36:03 -07:00
Peter Steinberger
9350cb19dd refactor: deduplicate plugin setup and channel config helpers 2026-03-18 03:28:05 +00:00
Vincent Koc
889bb8a78a Plugins: internalize matrix and feishu SDK imports 2026-03-17 19:47:25 -07:00
Gustavo Madeira Santana
fb0d04c834
Tests: migrate channel action discovery to describeMessageTool 2026-03-18 02:17:47 +00:00
Gustavo Madeira Santana
1c6676cd57
Plugins: remove first-party legacy message discovery shims 2026-03-18 02:17:40 +00:00
Gustavo Madeira Santana
4c36436fb4
Plugin SDK: add legacy message discovery helper 2026-03-18 02:08:07 +00:00
Gustavo Madeira Santana
cac1c62208
Feishu: consolidate message tool discovery 2026-03-18 00:07:03 +00:00
Gustavo Madeira Santana
60d4c5a30b
Feishu: own message tool card schema 2026-03-17 23:48:44 +00:00
Gustavo Madeira Santana
ffe24955c8
Plugins: fix pnpm check regressions 2026-03-17 23:25:40 +00:00
Peter Steinberger
4b125762f6
refactor: clean extension api boundaries 2026-03-17 09:38:21 -07:00
Bob
ea15819ecf
ACP: harden startup and move configured routing behind plugin seams (#48197)
* ACPX: keep plugin-local runtime installs out of dist

* Gateway: harden ACP startup and service PATH

* ACP: reinitialize error-state configured bindings

* ACP: classify pre-turn runtime failures as session init failures

* Plugins: move configured ACP routing behind channel seams

* Telegram tests: align startup probe assertions after rebase

* Discord: harden ACP configured binding recovery

* ACP: recover Discord bindings after stale runtime exits

* ACPX: replace dead sessions during ensure

* Discord: harden ACP binding recovery

* Discord: fix review follow-ups

* ACP bindings: load channel snapshots across workspaces

* ACP bindings: cache snapshot channel plugin resolution

* Experiments: add ACP pluginification holy grail plan

* Experiments: rename ACP pluginification plan doc

* Experiments: drop old ACP pluginification doc path

* ACP: move configured bindings behind plugin services

* Experiments: update bindings capability architecture plan

* Bindings: isolate configured binding routing and targets

* Discord tests: fix runtime env helper path

* Tests: fix channel binding CI regressions

* Tests: normalize ACP workspace assertion on Windows

* Bindings: isolate configured binding registry

* Bindings: finish configured binding cleanup

* Bindings: finish generic cleanup

* Bindings: align runtime approval callbacks

* ACP: delete residual bindings barrel

* Bindings: restore legacy compatibility

* Revert "Bindings: restore legacy compatibility"

This reverts commit ac2ed68fa2426ecc874d68278c71c71ad363fcfe.

* Tests: drop ACP route legacy helper names

* Discord/ACP: fix binding regressions

---------

Co-authored-by: Onur <2453968+osolmaz@users.noreply.github.com>
2026-03-17 17:27:52 +01:00
Peter Steinberger
39a8dab0da
refactor: dedupe plugin lazy runtime helpers 2026-03-17 09:24:22 -07:00
Peter Steinberger
df76e0f44b test: harden CI-sensitive test suites 2026-03-17 16:21:57 +00:00
Peter Steinberger
795f1f438b
refactor: expose lazy runtime helper to plugins 2026-03-17 08:37:11 -07:00
huntharo
8448f48cc5 tests(feishu): inject client runtime seam 2026-03-17 09:46:58 -04:00
huntharo
3e8bf845cb tests(feishu): mock conversation runtime seam 2026-03-17 09:46:58 -04:00
Peter Steinberger
6bf07b5075 fix(ci): restore local check suite 2026-03-17 08:14:03 +00:00
Peter Steinberger
f9588da3e0
refactor: split plugin testing seam from bundled extension helpers 2026-03-17 01:05:09 -07:00
Peter Steinberger
9648e7fecb
refactor: consolidate lazy runtime surfaces 2026-03-17 00:59:20 -07:00