@theokit/gateway 0.14.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,78 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 6178f72: Make `qq` a first-party platform.
8
+
9
+ `@theokit/gateway` gains the `qq` key in `PlatformEventRegistry`, the `QQMessageEvent` type and a
10
+ `channelRendering` row (`plain`, markers removed). `PlatformName` grows by one member. Code that
11
+ lists every platform in a `Record<PlatformName, …>` or in a switch with a `never` default must add
12
+ it.
13
+
14
+ - 971efb1: Make `x` a first-party platform.
15
+
16
+ `@theokit/gateway` gains the `x` key in `PlatformEventRegistry`, the `XMessageEvent` and
17
+ `XThreadTweet` types and a `channelRendering` row (`plain`, markers removed). `PlatformName` grows
18
+ by one member. Code that lists every platform in a `Record<PlatformName, …>` or in a switch with a
19
+ `never` default must add it.
20
+
21
+ ### Patch Changes
22
+
23
+ - c6ee490: Restructure the QQ adapter and write the credential-shape and platform tables as rows, so they no longer repeat the same structure entry after entry. Behaviour and exports are unchanged.
24
+
25
+ ## 0.15.0
26
+
27
+ ### Minor Changes
28
+
29
+ - 00af16f: `BasePlatformAdapter` gains `react(channelId, messageId, emoji)`, which adds an emoji reaction to an inbound message. The default resolves `react_unsupported`; the Discord, Slack, Telegram and Matrix adapters implement it.
30
+ - db894a4: Make `raft` a first-party platform.
31
+
32
+ `@theokit/gateway` gains the `raft` key in `PlatformEventRegistry`, the `RaftMessageEvent` type
33
+ and a `channelRendering` row (`plain`, markers removed). `PlatformName` grows by one member. Code
34
+ that lists every platform in a `Record<PlatformName, …>` or in a switch with a `never` default must
35
+ add it.
36
+
37
+ - 3efe7e7: Make `wechat` a first-party platform.
38
+
39
+ `@theokit/gateway` gains the `wechat` key in `PlatformEventRegistry`, the `WeChatMessageEvent` type
40
+ and a `channelRendering` row (`plain`, markers removed). `PlatformName` grows by one member. Code
41
+ that lists every platform in a `Record<PlatformName, …>` or in a switch with a `never` default must
42
+ add it.
43
+
44
+ - 5980e00: Make `wecom` a first-party platform.
45
+
46
+ `@theokit/gateway` gains the `wecom` key in `PlatformEventRegistry`, the `WeComMessageEvent` type
47
+ and a `channelRendering` row (`plain`, markers removed). `PlatformName` grows by one member. Code
48
+ that lists every platform in a `Record<PlatformName, …>` or in a switch with a `never` default must
49
+ add it.
50
+
51
+ - d7ed3ab: Make `yuanbao` a first-party platform.
52
+
53
+ `@theokit/gateway` gains the `yuanbao` key in `PlatformEventRegistry`, the `YuanbaoMessageEvent`
54
+ type and a `channelRendering` row (`plain`, markers removed). `PlatformName` grows by one member.
55
+ Code that lists every platform in a `Record<PlatformName, …>` or in a switch with a `never`
56
+ default must add it.
57
+
58
+ - 6555723: Make `zalo` a first-party platform.
59
+
60
+ `@theokit/gateway` gains the `zalo` key in `PlatformEventRegistry`, the `ZaloMessageEvent` type and
61
+ a `channelRendering` row (`plain`, markers removed). `PlatformName` grows by one member. Code that
62
+ lists every platform in a `Record<PlatformName, …>` or in a switch with a `never` default must add
63
+ it.
64
+
65
+ - 00733b8: `@theokit/gateway` exports `WeixinAdapterBase` and `parseFlatXml`: the token, send and dispatch flow and the XML reader that the WeChat and WeCom adapters used to carry a copy each. The WeChat and WeCom adapters now extend the base.
66
+
67
+ ### Patch Changes
68
+
69
+ - bac158b: Keep the outbound checks and the inbound handler wiring in `BasePlatformAdapter`.
70
+
71
+ `BasePlatformAdapter` gains protected `refuseUnsendable`, `outboundText`, `subscribe`, `deliverInbound`
72
+ and `dispatchOnce`, so the `empty_text`, `not_connected` and `invalid_channel` checks, the
73
+ markdown translation, the handler slot and the dedup-then-dispatch step exist once instead of in
74
+ the adapters. Every adapter answers the same codes and messages as before.
75
+
3
76
  ## 0.14.0
4
77
 
5
78
  ### Minor Changes
package/README.md CHANGED
@@ -302,6 +302,12 @@ for (const { platform, reason } of failed) console.error(`${platform} did not co
302
302
  configuration error thrown by `create` the same way. Any other error propagates. It performs no
303
303
  network call.
304
304
  - `createChannels` also returns `channels`: each built adapter paired with the descriptor that built it, in the order of `adapters`.
305
+ - `reconnect: { initialDelayMs, maxDelayMs, factor, maxAttempts }` retries an adapter whose
306
+ `connect()` threw a transient error (refused connection, DNS, 5xx) with exponential backoff and a
307
+ stderr line per attempt. It is off unless set, and takes effect only with
308
+ `connectFailure: "isolate"` (under `"rollback"` the start still rejects). A `connect()` that
309
+ returns `false`, or throws a 401/403 credential error, is reported once and never retried.
310
+ `start()` called again afterwards returns the updated `connected` and `failed`.
305
311
  - `connectFailure` defaults to `"rollback"`: one failed connect disconnects the adapters that did
306
312
  connect and rejects `start()`, as before. Under `"isolate"`, `start()` resolves even when every
307
313
  adapter failed, so check `connected` before you rely on the runner.