@zhin.js/adapter-qq 1.1.9 → 1.1.11

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 (3) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +39 -35
  3. package/package.json +16 -16
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @zhin.js/adapter-qq
2
2
 
3
+ ## 1.1.11
4
+
5
+ ### Patch Changes
6
+
7
+ - 9816c18: 将应用插件装配改为 configVersion: 2:主配置 plugins 映射实例名到包,disable_plugins 控制启停,业务配置使用顶层同名块。package.json 继续保留 features、entry、engine 等包契约,并支持静态 displayName/icon。
8
+
9
+ 这是配置格式的破坏性更新:旧配置不能继续运行,请先停止 Bot,运行 `zhin migrate instances` 预览,再使用 `--apply` 转换;提供备份与中断继续/回滚,无法无损转换的嵌套、optional 和别名碰撞需人工迁移。Runtime、Console、CLI 与创建向导统一使用新声明。
10
+
11
+ 保留框架顶层 `menuKeyword` / `menuStyle`,通过当前 generation 的 Root 配置视图供 Command Feature 消费;严格校验和配置修改不会丢失菜单设置,子实例配置保持隔离。
12
+
13
+ - Updated dependencies [c407bd2]
14
+ - Updated dependencies [064b06d]
15
+ - Updated dependencies [2b4d6dc]
16
+ - Updated dependencies [a50fc8a]
17
+ - Updated dependencies [b58548a]
18
+ - Updated dependencies [e914a93]
19
+ - Updated dependencies [e914a93]
20
+ - Updated dependencies [064b06d]
21
+ - @zhin.js/core@1.1.46
22
+ - @zhin.js/feature-kit@1.1.6
23
+ - @zhin.js/host-http@1.1.7
24
+ - @zhin.js/permission@1.1.7
25
+ - @zhin.js/adapter@1.1.20
26
+ - @zhin.js/agent-feature@1.1.7
27
+ - @zhin.js/skill@1.1.7
28
+ - @zhin.js/tool@1.1.7
29
+
30
+ ## 1.1.10
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [dd7f25f]
35
+ - @zhin.js/core@1.1.45
36
+
3
37
  ## 1.1.9
4
38
 
5
39
  ### Patch Changes
package/README.md CHANGED
@@ -24,7 +24,7 @@ pnpm add @zhin.js/adapter-qq
24
24
  - `@zhin.js/adapter` — 约定式 `adapters/qq/index.ts`(`defineAdapter`)
25
25
  - `@zhin.js/core` — `Endpoint.emit(...)` 入站、`outboundMessageToken` 出站
26
26
  - `zhin.js` — `plugin.ts`(`definePlugin`)
27
- - 配置经插件 `schema.json` 落到 `plugins.<instanceKey>`
27
+ - 配置经插件 `schema.json` 落到顶层 `<instanceKey>`
28
28
  - **无需** `@zhin.js/host-http` / `@zhin.js/host-router`(WebSocket 路径)
29
29
 
30
30
  入站:`gateway.receive({ conversation, message, content, sender, metadata })`(ConversationRef 结构化寻址)
@@ -43,15 +43,17 @@ pnpm add @zhin.js/adapter-qq
43
43
  ## 最小配置
44
44
 
45
45
  ```yaml
46
+ configVersion: 2
46
47
  # zhin.config.yml(Plugin Runtime)
47
48
  plugins:
48
- qq:
49
- # mode: websocket # 默认
50
- endpoints:
51
- - id: my-qq-bot
52
- appid: ${QQ_APPID}
53
- secret: ${QQ_SECRET}
54
- # botKind / intents 可由向导写入;`qq endpoint add` 扫码后会追问公域/私域再写入
49
+ qq: "@zhin.js/adapter-qq"
50
+ qq:
51
+ # mode: websocket # 默认
52
+ endpoints:
53
+ - id: my-qq-bot
54
+ appid: ${QQ_APPID}
55
+ secret: ${QQ_SECRET}
56
+ # botKind / intents 可由向导写入;`qq endpoint add` 扫码后会追问公域/私域再写入
55
57
  ```
56
58
 
57
59
  ### botKind 与 intents
@@ -70,35 +72,37 @@ WebSocket Identify 的 `intents` **必须与开放平台已开通的权限一致
70
72
  多账号:一个插件实例挂多个 endpoint(`endpoints` 数组逐项覆盖顶层字段,`id` 必填):
71
73
 
