@zhin.js/adapter-satori 1.0.1 → 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 (70) hide show
  1. package/CHANGELOG.md +828 -0
  2. package/README.md +60 -38
  3. package/adapters/satori.js +38 -0
  4. package/adapters/satori.ts +49 -0
  5. package/commands/endpoint/add/[id].js +3 -0
  6. package/commands/endpoint/add/[id].ts +3 -0
  7. package/commands/endpoint/list.js +3 -0
  8. package/commands/endpoint/list.ts +3 -0
  9. package/commands/endpoint/remove/[id].js +3 -0
  10. package/commands/endpoint/remove/[id].ts +3 -0
  11. package/lib/client.d.ts +18 -0
  12. package/lib/client.js +21 -0
  13. package/lib/endpoint.d.ts +56 -0
  14. package/lib/endpoint.js +472 -0
  15. package/lib/index.d.ts +8 -18
  16. package/lib/index.js +6 -25
  17. package/lib/protocol.d.ts +158 -0
  18. package/lib/protocol.js +242 -0
  19. package/lib/satori-endpoint-commands.d.ts +1 -0
  20. package/lib/satori-endpoint-commands.js +18 -0
  21. package/lib/satori-runtime-state.d.ts +1 -0
  22. package/lib/satori-runtime-state.js +6 -0
  23. package/lib/webhook.d.ts +12 -0
  24. package/lib/webhook.js +60 -0
  25. package/lib/ws.d.ts +13 -0
  26. package/lib/ws.js +5 -0
  27. package/package.json +64 -18
  28. package/plugin.js +14 -0
  29. package/schema.json +95 -0
  30. package/src/client.ts +57 -0
  31. package/src/endpoint.ts +580 -0
  32. package/src/index.ts +61 -35
  33. package/src/protocol.ts +370 -0
  34. package/src/satori-endpoint-commands.ts +19 -0
  35. package/src/satori-runtime-state.ts +7 -0
  36. package/src/webhook.ts +79 -0
  37. package/src/ws.ts +22 -0
  38. package/lib/adapter.d.ts +0 -17
  39. package/lib/adapter.d.ts.map +0 -1
  40. package/lib/adapter.js +0 -35
  41. package/lib/adapter.js.map +0 -1
  42. package/lib/api.d.ts +0 -15
  43. package/lib/api.d.ts.map +0 -1
  44. package/lib/api.js +0 -37
  45. package/lib/api.js.map +0 -1
  46. package/lib/endpoint-webhook.d.ts +0 -27
  47. package/lib/endpoint-webhook.d.ts.map +0 -1
  48. package/lib/endpoint-webhook.js +0 -99
  49. package/lib/endpoint-webhook.js.map +0 -1
  50. package/lib/endpoint-ws.d.ts +0 -30
  51. package/lib/endpoint-ws.d.ts.map +0 -1
  52. package/lib/endpoint-ws.js +0 -195
  53. package/lib/endpoint-ws.js.map +0 -1
  54. package/lib/index.d.ts.map +0 -1
  55. package/lib/index.js.map +0 -1
  56. package/lib/types.d.ts +0 -91
  57. package/lib/types.d.ts.map +0 -1
  58. package/lib/types.js +0 -13
  59. package/lib/types.js.map +0 -1
  60. package/lib/utils.d.ts +0 -40
  61. package/lib/utils.d.ts.map +0 -1
  62. package/lib/utils.js +0 -33
  63. package/lib/utils.js.map +0 -1
  64. package/src/adapter.ts +0 -48
  65. package/src/api.ts +0 -48
  66. package/src/endpoint-webhook.ts +0 -117
  67. package/src/endpoint-ws.ts +0 -214
  68. package/src/types.ts +0 -91
  69. package/src/utils.ts +0 -64
  70. /package/{skills/satori/SKILL.md → agent/skills/satori.md} +0 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,828 @@
