chaimi-keep-mcp 3.3.3-beta.0 → 3.3.3-beta.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * 柴米记账 MCP Server CLI 入口
4
+ * 柴米AI记账 MCP Server CLI 入口
5
5
  * 智能创建/更新多个 Agent 配置,保护用户已有配置
6
6
  */
7
7
 
@@ -20,7 +20,7 @@ const serverPath = path.join(__dirname, '..', 'server.js');
20
20
  // 默认的柴米记账配置
21
21
  const DEFAULT_CHAIMI_CONFIG = {
22
22
  command: 'chaimi-keep-mcp',
23
- description: '柴米记账 MCP Server - 支持 AI 工具直接记账',
23
+ description: '柴米AI记账 MCP Server - 支持 AI 工具直接记账',
24
24
  env: {
25
25
  MCP_OAUTH_URL: 'https://cloud1-2gfe5jhjef06b85d-1412172089.ap-shanghai.app.tcloudbase.com/mcpOAuth',
26
26
  MCP_HUB_URL: 'https://cloud1-2gfe5jhjef06b85d-1412172089.ap-shanghai.app.tcloudbase.com/mcpHub-mcp',
@@ -38,6 +38,18 @@ const SUPPORTED_AGENTS = [
38
38
  configPath: path.join(os.homedir(), '.mcporter', 'mcporter.json'),
39
39
  format: 'json'
40
40
  },
41
+ {
42
+ name: 'OpenClaw MCP Config',
43
+ configPath: path.join(os.homedir(), '.openclaw', 'workspace', 'config', 'mcporter.json'),
44
+ format: 'json',
45
+ platform: 'darwin'
46
+ },
47
+ {
48
+ name: 'OpenClaw MCP Config (Linux)',
49
+ configPath: path.join(os.homedir(), '.openclaw', 'workspace', 'config', 'mcporter.json'),
50
+ format: 'json',
51
+ platform: 'linux'
52
+ },
41
53
  {
42
54
  name: 'WorkBuddy (Windows)',
43
55
  configPath: path.join(os.homedir(), 'workbuddy', 'mcp.json'),
@@ -297,7 +309,7 @@ function showWelcome() {
297
309
 
298
310
  console.error('+--------------------------------------------------------+');
299
311
  console.error('| |');
300
- console.error('| 柴米记账 MCP Server v' + ver + ' |');
312
+ console.error('| 柴米AI记账 MCP Server v' + ver + ' |');
301
313
  console.error('| |');
302
314
  console.error('| 支持: OpenClaw/hermes/WorkBuddy 等国产小龙虾 |');
303
315
  console.error('| Claude/Cursor 等支持 MCP 的 Agent |');
@@ -1,4 +1,4 @@
1
- # 柴米记账 MCP Server 配置文件示例
1
+ # 柴米AI记账 MCP Server 配置文件示例
2
2
  # 复制此文件为 config.yaml 并填入您的实际配置
3
3
 
4
4
  chaihuo:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "chaimi-keep-mcp",
3
- "version": "3.3.3-beta.0",
4
- "description": "柴米记账 MCP Server - 支持 Claude、Cursor、OpenClaw、WorkBuddy 等 AI 工具直接记账",
3
+ "version": "3.3.3-beta.2",
4
+ "description": "柴米AI记账 MCP Server - 支持 Claude、Cursor、OpenClaw、WorkBuddy 等 AI 工具直接记账",
5
5
  "main": "server.js",
6
6
  "bin": {
7
7
  "chaimi-keep-mcp": "bin/cli.js"
package/server.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * 柴米记账 MCP Server (Node.js 版本)
3
+ * 柴米AI记账 MCP Server (Node.js 版本)
4
4
  * 适配微信云函数 mcpHub
5
5
  * 支持 Claude Desktop、Cursor、WorkBuddy、OpenClaw
6
6
  */
@@ -283,15 +283,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
283
283
  date: { type: 'number', description: '消费时间(毫秒级时间戳,13位数字。如提供 date_components 可不传此字段)' },
284
284
  date_components: {
285
285
  type: 'object',
286
- description: '【推荐】消费时间组件。包含:year、month、day、hour、minute、second。服务端会自动转换为时间戳',
287
- properties: {
288
- year: { type: 'number', description: '4位年份,如 2025' },
289
- month: { type: 'number', description: '1-12,1月=1' },
290
- day: { type: 'number', description: '1-31' },
291
- hour: { type: 'number', description: '0-23' },
292
- minute: { type: 'number', description: '0-59' },
293
- second: { type: 'number', description: '0-59,默认0' }
294
- }
286
+ description: '【推荐】消费时间组件。包含:year、month、day、hour、minute、second。服务端会自动转换为时间戳'
295
287
  },
296
288
  totalAmount: { type: 'number', description: '(必填)总金额(所有商品amount之和)' },
297
289
  originalAmount: { type: 'number', description: '(必填)应付金额(优惠前)' },
@@ -1863,13 +1855,7 @@ function formatDateWithTimezone(dateInput) {
1863
1855
  timestamp = parseInt(dateInput, 10);
1864
1856
  }
1865
1857
 
1866
- // 检测是否是假的时间戳(秒级转毫秒级,结尾是000)
1867
- if (timestamp && timestamp % 1000 === 0 && String(timestamp).length === 13) {
1868
- console.error(`⚠️ 警告:检测到可能错误的时间戳(秒级转毫秒级):${timestamp},使用当前时间替代`);
1869
- return Date.now();
1870
- }
1871
-
1872
- // 如果是数字时间戳且没问题,直接返回
1858
+ // 如果是数字时间戳,直接返回
1873
1859
  if (timestamp) {
1874
1860
  return timestamp;
1875
1861
  }