Commit Graph

27 Commits

Author SHA1 Message Date
Peter Steinberger
7199e730a7 refactor: hide synology chat internals 2026-05-02 09:13:08 +01:00
Peter Steinberger
bd1d1f0f2b fix: align open DM allowlist policy (#74112)
* fix: harden telegram open dm allowlist merging

* fix: align open dm allowlist policy
2026-04-29 06:52:12 +01:00
Peter Steinberger
af954a81d1 perf: optimize bundled extension tests 2026-04-17 16:05:09 +01:00
Peter Steinberger
a2f2e5738e test: trim messaging test hotspots 2026-04-17 04:10:55 +01:00
Peter Steinberger
67dc6e82b9 refactor: dedupe misc lowercase helpers 2026-04-07 22:24:32 +01:00
Peter Steinberger
af62a2c2e4 style: fix extension lint violations 2026-04-06 14:53:55 +01:00
Jacob Tomlinson
7e08669715 synology-chat: add webhook in-flight guard (#57722)
* synology-chat: add webhook in-flight guard

* tests: clarify synology in-flight limit assertion

* synology-chat: scope webhook in-flight budget per account
2026-03-30 15:37:02 +01:00
Tak Hoffman
262e5c57c8 fix(ci): stabilize module-bound exact regressions (#56085)
* Adjust compaction identifier test for summary args

* Harden exec completion after child exit

* Handle SDK compaction and skill shape drift

* Stabilize Synology Chat module-bound tests

* Restore skill source compatibility shims

* Restore self-hosted provider discovery mocks
2026-03-27 19:44:15 -05:00
Jacob Tomlinson
0b4d073374 synology-chat: throttle webhook token guesses (#55141)
* synology-chat: throttle webhook token guesses

* synology-chat: keep valid webhook traffic within configured limits

* docs: refresh generated config baseline

* synology-chat: enforce lockout after repeated token failures
2026-03-26 15:30:06 +00:00
Peter Steinberger
fb6454c543 refactor: narrow synology legacy name lookup 2026-03-22 23:32:21 -07:00
Peter Steinberger
ea800dd4ef refactor: clarify synology delivery identity names 2026-03-22 23:32:21 -07:00
Peter Steinberger
7ade3553b7 fix: gate synology chat reply name matching 2026-03-22 23:06:38 -07:00
Peter Steinberger
bb16ab9e08 refactor(synology-chat): split inbound webhook flow 2026-03-22 09:26:50 -07:00
Peter Steinberger
ce19a41f52 fix(synology-chat): scope DM sessions by account 2026-03-22 09:21:05 -07:00
Peter Steinberger
f6948ce405 refactor: shrink sdk helper surfaces 2026-03-20 15:43:14 +00:00
Vincent Koc
f23a069d37 Plugins: internalize synology chat SDK imports 2026-03-17 15:06:22 -07:00
Vincent Koc
5e78c8bc95 Webhooks: tighten pre-auth body handling (#46802)
* Webhooks: tighten pre-auth body handling

* Webhooks: clean up request body guards
2026-03-15 09:45:18 -07:00
Peter Steinberger
b393b9e8ff refactor(synology-chat): thread command authorization from webhook gate 2026-03-07 16:48:42 +00:00
Gustavo Madeira Santana
65ffa676a5 Plugins/synology-chat: migrate to scoped plugin-sdk imports 2026-03-04 02:35:13 -05:00
Gustavo Madeira Santana
96b0fce27c Extensions: migrate synology-chat plugin-sdk imports 2026-03-04 01:21:30 -05:00
Jean-Marc
9a3800d8e6 fix(synology-chat): resolve Chat API user_id for reply delivery (#23709)
* fix(synology-chat): resolve Chat API user_id for reply delivery

Synology Chat outgoing webhooks use a per-integration user_id that
differs from the global Chat API user_id required by method=chatbot.
This caused reply messages to fail silently when the IDs diverged.

Changes:
- Add fetchChatUsers() and resolveChatUserId() to resolve the correct
  Chat API user_id via the user_list endpoint (cached 5min)
- Use resolved user_id for all sendMessage() calls in webhook handler
  and channel dispatcher
- Add Provider field to MsgContext so the agent runner correctly
  identifies the message channel (was "unknown", now "synology-chat")
- Log warnings when user_list API fails or when falling back to
  unresolved webhook user_id
- Add 5 tests for user_id resolution (nickname, username, case,
  not-found, URL rewrite)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(synology-chat): use Readable stream in integration test for Windows compat

Replace EventEmitter + process.nextTick with Readable stream for
request body simulation. The process.nextTick approach caused the test
to hang on Windows CI (120s timeout) because events were not reliably
delivered to readBody() listeners.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: harden synology reply user resolution and cache scope (#23709) (thanks @druide67)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-03-02 19:50:58 +00:00
memphislee09-source
92bf77d9a0 fix(synology-chat): accept JSON/aliases and ACK webhook with 204 2026-03-02 19:45:55 +00:00
bmendonca3
6df36a8b35 fix(synology-chat): bound webhook body read time 2026-03-02 19:42:56 +00:00
Peter Steinberger
43cad8268d fix(security): harden webhook memory guards across channels 2026-03-02 00:12:05 +00:00
Peter Steinberger
9fccf60733 refactor(synology-chat): centralize DM auth and fail fast startup 2026-02-24 23:28:40 +00:00
Peter Steinberger
0ee30361b8 fix(synology-chat): fail closed empty allowlist 2026-02-24 23:18:17 +00:00
Jean-Marc
03586e3d00 feat(channels): add Synology Chat native channel (#23012)
* feat(channels): add Synology Chat native channel

Webhook-based integration with Synology NAS Chat (DSM 7+).
Supports outgoing webhooks, incoming messages, multi-account,
DM policies, rate limiting, and input sanitization.

- HMAC-based constant-time token validation
- Configurable SSL verification (allowInsecureSsl) for self-signed NAS certs
- 54 unit tests across 5 test suites
- Follows the same ChannelPlugin pattern as LINE/Discord/Telegram

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(synology-chat): add pairing, warnings, messaging, agent hints

- Enable media capability (file_url already supported by client)
- Add pairing.notifyApproval to message approved users
- Add security.collectWarnings for missing token/URL, insecure SSL, open DM policy
- Add messaging.normalizeTarget and targetResolver for user ID resolution
- Add directory stubs (self, listPeers, listGroups)
- Add agentPrompt.messageToolHints with Synology Chat formatting guide
- 63 tests (up from 54), all passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 00:09:58 +01:00