@zhin.js/adapter-napcat 1.1.13 → 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.
Files changed (23) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/agents/napcat/skills/napcat-files-history/SKILL.md +5 -13
  3. package/agents/napcat/skills/napcat-group-content/SKILL.md +11 -10
  4. package/agents/napcat/skills/napcat-group-files-history/SKILL.md +20 -0
  5. package/agents/napcat/skills/napcat-group-media/SKILL.md +18 -0
  6. package/agents/napcat/skills/napcat-group-settings/SKILL.md +13 -12
  7. package/agents/napcat/skills/napcat-media/SKILL.md +9 -14
  8. package/agents/napcat/skills/napcat-private-history/SKILL.md +16 -0
  9. package/agents/napcat/skills/{napcat-files-history → napcat-private-history}/tools/get_friend_msg_history/index.js +1 -0
  10. package/agents/napcat/skills/{napcat-files-history → napcat-private-history}/tools/get_friend_msg_history/index.ts +1 -0
  11. package/package.json +16 -16
  12. /package/agents/napcat/skills/{napcat-files-history → napcat-group-files-history}/tools/get_group_file_url/index.js +0 -0
  13. /package/agents/napcat/skills/{napcat-files-history → napcat-group-files-history}/tools/get_group_file_url/index.ts +0 -0
  14. /package/agents/napcat/skills/{napcat-files-history → napcat-group-files-history}/tools/get_group_msg_history/index.js +0 -0
  15. /package/agents/napcat/skills/{napcat-files-history → napcat-group-files-history}/tools/get_group_msg_history/index.ts +0 -0
  16. /package/agents/napcat/skills/{napcat-files-history → napcat-group-files-history}/tools/get_group_root_files/index.js +0 -0
  17. /package/agents/napcat/skills/{napcat-files-history → napcat-group-files-history}/tools/get_group_root_files/index.ts +0 -0
  18. /package/agents/napcat/skills/{napcat-files-history → napcat-group-files-history}/tools/upload_group_file/index.js +0 -0
  19. /package/agents/napcat/skills/{napcat-files-history → napcat-group-files-history}/tools/upload_group_file/index.ts +0 -0
  20. /package/agents/napcat/skills/{napcat-media → napcat-group-media}/tools/ai_tts/index.js +0 -0
  21. /package/agents/napcat/skills/{napcat-media → napcat-group-media}/tools/ai_tts/index.ts +0 -0
  22. /package/agents/napcat/skills/{napcat-media → napcat-group-media}/tools/get_ai_characters/index.js +0 -0
  23. /package/agents/napcat/skills/{napcat-media → napcat-group-media}/tools/get_ai_characters/index.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @zhin.js/adapter-napcat
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
+
26
+ ## 1.1.14
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [974fa85]
31
+ - Updated dependencies [1e9b3d6]
32
+ - @zhin.js/core@1.1.49
33
+
3
34
  ## 1.1.13
4
35
 
5
36
  ### Patch Changes
@@ -2,21 +2,13 @@
2
2
  name: napcat-files-history
3
3
  platforms:
4
4
  - napcat
5
- description: NapCatQQ 群文件、下载地址和消息历史能力。
5
+ description: NapCatQQ 文件下载。
6
6
  keywords:
7
- - "napcat"
8
- - "群文件"
9
- - "下载"
10
- - "消息历史"
7
+ - napcat
8
+ - 下载
11
9
  tools:
12
- - "upload_group_file"
13
- - "get_group_file_url"
14
- - "get_group_root_files"
15
- - "download_file"
16
- - "get_group_msg_history"
17
- - "get_friend_msg_history"
10
+ - download_file
18
11
  ---
19
-
20
12
  # napcat-files-history
21
13
 
22
- 文件和历史记录可能包含敏感内容,只读取完成任务所需范围;上传前确认目标群和文件。
14
+ 下载给定文件到缓存目录;只读取任务必需范围,保留工具返回的真实路径。
@@ -4,18 +4,19 @@ platforms:
4
4
  - napcat
