chaimi-keep-mcp 3.1.44-beta.3 → 3.1.44-beta.5
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/README.md +12 -0
- package/package.json +1 -1
- package/server.js +11 -14
package/README.md
CHANGED
|
@@ -141,6 +141,18 @@ AI 会自动调用 `save_income` 工具记录收入。
|
|
|
141
141
|
|
|
142
142
|
## 更新日志
|
|
143
143
|
|
|
144
|
+
### v3.1.44-beta.4 (2026-04-21)
|
|
145
|
+
- **优化** 统一字段命名规范
|
|
146
|
+
- 将 `mcp_version` 改为 `mcpVersion`,统一使用驼峰命名法
|
|
147
|
+
- 符合项目 JavaScript 代码规范
|
|
148
|
+
|
|
149
|
+
### v3.1.44-beta.3 (2026-04-21)
|
|
150
|
+
- **修复** MCP 调用日志字段缺失问题(完整修复)
|
|
151
|
+
- 修复所有日志记录阶段(request_received/cloud_calling/cloud_success/cloud_failed/validation_failed/mcp_error)
|
|
152
|
+
- 补充缺失字段:agentType、apiProvider、mcp_version、params
|
|
153
|
+
- 修改 callMcpHubWithLogging 函数签名,添加 agentType/apiProvider 参数
|
|
154
|
+
- 更新所有调用处(8处),正确传递元数据字段
|
|
155
|
+
|
|
144
156
|
### v3.1.44-beta.2 (2026-04-20)
|
|
145
157
|
- **重构** `get_text_parse_prompt` 工具改为云端实现
|
|
146
158
|
- 新增 `mcpPrompt` 云函数 `getTextParsePrompt` 工具
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -170,7 +170,6 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
170
170
|
agentType: { type: 'string', description: '【必填】Agent类型,如:claude-desktop、cursor、openclaw、workbuddy、trae' },
|
|
171
171
|
apiProvider: { type: 'string', description: '【必填】AI服务提供商,如:anthropic、openai、doubao、aliyun' },
|
|
172
172
|
rawInput: { type: 'string', description: '【必填】用户的原始输入内容,用于记录用户原始请求' },
|
|
173
|
-
mcp_version: { type: 'string', description: 'MCP Server 版本号(自动填充)' },
|
|
174
173
|
},
|
|
175
174
|
required: ['name', 'amount', 'category', 'agentType', 'apiProvider', 'rawInput'],
|
|
176
175
|
},
|
|
@@ -214,7 +213,6 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
214
213
|
agentType: { type: 'string', description: '【必填】Agent类型:claude-desktop、cursor、openclaw、workbuddy、trae' },
|
|
215
214
|
apiProvider: { type: 'string', description: '【必填】AI服务提供商:anthropic、openai、doubao、aliyun' },
|
|
216
215
|
rawInput: { type: 'string', description: '【必填】用户的原始输入内容' },
|
|
217
|
-
mcp_version: { type: 'string', description: '【自动填充】MCP Server版本号' },
|
|
218
216
|
},
|
|
219
217
|
required: ['store', 'items', 'storeCategory', 'storeSubCategory', 'agentType', 'apiProvider', 'rawInput'],
|
|
220
218
|
},
|
|
@@ -315,7 +313,6 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
315
313
|
agentType: { type: 'string', description: '【必填】Agent类型,如:claude-desktop、cursor、openclaw、workbuddy、trae' },
|
|
316
314
|
apiProvider: { type: 'string', description: '【必填】AI服务提供商,如:anthropic、openai、doubao、aliyun' },
|
|
317
315
|
rawInput: { type: 'string', description: '【必填】用户的原始输入内容,用于记录用户原始请求' },
|
|
318
|
-
mcp_version: { type: 'string', description: 'MCP Server 版本号(自动填充)' },
|
|
319
316
|
},
|
|
320
317
|
required: ['name', 'amount', 'category', 'agentType', 'apiProvider', 'rawInput'],
|
|
321
318
|
},
|
|
@@ -547,7 +544,7 @@ async function callMcpHubWithLogging(tool, params, token, traceId, startTime, os
|
|
|
547
544
|
params: sanitizeLogParams(params),
|
|
548
545
|
agentType: agentType || '',
|
|
549
546
|
apiProvider: apiProvider || '',
|
|
550
|
-
|
|
547
|
+
mcpVersion: MCP_VERSION,
|
|
551
548
|
osType: osInfo?.osType,
|
|
552
549
|
osVersion: osInfo?.osVersion,
|
|
553
550
|
timestamp: new Date().toISOString(),
|
|
@@ -565,7 +562,7 @@ async function callMcpHubWithLogging(tool, params, token, traceId, startTime, os
|
|
|
565
562
|
duration: Date.now() - startTime,
|
|
566
563
|
agentType: agentType || '',
|
|
567
564
|
apiProvider: apiProvider || '',
|
|
568
|
-
|
|
565
|
+
mcpVersion: MCP_VERSION,
|
|
569
566
|
osType: osInfo?.osType,
|
|
570
567
|
osVersion: osInfo?.osVersion,
|
|
571
568
|
timestamp: new Date().toISOString(),
|
|
@@ -583,7 +580,7 @@ async function callMcpHubWithLogging(tool, params, token, traceId, startTime, os
|
|
|
583
580
|
duration: Date.now() - startTime,
|
|
584
581
|
agentType: agentType || '',
|
|
585
582
|
apiProvider: apiProvider || '',
|
|
586
|
-
|
|
583
|
+
mcpVersion: MCP_VERSION,
|
|
587
584
|
osType: osInfo?.osType,
|
|
588
585
|
osVersion: osInfo?.osVersion,
|
|
589
586
|
timestamp: new Date().toISOString(),
|
|
@@ -682,7 +679,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
682
679
|
params: sanitizeLogParams(args),
|
|
683
680
|
agentType: args.agentType || process.env.AGENT_TYPE || process.env.MCP_AGENT_TYPE || '',
|
|
684
681
|
apiProvider: args.apiProvider || process.env.API_PROVIDER || process.env.MCP_API_PROVIDER || '',
|
|
685
|
-
|
|
682
|
+
mcpVersion: MCP_VERSION,
|
|
686
683
|
osType: osInfo.osType,
|
|
687
684
|
osVersion: osInfo.osVersion,
|
|
688
685
|
timestamp: new Date().toISOString(),
|
|
@@ -703,7 +700,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
703
700
|
duration: Date.now() - startTime,
|
|
704
701
|
agentType: args.agentType || process.env.AGENT_TYPE || process.env.MCP_AGENT_TYPE || '',
|
|
705
702
|
apiProvider: args.apiProvider || process.env.API_PROVIDER || process.env.MCP_API_PROVIDER || '',
|
|
706
|
-
|
|
703
|
+
mcpVersion: MCP_VERSION,
|
|
707
704
|
osType: osInfo.osType,
|
|
708
705
|
osVersion: osInfo.osVersion,
|
|
709
706
|
timestamp: new Date().toISOString(),
|
|
@@ -1414,7 +1411,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1414
1411
|
context: processedArgs.context || '',
|
|
1415
1412
|
agentType: processedArgs.agentType || '',
|
|
1416
1413
|
apiProvider: processedArgs.apiProvider || '',
|
|
1417
|
-
|
|
1414
|
+
mcpVersion: MCP_VERSION,
|
|
1418
1415
|
userAgent: request.headers?.['user-agent'] || ''
|
|
1419
1416
|
};
|
|
1420
1417
|
|
|
@@ -1447,7 +1444,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1447
1444
|
const fullResponse = {
|
|
1448
1445
|
userMessage: userMessage,
|
|
1449
1446
|
result: result,
|
|
1450
|
-
|
|
1447
|
+
mcpVersion: MCP_VERSION
|
|
1451
1448
|
};
|
|
1452
1449
|
|
|
1453
1450
|
return {
|
|
@@ -1468,7 +1465,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1468
1465
|
duration: Date.now() - startTime,
|
|
1469
1466
|
agentType: agentType || '',
|
|
1470
1467
|
apiProvider: apiProvider || '',
|
|
1471
|
-
|
|
1468
|
+
mcpVersion: MCP_VERSION,
|
|
1472
1469
|
osType: osInfo.osType,
|
|
1473
1470
|
osVersion: osInfo.osVersion,
|
|
1474
1471
|
timestamp: new Date().toISOString(),
|
|
@@ -1709,7 +1706,7 @@ function convertParams(toolName, args) {
|
|
|
1709
1706
|
rawInput: sanitizeString(args.rawInput, 1000) || '',
|
|
1710
1707
|
agentType: args.agentType || '',
|
|
1711
1708
|
apiProvider: args.apiProvider || '',
|
|
1712
|
-
|
|
1709
|
+
mcpVersion: MCP_VERSION,
|
|
1713
1710
|
source: 'mcp_txt_expense',
|
|
1714
1711
|
};
|
|
1715
1712
|
}
|
|
@@ -1763,7 +1760,7 @@ function convertParams(toolName, args) {
|
|
|
1763
1760
|
rawInput: sanitizeString(args.rawInput, 2000),
|
|
1764
1761
|
agentType: args.agentType || '',
|
|
1765
1762
|
apiProvider: args.apiProvider || '',
|
|
1766
|
-
|
|
1763
|
+
mcpVersion: MCP_VERSION,
|
|
1767
1764
|
source: 'mcp_receipt',
|
|
1768
1765
|
storeCategory: sanitizeString(args.storeCategory, 50) || '其他',
|
|
1769
1766
|
storeSubCategory: sanitizeString(args.storeSubCategory, 50) || '其他',
|
|
@@ -1795,7 +1792,7 @@ function convertParams(toolName, args) {
|
|
|
1795
1792
|
rawInput: sanitizeString(args.rawInput, 1000),
|
|
1796
1793
|
agentType: args.agentType || '',
|
|
1797
1794
|
apiProvider: args.apiProvider || '',
|
|
1798
|
-
|
|
1795
|
+
mcpVersion: MCP_VERSION,
|
|
1799
1796
|
source: 'mcp_txt_income',
|
|
1800
1797
|
};
|
|
1801
1798
|
|