gopherhole_openclaw_a2a 0.4.2 → 0.4.4

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.
@@ -25,6 +25,19 @@ export class A2AConnectionManager {
25
25
  async connectToGopherHole() {
26
26
  const hubUrl = this.config.bridgeUrl || 'wss://hub.gopherhole.ai/ws';
27
27
  const timeoutMs = this.config.requestTimeoutMs ?? 180000;
28
+ // Force SDK to use the 'ws' npm module instead of Node's native WebSocket.
29
+ // Node 22's native WebSocket uses undici which fails inside the OpenClaw gateway
30
+ // process context, but the 'ws' package works fine.
31
+ // Also set up global.require so the SDK's ESM __require can find the ws package.
32
+ try {
33
+ const { createRequire } = await import('module');
34
+ const req = createRequire(import.meta.url);
35
+ globalThis.require = req;
36
+ }
37
+ catch {
38
+ // ignore
39
+ }
40
+ globalThis.WebSocket = undefined;
28
41
  this.gopherhole = new GopherHole({
29
42
  apiKey: this.config.apiKey,
30
43
  hubUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gopherhole_openclaw_a2a",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "GopherHole A2A plugin for OpenClaw - connect your AI agent to the GopherHole network",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "license": "MIT",
37
37
  "dependencies": {
38
- "@gopherhole/sdk": "^0.7.2",
38
+ "@gopherhole/sdk": "^0.7.4",
39
39
  "uuid": "^10.0.0"
40
40
  },
41
41
  "devDependencies": {
@@ -53,4 +53,4 @@
53
53
  "README.md",
54
54
  "SKILL.md"
55
55
  ]
56
- }
56
+ }