5
5
  description: NapCatQQ 群公告与精华消息管理能力。
6
6
  keywords:
7
- - "napcat"
8
- - "群公告"
9
- - "精华消息"
7
+ - napcat
8
+ - 群公告
9
+ - 精华消息
10
10
  tools:
11
- - "set_essence_msg"
12
- - "delete_essence_msg"
13
- - "get_essence_list"
14
- - "send_group_notice"
15
- - "get_group_notice"
16
- - "del_group_notice"
11
+ - set_essence_msg
12
+ - delete_essence_msg
13
+ - get_essence_list
14
+ - send_group_notice
15
+ - get_group_notice
16
+ - del_group_notice
17
+ scopes:
18
+ - group
17
19
  ---
18
-
19
20
  # napcat-group-content
20
21
 
21
22
  先读取现有公告或精华列表,再进行创建、删除或变更;删除操作必须复核稳定 ID。
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: napcat-group-files-history
3
+ platforms:
4
+ - napcat
5
+ scopes:
6
+ - group
7
+ description: NapCatQQ 群文件与群消息历史。
8
+ keywords:
9
+ - napcat
10
+ - 群文件
11
+ - 消息历史
12
+ tools:
13
+ - upload_group_file
14
+ - get_group_file_url
15
+ - get_group_root_files
16
+ - get_group_msg_history
17
+ ---
18
+ # napcat-group-files-history
19
+
20
+ 文件和历史可能包含敏感内容,只读取任务必需范围;上传前确认目标群和文件。
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: napcat-group-media
3
+ platforms:
4
+ - napcat
5
+ scopes:
6
+ - group
7
+ description: NapCatQQ 群 AI 语音角色查询与 TTS。
8
+ keywords:
9
+ - napcat
10
+ - tts
11
+ - 语音
12
+ tools:
13
+ - ai_tts
14
+ - get_ai_characters
15
+ ---
16
+ # napcat-group-media
17
+
18
+ 先查询角色,再生成群 AI 语音;确认目标群。
@@ -4,20 +4,21 @@ platforms:
4
4
  - napcat
5
5
  description: NapCatQQ 群状态、群头像、头衔与签到设置能力。
6
6
  keywords:
7
- - "napcat"
8
- - "群设置"
9
- - "群头像"
10
- - "头衔"
11
- - "签到"
12
- - "禁言"
7
+ - napcat
8
+ - 群设置
9
+ - 群头像
10
+ - 头衔
11
+ - 签到
12
+ - 禁言
13
13
  tools:
14
- - "get_group_shut_list"
15
- - "set_group_portrait"
16
- - "set_title"
17
- - "group_sign"
18
- - "get_group_info_ex"
14
+ - get_group_shut_list
15
+ - set_group_portrait
16
+ - set_title
17
+ - group_sign
18
+ - get_group_info_ex
19
+ scopes:
20
+ - group
19
21
  ---
20
-
21
22
  # napcat-group-settings
22
23
 
23
24
  查询群状态后再修改群设置。头像和头衔变更遵守审批策略,不根据昵称猜测成员。
@@ -2,22 +2,17 @@
2
2
  name: napcat-media
3
3
  platforms:
4
4
  - napcat
5
- description: NapCatQQ TTS、OCR、小程序卡片与翻译能力。
5
+ description: NapCatQQ OCR、小程序卡片与翻译。
6
6
  keywords:
7
- - "napcat"
8
- - "tts"
9
- - "ocr"
10
- - "语音"
11
- - "翻译"
12
- - "小程序"
7
+ - napcat
8
+ - ocr
9
+ - 翻译
10
+ - 小程序
13
11
  tools:
14
- - "ai_tts"
15
- - "get_ai_characters"
16
- - "ocr_image"
17
- - "get_mini_app_ark"
18
- - "translate"
12
+ - ocr_image
13
+ - get_mini_app_ark
14
+ - translate
19
15
  ---
