Commit Graph

67 Commits

Author SHA1 Message Date
Peter Steinberger 39faf4725d refactor: share warning collector projections 2026-03-22 23:37:12 +00:00
Peter Steinberger 18c4a00b6f refactor: adopt chat plugin builder in synology chat 2026-03-22 22:45:06 +00:00
Peter Steinberger 16616e21df refactor: share synology chat account helpers 2026-03-22 19:45:59 +00: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 2d492ab534 test: tighten regression assertions across extension tests 2026-03-22 07:46:07 +00:00
Peter Steinberger b4656f193a test: strengthen regression coverage and trim low-value checks 2026-03-22 07:38:01 +00:00
Peter Steinberger 30ad059da8 refactor(test): dedupe setup wizard helpers 2026-03-22 00:16:31 +00:00
Peter Steinberger 57fa59ab92 refactor(test): dedupe setup wizard test helpers 2026-03-21 23:41:54 +00:00
Peter Steinberger 62ddc9d9e0 refactor: consolidate plugin sdk surface 2026-03-20 19:24:10 +00:00
Peter Steinberger f6948ce405 refactor: shrink sdk helper surfaces 2026-03-20 15:43:14 +00:00
Vincent Koc 757c2cc2de fix(release): isolate bundled config docs loading 2026-03-18 16:01:43 -07: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
Vincent Koc b333eb137b Tests: align plugin test imports with local barrels 2026-03-17 23:23:58 -07:00
Peter Steinberger 05603e4e6c refactor: deduplicate channel config adapters 2026-03-18 04:51:29 +00:00
Peter Steinberger 1a9114a169 refactor: deduplicate setup wizard helpers 2026-03-18 03:58:22 +00:00
Peter Steinberger 9350cb19dd refactor: deduplicate plugin setup and channel config helpers 2026-03-18 03:28:05 +00:00
Vincent Koc f23a069d37 Plugins: internalize synology chat SDK imports 2026-03-17 15:06:22 -07: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 d28cb8d821 refactor(tests): share setup wizard prompter 2026-03-17 07:23:43 +00:00
Peter Steinberger f2bd76cd1a
refactor: finalize plugin sdk legacy boundary cleanup 2026-03-16 22:51:46 -07:00
Peter Steinberger 2497b8147e
refactor: add shared setup sdk subpath 2026-03-16 20:17:13 -07:00
Ayaan Zaidi 3009e689bc
test: remove stale synology zod mock 2026-03-16 18:41:29 +05:30
Peter Steinberger 656848dcd7
refactor: rename setup wizard surfaces 2026-03-15 21:40:31 -07:00
Peter Steinberger 371366e9eb
feat: add synology chat setup wizard 2026-03-15 20:44:26 -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
Val Alexander 0e8672af87
fix(ui): stop dashboard chat history reload storm (#45541)
* UI: stop dashboard chat history reload storm

* Changelog: add PR number for chat reload fix

* fix: resolve branch typecheck regressions
2026-03-13 19:19:53 -05:00
Peter Steinberger 0f8531dea6 test: share synology channel harness 2026-03-13 23:35:28 +00:00
Peter Steinberger d0337a18b6
fix: clear typecheck backlog 2026-03-13 22:09:06 +00:00
Peter Steinberger 5b51d92f3e test: dedupe synology channel account fixtures 2026-03-13 21:54:39 +00:00
Peter Steinberger d964c15040 test: dedupe synology webhook request helpers 2026-03-13 21:54:39 +00:00
Peter Steinberger b9f0effd55 test: dedupe synology chat client timer setup 2026-03-13 21:54:39 +00:00
Peter Steinberger 853999fd7f refactor: dedupe synology chat client webhook payloads 2026-03-13 21:54:39 +00:00
Peter Steinberger 534e4b1418 refactor: share synology chat raw config fields 2026-03-13 21:40:52 +00:00
Peter Steinberger 141738f717 refactor: harden browser runtime profile handling 2026-03-09 00:25:43 +00:00
Peter Steinberger 8d7778d1d6 refactor: dedupe plugin runtime stores 2026-03-08 23:38:24 +00:00
Peter Steinberger af9d76b79a fix: honor explicit Synology Chat rate-limit env values
Landed from contributor PR #39197 by @scoootscooob.

Co-authored-by: scoootscooob <zhentongfan@gmail.com>
2026-03-08 02:34:19 +00:00
Peter Steinberger b393b9e8ff refactor(synology-chat): thread command authorization from webhook gate 2026-03-07 16:48:42 +00:00
Peter Steinberger 1aa77e4603 refactor(extensions): reuse shared helper primitives 2026-03-07 10:41:05 +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 b52561bfa3
fix(synology-chat): prevent restart loop in startAccount (#23074)
* fix(synology-chat): prevent restart loop in startAccount

startAccount must return a Promise that stays pending while the channel
is running. The gateway wraps the return value in Promise.resolve(), and
when it resolves, the gateway thinks the channel crashed and auto-restarts
with exponential backoff (5s → 10s → 20s..., up to 10 attempts).

Replace the synchronous { stop } return with a Promise<void> that resolves
only when ctx.abortSignal fires, keeping the channel alive until shutdown.

Tested on Synology DS923+ with DSM 7.2 — single startup, no restart loop.

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

* fix(synology-chat): add type guards for startAccount return value

startAccount returns `void | { stop: () => void }` — TypeScript requires
a type guard before accessing .stop on the union type. Added proper checks
in both integration and unit tests.

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: stabilize synology gateway account lifecycle (#23074) (thanks @druide67)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-03-02 20:06:16 +00: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
Peter Steinberger a3bb7a5ee5 fix: land synology webhook bounded body reads (#25831) (thanks @bmendonca3) 2026-03-02 19:42:56 +00:00
bmendonca3 2b088ca125 test(synology-chat): use real plugin-sdk helper exports 2026-03-02 19:42:56 +00:00
bmendonca3 aeeb0474c6 test(synology-chat): match request destroy typing 2026-03-02 19:42:56 +00:00
bmendonca3 6df36a8b35 fix(synology-chat): bound webhook body read time 2026-03-02 19:42:56 +00:00