@zhin.js/adapter-qq 1.1.21 → 1.1.22

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,41 @@
1
1
  # @zhin.js/adapter-qq
2
2
 
3
+ ## 1.1.22
4
+
5
+ ### Patch Changes
6
+
7
+ - b249e5e: ADR 0044 C4:事件映射迁出 core。新增 `@zhin.js/adapter-onebot-events`,承载 OneBot v11 / NapCat / icqq 的原始通知与请求 → 标准事件映射(`receiveOneBotLikeSideEvent`、`mapNoticeParts`、`mapRequestParts`、`resolveSideEventDedupeKey` 及 OneBot 映射表,icqq 差异用覆盖表表达);KOOK、Slack 的映射迁入各自适配器;`@zhin.js/core` 只保留标准事件名、类型与 `buildNotice` / `buildRequest` / `buildSystem` / `senderFromId`,不再含任何平台名。core 不再导出上述映射函数与 `ONEBOT_/KOOK_/SLACK_NOTICE_PARTS_MAP`、`SideEventPlatform`、`OneBotLike*` 类型,适配器改从共享包导入。
8
+ - 41ff1a5: ADR 0044 C5: every official adapter now declares a capability `profile` (its `segments` moved into `profile.default.messaging.segments`). icqq declares the complete profile (per conversation kind: scene, all 14 actions with real limits, events, feedback, delivery) and implements the seven new management ports (`pokeUser`, `unmuteGroupMember`, `muteAllGroupMembers`, `setGroupCard`, `setGroupTitle`, `setGroupEssence`, `inviteGroupMember`) with fresh bot-role reads. qq official declares its passive reply windows; undeclared capabilities stay unsupported.
9
+ - cbd3f14: ADR 0044 integration and C6 guard. `delivery.spool` now reproduces the pre-0044 media rule (icqq `false`, every other official adapter `true`). icqq narrows `actions.recall.others` unless the Bot is admin or owner, and declares recall for groups. Endpoint kind capabilities merge the Endpoint's `operations` (Discord reactions keep working; Discord declares reaction feedback). Adapters in the `@zhin.js/` scope are trusted: their custom prompt text is not labelled `external_content`. Core no longer keeps a telegram/discord interactive-policy table (adapters declare `segments.interactive`). New `pnpm check:no-platform-branches` blocks platform-name branches in runtime code.
10
+ - 4fe49b5: 支持配置按需生效:分离保存与有效版本,独立变更先应用,账号资料更新保留连接,模型按回合使用确定版本;Console 返回结构化应用结果。监听改为仅显式 --watch 启用,开发模板显式选择源码和配置监听。
11
+
12
+ 自变更消费配置应用回执,避免已处理配置被二次重载;持久化本次写入修订和应用结果,未知结果或修订冲突时停止自动续作并保留现场,恢复不会覆盖未经本次变更确认的配置。
13
+
14
+ - Updated dependencies [b249e5e]
15
+ - Updated dependencies [57661f6]
16
+ - Updated dependencies [cbd3f14]
17
+ - Updated dependencies [299863a]
18
+ - Updated dependencies [aaa93d7]
19
+ - Updated dependencies [bd524d1]
20
+ - Updated dependencies [126ae99]
21
+ - Updated dependencies [4fe49b5]
22
+ - Updated dependencies [cce07db]
23
+ - Updated dependencies [b652db3]
24
+ - Updated dependencies [0315ba0]
25
+ - Updated dependencies [00be764]
26
+ - @zhin.js/adapter-onebot-events@0.0.1
27
+ - @zhin.js/core@1.1.56
28
+ - @zhin.js/adapter@1.1.28
29
+ - @zhin.js/im-contract@1.1.11
30
+ - @zhin.js/tool@1.1.15
31
+ - @zhin.js/skill@1.1.13
32
+ - @zhin.js/host-http@1.1.14
33
+ - @zhin.js/feature-kit@1.1.12
34
+ - @zhin.js/client@1.1.24
35
+ - @zhin.js/page@1.1.14
36
+ - @zhin.js/agent-feature@1.1.13
37
+ - @zhin.js/permission@1.1.12
38
+
3
39
  ## 1.1.21
