chaimi-keep-mcp 3.3.1-beta.2 → 3.3.1-beta.4
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/bin/cli.js +8 -21
- package/package.json +1 -1
- package/server.js +3 -0
package/bin/cli.js
CHANGED
|
@@ -294,31 +294,18 @@ function configureAllAgents() {
|
|
|
294
294
|
*/
|
|
295
295
|
function showWelcome() {
|
|
296
296
|
const ver = CURRENT_VERSION;
|
|
297
|
-
const title = `柴米记账 MCP Server v${ver}`;
|
|
298
|
-
const pad = (76 - getDisplayWidth(title)) / 2;
|
|
299
|
-
const leftPad = ' '.repeat(Math.floor(pad));
|
|
300
|
-
const rightPad = ' '.repeat(Math.ceil(pad));
|
|
301
297
|
|
|
302
|
-
console.error('
|
|
303
|
-
console.error('
|
|
304
|
-
console.error(
|
|
305
|
-
console.error('
|
|
306
|
-
console.error('
|
|
307
|
-
console.error('
|
|
308
|
-
console.error('
|
|
309
|
-
console.error('
|
|
298
|
+
console.error('+--------------------------------------------------------+');
|
|
299
|
+
console.error('| |');
|
|
300
|
+
console.error('| 柴米记账 MCP Server v' + ver + ' |');
|
|
301
|
+
console.error('| |');
|
|
302
|
+
console.error('| 支持: OpenClaw/hermes/WorkBuddy 等国产小龙虾 |');
|
|
303
|
+
console.error('| Claude/Cursor 等支持 MCP 的 Agent |');
|
|
304
|
+
console.error('| |');
|
|
305
|
+
console.error('+--------------------------------------------------------+');
|
|
310
306
|
console.error('');
|
|
311
307
|
}
|
|
312
308
|
|
|
313
|
-
// 计算字符串显示宽度(中文字符=2,英文=1)
|
|
314
|
-
function getDisplayWidth(str) {
|
|
315
|
-
let width = 0;
|
|
316
|
-
for (const char of str) {
|
|
317
|
-
width += (char.charCodeAt(0) > 127) ? 2 : 1;
|
|
318
|
-
}
|
|
319
|
-
return width;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
309
|
// 主程序
|
|
323
310
|
showWelcome();
|
|
324
311
|
configureAllAgents();
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -1942,6 +1942,7 @@ function convertParams(toolName, args) {
|
|
|
1942
1942
|
apiProvider: sanitizeString(args.apiProvider, 50) || '',
|
|
1943
1943
|
mcpVersion: MCP_VERSION,
|
|
1944
1944
|
source: 'mcp_txt_expense',
|
|
1945
|
+
_requestToken: args._requestToken,
|
|
1945
1946
|
};
|
|
1946
1947
|
}
|
|
1947
1948
|
|
|
@@ -1998,6 +1999,7 @@ function convertParams(toolName, args) {
|
|
|
1998
1999
|
source: 'mcp_receipt',
|
|
1999
2000
|
storeCategory: sanitizeString(args.storeCategory, 50) || '其他',
|
|
2000
2001
|
storeSubCategory: sanitizeString(args.storeSubCategory, 50) || '其他',
|
|
2002
|
+
_requestToken: args._requestToken,
|
|
2001
2003
|
};
|
|
2002
2004
|
}
|
|
2003
2005
|
|
|
@@ -2039,6 +2041,7 @@ function convertParams(toolName, args) {
|
|
|
2039
2041
|
apiProvider: sanitizeString(args.apiProvider, 50) || '',
|
|
2040
2042
|
mcpVersion: MCP_VERSION,
|
|
2041
2043
|
source: 'mcp_txt_income',
|
|
2044
|
+
_requestToken: args._requestToken,
|
|
2042
2045
|
};
|
|
2043
2046
|
|
|
2044
2047
|
default:
|