@zhin.js/adapter-dingtalk 1.1.10 → 1.1.13

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,60 @@
1
1
  # @zhin.js/adapter-dingtalk
2
2
 
3
+ ## 1.1.13
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [db06de8]
8
+ - @zhin.js/core@1.1.48
9
+
10
+ ## 1.1.12
11
+
12
+ ### Patch Changes
13
+
14
+ - fbfefb7: Share segments accept `data.platform` (the song's music service: qq, netease, kugou, kuwo, migu). icqq maps it to the matching music app id when `config.appid` is absent and offers it to the Agent; adapters that cannot render share app metadata reject it like `audio` and `config`.
15
+ - Updated dependencies [1a11207]
16
+ - Updated dependencies [9943df6]
17
+ - Updated dependencies [5be09ae]
18
+ - Updated dependencies [a3ab153]
19
+ - Updated dependencies [e8f7309]
20
+ - Updated dependencies [5afc18f]
21
+ - Updated dependencies [d3563d9]
22
+ - Updated dependencies [c618eb7]
23
+ - Updated dependencies [fbfefb7]
24
+ - @zhin.js/tool@1.1.8
25
+ - @zhin.js/core@1.1.47
26
+ - @zhin.js/adapter@1.1.21
27
+ - @zhin.js/feature-kit@1.1.7
28
+ - @zhin.js/im-contract@1.1.5
29
+ - @zhin.js/agent-feature@1.1.8
30
+ - @zhin.js/skill@1.1.8
31
+ - @zhin.js/host-http@1.1.8
32
+
33
+ ## 1.1.11
34
+
35
+ ### Patch Changes
36
+
37
+ - 9816c18: 将应用插件装配改为 configVersion: 2:主配置 plugins 映射实例名到包,disable_plugins 控制启停,业务配置使用顶层同名块。package.json 继续保留 features、entry、engine 等包契约,并支持静态 displayName/icon。
38
+
39
+ 这是配置格式的破坏性更新:旧配置不能继续运行,请先停止 Bot,运行 `zhin migrate instances` 预览,再使用 `--apply` 转换;提供备份与中断继续/回滚,无法无损转换的嵌套、optional 和别名碰撞需人工迁移。Runtime、Console、CLI 与创建向导统一使用新声明。
40
+
41
+ 保留框架顶层 `menuKeyword` / `menuStyle`,通过当前 generation 的 Root 配置视图供 Command Feature 消费;严格校验和配置修改不会丢失菜单设置,子实例配置保持隔离。
42
+
43
+ - Updated dependencies [c407bd2]
44
+ - Updated dependencies [064b06d]
45
+ - Updated dependencies [2b4d6dc]
46
+ - Updated dependencies [b58548a]
47
+ - Updated dependencies [e914a93]
48
+ - Updated dependencies [e914a93]
49
+ - Updated dependencies [064b06d]
50
+ - @zhin.js/core@1.1.46
51
+ - @zhin.js/feature-kit@1.1.6
52
+ - @zhin.js/host-http@1.1.7
53
+ - @zhin.js/adapter@1.1.20
54
+ - @zhin.js/agent-feature@1.1.7
55
+ - @zhin.js/skill@1.1.7
56
+ - @zhin.js/tool@1.1.7
57
+
3
58
  ## 1.1.10
4
59
 
5
60
  ### Patch Changes
package/README.md CHANGED
@@ -23,7 +23,7 @@ pnpm add @zhin.js/adapter-dingtalk
23
23
  - `@zhin.js/core` — `Endpoint.emit(...)` 入站、`outboundMessageToken` 出站
24
24
  - `@zhin.js/host-http` — `httpHostToken` 注册 Webhook 路由(**非** legacy host-router/Koa)
25
25
  - `zhin.js` — `plugin.ts`(`definePlugin`)
26
- - 配置经插件 `schema.json` 落到 `plugins.<instanceKey>`
26
+ - 配置经插件 `schema.json` 落到顶层 `<instanceKey>`
27
27
 
28
28
  入站:`gateway.receive({ conversation: ConversationRef, message: { conversation, id }, content: text, sender, metadata })`
29
29
  出站:`send({ conversation, payload })` → sessionWebhook 或 `/robot/send`
@@ -40,19 +40,21 @@ pnpm add @zhin.js/adapter-dingtalk
40
40
  ## 最小配置
41
41
 
42
42
  ```yaml
43
+ configVersion: 2
43
44
  # zhin.config.yml(Plugin Runtime)
44
45
  plugins:
45
- dingtalk:
46
- apiBaseUrl: https://oapi.dingtalk.com # 可选,顶层共享
47
- endpoints:
48
- - id: my-dingtalk-bot
49
- appKey: ${DINGTALK_APP_KEY}
50
- appSecret: ${DINGTALK_APP_SECRET}
51
- robotCode: ${DINGTALK_ROBOT_CODE}
52
- webhookPath: /dingtalk/webhook # 可选,默认 /dingtalk/webhook
46
+ dingtalk: "@zhin.js/adapter-dingtalk"
47
+ dingtalk:
48
+ apiBaseUrl: https://oapi.dingtalk.com # 可选,顶层共享
49
+ endpoints:
50
+ - id: my-dingtalk-bot
51
+ appKey: ${DINGTALK_APP_KEY}
52
+ appSecret: ${DINGTALK_APP_SECRET}
53
+ robotCode: ${DINGTALK_ROBOT_CODE}
54
+ webhookPath: /dingtalk/webhook # 可选,默认 /dingtalk/webhook
53
55
  ```
54
56
 
55
- 根插件 `zhin.plugins`(或项目图)需引用 `@zhin.js/adapter-dingtalk`(`instanceKey: dingtalk`)。
57
+ 主配置 `plugins` 映射需引用 `@zhin.js/adapter-dingtalk`(`instanceKey: dingtalk`)。
56
58
 
57
59
  ## 环境变量
58
60
 
package/lib/protocol.js CHANGED
@@ -185,7 +185,7 @@ export function formatOutboundBody(payload) {
185
185
  case 'reply':
186
186
  throw new EndpointDeliveryError('unsupported_operation', 'DingTalk native quoted replies are not implemented', 'not_sent');
187
187
  case 'share': {
188
- if (['audio', 'artist', 'duration', 'config'].some(key => data[key] !== undefined)) {
188
+ if (['audio', 'artist', 'duration', 'platform', 'config'].some(key => data[key] !== undefined)) {
189
189
  throw new EndpointDeliveryError('unsupported_operation', 'dingtalk rich share metadata is not implemented', 'not_sent');
190
190
  }
191
191
  let url;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-dingtalk",
3
- "version": "1.1.10",
3
+ "version": "1.1.13",
4
4
  "description": "Zhin.js DingTalk (钉钉) adapter for Plugin Runtime (HTTP webhook)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -33,24 +33,24 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "ws": "^8.18.3",
36
- "@zhin.js/adapter": "1.1.19",
37
- "@zhin.js/agent-feature": "1.1.6",
38
- "@zhin.js/core": "1.1.45",
39
- "@zhin.js/feature-kit": "1.1.5",
40
- "@zhin.js/host-http": "1.1.6",
41
- "@zhin.js/im-contract": "1.1.4",
36
+ "@zhin.js/adapter": "1.1.21",
37
+ "@zhin.js/agent-feature": "1.1.8",
38
+ "@zhin.js/core": "1.1.48",
39
+ "@zhin.js/feature-kit": "1.1.7",
40
+ "@zhin.js/host-http": "1.1.8",
41
+ "@zhin.js/im-contract": "1.1.5",
42
42
  "@zhin.js/logger": "1.1.2",
43
- "@zhin.js/skill": "1.1.6",
44
- "@zhin.js/tool": "1.1.6"
43
+ "@zhin.js/skill": "1.1.8",
44
+ "@zhin.js/tool": "1.1.8"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "zod": "^4.0.0",
48
- "@zhin.js/adapter": "^1.1.19",
49
- "@zhin.js/command": "^1.1.7",
50
- "@zhin.js/core": "^1.1.45",
51
- "@zhin.js/host-http": "^1.1.6",
52
- "@zhin.js/permission": "^1.1.6",
53
- "zhin.js": "^1.1.10"
48
+ "@zhin.js/adapter": "^1.1.21",
49
+ "@zhin.js/command": "^1.1.9",
50
+ "@zhin.js/core": "^1.1.48",
51
+ "@zhin.js/host-http": "^1.1.8",
52
+ "@zhin.js/permission": "^1.1.7",
53
+ "zhin.js": "^1.1.13"
54
54
  },
55
55
  "peerDependenciesMeta": {
56
56
  "@zhin.js/command": {
@@ -69,7 +69,7 @@
69
69
  "vitest": "^4.1.10",
70
70
  "zod": "^4.4.3",
71
71
  "@types/ws": "^8.18.1",
72
- "zhin.js": "1.1.10"
72
+ "zhin.js": "1.1.13"
73
73
  },
74
74
  "files": [
75
75
  "adapters",
package/src/protocol.ts CHANGED
@@ -296,7 +296,7 @@ export function formatOutboundBody(payload: unknown): DingTalkSendBody {
296
296
  case 'reply':
297
297
  throw new EndpointDeliveryError('unsupported_operation', 'DingTalk native quoted replies are not implemented', 'not_sent');
298
298
  case 'share': {
299
- if (['audio', 'artist', 'duration', 'config'].some(key => data[key] !== undefined)) {
299
+ if (['audio', 'artist', 'duration', 'platform', 'config'].some(key => data[key] !== undefined)) {
300
300
  throw new EndpointDeliveryError('unsupported_operation', 'dingtalk rich share metadata is not implemented', 'not_sent');
301
301
  }
302
302
  let url: URL;