multiclaws 0.4.12 → 0.4.13

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/dist/infra/frp.js CHANGED
@@ -233,7 +233,9 @@ class FrpTunnelManager {
233
233
  }
234
234
  /* ── Private: poll admin API ──────────────────────────────────── */
235
235
  async waitForProxy(proxyName) {
236
- const url = `http://127.0.0.1:${this.adminPort}/api/proxy/tcp`;
236
+ // frpc 0.61.x uses /api/status (returns { tcp: [...], udp: [...], ... })
237
+ // older versions used /api/proxy/tcp (returns flat array or { proxies: [...] })
238
+ const statusUrl = `http://127.0.0.1:${this.adminPort}/api/status`;
237
239
  for (let attempt = 0; attempt < ADMIN_API_POLL_MAX_RETRIES; attempt++) {
238
240
  await new Promise((r) => setTimeout(r, ADMIN_API_POLL_INTERVAL_MS));
239
241
  // Check if process has already exited
@@ -241,13 +243,13 @@ class FrpTunnelManager {
241
243
  throw new Error("frpc process exited before proxy became ready");
242
244
  }
243
245
  try {
244
- const res = await fetch(url, { signal: AbortSignal.timeout(3_000) });
246
+ const res = await fetch(statusUrl, { signal: AbortSignal.timeout(3_000) });
245
247
  if (!res.ok)
246
248
  continue;
247
- // frpc 0.61.x admin API returns a flat array: [{name, status, ...}]
248
249
  const data = (await res.json());
249
- const proxies = Array.isArray(data) ? data : data.proxies;
250
- const proxy = proxies?.find((p) => p.name === proxyName);
250
+ // /api/status groups proxies by type: { tcp: [...], udp: [...], ... }
251
+ const tcpProxies = data.tcp ?? [];
252
+ const proxy = tcpProxies.find((p) => p.name === proxyName);
251
253
  if (!proxy)
252
254
  continue;
253
255
  if (proxy.status === "running") {
@@ -274,7 +276,7 @@ class FrpTunnelManager {
274
276
  if (this._status.status !== "running")
275
277
  return;
276
278
  try {
277
- const res = await fetch(`http://127.0.0.1:${this.adminPort}/api/proxy/tcp`, { signal: AbortSignal.timeout(5_000) });
279
+ const res = await fetch(`http://127.0.0.1:${this.adminPort}/api/status`, { signal: AbortSignal.timeout(5_000) });
278
280
  if (!res.ok) {
279
281
  this.logger.warn("[frp] health check: admin API returned non-OK");
280
282
  this._status = { status: "error", reason: "admin API returned non-OK status" };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multiclaws",
3
- "version": "0.4.12",
3
+ "version": "0.4.13",
4
4
  "description": "MultiClaws plugin for OpenClaw collaboration via A2A protocol",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",