@zhin.js/adapter-kook 1.1.14 → 1.1.15

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-kook
2
2
 
3
+ ## 1.1.15
4
+
5
+ ### Patch Changes
6
+
7
+ - 7d68df6: 精简 Agent 内置固定提示词与消息说明,保留工具、审批和结构化回复能力。适配器 Skill 按会话场景拆分,群/频道管理仅向对应场景披露;提示段与模型消息段支持场景声明,沿用当前回合权限和 generation 投影。
8
+ - Updated dependencies [f98025b]
9
+ - Updated dependencies [66ec1a5]
10
+ - Updated dependencies [7d68df6]
11
+ - Updated dependencies [bf0fa9f]
12
+ - Updated dependencies [3326db3]
13
+ - Updated dependencies [e91235e]
14
+ - Updated dependencies [6da2bad]
15
+ - Updated dependencies [3781f1c]
16
+ - @zhin.js/core@1.1.50
17
+ - @zhin.js/adapter@1.1.22
18
+ - @zhin.js/im-contract@1.1.6
19
+ - @zhin.js/tool@1.1.9
20
+ - @zhin.js/host-http@1.1.9
21
+ - @zhin.js/agent-feature@1.1.9
22
+ - @zhin.js/feature-kit@1.1.8
23
+ - @zhin.js/permission@1.1.8
24
+ - @zhin.js/skill@1.1.9
25
+
3
26
  ## 1.1.14
4
27
 
5
28
  ### Patch Changes
@@ -1,9 +1,17 @@
1
1
  ---
2
2
  name: kook
3
- platforms: [kook]
3
+ platforms:
4
+ - kook
4
5
  description: KOOK 角色和黑名单管理能力。
5
- keywords: [kook, role, 角色, blacklist, 黑名单]
6
- tags: [adapter, community]
6
+ keywords:
7
+ - kook
8
+ - role
9
+ - 角色
10
+ - blacklist
11
+ - 黑名单
12
+ tags:
13
+ - adapter
14
+ - community
7
15
  tools:
8
16
  - grant_role
9
17
  - revoke_role
@@ -11,8 +19,9 @@ tools:
11
19
  - create_role
12
20
  - delete_role
13
21
  - blacklist
22
+ scopes:
23
+ - channel
14
24
  ---
15
-
16
25
  # KOOK
17
26
 
18
27
  角色操作前先用 `list_roles` 确认角色 ID,再授予、撤销、创建或删除角色。`blacklist` 是黑名单操作,影响用户重新加入服务器,执行前应确认目标用户和意图。
@@ -11,6 +11,7 @@ export default defineAgentTool({
11
11
  remark: z.string().optional().describe('备注(add 可选)'),
12
12
  }),
13
13
  adapter: 'kook',
14
+ scopes: ["channel"],
14
15
  tags: ['kook'],
15
16
  permissions: [platformPermission('kook', 'guild_admin')],
16
17
  async execute({ guild_id, action, user_id, remark }, context) {
@@ -11,6 +11,7 @@ export default defineAgentTool<{ guild_id: string; action: 'add' | 'remove'; use
11
11
  remark: z.string().optional().describe('备注(add 可选)'),
12
12
  }),
13
13
  adapter: 'kook',
14
+ scopes: ["channel"],
14
15
  tags: ['kook'],
15
16
  permissions: [platformPermission('kook', 'guild_admin')],
