@zhin.js/adapter-onebot11 1.1.11 → 1.1.12

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,28 @@
1
1
  # @zhin.js/adapter-onebot11
2
2
 
3
+ ## 1.1.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 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`.
8
+ - Updated dependencies [1a11207]
9
+ - Updated dependencies [9943df6]
10
+ - Updated dependencies [5be09ae]
11
+ - Updated dependencies [a3ab153]
12
+ - Updated dependencies [e8f7309]
13
+ - Updated dependencies [5afc18f]
14
+ - Updated dependencies [d3563d9]
15
+ - Updated dependencies [c618eb7]
16
+ - Updated dependencies [fbfefb7]
17
+ - @zhin.js/tool@1.1.8
18
+ - @zhin.js/core@1.1.47
19
+ - @zhin.js/adapter@1.1.21
20
+ - @zhin.js/feature-kit@1.1.7
21
+ - @zhin.js/im-contract@1.1.5
22
+ - @zhin.js/agent-feature@1.1.8
23
+ - @zhin.js/skill@1.1.8
24
+ - @zhin.js/host-http@1.1.8
25
+
3
26
  ## 1.1.11
4
27
 
5
28
  ### Patch Changes
package/lib/protocol.js CHANGED
@@ -228,7 +228,7 @@ function canonicalToOneBotSegment(segment) {
228
228
  case 'keyboard':
229
229
  throw new EndpointDeliveryError('unsupported_operation', `OneBot11 standard has no ${segment.type} message segment`, 'not_sent');
230
230
  case 'share': {
231
- if (['audio', 'artist', 'duration', 'config'].some(key => data[key] !== undefined)) {
231
+ if (['audio', 'artist', 'duration', 'platform', 'config'].some(key => data[key] !== undefined)) {
232
232
  throw new EndpointDeliveryError('unsupported_operation', 'onebot11 rich share metadata is not implemented', 'not_sent');
233
233
  }
234
234
  if (typeof data.url !== 'string' || !/^https?:\/\//.test(data.url) || typeof data.title !== 'string' || !data.title) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-onebot11",
3
- "version": "1.1.11",
3
+ "version": "1.1.12",
4
4
  "description": "Zhin.js OneBot 11 adapter for Plugin Runtime (WebSocket client)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -44,16 +44,16 @@
44
44
  "@imhelper/onebot-v11": "1.0.7",
45
45
  "imhelper": "1.0.7",
46
46
  "ws": "^8.21.1",
47
- "@zhin.js/agent-feature": "1.1.7",
48
- "@zhin.js/feature-kit": "1.1.6",
49
- "@zhin.js/core": "1.1.46",
50
- "@zhin.js/adapter": "1.1.20",
51
- "@zhin.js/host-http": "1.1.7",
52
- "@zhin.js/im-contract": "1.1.4",
47
+ "@zhin.js/adapter": "1.1.21",
48
+ "@zhin.js/agent-feature": "1.1.8",
49
+ "@zhin.js/core": "1.1.47",
50
+ "@zhin.js/feature-kit": "1.1.7",
51
+ "@zhin.js/host-http": "1.1.8",
52
+ "@zhin.js/im-contract": "1.1.5",
53
53
  "@zhin.js/logger": "1.1.2",
54
54
  "@zhin.js/permission": "1.1.7",
55
- "@zhin.js/skill": "1.1.7",
56
- "@zhin.js/tool": "1.1.7"
55
+ "@zhin.js/skill": "1.1.8",
56
+ "@zhin.js/tool": "1.1.8"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/node": "^26.1.2",
@@ -61,15 +61,15 @@
61
61
  "typescript": "^6.0.3",
62
62
  "vitest": "^4.1.10",
63
63
  "zod": "^4.4.3",
64
- "@zhin.js/host-http": "1.1.7",
65
- "zhin.js": "1.1.11"
64
+ "@zhin.js/host-http": "1.1.8",
65
+ "zhin.js": "1.1.12"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "zod": "^4.0.0",
69
- "@zhin.js/adapter": "^1.1.20",
70
- "@zhin.js/command": "^1.1.8",
71
- "@zhin.js/core": "^1.1.46",
72
- "zhin.js": "^1.1.11"
69
+ "@zhin.js/adapter": "^1.1.21",
70
+ "@zhin.js/command": "^1.1.9",
71
+ "@zhin.js/core": "^1.1.47",
72
+ "zhin.js": "^1.1.12"
73
73
  },
74
74
  "peerDependenciesMeta": {
75
75
  "@zhin.js/command": {
package/src/protocol.ts CHANGED
@@ -344,7 +344,7 @@ function canonicalToOneBotSegment(segment: OneBot11WireSegment): OneBot11Segment
344
344
  case 'keyboard':
345
345
  throw new EndpointDeliveryError('unsupported_operation', `OneBot11 standard has no ${segment.type} message segment`, 'not_sent');
346
346
  case 'share': {
347
- if (['audio', 'artist', 'duration', 'config'].some(key => data[key] !== undefined)) {
347
+ if (['audio', 'artist', 'duration', 'platform', 'config'].some(key => data[key] !== undefined)) {
348
348
  throw new EndpointDeliveryError('unsupported_operation', 'onebot11 rich share metadata is not implemented', 'not_sent');
349
349
  }
350
350
  if (typeof data.url !== 'string' || !/^https?:\/\//.test(data.url) || typeof data.title !== 'string' || !data.title) {