chaimi-keep-mcp 3.2.1-beta.0 → 3.2.1-beta.1

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 (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chaimi-keep-mcp",
3
- "version": "3.2.1-beta.0",
3
+ "version": "3.2.1-beta.1",
4
4
  "description": "柴米记账 MCP Server - 支持 Claude、Cursor、OpenClaw、WorkBuddy 等 AI 工具直接记账",
5
5
  "main": "server.js",
6
6
  "bin": {
package/server.js CHANGED
@@ -490,6 +490,7 @@ async function getToken() {
490
490
  authState.isAuthorized = true;
491
491
  await oauthManager.tokenStorage.save(token);
492
492
  // 【新增】保存默认 Agent 名称和 deviceCode
493
+ // 【修复】使用实际授权的 deviceCode
493
494
  await oauthManager.tokenStorage.saveAgentName('柴米AI助手');
494
495
  await oauthManager.tokenStorage.saveDeviceCode(savedAuthState.deviceCode);
495
496
  await oauthManager.clearAuthState();
@@ -2186,8 +2187,9 @@ async function pollForAuthInBackground(deviceCode, interval) {
2186
2187
  await oauthManager.tokenStorage.save(token);
2187
2188
 
2188
2189
  // 【新增】保存默认 Agent 名称和 deviceCode(首次记账时会获取真实名称)
2190
+ // 【修复】使用传入的 deviceCode,而不是 authState.deviceCode(可能不一致)
2189
2191
  await oauthManager.tokenStorage.saveAgentName('柴米AI助手');
2190
- await oauthManager.tokenStorage.saveDeviceCode(authState.deviceCode);
2192
+ await oauthManager.tokenStorage.saveDeviceCode(deviceCode);
2191
2193
 
2192
2194
  // 清除授权状态
2193
2195
  await oauthManager.clearAuthState();