16
17
  async execute({ guild_id, action, user_id, remark }: { guild_id: string; action: 'add' | 'remove'; user_id: string; remark?: string }, context) {
@@ -9,6 +9,7 @@ export default defineAgentTool({
9
9
  name: z.string().describe('角色名称'),
10
10
  }),
11
11
  adapter: 'kook',
12
+ scopes: ["channel"],
12
13
  tags: ['kook'],
13
14
  permissions: [platformPermission('kook', 'guild_owner')],
14
15
  async execute({ guild_id, name }, context) {
@@ -9,6 +9,7 @@ export default defineAgentTool<{ guild_id: string; name: string }>({
9
9
  name: z.string().describe('角色名称'),
10
10
  }),
11
11
  adapter: 'kook',
12
+ scopes: ["channel"],
12
13
  tags: ['kook'],
13
14
  permissions: [platformPermission('kook', 'guild_owner')],
14
15
  async execute({ guild_id, name }: { guild_id: string; name: string }, context) {
@@ -9,6 +9,7 @@ export default defineAgentTool({
9
9
  role_id: z.string().describe('角色 ID'),
10
10
  }),
11
11
  adapter: 'kook',
12
+ scopes: ["channel"],
12
13
  tags: ['kook'],
13
14
  permissions: [platformPermission('kook', 'guild_owner')],
14
15
  async execute({ guild_id, role_id }, context) {
@@ -9,6 +9,7 @@ export default defineAgentTool<{ guild_id: string; role_id: string }>({
9
9
  role_id: z.string().describe('角色 ID'),
10
10
  }),
11
11
  adapter: 'kook',
12
+ scopes: ["channel"],
12
13
  tags: ['kook'],
13
14
  permissions: [platformPermission('kook', 'guild_owner')],
14
15
  async execute({ guild_id, role_id }: { guild_id: string; role_id: string }, context) {
@@ -10,6 +10,7 @@ export default defineAgentTool({
10
10
  role_id: z.string().describe('角色 ID'),
11
11
  }),
12
12
  adapter: 'kook',
13
+ scopes: ["channel"],
13
14
  tags: ['kook'],
14
15
  permissions: [platformPermission('kook', 'manage_roles')],
15
16
  async execute({ guild_id, user_id, role_id }, context) {
@@ -10,6 +10,7 @@ export default defineAgentTool<{ guild_id: string; user_id: string; role_id: str
10
10
  role_id: z.string().describe('角色 ID'),
11
11
  }),
12
12
  adapter: 'kook',
13
+ scopes: ["channel"],
13
14
  tags: ['kook'],
14
15
  permissions: [platformPermission('kook', 'manage_roles')],
15
16
  async execute({ guild_id, user_id, role_id }: { guild_id: string; user_id: string; role_id: string }, context) {
@@ -7,6 +7,7 @@ export default defineAgentTool({
7
7
  guild_id: z.string().describe('服务器 ID'),
8
8
  }),
9
9
  adapter: 'kook',
10
+ scopes: ["channel"],
10
11
  tags: ['kook'],
11
12
  async execute({ guild_id }, context) {
12
13
  const client = context.$client;
@@ -7,6 +7,7 @@ export default defineAgentTool<{ guild_id: string }>({
7
7
  guild_id: z.string().describe('服务器 ID'),
8
8
  }),
9
9
  adapter: 'kook',
10
+ scopes: ["channel"],
10
11
  tags: ['kook'],
11
12
  async execute({ guild_id }: { guild_id: string }, context) {
12
13
  const client = context.$client;
@@ -10,6 +10,7 @@ export default defineAgentTool({
10
10
  role_id: z.string().describe('角色 ID'),
11
11
  }),
12
12
  adapter: 'kook',
13
+ scopes: ["channel"],
13
14
  tags: ['kook'],
14
15
  permissions: [platformPermission('kook', 'manage_roles')],
15
16
  async execute({ guild_id, user_id, role_id }, context) {
@@ -10,6 +10,7 @@ export default defineAgentTool<{ guild_id: string; user_id: string; role_id: str
10
10
  role_id: z.string().describe('角色 ID'),
11
11
  }),
12
12
  adapter: 'kook',
13
+ scopes: ["channel"],
13
14
  tags: ['kook'],
14
15
  permissions: [platformPermission('kook', 'manage_roles')],
15
16
  async execute({ guild_id, user_id, role_id }: { guild_id: string; user_id: string; role_id: string }, context) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-kook",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "description": "Zhin.js KOOK adapter for Plugin Runtime (WebSocket gateway or Webhook)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -33,23 +33,23 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "kook-client": "^1.0.5",
36
- "@zhin.js/adapter": "1.1.21",
37
- "@zhin.js/agent-feature": "1.1.8",
38
- "@zhin.js/core": "1.1.49",
39
- "@zhin.js/feature-kit": "1.1.7",
40
- "@zhin.js/host-http": "1.1.8",
41
- "@zhin.js/im-contract": "1.1.5",
36
+ "@zhin.js/adapter": "1.1.22",
37
+ "@zhin.js/agent-feature": "1.1.9",
38
+ "@zhin.js/core": "1.1.50",
39
+ "@zhin.js/feature-kit": "1.1.8",
40
+ "@zhin.js/host-http": "1.1.9",
41
+ "@zhin.js/im-contract": "1.1.6",
42
42
  "@zhin.js/logger": "1.1.2",
43
- "@zhin.js/permission": "1.1.7",
44
- "@zhin.js/skill": "1.1.8",
45
- "@zhin.js/tool": "1.1.8"
43
+ "@zhin.js/permission": "1.1.8",
44
+ "@zhin.js/skill": "1.1.9",
45
+ "@zhin.js/tool": "1.1.9"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "zod": "^4.0.0",
49
- "@zhin.js/adapter": "^1.1.21",
50
- "@zhin.js/command": "^1.1.9",
51
- "@zhin.js/core": "^1.1.49",
52
- "zhin.js": "^1.1.14"
49
+ "@zhin.js/adapter": "^1.1.22",
50
+ "@zhin.js/command": "^1.1.10",
51
+ "@zhin.js/core": "^1.1.50",
52
+ "zhin.js": "^1.1.15"
53
53
  },
54
54
  "peerDependenciesMeta": {
55
55
  "@zhin.js/command": {
@@ -67,8 +67,8 @@
67
67
  "typescript": "^6.0.3",
68
68
  "vitest": "^4.1.10",
69
69
  "zod": "^4.4.3",
70
- "@zhin.js/host-http": "1.1.8",
71
- "zhin.js": "1.1.14"
70
+ "@zhin.js/host-http": "1.1.9",
71
+ "zhin.js": "1.1.15"
72
72
  },
73
73
  "files": [
74
74
  "adapters",