@zhin.js/adapter-line 0.1.0 → 1.1.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +596 -0
  2. package/README.md +54 -22
  3. package/adapters/line.js +31 -0
  4. package/adapters/line.ts +36 -0
  5. package/agent/tools/get_group_members.ts +16 -0
  6. package/agent/tools/get_profile.ts +16 -0
  7. package/commands/endpoint/add/[id].js +3 -0
  8. package/commands/endpoint/add/[id].ts +3 -0
  9. package/commands/endpoint/list.js +3 -0
  10. package/commands/endpoint/list.ts +3 -0
  11. package/commands/endpoint/remove/[id].js +3 -0
  12. package/commands/endpoint/remove/[id].ts +3 -0
  13. package/lib/client.d.ts +33 -0
  14. package/lib/client.js +54 -0
  15. package/lib/endpoint.d.ts +41 -37
  16. package/lib/endpoint.js +149 -500
  17. package/lib/index.d.ts +4 -15
  18. package/lib/index.js +4 -83
  19. package/lib/line-endpoint-commands.d.ts +1 -0
  20. package/lib/line-endpoint-commands.js +17 -0
  21. package/lib/line-runtime-state.d.ts +1 -0
  22. package/lib/line-runtime-state.js +6 -0
  23. package/lib/protocol.d.ts +158 -0
  24. package/lib/protocol.js +265 -0
  25. package/lib/side-event-dispatch.d.ts +4 -0
  26. package/lib/side-event-dispatch.js +42 -0
  27. package/lib/webhook.d.ts +13 -0
  28. package/lib/webhook.js +50 -0
  29. package/package.json +61 -21
  30. package/plugin.js +14 -0
  31. package/schema.json +86 -0
  32. package/src/client.ts +87 -0
  33. package/src/endpoint.ts +197 -551
  34. package/src/index.ts +51 -100
  35. package/src/line-endpoint-commands.ts +18 -0
  36. package/src/line-runtime-state.ts +7 -0
  37. package/src/protocol.ts +442 -0
  38. package/src/side-event-dispatch.ts +54 -0
  39. package/src/webhook.ts +79 -0
  40. package/lib/adapter.d.ts +0 -15
  41. package/lib/adapter.d.ts.map +0 -1
  42. package/lib/adapter.js +0 -20
  43. package/lib/adapter.js.map +0 -1
  44. package/lib/endpoint.d.ts.map +0 -1
  45. package/lib/endpoint.js.map +0 -1
  46. package/lib/index.d.ts.map +0 -1
  47. package/lib/index.js.map +0 -1
  48. package/lib/types.d.ts +0 -112
  49. package/lib/types.d.ts.map +0 -1
  50. package/lib/types.js +0 -5
  51. package/lib/types.js.map +0 -1
  52. package/plugin.yml +0 -3
  53. package/src/adapter.ts +0 -29
  54. package/src/types.ts +0 -130
  55. /package/{skills/line → agent}/PERMITS.md +0 -0
  56. /package/{skills/line/SKILL.md → agent/skills/line.md} +0 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,596 @@
