multiclaws 0.4.23 → 0.4.25

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.
@@ -1,10 +1,6 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.OpenClawAgentExecutor = void 0;
7
- const node_os_1 = __importDefault(require("node:os"));
8
4
  const gateway_client_1 = require("../infra/gateway-client");
9
5
  function extractTextFromMessage(message) {
10
6
  if (!message.parts)
@@ -84,7 +80,7 @@ class OpenClawAgentExecutor {
84
80
  args: {
85
81
  task: taskText,
86
82
  mode: "run",
87
- cwd: node_os_1.default.homedir(),
83
+ cwd: process.cwd(),
88
84
  },
89
85
  sessionKey: `a2a-${taskId}`,
90
86
  timeoutMs: 15_000,
@@ -142,7 +138,21 @@ class OpenClawAgentExecutor {
142
138
  if (result !== null) {
143
139
  return result;
144
140
  }
145
- this.logger.info(`[a2a-adapter] poll attempt ${attempt}: session ${sessionKey} still running...`);
141
+ // Log details every 50 attempts to help diagnose stuck sessions
142
+ if (attempt % 50 === 0) {
143
+ const details = extractDetails(histResult);
144
+ const messages = (details?.messages ?? []);
145
+ const lastMsg = messages[messages.length - 1];
146
+ this.logger.info(`[a2a-adapter] poll attempt ${attempt}: session ${sessionKey} still running. ` +
147
+ `isComplete=${details?.isComplete}, status=${details?.status}, ` +
148
+ `msgCount=${messages.length}, lastRole=${lastMsg?.role}, ` +
149
+ `lastContentTypes=${JSON.stringify(Array.isArray(lastMsg?.content)
150
+ ? lastMsg.content.map((c) => c?.type)
151
+ : typeof lastMsg?.content)}`);
152
+ }
153
+ else {
154
+ this.logger.info(`[a2a-adapter] poll attempt ${attempt}: session ${sessionKey} still running...`);
155
+ }
146
156
  }
147
157
  catch (err) {
148
158
  this.logger.warn(`[a2a-adapter] poll attempt ${attempt} error: ${err instanceof Error ? err.message : err}`);
@@ -357,7 +357,7 @@ class MulticlawsService extends node_events_1.EventEmitter {
357
357
  await (0, gateway_client_1.invokeGatewayTool)({
358
358
  gateway: this.gatewayConfig,
359
359
  tool: "sessions_spawn",
360
- args: { task: prompt, mode: "run", cwd: node_os_1.default.homedir() },
360
+ args: { task: prompt, mode: "run", cwd: process.cwd() },
361
361
  sessionKey: `delegate-${Date.now()}`,
362
362
  timeoutMs: 15_000,
363
363
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multiclaws",
3
- "version": "0.4.23",
3
+ "version": "0.4.25",
4
4
  "description": "MultiClaws plugin for OpenClaw collaboration via A2A protocol",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",