multiclaws 0.4.38 → 0.4.39

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.
@@ -296,9 +296,18 @@ class OpenClawAgentExecutor {
296
296
  args: { limit: 10, activeMinutes: 120 },
297
297
  timeoutMs: 5_000,
298
298
  });
299
+ this.logger.info(`[a2a-adapter] discoverActiveSession: raw result = ${JSON.stringify(result).slice(0, 500)}`);
300
+ const sessions = result?.sessions ?? [];
301
+ this.logger.info(`[a2a-adapter] discoverActiveSession: found ${sessions.length} sessions`);
299
302
  const INTERNAL_PREFIXES = ["delegate-", "a2a-"];
300
- const session = result?.sessions?.find((s) => s.sessionKey &&
301
- !INTERNAL_PREFIXES.some((p) => s.sessionKey.startsWith(p)));
303
+ const session = sessions.find((s) => s.sessionKey && !INTERNAL_PREFIXES.some((p) => s.sessionKey.startsWith(p)));
304
+ if (session) {
305
+ this.logger.info(`[a2a-adapter] discoverActiveSession: matched session ${session.sessionKey}`);
306
+ }
307
+ else {
308
+ this.logger.warn(`[a2a-adapter] discoverActiveSession: all ${sessions.length} sessions filtered or empty`);
309
+ sessions.forEach((s) => this.logger.info(`[a2a-adapter] session: ${s.sessionKey ?? "(no key)"}`));
310
+ }
302
311
  return session?.sessionKey ?? null;
303
312
  }
304
313
  catch (err) {
@@ -991,8 +991,18 @@ class MulticlawsService extends node_events_1.EventEmitter {
991
991
  args: { limit: 10, activeMinutes: 120 },
992
992
  timeoutMs: 5_000,
993
993
  });
994
+ this.log("info", `discoverActiveSession: raw result = ${JSON.stringify(result).slice(0, 500)}`);
995
+ const sessions = result?.sessions ?? [];
996
+ this.log("info", `discoverActiveSession: found ${sessions.length} sessions`);
994
997
  const INTERNAL_PREFIXES = ["delegate-", "a2a-"];
995
- const session = result?.sessions?.find((s) => s.sessionKey && !INTERNAL_PREFIXES.some((p) => s.sessionKey.startsWith(p)));
998
+ const session = sessions.find((s) => s.sessionKey && !INTERNAL_PREFIXES.some((p) => s.sessionKey.startsWith(p)));
999
+ if (session) {
1000
+ this.log("info", `discoverActiveSession: matched session ${session.sessionKey}`);
1001
+ }
1002
+ else {
1003
+ this.log("warn", `discoverActiveSession: all ${sessions.length} sessions filtered or empty`);
1004
+ sessions.forEach((s) => this.log("info", ` session: ${s.sessionKey ?? "(no key)"}`));
1005
+ }
996
1006
  return session?.sessionKey ?? null;
997
1007
  }
998
1008
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multiclaws",
3
- "version": "0.4.38",
3
+ "version": "0.4.39",
4
4
  "description": "MultiClaws plugin for OpenClaw collaboration via A2A protocol",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",