4
40
 
5
41
  ### Patch Changes
@@ -11,11 +11,33 @@ export default defineAdapter({
11
11
  operations: ['recall', 'reaction'],
12
12
  // 媒体 url 直发,base64/path 由 SDK formatMediaData 物化走 /files 上传;
13
13
  // markdown/keyboard 原生按钮承载交互段。
14
- segments: {
15
- supported: ['text', 'mention', 'image', 'audio', 'video', 'file', 'reply', 'markdown', 'keyboard'],
16
- markdown: 'native',
17
- outboundMedia: ['url', 'upload'],
18
- interactive: 'native',
14
+ profile: {
15
+ default: {
16
+ messaging: {
17
+ segments: {
18
+ supported: ['text', 'mention', 'image', 'audio', 'video', 'file', 'reply', 'markdown', 'keyboard'],
19
+ markdown: 'native',
20
+ outboundMedia: ['url', 'upload'],
21
+ interactive: 'native',
22
+ },
23
+ quote: true,
24
+ recall: {},
25
+ },
26
+ actions: {
27
+ recall: { scopes: ['private', 'group', 'channel'] },
28
+ quoteReply: { scopes: ['private', 'group', 'channel'] },
29
+ },
30
+ delivery: { send: true, requiresMessageSeq: true, spool: true },
31
+ },
32
+ private: {
33
+ delivery: { passiveWindow: { seconds: 3600, maxMessages: 4 } },
34
+ },
35
+ group: {
36
+ delivery: { passiveWindow: { seconds: 300, maxMessages: 5 } },
37
+ },
38
+ channel: {
39
+ delivery: { passiveWindow: { seconds: 300, maxMessages: 5 } },
40
+ },
19
41
  },
20
42
  createAdapter: context => new QqAdapter(context),
21
43
  });
@@ -23,11 +23,33 @@ export default defineAdapter<QqEndpointConfig>({
23
23
  operations: ['recall', 'reaction'],
24
24
  // 媒体 url 直发,base64/path 由 SDK formatMediaData 物化走 /files 上传;
25
25
  // markdown/keyboard 原生按钮承载交互段。
26
- segments: {
27
- supported: ['text', 'mention', 'image', 'audio', 'video', 'file', 'reply', 'markdown', 'keyboard'],
28
- markdown: 'native',
29
- outboundMedia: ['url', 'upload'],
30
- interactive: 'native',
26
+ profile: {
27
+ default: {
28
+ messaging: {
29
+ segments: {
30
+ supported: ['text', 'mention', 'image', 'audio', 'video', 'file', 'reply', 'markdown', 'keyboard'],
31
+ markdown: 'native',
32
+ outboundMedia: ['url', 'upload'],
33
+ interactive: 'native',
34
+ },
35
+ quote: true,
36
+ recall: {},
37
+ },
38
+ actions: {
39
+ recall: { scopes: ['private', 'group', 'channel'] },
40
+ quoteReply: { scopes: ['private', 'group', 'channel'] },
41
+ },
42
+ delivery: { send: true, requiresMessageSeq: true, spool: true },
43
+ },
44
+ private: {
45
+ delivery: { passiveWindow: { seconds: 3600, maxMessages: 4 } },
46
+ },
47
+ group: {
48
+ delivery: { passiveWindow: { seconds: 300, maxMessages: 5 } },
49
+ },
50
+ channel: {
51
+ delivery: { passiveWindow: { seconds: 300, maxMessages: 5 } },
52
+ },
31
53
  },
32
54
  createAdapter: context => new QqAdapter(context),
33
55
  });
@@ -1,4 +1,4 @@
1
- import { receiveOneBotLikeSideEvent } from '@zhin.js/core';
1
+ import { receiveOneBotLikeSideEvent } from '@zhin.js/adapter-onebot-events';
2
2
  import { formatCompact } from '@zhin.js/logger';
3
3
  export function bindQqBotSideEvents(bot, dispatch) {
4
4
  // qq-official-bot emits every dotted prefix. Listening at `notice` once avoids
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-qq",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
4
4
  "description": "Zhin.js QQ Official adapter for Plugin Runtime (WebSocket gateway)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -34,27 +34,28 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "qq-official-bot": "^1.3.3",
37
- "@zhin.js/adapter": "1.1.27",
38
- "@zhin.js/agent-feature": "1.1.12",
39
- "@zhin.js/client": "1.1.23",
37
+ "@zhin.js/adapter-onebot-events": "0.0.1",
38
+ "@zhin.js/adapter": "1.1.28",
39
+ "@zhin.js/agent-feature": "1.1.13",
40
+ "@zhin.js/client": "1.1.24",
40
41
  "@zhin.js/console-contract": "1.1.3",
41
- "@zhin.js/core": "1.1.55",
42
- "@zhin.js/feature-kit": "1.1.11",
43
- "@zhin.js/host-http": "1.1.13",
44
- "@zhin.js/im-contract": "1.1.10",
42
+ "@zhin.js/core": "1.1.56",
43
+ "@zhin.js/feature-kit": "1.1.12",
44
+ "@zhin.js/host-http": "1.1.14",
45
+ "@zhin.js/im-contract": "1.1.11",
45
46
  "@zhin.js/logger": "1.1.2",
46
- "@zhin.js/page": "1.1.13",
47
- "@zhin.js/permission": "1.1.11",
48
- "@zhin.js/skill": "1.1.12",
49
- "@zhin.js/tool": "1.1.14"
47
+ "@zhin.js/page": "1.1.14",
48
+ "@zhin.js/permission": "1.1.12",
49
+ "@zhin.js/skill": "1.1.13",
50
+ "@zhin.js/tool": "1.1.15"
50
51
  },
51
52
  "peerDependencies": {
52
53
  "zod": "^4.0.0",
53
- "@zhin.js/adapter": "^1.1.27",
54
- "@zhin.js/command": "^1.1.13",
55
- "@zhin.js/core": "^1.1.55",
56
- "@zhin.js/middleware": "^1.1.12",
57
- "zhin.js": "^1.1.20"
54
+ "@zhin.js/adapter": "^1.1.28",
55
+ "@zhin.js/command": "^1.1.14",
56
+ "@zhin.js/core": "^1.1.56",
57
+ "@zhin.js/middleware": "^1.1.13",
58
+ "zhin.js": "^1.1.21"
58
59
  },
59
60
  "peerDependenciesMeta": {
60
61
  "@zhin.js/command": {
@@ -75,8 +76,8 @@
75
76
  "typescript": "^6.0.3",
76
77
  "vitest": "^4.1.10",
77
78
  "zod": "^4.4.3",
78
- "@zhin.js/host-http": "1.1.13",
79
- "zhin.js": "1.1.20"
79
+ "@zhin.js/host-http": "1.1.14",
80
+ "zhin.js": "1.1.21"
80
81
  },
81
82
  "files": [
82
83
  "adapters",
package/plugin.js CHANGED
@@ -7,6 +7,7 @@ import { createQqConsoleRpc } from "./lib/console.js";
7
7
  import { cancelQqConsoleBind } from "./lib/qq-console.js";
8
8
  export default definePlugin({
9
9
  name: 'qq',
10
+ configUpdate: { featurePaths: [['nickname'], ['profile'], ['endpoints']] },
10
11
  metadata: {
11
12
  displayName: 'QQ Official WebSocket Adapter',
12
13
  },
@@ -1,4 +1,4 @@
1
- import { receiveOneBotLikeSideEvent, type OneBotLikeRawEvent } from '@zhin.js/core';
1
+ import { receiveOneBotLikeSideEvent, type OneBotLikeRawEvent } from '@zhin.js/adapter-onebot-events';
2
2
  import type { EndpointEventEmitter } from 'zhin.js/adapter';
3
3
  import { formatCompact, type getAdapterLogger } from '@zhin.js/logger';
4
4
  import type { ApproveJoinRequestOptions } from 'qq-official-bot';