72
74
  ```yaml
75
+ configVersion: 2
73
76
  plugins:
74
- qq:
75
- mode: websocket
76
- endpoints:
77
- - id: main-bot
78
- appid: ${QQ_APPID}
79
- secret: ${QQ_SECRET}
80
- botKind: public
81
- intents:
82
- - GROUP_AND_C2C_EVENT
83
- - GROUP_MEMBER
84
- - GUILDS
85
- - GUILD_MEMBERS
86
- - DIRECT_MESSAGE
87
- - PUBLIC_GUILD_MESSAGES
88
- - id: private-bot
89
- appid: ${QQ_APPID_2}
90
- secret: ${QQ_SECRET_2}
91
- botKind: private
92
- intents:
93
- - GROUP_AND_C2C_EVENT
94
- - GROUP_MEMBER
95
- - GUILDS
96
- - GUILD_MEMBERS
97
- - DIRECT_MESSAGE
98
- - GUILD_MESSAGES
77
+ qq: "@zhin.js/adapter-qq"
78
+ qq:
79
+ mode: websocket
80
+ endpoints:
81
+ - id: main-bot
82
+ appid: ${QQ_APPID}
83
+ secret: ${QQ_SECRET}
84
+ botKind: public
85
+ intents:
86
+ - GROUP_AND_C2C_EVENT
87
+ - GROUP_MEMBER
88
+ - GUILDS
89
+ - GUILD_MEMBERS
90
+ - DIRECT_MESSAGE
91
+ - PUBLIC_GUILD_MESSAGES
92
+ - id: private-bot
93
+ appid: ${QQ_APPID_2}
94
+ secret: ${QQ_SECRET_2}
95
+ botKind: private
96
+ intents:
97
+ - GROUP_AND_C2C_EVENT
98
+ - GROUP_MEMBER
99
+ - GUILDS
100
+ - GUILD_MEMBERS
101
+ - DIRECT_MESSAGE
102
+ - GUILD_MESSAGES
99
103
  ```
100
104
 
101
- 根插件 `zhin.plugins`(或项目图)需引用 `@zhin.js/adapter-qq`(`instanceKey: qq`)。
105
+ 主配置 `plugins` 映射需引用 `@zhin.js/adapter-qq`(`instanceKey: qq`)。
102
106
 
103
107
  ## Endpoint 管理命令
104
108
 
@@ -106,7 +110,7 @@ plugins:
106
110
 
107
111
  | 命令 | 说明 |
108
112
  |------|------|
109
- | `qq endpoint add [name]` | 手机 QQ 扫码绑定 → **追问公域/私域** → 一次性写入 `.env` + `plugins.qq.endpoints`(重启生效) |
113
+ | `qq endpoint add [name]` | 手机 QQ 扫码绑定 → **追问公域/私域** → 一次性写入 `.env` + `qq.endpoints`(重启生效) |
110
114
  | `qq endpoint cancel` | 取消进行中的扫码绑定或待确认的公域/私域选择 |
111
115
  | `qq endpoint list` | 列出运行中与配置中的 endpoints |
112
116
  | `qq endpoint remove <name>` | 从配置移除 endpoint(`.env` 键保留,可手动清理) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-qq",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "description": "Zhin.js QQ Official adapter for Plugin Runtime (WebSocket gateway)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -34,24 +34,24 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "qq-official-bot": "^1.3.1",
37
- "@zhin.js/adapter": "1.1.19",
38
- "@zhin.js/agent-feature": "1.1.6",
39
- "@zhin.js/core": "1.1.44",
40
- "@zhin.js/feature-kit": "1.1.5",
41
- "@zhin.js/host-http": "1.1.6",
37
+ "@zhin.js/adapter": "1.1.20",
38
+ "@zhin.js/agent-feature": "1.1.7",
39
+ "@zhin.js/core": "1.1.46",
40
+ "@zhin.js/feature-kit": "1.1.6",
41
+ "@zhin.js/host-http": "1.1.7",
42
42
  "@zhin.js/im-contract": "1.1.4",
43
43
  "@zhin.js/logger": "1.1.2",
44
- "@zhin.js/permission": "1.1.6",
45
- "@zhin.js/skill": "1.1.6",
46
- "@zhin.js/tool": "1.1.6"
44
+ "@zhin.js/permission": "1.1.7",
45
+ "@zhin.js/skill": "1.1.7",
46
+ "@zhin.js/tool": "1.1.7"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "zod": "^4.0.0",
50
- "@zhin.js/adapter": "^1.1.19",
51
- "@zhin.js/command": "^1.1.7",
52
- "@zhin.js/core": "^1.1.44",
53
- "@zhin.js/middleware": "^1.1.6",
54
- "zhin.js": "^1.1.9"
50
+ "@zhin.js/adapter": "^1.1.20",
51
+ "@zhin.js/command": "^1.1.8",
52
+ "@zhin.js/core": "^1.1.46",
53
+ "@zhin.js/middleware": "^1.1.7",
54
+ "zhin.js": "^1.1.11"
55
55
  },
56
56
  "peerDependenciesMeta": {
57
57
  "@zhin.js/command": {
@@ -72,8 +72,8 @@
72
72
  "typescript": "^6.0.3",
73
73
  "vitest": "^4.1.10",
74
74
  "zod": "^4.4.3",
75
- "@zhin.js/host-http": "1.1.6",
76
- "zhin.js": "1.1.9"
75
+ "@zhin.js/host-http": "1.1.7",
76
+ "zhin.js": "1.1.11"
77
77
  },
78
78
  "files": [
79
79
  "adapters",