1
+ # @zhin.js/adapter-satori
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
+ ## 7.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
+
29
+ ## 7.0.0
30
+
31
+ ### Patch Changes
32
+
33
+ - zhin.js@7.0.0
34
+
35
+ ## 6.0.5
36
+
37
+ ### Patch Changes
38
+
39
+ - Updated dependencies [a728a20]
40
+ - @zhin.js/host-http@1.0.17
41
+ - zhin.js@6.0.15
42
+
43
+ ## 6.0.4
44
+
45
+ ### Patch Changes
46
+
47
+ - Updated dependencies [fcbff21]
48
+ - @zhin.js/host-http@1.0.16
49
+ - zhin.js@6.0.15
50
+
51
+ ## 6.0.3
52
+
53
+ ### Patch Changes
54
+
55
+ - Updated dependencies [d85eddd]
56
+ - @zhin.js/host-http@1.0.15
57
+ - @zhin.js/core@1.5.15
58
+ - zhin.js@6.0.15
59
+
60
+ ## 6.0.2
61
+
62
+ ### Patch Changes
63
+
64
+ - Updated dependencies [a5ee497]
65
+ - Updated dependencies [ba7e17a]
66
+ - Updated dependencies [7108d0b]
67
+ - @zhin.js/host-http@1.0.14
68
+ - @zhin.js/core@1.5.15
69
+ - zhin.js@6.0.15
70
+
71
+ ## 6.0.1
72
+
73
+ ### Patch Changes
74
+
75
+ - 4e8117c: Expose the published imhelper protocol Clients from every Endpoint, preserve native action responses, and route host-owned HTTP, WebSocket, and raw ingress through the Client APIs. Add the shared `ClientEndpoint` deep base so concrete transports inherit one open-gated Client event bridge, and move reverse WebSocket lifecycle and heartbeat cleanup onto the common lifecycle state machine.
76
+ - 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.
77
+ - 2ca9a52: Upgrade the protocol Clients to imhelper 1.0.7, keep receiver ownership exclusively in Endpoint through manual mode, expose structured protocol errors, and support canonical non-message Client events.
78
+ - Updated dependencies [4e8117c]
79
+ - Updated dependencies [54bfd6b]
80
+ - Updated dependencies [12025ee]
81
+ - Updated dependencies [09b14d6]
82
+ - Updated dependencies [1fc78bc]
83
+ - @zhin.js/adapter@1.2.1
84
+ - @zhin.js/core@1.5.14
85
+ - @zhin.js/host-http@1.0.13
86
+ - @zhin.js/command@1.0.16
87
+ - @zhin.js/logger@1.0.77
88
+ - zhin.js@6.0.14
89
+ - @zhin.js/feature-kit@1.0.13
90
+
91
+ ## 6.0.0
92
+
93
+ ### Patch Changes
94
+
95
+ - f2c532f: Expose exact per-Endpoint message operations through one validated Adapter capability model, route Core control calls through declared active capabilities, and connect existing recall, edit, reaction, and typing implementations across platform adapters.
96
+ - Updated dependencies [b10d058]
97
+ - Updated dependencies [f2c532f]
98
+ - @zhin.js/host-http@1.0.12
99
+ - @zhin.js/adapter@1.2.0
100
+ - @zhin.js/core@1.5.13
101
+ - zhin.js@6.0.13
102
+
103
+ ## 5.0.13
104
+
105
+ ### Patch Changes
106
+
107
+ - 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.
108
+ - Updated dependencies [5969c5b]
109
+ - Updated dependencies [d336a3f]
110
+ - Updated dependencies [5969c5b]
111
+ - Updated dependencies [5969c5b]
112
+ - Updated dependencies [974772e]
113
+ - Updated dependencies [5969c5b]
114
+ - Updated dependencies [2f786bd]
115
+ - Updated dependencies [1312ca0]
116
+ - Updated dependencies [985fa22]
117
+ - @zhin.js/im-contract@1.0.4
118
+ - @zhin.js/core@1.5.12
119
+ - @zhin.js/adapter@1.1.11
120
+ - @zhin.js/host-http@1.0.11
121
+ - @zhin.js/command@1.0.15
122
+ - zhin.js@6.0.12
123
+
124
+ ## 5.0.12
125
+
126
+ ### Patch Changes
127
+
128
+ - @zhin.js/core@1.5.11
129
+ - zhin.js@6.0.11
130
+
131
+ ## 5.0.11
132
+
133
+ ### Patch Changes
134
+
135
+ - 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.
136
+ - @zhin.js/core@1.5.10
137
+ - zhin.js@6.0.10
138
+
139
+ ## 5.0.10
140
+
141
+ ### Patch Changes
142
+
143
+ - eb84b77: fix: 更新文档,建立正确的依赖关系
144
+ - Updated dependencies [d3920e9]
145
+ - @zhin.js/core@1.5.10
146
+ - zhin.js@6.0.10
147
+ - @zhin.js/adapter@1.1.10
148
+
149
+ ## 5.0.9
150
+
151
+ ### Patch Changes
152
+
153
+ - Updated dependencies [e4757a8]
154
+ - Updated dependencies [c3c0ebf]
155
+ - @zhin.js/command@1.0.13
156
+ - @zhin.js/host-http@1.0.10
157
+ - @zhin.js/core@1.5.9
158
+ - @zhin.js/adapter@1.1.9
159
+ - zhin.js@6.0.9
160
+
161
+ ## 5.0.8
162
+
163
+ ### Patch Changes
164
+
165
+ - Updated dependencies [63253bb]
166
+ - Updated dependencies [8e973dc]
167
+ - Updated dependencies [953cfe1]
168
+ - Updated dependencies [0e73866]
169
+ - @zhin.js/plugin-runtime@1.1.6
170
+ - @zhin.js/core@1.5.8
171
+ - @zhin.js/adapter@1.1.8
172
+ - @zhin.js/host-http@1.0.9
173
+ - zhin.js@6.0.8
174
+ - @zhin.js/command@1.0.12
175
+
176
+ ## 5.0.7
177
+
178
+ ### Patch Changes
179
+
180
+ - Updated dependencies [36cb1ca]
181
+ - @zhin.js/core@1.5.7
182
+ - zhin.js@6.0.7
183
+
184
+ ## 5.0.6
185
+
186
+ ### Patch Changes
187
+
188
+ - Updated dependencies [7945544]
189
+ - @zhin.js/command@1.0.11
190
+ - @zhin.js/adapter@1.1.7
191
+ - @zhin.js/core@1.5.6
192
+ - zhin.js@6.0.6
193
+
194
+ ## 5.0.5
195
+
196
+ ### Patch Changes
197
+
198
+ - Updated dependencies [2d0a622]
199
+ - @zhin.js/command@1.0.10
200
+ - @zhin.js/adapter@1.1.7
201
+ - @zhin.js/core@1.5.5
202
+ - zhin.js@6.0.5
203
+
204
+ ## 5.0.4
205
+
206
+ ### Patch Changes
207
+
208
+ - Updated dependencies [0de46a8]
209
+ - Updated dependencies [c106ecc]
210
+ - Updated dependencies [ca92e03]
211
+ - Updated dependencies [b0f37ae]
212
+ - Updated dependencies [ba08a2f]
213
+ - Updated dependencies [daffd4c]
214
+ - Updated dependencies [36c7400]
215
+ - Updated dependencies [162fa34]
216
+ - Updated dependencies [e40b048]
217
+ - Updated dependencies [f1708c3]
218
+ - Updated dependencies [e53444f]
219
+ - Updated dependencies [92b0dd7]
220
+ - Updated dependencies [a7df753]
221
+ - @zhin.js/host-http@1.0.8
222
+ - @zhin.js/im-contract@1.0.3
223
+ - @zhin.js/adapter@1.1.7
224
+ - @zhin.js/plugin-runtime@1.1.5
225
+ - @zhin.js/command@1.0.9
226
+ - @zhin.js/core@1.5.4
227
+ - zhin.js@6.0.4
228
+
229
+ ## 5.0.3
230
+
231
+ ### Patch Changes
232
+
233
+ - f8c7a54: fix: im
234
+ - Updated dependencies [f8c7a54]
235
+ - @zhin.js/logger@1.0.76
236
+ - @zhin.js/host-http@1.0.7
237
+ - @zhin.js/adapter@1.1.6
238
+ - @zhin.js/command@1.0.8
239
+ - @zhin.js/core@1.5.3
240
+ - @zhin.js/im-contract@1.0.2
241
+ - @zhin.js/plugin-runtime@1.1.4
242
+ - zhin.js@6.0.3
243
+
244
+ ## 5.0.2
245
+
246
+ ### Patch Changes
247
+
248
+ - Updated dependencies [afc0e66]
249
+ - Updated dependencies [2e41ad5]
250
+ - Updated dependencies [9f57124]
251
+ - @zhin.js/core@1.5.2
252
+ - @zhin.js/adapter@1.1.5
253
+ - @zhin.js/im-contract@1.0.1
254
+ - @zhin.js/plugin-runtime@1.1.3
255
+ - @zhin.js/command@1.0.7
256
+ - @zhin.js/host-http@1.0.6
257
+ - zhin.js@6.0.2
258
+
259
+ ## 5.0.1
260
+
261
+ ### Patch Changes
262
+
263
+ - Updated dependencies [c8f4d45]
264
+ - @zhin.js/plugin-runtime@1.1.2
265
+ - @zhin.js/host-http@1.0.5
266
+ - @zhin.js/adapter@1.1.4
267
+ - @zhin.js/command@1.0.6
268
+ - @zhin.js/core@1.5.1
269
+ - zhin.js@6.0.1
270
+
271
+ ## 5.0.0
272
+
273
+ ### Patch Changes
274
+
275
+ - 4fbff5d: feat!: 多模态双向 Segment 一贯制(BREAKING,无兼容层)
276
+
277
+ 全框架唯一媒体表达统一为 canonical `Segment` + `MediaRef{kind: url|path|base64|file, value, mime_type?, file_name?, size?}`,新增 audio/video/file 段类型;所有第二形状(legacy `data.url/file/base64` 字段、`mediaRefFromLegacyData`/`mediaRefToLegacyFields` 桥、双写)全部删除。
278
+
279
+ - **core**:`SendContent` 一等支持 `Segment[]`;endpoint 出站载荷只含 canonical 段;`resolveOutboundMediaPolicy` 改为纯声明驱动(adapter definition `segments.outboundMedia`),内置策略表删除,未声明回退 `url-or-text`;`ImageContent` 旧桥删除。
280
+ - **ai**:新增 `MediaContentBlock`/`MediaBlockRef`(Segment 同构)与 `UserMessage.media`(当前 turn 媒体,**不持久化**——存储层自动剥离);`createUserMessage(text, media?)` 签名变更(`ImageContent` 删除);provider 边界序列化器 `filterMediaBlocksForProvider` + 能力表(缺省 image-only,不支持类型降级占位文本);ai-sdk 桥媒体块 → SDK image/file parts。
281
+ - **agent**:入站 turn 注入(`turn/inbound-media.ts`)——commMessage 媒体段 → 当前 turn `UserMessage.media`;图片 path 物化、音频默认 STT(`@zhin.js/speech` 可选,失败降级占位)、视频/文件占位;`publishOutboundElements` 产出 canonical Segment;`transcribeAudioPayload` 导出。
282
+ - **cli**:`bridgeRuntimeMessage` 回复链路媒体段透传,不再压平为文本(`$reply` 直达 normalize → adapter)。
283
+ - **全部 20 个平台适配器**:出站媒体只消费 `data.media`(url 直发 / base64 直发 / 平台上传 / 读盘),入站媒体产出 canonical `data.media`;`segments.outboundMedia` 声明与实际消费逐一核对修正;QQ 入站新增 canonical segments(image/audio/video/file/mention/face/reply),图片/语音/视频不再丢失。
284
+
285
+ 迁移:适配器/插件产媒体一律用 `{ type, data: { media: MediaRef } }`;发送 legacy `data.url/file/base64` 形状的段会被 warn 丢弃。
286
+
287
+ - Updated dependencies [7c1e63a]
288
+ - Updated dependencies [4fbff5d]
289
+ - Updated dependencies [5b94d9c]
290
+ - @zhin.js/command@1.0.5
291
+ - @zhin.js/adapter@1.1.3
292
+ - @zhin.js/core@1.5.0
293
+ - zhin.js@6.0.0
294
+
295
+ ## 4.0.4
296
+
297
+ ### Patch Changes
298
+
299
+ - Updated dependencies [d8bf702]
300
+ - @zhin.js/host-http@1.0.4
301
+ - @zhin.js/core@1.4.3
302
+ - zhin.js@5.0.3
303
+
304
+ ## 4.0.3
305
+
306
+ ### Patch Changes
307
+
308
+ - Updated dependencies [45b3256]
309
+ - @zhin.js/core@1.4.3
310
+ - zhin.js@5.0.3
311
+
312
+ ## 4.0.2
313
+
314
+ ### Patch Changes
315
+
316
+ - d5cd4aa: Publish Plugin Runtime entry points and convention modules as JavaScript so
317
+ installed npm plugins load on Node without TypeScript stripping. Workspace
318
+ development continues to prefer TypeScript sources for local HMR.
319
+
320
+ Remove the unconsumed legacy game hub APIs from game-kit; game navigation and
321
+ records now use ordinary convention commands owned by the game hub plugin.
322
+
323
+ - Updated dependencies [d5cd4aa]
324
+ - @zhin.js/command@1.0.4
325
+ - zhin.js@5.0.2
326
+ - @zhin.js/adapter@1.1.2
327
+ - @zhin.js/core@1.4.2
328
+
329
+ ## 4.0.1
330
+
331
+ ### Patch Changes
332
+
333
+ - 5691aba: 第二轮全量审计修复批(8 面 ~60 bug):
334
+
335
+ - **安全**:email 附件路径穿越修复(basename + downloadPath 约束);lark/telegram/satori webhook 鉴权(缺密钥告警、timingSafeEqual、±5min 时效窗、chat_type 修正);onebot wss/webhook 缺 token 告警;qq webhook 改原始字节验签;renderJsx/JSX 转义注入修复;console runtime token 401 死循环。
336
+ - **P0 功能**:sandbox 多 endpoint 解析 + WS 路径隔离;short-url expand(undici opaqueredirect)改 follow;AI 压缩摘要失败不再静默丢历史(熔断恢复生效);console-ui 实时推送事件名归一化 + IndexedDB schema 对齐;process-monitor 热重载不再误判崩溃。
337
+ - **生命周期**:email IMAP 断线重连 + 在飞锁;onebot11/12 start 失败清理;line replyToken TTL + push 兜底;wechat-mp token 过期重试 + MsgId 去重;weixin-ilink buf 推进/防抖写盘/媒体 TTL/QR abort;satori PONG 看门狗;退避自毁修复。
338
+ - **游戏**:text-adventure 终局 restart 复活 + requires 服务端校验;tic-tac-toe PvP 占用/restart/队列清理/TTL;idiom-chain/word-riddle 闲聊不扣失误;别名中间件不劫持普通聊天。
339
+ - **共享库**:schema falsy 默认值/date/tuple/union 修复;database parseCondition Date/未知操作符、sqlite TEXT 往返、query 分派、belongsToMany 方言、migration dry-run;schedule DST 回拨死循环、重复 id 去重、flush 串行化;game-kit fallback 编号/onboarding 提示/尾缀边界/活引用拷贝。
340
+ - **渲染语音**:fetch 全部超时 + 渲染并发闸;sanitizeHtml form 保文本;STT 扩展名映射 + 删临时文件;TTS 未知 provider 报错;emojiCache LRU 负缓存/fontCache style/clearFonts 恢复;register 错误分类收窄。
341
+
342
+ - 078e3f7: 架构统一批(AURA):
343
+
344
+ - **EndpointLifecycle 基座**(@zhin.js/adapter 新增 `createEndpointLifecycle`):WS/SSE 端点的 start 失败复位、仅曾 open 才退避重连(指数+jitter 可配)、stop 不重连、PONG 看门狗、定时器集中清理、陈旧事件防叠套;napcat/milky/onebot11/onebot12/satori 已迁移(删除各自手写状态机),从此同类竞态在结构上不可能再犯。
345
+ - **Generation-store**(@zhin.js/plugin-runtime 新增 `createGenerationStore`):模块级运行时状态的一等能力,provide 自动挂 lifecycle 反注册(代际结束自动清理);lottery deps 与 rss db 已迁移,公开 API 兼容。
346
+ - **Resolver 管线收敛**(@zhin.js/runtime):解析规则统一为 local path → workspace → node_modules 单管线;optional 引用对所有 PackageResolutionError 容错(消除 message 前缀补丁)。
347
+ - **工具目录准入统一**(@zhin.js/agent):RegisteredToolSource 与 ExternalToolSource 共用同一 `canAccessTool` 准入(platforms/scopes/permissions/hidden 四元组全链路透传),同名覆盖 warn;AgentToolRegistration 补 platforms/scopes。两条注册通道(静态约定 vs 动态注册)职责边界已文档化。
348
+
349
+ - 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(无凭据)暂不接。
350
+ - 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 注明平台无列表面暂不接。
351
+ - Updated dependencies [cdf64e7]
352
+ - Updated dependencies [2d0a159]
353
+ - Updated dependencies [5691aba]
354
+ - Updated dependencies [078e3f7]
355
+ - Updated dependencies [50497a5]
356
+ - Updated dependencies [9c997b2]
357
+ - Updated dependencies [09d4f25]
358
+ - Updated dependencies [43485a9]
359
+ - Updated dependencies [f0ec5ab]
360
+ - Updated dependencies [3e925d0]
361
+ - Updated dependencies [fa66c4c]
362
+ - Updated dependencies [fa66c4c]
363
+ - Updated dependencies [6cb6152]
364
+ - @zhin.js/command@1.0.3
365
+ - @zhin.js/plugin-runtime@1.1.1
366
+ - @zhin.js/host-http@1.0.3
367
+ - zhin.js@5.0.1
368
+ - @zhin.js/adapter@1.1.1
369
+ - @zhin.js/core@1.4.1
370
+
371
+ ## 4.0.0
372
+
373
+ ### Patch Changes
374
+
375
+ - 7db69c1: 命令前缀改为适配器配置项:`MessageDispatcher` 不再硬编码 `/`,默认按消息所属适配器实例 config 的 `commandPrefix` 解析(默认 `''` 无前缀,任意文本按命令匹配),`endpoints[i].commandPrefix` 逐项覆盖;`ImRuntime({ commandPrefix })` 仍可设全局静态前缀。全部 20 个平台适配器 schema 新增 `commandPrefix` 属性。
376
+
377
+ BREAKING(行为变化):未配置时命令不再需要 `/` 前缀——原 `/zt` 写法不再命中,直接发 `zt` 即可;需要斜杠风格的适配器请在配置里显式设 `commandPrefix: '/'`。
378
+
379
+ - 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 同步迁移。
380
+ - Updated dependencies [7db69c1]
381
+ - Updated dependencies [e5c84ed]
382
+ - Updated dependencies [3ea84a0]
383
+ - Updated dependencies [1ddcd70]
384
+ - Updated dependencies [ac9da66]
385
+ - @zhin.js/core@1.4.0
386
+ - @zhin.js/adapter@1.1.0
387
+ - @zhin.js/plugin-runtime@1.1.0
388
+ - @zhin.js/host-http@1.0.2
389
+ - zhin.js@5.0.0
390
+
391
+ ## 3.0.3
392
+
393
+ ### Patch Changes
394
+
395
+ - cc5c94d: 约定式插件运行时迁移(breaking):插件与适配器由 `usePlugin()` / `extends Adapter` 迁移为 `definePlugin` / `defineAdapter` + `plugin.ts` + 约定目录(`adapters/`、`commands/`、`components/`、`tools/` 等)。
396
+
397
+ - 新增约定式运行时包:`@zhin.js/plugin-runtime`、`@zhin.js/adapter`、`@zhin.js/runtime`、`@zhin.js/host-http`(首版 1.0.0 走 init-publish,不在本 changeset 内 bump)。
398
+ - 全部 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 推迟的连接模式已补齐。
399
+ - 游戏 / 工具 / 服务插件同步迁移到约定目录结构。
400
+ - CLI 增加 plugin-runtime host installer(http/database/outbound/schedule/console 等)。
401
+
402
+ 后续加固(同批):
403
+
404
+ - CLI:`zhin runtime start --daemon`(pidfile/崩溃拉起/风暴保护),orphan watchdog 防僵尸进程;legacy `zhin dev` / `zhin start` 已移除(含 `zhin restart`),`zhin stop` 兼容新 daemon。
405
+ - 安全:builtin 工具统一走 `security/policy-facade.ts` 的 `runToolPolicies`(声明式策略表,deny 优先);审计日志 close flush + 背压队列;`splitCompoundCommand` 引号感知、`extractCommandName` 去引号堵绕过。
406
+ - 日志:Logger 双堆栈修复、本地时区、`getLogger` 挂树(`setLevel` 递归生效)、第三方库(log4js/discord)桥接、启动人读总结。
407
+ - 结构:`plugins/games/shared` 迁为 `packages/game-kit`(`@zhin.js/game-kit`);死目录 `plugins/adapters/common` 删除。
408
+ - 脚手架:`create-zhin-app` / `zhin new` / scaffold-wizard 生成物改为 Plugin Runtime 形态(minimal-bot 同构,新配置格式)。
409
+ - Console:endpoint.list 真实名称与 phase、schema:get-all 按 instanceKey 映射、db:\* 接 DatabaseHost。
410
+
411
+ 注:按仓库发布惯例(见 1bb345dd2),本次 breaking 迁移统一使用 patch,避免 zhin.js 5.0 级联。
412
+
413
+ - 447f3e2: 迁移缺口修复(legacy 功能对齐):
414
+
415
+ - html 段出站规范化:经 `@zhin.js/html-renderer` 渲染为 image 段(sandbox 豁免、无渲染器时降级文本),修复真实平台 `[object Object]`。
416
+ - 群聊 @ 触发 AI:适配器入站标注 `metadata.mentioned`(icqq/qq/slack/onebot11/onebot12/napcat/milky/discord/telegram/kook/dingtalk/satori),`matchAiTrigger` 补齐 ignorePrefixes/respondToAt/respondToPrivate/keywords(默认值与 legacy 对齐)。
417
+ - im_transcripts 全量流水恢复写入(chat_history 工具可用);群聊旁听上下文回迁。
418
+ - `ai.trigger.timeout/thinkingMessage/errorTemplate` 生效;masters/trusted 角色解析对齐 legacy。
419
+ - `Message.sender` 统一为用户 ID(onebot11/12、napcat、milky 原误传显示名);quote_id 经 metadata 接入 AI 引用上下文。
420
+
421
+ - Updated dependencies [16ec4e8]
422
+ - Updated dependencies [cc5c94d]
423
+ - Updated dependencies [447f3e2]
424
+ - @zhin.js/core@1.3.5
425
+ - @zhin.js/host-http@1.0.1
426
+ - zhin.js@4.1.3
427
+ - @zhin.js/logger@1.0.75
428
+ - @zhin.js/plugin-runtime@1.0.1
429
+ - @zhin.js/adapter@1.0.1
430
+
431
+ ## 3.0.2
432
+
433
+ ### Patch Changes
434
+
435
+ - 872c583: fix: 代码格式优化
436
+ - Updated dependencies [872c583]
437
+ - Updated dependencies [872c583]
438
+ - @zhin.js/host-router@2.0.3
439
+ - zhin.js@4.1.2
440
+
441
+ ## 3.0.1
442
+
443
+ ### Patch Changes
444
+
445
+ - 5cc9c03: fix: ai 优化
446
+ - b9b3881: fix: 增加游戏引擎以及部分游戏
447
+ - Updated dependencies [5cc9c03]
448
+ - Updated dependencies [7700903]
449
+ - @zhin.js/host-router@2.0.2
450
+ - zhin.js@4.1.1
451
+
452
+ ## 3.0.0
453
+
454
+ ### Patch Changes
455
+
456
+ - c4575c9: fix: 输入输出优化,文档优化
457
+ - Updated dependencies [c4575c9]
458
+ - Updated dependencies [c4575c9]
459
+ - @zhin.js/host-router@2.0.1
460
+ - zhin.js@4.1.0
461
+
462
+ ## 2.0.1
463
+
464
+ ### Patch Changes
465
+
466
+ - Updated dependencies [ae5239c]
467
+ - zhin.js@4.0.1
468
+ - @zhin.js/host-router@2.0.0
469
+
470
+ ## 2.0.0
471
+
472
+ ### Patch Changes
473
+
474
+ - zhin.js@3.0.0
475
+ - @zhin.js/host-router@2.0.0
476
+
477
+ ## 1.0.1
478
+
479
+ ### Patch Changes
480
+
481
+ - d8def69: fix: 性能优化
482
+ - 2ef4896: fix: 更新概念 Bot=>Endpoint,已适配后续更多的业务场景;统一角色权限
483
+ - Updated dependencies [d8def69]
484
+ - Updated dependencies [2ef4896]
485
+ - @zhin.js/host-router@1.0.1
486
+ - zhin.js@2.0.1
487
+
488
+ ## 1.0.0
489
+
490
+ ### Patch Changes
491
+
492
+ - zhin.js@2.0.0
493
+ - @zhin.js/host-router@1.0.0
494
+
495
+ ## 0.0.42
496
+
497
+ ### Patch Changes
498
+
499
+ - Updated dependencies [d8547d2]
500
+ - zhin.js@1.0.92
501
+ - @zhin.js/host-router@0.0.3
502
+
503
+ ## 0.0.41
504
+
505
+ ### Patch Changes
506
+
507
+ - Updated dependencies [3735e96]
508
+ - zhin.js@1.0.91
509
+ - @zhin.js/host-router@0.0.3
510
+
511
+ ## 0.0.40
512
+
513
+ ### Patch Changes
514
+
515
+ - c8f8207: fix: 修复内存泄露问题
516
+ - Updated dependencies [c8f8207]
517
+ - @zhin.js/host-router@0.0.3
518
+ - zhin.js@1.0.90
519
+
520
+ ## 0.0.39
521
+
522
+ ### Patch Changes
523
+
524
+ - Updated dependencies [c78d2cd]
525
+ - @zhin.js/host-router@0.0.2
526
+ - zhin.js@1.0.89
527
+
528
+ ## 0.0.38
529
+
530
+ ### Patch Changes
531
+
532
+ - Updated dependencies [ccb6e24]
533
+ - zhin.js@1.0.88
534
+
535
+ ## 0.0.37
536
+
537
+ ### Patch Changes
538
+
539
+ - 90d9efd: fix: 处理包名
540
+ - zhin.js@1.0.87
541
+ - @zhin.js/host-router@0.0.1
542
+
543
+ ## 0.0.36
544
+
545
+ ### Patch Changes
546
+
547
+ - 7e14f8d: fix: 统一发个版,优化一些列安全问题
548
+ - Updated dependencies [7e14f8d]
549
+ - zhin.js@1.0.86
550
+ - @zhin.js/host-router@1.0.79
551
+
552
+ ## 0.0.35
553
+
554
+ ### Patch Changes
555
+
556
+ - zhin.js@1.0.85
557
+ - @zhin.js/host-router@1.0.78
558
+
559
+ ## 0.0.34
560
+
561
+ ### Patch Changes
562
+
563
+ - f19d2e0: fix: remove multiple runtime support
564
+ - Updated dependencies [0db9fed]
565
+ - Updated dependencies [f19d2e0]
566
+ - zhin.js@1.0.84
567
+ - @zhin.js/host-router@1.0.77
568
+
569
+ ## 0.0.33
570
+
571
+ ### Patch Changes
572
+
573
+ - 775427e: fix: edge 支持
574
+ - Updated dependencies [775427e]
575
+ - @zhin.js/host-router@1.0.76
576
+ - zhin.js@1.0.83
577
+
578
+ ## 0.0.32
579
+
580
+ ### Patch Changes
581
+
582
+ - 32049f5: fix: init publish
583
+ - Updated dependencies [32049f5]
584
+ - @zhin.js/host-router@1.0.75
585
+ - zhin.js@1.0.82
586
+
587
+ ## 0.0.31
588
+
589
+ ### Patch Changes
590
+
591
+ - Updated dependencies [8086ccb]
592
+ - zhin.js@1.0.81
593
+ - @zhin.js/host-router@1.0.74
594
+
595
+ ## 0.0.30
596
+
597
+ ### Patch Changes
598
+
599
+ - zhin.js@1.0.80
600
+ - @zhin.js/host-router@1.0.73
601
+
602
+ ## 0.0.29
603
+
604
+ ### Patch Changes
605
+
606
+ - zhin.js@1.0.79
607
+ - @zhin.js/host-router@1.0.72
608
+
609
+ ## 0.0.28
610
+
611
+ ### Patch Changes
612
+
613
+ - zhin.js@1.0.78
614
+ - @zhin.js/host-router@1.0.71
615
+
616
+ ## 0.0.27
617
+
618
+ ### Patch Changes
619
+
620
+ - zhin.js@1.0.77
621
+ - @zhin.js/host-router@1.0.70
622
+
623
+ ## 0.0.26
624
+
625
+ ### Patch Changes
626
+
627
+ - Updated dependencies [cb9fbf1]
628
+ - zhin.js@1.0.76
629
+ - @zhin.js/host-router@1.0.69
630
+
631
+ ## 0.0.25
632
+
633
+ ### Patch Changes
634
+
635
+ - zhin.js@1.0.75
636
+ - @zhin.js/host-router@1.0.68
637
+
638
+ ## 0.0.24
639
+
640
+ ### Patch Changes
641
+
642
+ - Updated dependencies [c9dec38]
643
+ - zhin.js@1.0.74
644
+ - @zhin.js/host-router@1.0.67
645
+
646
+ ## 0.0.23
647
+
648
+ ### Patch Changes
649
+
650
+ - f1e9a76: fix: 提高 skill 质量
651
+ - zhin.js@1.0.73
652
+ - @zhin.js/host-router@1.0.66
653
+
654
+ ## 0.0.22
655
+
656
+ ### Patch Changes
657
+
658
+ - abc75a4: fix: 优化,客户端构建优化
659
+
660
+ ## 0.0.21
661
+
662
+ ### Patch Changes
663
+
664
+ - e28fd7c: fix: 重新发版
665
+ - Updated dependencies [e28fd7c]
666
+ - zhin.js@1.0.72
667
+ - @zhin.js/host-router@1.0.65
668
+
669
+ ## 0.0.20
670
+
671
+ ### Patch Changes
672
+
673
+ - 4304825: fix: 重新发版
674
+ - Updated dependencies [4304825]
675
+ - zhin.js@1.0.71
676
+ - @zhin.js/host-router@1.0.64
677
+
678
+ ## 0.0.19
679
+
680
+ ### Patch Changes
681
+
682
+ - zhin.js@1.0.68
683
+ - @zhin.js/host-router@1.0.63
684
+
685
+ ## 0.0.18
686
+
687
+ ### Patch Changes
688
+
689
+ - Updated dependencies [0eba6d6]
690
+ - @zhin.js/host-router@1.0.62
691
+ - zhin.js@1.0.67
692
+
693
+ ## 0.0.17
694
+
695
+ ### Patch Changes
696
+
697
+ - zhin.js@1.0.66
698
+ - @zhin.js/host-router@1.0.61
699
+
700
+ ## 0.0.16
701
+
702
+ ### Patch Changes
703
+
704
+ - zhin.js@1.0.65
705
+ - @zhin.js/host-router@1.0.60
706
+
707
+ ## 0.0.15
708
+
709
+ ### Patch Changes
710
+
711
+ - 9577eba: fix: tool 收集 bug,升级 ts 到 6.0.2
712
+ - Updated dependencies [9577eba]
713
+ - zhin.js@1.0.64
714
+ - @zhin.js/host-router@1.0.59
715
+
716
+ ## 0.0.14
717
+
718
+ ### Patch Changes
719
+
720
+ - Updated dependencies [ba30934]
721
+ - @zhin.js/host-router@1.0.58
722
+ - zhin.js@1.0.63
723
+
724
+ ## 0.0.13
725
+
726
+ ### Patch Changes
727
+
728
+ - zhin.js@1.0.62
729
+ - @zhin.js/host-router@1.0.57
730
+
731
+ ## 0.0.12
732
+
733
+ ### Patch Changes
734
+
735
+ - zhin.js@1.0.61
736
+ - @zhin.js/host-router@1.0.56
737
+
738
+ ## 0.0.11
739
+
740
+ ### Patch Changes
741
+
742
+ - 5073d4c: chore: chore: update TypeScript version to ^5.9.3 across all plugins and packages
743
+ feat: enhance ai-text-as-image output registration with off handler for cleanup
744
+ fix: remove unnecessary logging in ensureBuiltinFontsCached function
745
+ refactor: simplify action handlers in html-renderer tools
746
+ chore: add README files for queue-sandbox-poc and event-delivery packages
747
+ chore: adjust pnpm workspace configuration to exclude games directory
748
+ chore: update tsconfig to include plugins directory for TypeScript compilation
749
+ - Updated dependencies [5073d4c]
750
+ - zhin.js@1.0.60
751
+ - @zhin.js/host-router@1.0.55
752
+
753
+ ## 0.0.10
754
+
755
+ ### Patch Changes
756
+
757
+ - c212bf7: fix: 适配器优化
758
+ - Updated dependencies [c212bf7]
759
+ - zhin.js@1.0.59
760
+ - @zhin.js/host-router@1.0.54
761
+
762
+ ## 0.0.9
763
+
764
+ ### Patch Changes
765
+
766
+ - zhin.js@1.0.58
767
+ - @zhin.js/host-router@1.0.53
768
+
769
+ ## 0.0.8
770
+
771
+ ### Patch Changes
772
+
773
+ - zhin.js@1.0.57
774
+ - @zhin.js/host-router@1.0.52
775
+
776
+ ## 0.0.7
777
+
778
+ ### Patch Changes
779
+
780
+ - zhin.js@1.0.56
781
+ - @zhin.js/host-router@1.0.51
782
+
783
+ ## 0.0.6
784
+
785
+ ### Patch Changes
786
+
787
+ - zhin.js@1.0.55
788
+ - @zhin.js/host-router@1.0.50
789
+
790
+ ## 0.0.5
791
+
792
+ ### Patch Changes
793
+
794
+ - 16c8f92: fix: 统一发一次版
795
+ - Updated dependencies [16c8f92]
796
+ - zhin.js@1.0.54
797
+ - @zhin.js/host-router@1.0.49
798
+
799
+ ## 0.0.4
800
+
801
+ ### Patch Changes
802
+
803
+ - zhin.js@1.0.53
804
+ - @zhin.js/host-router@1.0.48
805
+
806
+ ## 0.0.3
807
+
808
+ ### Patch Changes
809
+
810
+ - a3511a0: 各包内 Agent 技能说明已固定为随包发布的 `skills/*/SKILL.md`(替代已移除的运行时 `declareSkill`)。本批为 registry / 分发侧对齐的 **patch** 版本递增。
811
+ - Updated dependencies [a3511a0]
812
+ - @zhin.js/host-router@1.0.47
813
+
814
+ ## 0.0.2
815
+
816
+ ### Patch Changes
817
+
818
+ - Updated dependencies [bb6bfa8]
819
+ - Updated dependencies [bb6bfa8]
820
+ - zhin.js@1.0.52
821
+ - @zhin.js/host-router@1.0.46
822
+
823
+ ## 0.0.1
824
+
825
+ ### Patch Changes
826
+
827
+ - zhin.js@1.0.51
828
+ - @zhin.js/host-router@1.0.45