20
-
21
16
  # napcat-media
22
17
 
23
- 按媒体任务选择单个工具。生成语音前先确定角色;OCR 与翻译结果保留不确定性。
18
+ 按任务选择 OCR、小程序卡片或翻译工具;只使用真实输入,保留识别和翻译结果的不确定性。
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: napcat-private-history
3
+ platforms:
4
+ - napcat
5
+ scopes:
6
+ - private
7
+ description: NapCatQQ 私聊消息历史。
8
+ keywords:
9
+ - napcat
10
+ - 消息历史
11
+ tools:
12
+ - get_friend_msg_history
13
+ ---
14
+ # napcat-private-history
15
+
16
+ 只读取任务必需的私聊记录,不把其他会话的历史发送给当前用户。
@@ -9,6 +9,7 @@ export default defineAgentTool({
9
9
  count: z.number().optional().describe('获取条数(可选)'),
10
10
  }),
11
11
  adapter: 'napcat',
12
+ scopes: ["private"],
12
13
  tags: ['napcat', 'qq'],
13
14
  keywords: ['私聊记录', '好友聊天记录', 'friend history'],
14
15
  async execute({ user_id, message_seq, count }, context) {
@@ -9,6 +9,7 @@ export default defineAgentTool<{ user_id: number; message_seq?: number; count?:
9
9
  count: z.number().optional().describe('获取条数(可选)'),
10
10
  }),
11
11
  adapter: 'napcat',
12
+ scopes: ["private"],
12
13
  tags: ['napcat', 'qq'],
13
14
  keywords: ['私聊记录', '好友聊天记录', 'friend history'],
14
15
  async execute({ user_id, message_seq, count }: { user_id: number; message_seq?: number; count?: number }, context) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-napcat",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "description": "Zhin.js NapCat adapter for Plugin Runtime (WebSocket client, OneBot11 + NapCat extensions)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -44,16 +44,16 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "ws": "^8.21.1",
47
- "@zhin.js/adapter": "1.1.21",
48
- "@zhin.js/agent-feature": "1.1.8",
49
- "@zhin.js/core": "1.1.48",
50
- "@zhin.js/feature-kit": "1.1.7",
51
- "@zhin.js/host-http": "1.1.8",
52
- "@zhin.js/im-contract": "1.1.5",
47
+ "@zhin.js/adapter": "1.1.22",
48
+ "@zhin.js/agent-feature": "1.1.9",
49
+ "@zhin.js/core": "1.1.50",
50
+ "@zhin.js/feature-kit": "1.1.8",
51
+ "@zhin.js/host-http": "1.1.9",
52
+ "@zhin.js/im-contract": "1.1.6",
53
53
  "@zhin.js/logger": "1.1.2",
54
- "@zhin.js/permission": "1.1.7",
55
- "@zhin.js/skill": "1.1.8",
56
- "@zhin.js/tool": "1.1.8"
54
+ "@zhin.js/permission": "1.1.8",
55
+ "@zhin.js/skill": "1.1.9",
56
+ "@zhin.js/tool": "1.1.9"
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.8",
65
- "zhin.js": "1.1.13"
64
+ "@zhin.js/host-http": "1.1.9",
65
+ "zhin.js": "1.1.15"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "zod": "^4.0.0",
69
- "@zhin.js/adapter": "^1.1.21",
70
- "@zhin.js/command": "^1.1.9",
71
- "@zhin.js/core": "^1.1.48",
72
- "zhin.js": "^1.1.13"
69
+ "@zhin.js/adapter": "^1.1.22",
70
+ "@zhin.js/command": "^1.1.10",
71
+ "@zhin.js/core": "^1.1.50",
72
+ "zhin.js": "^1.1.15"
73
73
  },
74
74
  "peerDependenciesMeta": {
75
75
  "@zhin.js/command": {