@ynhcj/xiaoyi-channel 0.0.178-beta → 0.0.179-beta

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.
@@ -64,9 +64,17 @@ export function registerSession(sessionKey, context) {
64
64
  setLastRegisteredKey(sessionKey);
65
65
  const existing = activeSessions.get(sessionKey);
66
66
  if (existing) {
67
- // 更新上下文,增加引用计数,刷新存活时间
67
+ // 更新上下文(全量同步所有字段,避免 global Map 残留旧值,
68
+ // 当 ALS 丢失回退到 Map 时拿到过期的 modelName / deviceType)
69
+ existing.config = context.config;
70
+ existing.sessionId = context.sessionId;
71
+ existing.distributionSessionId = context.distributionSessionId;
68
72
  existing.taskId = context.taskId;
69
73
  existing.messageId = context.messageId;
74
+ existing.agentId = context.agentId;
75
+ existing.deviceType = context.deviceType;
76
+ existing.modelName = context.modelName;
77
+ existing.runCrossTaskContext = context.runCrossTaskContext;
70
78
  existing.refCount++;
71
79
  existing.createdAt = Date.now(); // 刷新存活时间,长对话不受 TTL 影响
72
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.178-beta",
3
+ "version": "0.0.179-beta",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",