1
+ # @zhin.js/adapter-line
2
+
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 1fc6270: Reset all 88 published official packages onto the owner-governed 1.1.x stable line. Packages whose historical 1.1.0 version is still available publish as 1.1.0; packages where npm permanently reserves that version use the next available 1.1.x patch. Historical higher version lines remain installable but are superseded, and routine releases after this reset are patch-only.
8
+
9
+ ### Patch Changes
10
+
11
+ - a34bf91: Publish internal peer dependencies as compatible caret ranges instead of exact versions, preventing compatible internal minor releases from forcing unrelated major bumps.
12
+ - Updated dependencies [1fc6270]
13
+ - @zhin.js/adapter@1.1.12
14
+ - @zhin.js/core@1.1.35
15
+ - @zhin.js/feature-kit@1.1.0
16
+ - @zhin.js/host-http@1.1.0
17
+ - @zhin.js/im-contract@1.1.0
18
+ - @zhin.js/logger@1.1.0
19
+
20
+ ## 6.0.1
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [f7ee28d]
25
+ - @zhin.js/adapter@1.2.2
26
+ - @zhin.js/core@1.5.16
27
+ - zhin.js@7.0.1
28
+ - @zhin.js/agent@1.2.1
29
+
30
+ ## 6.0.0
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [12325e1]
35
+ - Updated dependencies [d19e976]
36
+ - @zhin.js/agent@1.2.0
37
+ - zhin.js@7.0.0
38
+
39
+ ## 5.0.8
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [a728a20]
44
+ - @zhin.js/host-http@1.0.17
45
+ - @zhin.js/agent@1.1.22
46
+ - zhin.js@6.0.15
47
+
48
+ ## 5.0.7
49
+
50
+ ### Patch Changes
51
+
52
+ - Updated dependencies [337fd05]
53
+ - @zhin.js/agent@1.1.21
54
+ - zhin.js@6.0.15
55
+
56
+ ## 5.0.6
57
+
58
+ ### Patch Changes
59
+
60
+ - Updated dependencies [fcbff21]
61
+ - @zhin.js/host-http@1.0.16
62
+ - zhin.js@6.0.15
63
+
64
+ ## 5.0.5
65
+
66
+ ### Patch Changes
67
+
68
+ - Updated dependencies [882a08a]
69
+ - @zhin.js/agent@1.1.20
70
+ - zhin.js@6.0.15
71
+ - @zhin.js/core@1.5.15
72
+
73
+ ## 5.0.4
74
+
75
+ ### Patch Changes
76
+
77
+ - Updated dependencies [d85eddd]
78
+ - @zhin.js/agent@1.1.19
79
+ - @zhin.js/host-http@1.0.15
80
+ - @zhin.js/core@1.5.15
81
+ - zhin.js@6.0.15
82
+
83
+ ## 5.0.3
84
+
85
+ ### Patch Changes
86
+
87
+ - Updated dependencies [a5ee497]
88
+ - Updated dependencies [a5ee497]
89
+ - Updated dependencies [ba7e17a]
90
+ - Updated dependencies [7108d0b]
91
+ - @zhin.js/agent@1.1.18
92
+ - @zhin.js/host-http@1.0.14
93
+ - @zhin.js/core@1.5.15
94
+ - zhin.js@6.0.15
95
+
96
+ ## 5.0.2
97
+
98
+ ### Patch Changes
99
+
100
+ - Updated dependencies [736fa04]
101
+ - @zhin.js/agent@1.1.17
102
+ - zhin.js@6.0.14
103
+
104
+ ## 5.0.1
105
+
106
+ ### Patch Changes
107
+
108
+ - 1fc78bc: Unify native platform Client access behind the literal `adapter` discriminant. Handlers infer both native events and Clients, while command, inbound/outbound middleware, and both Agent tool authoring surfaces expose the exact operation-scoped Client through a lazy `$client` getter. Definitions without `adapter` keep `$client` typed as `unknown`, and runtime dispatch rejects adapter mismatches before resolving the Client. Bundled platform tools now use this single path instead of model-provided endpoint ids and adapter-specific dependency wrappers. Every adapter registers one Client/EventMap contract, and protocol adapters including NapCat, Milky, OneBot and Satori now produce transport-independent Client objects rather than letting Endpoint instances impersonate Clients.
109
+ - Updated dependencies [e9c6a73]
110
+ - Updated dependencies [4e8117c]
111
+ - Updated dependencies [902fa35]
112
+ - Updated dependencies [54bfd6b]
113
+ - Updated dependencies [12025ee]
114
+ - Updated dependencies [09b14d6]
115
+ - Updated dependencies [1fc78bc]
116
+ - @zhin.js/agent@1.1.16
117
+ - @zhin.js/adapter@1.2.1
118
+ - @zhin.js/core@1.5.14
119
+ - @zhin.js/host-http@1.0.13
120
+ - @zhin.js/command@1.0.16
121
+ - @zhin.js/logger@1.0.77
122
+ - zhin.js@6.0.14
123
+ - @zhin.js/feature-kit@1.0.13
124
+
125
+ ## 5.0.0
126
+
127
+ ### Patch Changes
128
+
129
+ - Updated dependencies [b10d058]
130
+ - Updated dependencies [f2c532f]
131
+ - Updated dependencies [3dbf990]
132
+ - @zhin.js/host-http@1.0.12
133
+ - @zhin.js/adapter@1.2.0
134
+ - @zhin.js/core@1.5.13
135
+ - @zhin.js/agent@1.1.15
136
+ - zhin.js@6.0.13
137
+
138
+ ## 4.0.14
139
+
140
+ ### Patch Changes
141
+
142
+ - 5969c5b: Add SideEventGateway so adapters forward notice/request/system into HandlerIndex. HandlerContext now exposes only generation-safe capabilities and prompt ports; live Endpoint escape hatches are removed.
143
+ - Updated dependencies [5969c5b]
144
+ - Updated dependencies [d336a3f]
145
+ - Updated dependencies [0c82a7e]
146
+ - Updated dependencies [b9217e4]
147
+ - Updated dependencies [5969c5b]
148
+ - Updated dependencies [5969c5b]
149
+ - Updated dependencies [974772e]
150
+ - Updated dependencies [5969c5b]
151
+ - Updated dependencies [5969c5b]
152
+ - Updated dependencies [2f786bd]
153
+ - Updated dependencies [63d89f9]
154
+ - Updated dependencies [71c7cdd]
155
+ - Updated dependencies [3cca0ea]
156
+ - Updated dependencies [1312ca0]
157
+ - Updated dependencies [985fa22]
158
+ - Updated dependencies [04b861d]
159
+ - Updated dependencies [a23d544]
160
+ - Updated dependencies [8cddabf]
161
+ - Updated dependencies [dbe5081]
162
+ - @zhin.js/im-contract@1.0.4
163
+ - @zhin.js/core@1.5.12
164
+ - @zhin.js/adapter@1.1.11
165
+ - @zhin.js/agent@1.1.14
166
+ - @zhin.js/host-http@1.0.11
167
+ - @zhin.js/command@1.0.15
168
+ - zhin.js@6.0.12
169
+
170
+ ## 4.0.13
171
+
172
+ ### Patch Changes
173
+
174
+ - @zhin.js/core@1.5.11
175
+ - @zhin.js/agent@1.1.13
176
+ - zhin.js@6.0.11
177
+
178
+ ## 4.0.12
179
+
180
+ ### Patch Changes
181
+
182
+ - 3556601: Declare Stable Feature packages referenced by `zhin.features` as optional `peerDependencies` on official plugins/adapters (`@zhin.js/runtime` ≥1.0.12 requires features to be declared in deps/peers). Keeps authoring via `zhin.js` facades without installing Feature implementation packages into `dependencies`, and removes the need for consumer postinstall peer-patch scripts. `zhin new` scaffolds the same peer shape.
183
+ - @zhin.js/agent@1.1.12
184
+ - @zhin.js/core@1.5.10
185
+ - zhin.js@6.0.10
186
+
187
+ ## 4.0.11
188
+
189
+ ### Patch Changes
190
+
191
+ - eb84b77: fix: 更新文档,建立正确的依赖关系
192
+ - Updated dependencies [d3920e9]
193
+ - @zhin.js/core@1.5.10
194
+ - zhin.js@6.0.10
195
+ - @zhin.js/adapter@1.1.10
196
+ - @zhin.js/agent@1.1.11
197
+
198
+ ## 4.0.10
199
+
200
+ ### Patch Changes
201
+
202
+ - Updated dependencies [e4757a8]
203
+ - Updated dependencies [c3c0ebf]
204
+ - @zhin.js/command@1.0.13
205
+ - @zhin.js/host-http@1.0.10
206
+ - @zhin.js/agent@1.1.10
207
+ - @zhin.js/core@1.5.9
208
+ - @zhin.js/adapter@1.1.9
209
+ - zhin.js@6.0.9
210
+
211
+ ## 4.0.9
212
+
213
+ ### Patch Changes
214
+
215
+ - Updated dependencies [63253bb]
216
+ - Updated dependencies [6fb24dd]
217
+ - Updated dependencies [d162216]
218
+ - Updated dependencies [7427818]
219
+ - Updated dependencies [90da255]
220
+ - Updated dependencies [8e973dc]
221
+ - Updated dependencies [953cfe1]
222
+ - Updated dependencies [0e73866]
223
+ - @zhin.js/plugin-runtime@1.1.6
224
+ - @zhin.js/core@1.5.8
225
+ - @zhin.js/adapter@1.1.8
226
+ - @zhin.js/host-http@1.0.9
227
+ - @zhin.js/agent@1.1.9
228
+ - zhin.js@6.0.8
229
+ - @zhin.js/command@1.0.12
230
+
231
+ ## 4.0.8
232
+
233
+ ### Patch Changes
234
+
235
+ - Updated dependencies [36cb1ca]
236
+ - @zhin.js/core@1.5.7
237
+ - @zhin.js/agent@1.1.8
238
+ - zhin.js@6.0.7
239
+
240
+ ## 4.0.7
241
+
242
+ ### Patch Changes
243
+
244
+ - Updated dependencies [7945544]
245
+ - @zhin.js/command@1.0.11
246
+ - @zhin.js/agent@1.1.7
247
+ - @zhin.js/adapter@1.1.7
248
+ - @zhin.js/core@1.5.6
249
+ - zhin.js@6.0.6
250
+
251
+ ## 4.0.6
252
+
253
+ ### Patch Changes
254
+
255
+ - Updated dependencies [2d0a622]
256
+ - @zhin.js/command@1.0.10
257
+ - @zhin.js/adapter@1.1.7
258
+ - @zhin.js/core@1.5.5
259
+ - @zhin.js/agent@1.1.6
260
+ - zhin.js@6.0.5
261
+
262
+ ## 4.0.5
263
+
264
+ ### Patch Changes
265
+
266
+ - Updated dependencies [6f9c366]
267
+ - Updated dependencies [373a56b]
268
+ - Updated dependencies [0de46a8]
269
+ - Updated dependencies [c106ecc]
270
+ - Updated dependencies [ca92e03]
271
+ - Updated dependencies [b0f37ae]
272
+ - Updated dependencies [ba08a2f]
273
+ - Updated dependencies [b08f7fe]
274
+ - Updated dependencies [daffd4c]
275
+ - Updated dependencies [36c7400]
276
+ - Updated dependencies [a9fa72e]
277
+ - Updated dependencies [c8de3ef]
278
+ - Updated dependencies [60f0fc8]
279
+ - Updated dependencies [574c990]
280
+ - Updated dependencies [d096f16]
281
+ - Updated dependencies [3f29623]
282
+ - Updated dependencies [2916852]
283
+ - Updated dependencies [d047869]
284
+ - Updated dependencies [162fa34]
285
+ - Updated dependencies [e62561e]
286
+ - Updated dependencies [3eeeb46]
287
+ - Updated dependencies [85d0f82]
288
+ - Updated dependencies [61bfc1c]
289
+ - Updated dependencies [04bad47]
290
+ - Updated dependencies [e40b048]
291
+ - Updated dependencies [5a5b1bb]
292
+ - Updated dependencies [f1708c3]
293
+ - Updated dependencies [d254a81]
294
+ - Updated dependencies [7123c47]
295
+ - Updated dependencies [05befc1]
296
+ - Updated dependencies [0663b6a]
297
+ - Updated dependencies [f28f9b3]
298
+ - Updated dependencies [9f340f7]
299
+ - Updated dependencies [e53444f]
300
+ - Updated dependencies [5eedd26]
301
+ - Updated dependencies [92b0dd7]
302
+ - Updated dependencies [f919b6f]
303
+ - Updated dependencies [098e411]
304
+ - Updated dependencies [e1b7c01]
305
+ - Updated dependencies [9b94f87]
306
+ - Updated dependencies [a7df753]
307
+ - @zhin.js/agent@1.1.5
308
+ - @zhin.js/host-http@1.0.8
309
+ - @zhin.js/im-contract@1.0.3
310
+ - @zhin.js/adapter@1.1.7
311
+ - @zhin.js/plugin-runtime@1.1.5
312
+ - @zhin.js/command@1.0.9
313
+ - @zhin.js/core@1.5.4
314
+ - zhin.js@6.0.4
315
+
316
+ ## 4.0.4
317
+
318
+ ### Patch Changes
319
+
320
+ - f8c7a54: fix: im
321
+ - Updated dependencies [f8c7a54]
322
+ - @zhin.js/logger@1.0.76
323
+ - @zhin.js/host-http@1.0.7
324
+ - @zhin.js/adapter@1.1.6
325
+ - @zhin.js/agent@1.1.4
326
+ - @zhin.js/command@1.0.8
327
+ - @zhin.js/core@1.5.3
328
+ - @zhin.js/im-contract@1.0.2
329
+ - @zhin.js/plugin-runtime@1.1.4
330
+ - zhin.js@6.0.3
331
+
332
+ ## 4.0.3
333
+
334
+ ### Patch Changes
335
+
336
+ - Updated dependencies [afc0e66]
337
+ - Updated dependencies [2e41ad5]
338
+ - Updated dependencies [9f57124]
339
+ - @zhin.js/core@1.5.2
340
+ - @zhin.js/adapter@1.1.5
341
+ - @zhin.js/im-contract@1.0.1
342
+ - @zhin.js/plugin-runtime@1.1.3
343
+ - @zhin.js/command@1.0.7
344
+ - @zhin.js/host-http@1.0.6
345
+ - @zhin.js/agent@1.1.3
346
+ - zhin.js@6.0.2
347
+
348
+ ## 4.0.2
349
+
350
+ ### Patch Changes
351
+
352
+ - Updated dependencies [696ab1b]
353
+ - @zhin.js/agent@1.1.2
354
+ - zhin.js@6.0.1
355
+
356
+ ## 4.0.1
357
+
358
+ ### Patch Changes
359
+
360
+ - Updated dependencies [c8f4d45]
361
+ - @zhin.js/plugin-runtime@1.1.2
362
+ - @zhin.js/host-http@1.0.5
363
+ - @zhin.js/adapter@1.1.4
364
+ - @zhin.js/agent@1.1.1
365
+ - @zhin.js/command@1.0.6
366
+ - @zhin.js/core@1.5.1
367
+ - zhin.js@6.0.1
368
+
369
+ ## 4.0.0
370
+
371
+ ### Patch Changes
372
+
373
+ - 4fbff5d: feat!: 多模态双向 Segment 一贯制(BREAKING,无兼容层)
374
+
375
+ 全框架唯一媒体表达统一为 canonical `Segment` + `MediaRef{kind: url|path|base64|file, value, mime_type?, file_name?, size?}`,新增 audio/video/file 段类型;所有第二形状(legacy `data.url/file/base64` 字段、`mediaRefFromLegacyData`/`mediaRefToLegacyFields` 桥、双写)全部删除。
376
+
377
+ - **core**:`SendContent` 一等支持 `Segment[]`;endpoint 出站载荷只含 canonical 段;`resolveOutboundMediaPolicy` 改为纯声明驱动(adapter definition `segments.outboundMedia`),内置策略表删除,未声明回退 `url-or-text`;`ImageContent` 旧桥删除。
378
+ - **ai**:新增 `MediaContentBlock`/`MediaBlockRef`(Segment 同构)与 `UserMessage.media`(当前 turn 媒体,**不持久化**——存储层自动剥离);`createUserMessage(text, media?)` 签名变更(`ImageContent` 删除);provider 边界序列化器 `filterMediaBlocksForProvider` + 能力表(缺省 image-only,不支持类型降级占位文本);ai-sdk 桥媒体块 → SDK image/file parts。
379
+ - **agent**:入站 turn 注入(`turn/inbound-media.ts`)——commMessage 媒体段 → 当前 turn `UserMessage.media`;图片 path 物化、音频默认 STT(`@zhin.js/speech` 可选,失败降级占位)、视频/文件占位;`publishOutboundElements` 产出 canonical Segment;`transcribeAudioPayload` 导出。
380
+ - **cli**:`bridgeRuntimeMessage` 回复链路媒体段透传,不再压平为文本(`$reply` 直达 normalize → adapter)。
381
+ - **全部 20 个平台适配器**:出站媒体只消费 `data.media`(url 直发 / base64 直发 / 平台上传 / 读盘),入站媒体产出 canonical `data.media`;`segments.outboundMedia` 声明与实际消费逐一核对修正;QQ 入站新增 canonical segments(image/audio/video/file/mention/face/reply),图片/语音/视频不再丢失。
382
+
383
+ 迁移:适配器/插件产媒体一律用 `{ type, data: { media: MediaRef } }`;发送 legacy `data.url/file/base64` 形状的段会被 warn 丢弃。
384
+
385
+ - Updated dependencies [7c1e63a]
386
+ - Updated dependencies [4fbff5d]
387
+ - Updated dependencies [5b94d9c]
388
+ - @zhin.js/command@1.0.5
389
+ - @zhin.js/adapter@1.1.3
390
+ - @zhin.js/core@1.5.0
391
+ - @zhin.js/agent@1.1.0
392
+ - zhin.js@6.0.0
393
+
394
+ ## 3.0.5
395
+
396
+ ### Patch Changes
397
+
398
+ - Updated dependencies [d8bf702]
399
+ - @zhin.js/host-http@1.0.4
400
+ - @zhin.js/agent@1.0.10
401
+ - @zhin.js/core@1.4.3
402
+ - zhin.js@5.0.3
403
+
404
+ ## 3.0.4
405
+
406
+ ### Patch Changes
407
+
408
+ - Updated dependencies [45b3256]
409
+ - @zhin.js/core@1.4.3
410
+ - @zhin.js/agent@1.0.9
411
+ - zhin.js@5.0.3
412
+
413
+ ## 3.0.3
414
+
415
+ ### Patch Changes
416
+
417
+ - Updated dependencies [f346346]
418
+ - @zhin.js/agent@1.0.8
419
+ - @zhin.js/core@1.4.2
420
+ - zhin.js@5.0.2
421
+
422
+ ## 3.0.2
423
+
424
+ ### Patch Changes
425
+
426
+ - d5cd4aa: Publish Plugin Runtime entry points and convention modules as JavaScript so
427
+ installed npm plugins load on Node without TypeScript stripping. Workspace
428
+ development continues to prefer TypeScript sources for local HMR.
429
+
430
+ Remove the unconsumed legacy game hub APIs from game-kit; game navigation and
431
+ records now use ordinary convention commands owned by the game hub plugin.
432
+
433
+ - Updated dependencies [d5cd4aa]
434
+ - @zhin.js/command@1.0.4
435
+ - zhin.js@5.0.2
436
+ - @zhin.js/adapter@1.1.2
437
+ - @zhin.js/core@1.4.2
438
+ - @zhin.js/agent@1.0.7
439
+
440
+ ## 3.0.1
441
+
442
+ ### Patch Changes
443
+
444
+ - 5691aba: 第二轮全量审计修复批(8 面 ~60 bug):
445
+
446
+ - **安全**:email 附件路径穿越修复(basename + downloadPath 约束);lark/telegram/satori webhook 鉴权(缺密钥告警、timingSafeEqual、±5min 时效窗、chat_type 修正);onebot wss/webhook 缺 token 告警;qq webhook 改原始字节验签;renderJsx/JSX 转义注入修复;console runtime token 401 死循环。
447
+ - **P0 功能**:sandbox 多 endpoint 解析 + WS 路径隔离;short-url expand(undici opaqueredirect)改 follow;AI 压缩摘要失败不再静默丢历史(熔断恢复生效);console-ui 实时推送事件名归一化 + IndexedDB schema 对齐;process-monitor 热重载不再误判崩溃。
448
+ - **生命周期**:email IMAP 断线重连 + 在飞锁;onebot11/12 start 失败清理;line replyToken TTL + push 兜底;wechat-mp token 过期重试 + MsgId 去重;weixin-ilink buf 推进/防抖写盘/媒体 TTL/QR abort;satori PONG 看门狗;退避自毁修复。
449
+ - **游戏**:text-adventure 终局 restart 复活 + requires 服务端校验;tic-tac-toe PvP 占用/restart/队列清理/TTL;idiom-chain/word-riddle 闲聊不扣失误;别名中间件不劫持普通聊天。
450
+ - **共享库**:schema falsy 默认值/date/tuple/union 修复;database parseCondition Date/未知操作符、sqlite TEXT 往返、query 分派、belongsToMany 方言、migration dry-run;schedule DST 回拨死循环、重复 id 去重、flush 串行化;game-kit fallback 编号/onboarding 提示/尾缀边界/活引用拷贝。
451
+ - **渲染语音**:fetch 全部超时 + 渲染并发闸;sanitizeHtml form 保文本;STT 扩展名映射 + 删临时文件;TTS 未知 provider 报错;emojiCache LRU 负缓存/fontCache style/clearFonts 恢复;register 错误分类收窄。
452
+
453
+ - 74b035c: endpoint 管理命令扩展至 18/20 适配器:kook / discord / github(private_key 支持内联文件路径)/ icqq(bindFlow 登记式 add + `icqq login` 引导)/ dingtalk / lark / line / satori / wechat-mp / wecom / weixin-ilink 接入 `endpoint list/add/remove`(字段对齐各自 schema,凭据写 `.env`)。email(smtp/imap 嵌套对象)与 sandbox(无凭据)暂不接。
454
+ - 09d4f25: Console 社交读取面(management 语义端口)多平台落地:napcat/onebot11/onebot12/milky(好友+群+群成员,OneBot 标准动作);discord/kook/satori(guild+频道+成员,分页聚合,id 保精度留字符串);slack(workspace 成员+public channels+conversations.members);line(群/room 成员分页+profile 回退);wechat-mp(followers openid);weixin-ilink(context_token 对端推导);lark(chats+members 全分页)。`EndpointFriend.user_id`/`EndpointGroup.group_id` 放宽为 `number | string`(雪花 id 不丢精度)。telegram/wecom/dingtalk/github/email/sandbox 注明平台无列表面暂不接。
455
+ - Updated dependencies [cdf64e7]
456
+ - Updated dependencies [2d0a159]
457
+ - Updated dependencies [5691aba]
458
+ - Updated dependencies [078e3f7]
459
+ - Updated dependencies [50497a5]
460
+ - Updated dependencies [9c997b2]
461
+ - Updated dependencies [09d4f25]
462
+ - Updated dependencies [43485a9]
463
+ - Updated dependencies [f0ec5ab]
464
+ - Updated dependencies [3e925d0]
465
+ - Updated dependencies [fa66c4c]
466
+ - Updated dependencies [fa66c4c]
467
+ - Updated dependencies [6cb6152]
468
+ - @zhin.js/command@1.0.3
469
+ - @zhin.js/agent@1.0.6
470
+ - @zhin.js/plugin-runtime@1.1.1
471
+ - @zhin.js/host-http@1.0.3
472
+ - zhin.js@5.0.1
473
+ - @zhin.js/adapter@1.1.1
474
+ - @zhin.js/core@1.4.1
475
+
476
+ ## 3.0.0
477
+
478
+ ### Patch Changes
479
+
480
+ - 7db69c1: 命令前缀改为适配器配置项:`MessageDispatcher` 不再硬编码 `/`,默认按消息所属适配器实例 config 的 `commandPrefix` 解析(默认 `''` 无前缀,任意文本按命令匹配),`endpoints[i].commandPrefix` 逐项覆盖;`ImRuntime({ commandPrefix })` 仍可设全局静态前缀。全部 20 个平台适配器 schema 新增 `commandPrefix` 属性。
481
+
482
+ BREAKING(行为变化):未配置时命令不再需要 `/` 前缀——原 `/zt` 写法不再命中,直接发 `zt` 即可;需要斜杠风格的适配器请在配置里显式设 `commandPrefix: '/'`。
483
+
484
+ - 713445c: 适配器配置格式定稿(不兼容旧格式):`plugins.<adapter>` 顶层仅共享字段 + `commandPrefix`,`endpoints[i]` 携带 endpoint 级字段(`name` + 凭据,各 schema 已类型化),`endpoints` 为必填(icqq 另需顶层 `master`);icqq 新增 `trusted` 列表(顶层/逐项均可)。scaffold-wizard 全部字段式与自定义 configure() 产出改为新格式,examples(full-bot / qq-games-bot)与 20 个适配器 README 同步迁移。
485
+ - Updated dependencies [7db69c1]
486
+ - Updated dependencies [e5c84ed]
487
+ - Updated dependencies [3ea84a0]
488
+ - Updated dependencies [1ddcd70]
489
+ - Updated dependencies [ac9da66]
490
+ - @zhin.js/core@1.4.0
491
+ - @zhin.js/adapter@1.1.0
492
+ - @zhin.js/plugin-runtime@1.1.0
493
+ - @zhin.js/agent@1.0.5
494
+ - @zhin.js/host-http@1.0.2
495
+ - zhin.js@5.0.0
496
+
497
+ ## 2.0.3
498
+
499
+ ### Patch Changes
500
+
501
+ - cc5c94d: 约定式插件运行时迁移(breaking):插件与适配器由 `usePlugin()` / `extends Adapter` 迁移为 `definePlugin` / `defineAdapter` + `plugin.ts` + 约定目录(`adapters/`、`commands/`、`components/`、`tools/` 等)。
502
+
503
+ - 新增约定式运行时包:`@zhin.js/plugin-runtime`、`@zhin.js/adapter`、`@zhin.js/runtime`、`@zhin.js/host-http`(首版 1.0.0 走 init-publish,不在本 changeset 内 bump)。
504
+ - 全部 20 个平台适配器改为约定式 `defineAdapter`,旧 `usePlugin` / `extends Adapter` / `segment-mapper` 生产入口已删除;onebot11 反向 WSS、onebot12 webhook/wss、milky sse/webhook/wss、satori webhook、kook webhook、qq webhook/middleware 等 slice 1 推迟的连接模式已补齐。
505
+ - 游戏 / 工具 / 服务插件同步迁移到约定目录结构。
506
+ - CLI 增加 plugin-runtime host installer(http/database/outbound/schedule/console 等)。
507
+
508
+ 后续加固(同批):
509
+
510
+ - CLI:`zhin runtime start --daemon`(pidfile/崩溃拉起/风暴保护),orphan watchdog 防僵尸进程;legacy `zhin dev` / `zhin start` 已移除(含 `zhin restart`),`zhin stop` 兼容新 daemon。
511
+ - 安全:builtin 工具统一走 `security/policy-facade.ts` 的 `runToolPolicies`(声明式策略表,deny 优先);审计日志 close flush + 背压队列;`splitCompoundCommand` 引号感知、`extractCommandName` 去引号堵绕过。
512
+ - 日志:Logger 双堆栈修复、本地时区、`getLogger` 挂树(`setLevel` 递归生效)、第三方库(log4js/discord)桥接、启动人读总结。
513
+ - 结构:`plugins/games/shared` 迁为 `packages/game-kit`(`@zhin.js/game-kit`);死目录 `plugins/adapters/common` 删除。
514
+ - 脚手架:`create-zhin-app` / `zhin new` / scaffold-wizard 生成物改为 Plugin Runtime 形态(minimal-bot 同构,新配置格式)。
515
+ - Console:endpoint.list 真实名称与 phase、schema:get-all 按 instanceKey 映射、db:\* 接 DatabaseHost。
516
+
517
+ 注:按仓库发布惯例(见 1bb345dd2),本次 breaking 迁移统一使用 patch,避免 zhin.js 5.0 级联。
518
+
519
+ - Updated dependencies [16ec4e8]
520
+ - Updated dependencies [cc5c94d]
521
+ - Updated dependencies [447f3e2]
522
+ - @zhin.js/core@1.3.5
523
+ - @zhin.js/agent@1.0.4
524
+ - @zhin.js/host-http@1.0.1
525
+ - zhin.js@4.1.3
526
+ - @zhin.js/logger@1.0.75
527
+ - @zhin.js/plugin-runtime@1.0.1
528
+ - @zhin.js/adapter@1.0.1
529
+
530
+ ## 2.0.2
531
+
532
+ ### Patch Changes
533
+
534
+ - 872c583: fix: 代码格式优化
535
+ - Updated dependencies [872c583]
536
+ - Updated dependencies [872c583]
537
+ - @zhin.js/agent@1.0.3
538
+ - @zhin.js/host-api@2.0.5
539
+ - @zhin.js/host-router@2.0.3
540
+ - @zhin.js/logger@1.0.74
541
+ - zhin.js@4.1.2
542
+
543
+ ## 2.0.1
544
+
545
+ ### Patch Changes
546
+
547
+ - 5cc9c03: fix: ai 优化
548
+ - b9b3881: fix: 增加游戏引擎以及部分游戏
549
+ - Updated dependencies [5cc9c03]
550
+ - Updated dependencies [7700903]
551
+ - @zhin.js/logger@1.0.73
552
+ - @zhin.js/host-api@2.0.4
553
+ - @zhin.js/host-router@2.0.2
554
+ - zhin.js@4.1.1
555
+
556
+ ## 2.0.0
557
+
558
+ ### Patch Changes
559
+
560
+ - c4575c9: fix: 输入输出优化,文档优化
561
+ - Updated dependencies [c4575c9]
562
+ - Updated dependencies [c4575c9]
563
+ - @zhin.js/host-router@2.0.1
564
+ - @zhin.js/host-api@2.0.3
565
+ - zhin.js@4.1.0
566
+ - @zhin.js/logger@1.0.72
567
+
568
+ ## 1.0.2
569
+
570
+ ### Patch Changes
571
+
572
+ - Updated dependencies [384ea11]
573
+ - @zhin.js/host-api@2.0.2
574
+ - zhin.js@4.0.1
575
+
576
+ ## 1.0.1
577
+
578
+ ### Patch Changes
579
+
580
+ - Updated dependencies [93e58d9]
581
+ - Updated dependencies [ae5239c]
582
+ - @zhin.js/host-api@2.0.1
583
+ - zhin.js@4.0.1
584
+ - @zhin.js/host-router@2.0.0
585
+
586
+ ## 1.0.0
587
+
588
+ ### Patch Changes
589
+
590
+ - 83d2796: feat: 新增企业微信适配器;LINE 适配器打磨与修复
591
+
592
+ - `@zhin.js/adapter-wecom`:企业微信入站/出站、platform permit、控制台侧栏
593
+ - `@zhin.js/adapter-line`:Messaging API 修复与文档同步(0.1.1+)
594
+ - zhin.js@3.0.0
595
+ - @zhin.js/host-api@2.0.0
596
+ - @zhin.js/host-router@2.0.0