@myassis/gateway 1.0.73 → 1.0.74

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.
@@ -92,30 +92,9 @@ exports.authService = {
92
92
  exports.skillsService = {
93
93
  list: async (token) => await index_js_1.skillsApi.list(token),
94
94
  get: (skillId, token) => index_js_1.skillsApi.get(skillId, token),
95
- install: async (skillHubId, token) => {
96
- // 1. 从技能库获取技能详情
97
- const hubResult = await index_js_1.skillHubApi.get(skillHubId, token);
98
- if (!hubResult.success || !hubResult.data) {
99
- return { success: false, error: '获取技能详情失败' };
100
- }
101
- const hub = hubResult.data;
102
- // 2. 创建用户技能记录
103
- const skillData = {
104
- name: hub.name,
105
- description: hub.description || '',
106
- content: hub.content || '',
107
- icon: hub.icon,
108
- templateId: skillHubId,
109
- isActive: true,
110
- apiKeyRequired: hub.apiKeyRequired || false,
111
- };
112
- const response = await index_js_1.skillsApi.create(skillData, token);
113
- if (response.success) {
114
- // 3. 增加安装计数
115
- await index_js_1.skillHubApi.install(skillHubId, token);
116
- }
117
- return response;
118
- },
95
+ // 安装技能:字段由服务端从 skill_hubs 回填,此处不再拼装 body,
96
+ // 防止漏传 scriptsUrl / version 等字段导致入库为空
97
+ install: async (skillHubId, token) => await index_js_1.skillHubApi.install(skillHubId, token),
119
98
  update: (skillId, data, token) => index_js_1.skillsApi.update(skillId, data, token),
120
99
  uninstall: async (skillId, token) => await index_js_1.skillsApi.uninstall(skillId, token),
121
100
  setApiKey: (skillId, apiKey, token) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myassis/gateway",
3
- "version": "1.0.73",
3
+ "version": "1.0.74",
4
4
  "description": "我的助手 Gateway Service - 本地 AI 网关服务,支持认证、WebSocket 实时通信和任务调度",
5
5
  "main": "dist/index.js",
6
6
  "bin": {