gopherhole_openclaw_a2a 0.3.5 → 0.3.7

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/README.md CHANGED
@@ -15,7 +15,7 @@ Then add to your OpenClaw config (`~/.openclaw/openclaw.json`):
15
15
  "channels": {
16
16
  "a2a": {
17
17
  "enabled": true,
18
- "bridgeUrl": "wss://gopherhole.ai/ws",
18
+ "bridgeUrl": "wss://hub.gopherhole.ai/ws",
19
19
  "apiKey": "gph_your_api_key_here"
20
20
  }
21
21
  }
@@ -23,14 +23,15 @@ export class A2AConnectionManager {
23
23
  }
24
24
  }
25
25
  async connectToGopherHole() {
26
- const hubUrl = this.config.bridgeUrl || 'wss://gopherhole.ai/ws';
26
+ const hubUrl = this.config.bridgeUrl || 'wss://hub.gopherhole.ai/ws';
27
27
  const timeoutMs = this.config.requestTimeoutMs ?? 180000;
28
28
  this.gopherhole = new GopherHole({
29
29
  apiKey: this.config.apiKey,
30
30
  hubUrl,
31
31
  autoReconnect: true,
32
32
  reconnectDelay: this.config.reconnectIntervalMs ?? 5000,
33
- maxReconnectAttempts: 20,
33
+ maxReconnectDelay: 300000, // 5 min cap on backoff
34
+ // maxReconnectAttempts defaults to 0 (infinite) in SDK
34
35
  requestTimeout: timeoutMs,
35
36
  messageTimeout: timeoutMs,
36
37
  agentCard: this.config.agentCard ?? {
@@ -82,6 +83,9 @@ export class A2AConnectionManager {
82
83
  this.connected = false;
83
84
  console.log(`[a2a] Disconnected from GopherHole: ${reason}`);
84
85
  });
86
+ this.gopherhole.on('reconnecting', ({ attempt, delayMs }) => {
87
+ console.log(`[a2a] Reconnecting to GopherHole (attempt ${attempt}, waiting ${delayMs}ms)...`);
88
+ });
85
89
  this.gopherhole.on('error', (error) => {
86
90
  console.error('[a2a] GopherHole SDK error:', error.message);
87
91
  });
@@ -237,7 +241,7 @@ export class A2AConnectionManager {
237
241
  if (!this.config.apiKey) {
238
242
  return [];
239
243
  }
240
- const hubUrl = this.config.bridgeUrl || 'wss://gopherhole.ai/ws';
244
+ const hubUrl = this.config.bridgeUrl || 'wss://hub.gopherhole.ai/ws';
241
245
  // Convert wss:// to https:// for API calls
242
246
  const apiBase = hubUrl.replace('wss://', 'https://').replace('/ws', '');
243
247
  try {
@@ -47,7 +47,7 @@ export interface A2AResponse {
47
47
  * "channels": {
48
48
  * "a2a": {
49
49
  * "enabled": true,
50
- * "bridgeUrl": "wss://gopherhole.ai/ws",
50
+ * "bridgeUrl": "wss://hub.gopherhole.ai/ws",
51
51
  * "apiKey": "gph_your_api_key"
52
52
  * }
53
53
  * }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gopherhole_openclaw_a2a",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
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",
package/src/connection.ts CHANGED
@@ -37,7 +37,7 @@ export class A2AConnectionManager {
37
37
  }
38
38
 
39
39
  private async connectToGopherHole(): Promise<void> {
40
- const hubUrl = this.config.bridgeUrl || 'wss://gopherhole.ai/ws';
40
+ const hubUrl = this.config.bridgeUrl || 'wss://hub.gopherhole.ai/ws';
41
41
  const timeoutMs = this.config.requestTimeoutMs ?? 180000;
42
42
 
43
43
  this.gopherhole = new GopherHole({
@@ -45,7 +45,8 @@ export class A2AConnectionManager {
45
45
  hubUrl,
46
46
  autoReconnect: true,
47
47
  reconnectDelay: this.config.reconnectIntervalMs ?? 5000,
48
- maxReconnectAttempts: 20,
48
+ maxReconnectDelay: 300000, // 5 min cap on backoff
49
+ // maxReconnectAttempts defaults to 0 (infinite) in SDK
49
50
  requestTimeout: timeoutMs,
50
51
  messageTimeout: timeoutMs,
51
52
  agentCard: this.config.agentCard ?? {
@@ -100,6 +101,10 @@ export class A2AConnectionManager {
100
101
  console.log(`[a2a] Disconnected from GopherHole: ${reason}`);
101
102
  });
102
103
 
104
+ this.gopherhole.on('reconnecting', ({ attempt, delayMs }) => {
105
+ console.log(`[a2a] Reconnecting to GopherHole (attempt ${attempt}, waiting ${delayMs}ms)...`);
106
+ });
107
+
103
108
  this.gopherhole.on('error', (error) => {
104
109
  console.error('[a2a] GopherHole SDK error:', error.message);
105
110
  });
@@ -305,7 +310,7 @@ export class A2AConnectionManager {
305
310
  return [];
306
311
  }
307
312
 
308
- const hubUrl = this.config.bridgeUrl || 'wss://gopherhole.ai/ws';
313
+ const hubUrl = this.config.bridgeUrl || 'wss://hub.gopherhole.ai/ws';
309
314
  // Convert wss:// to https:// for API calls
310
315
  const apiBase = hubUrl.replace('wss://', 'https://').replace('/ws', '');
311
316
 
package/src/types.ts CHANGED
@@ -47,7 +47,7 @@ export interface A2AResponse {
47
47
  * "channels": {
48
48
  * "a2a": {
49
49
  * "enabled": true,
50
- * "bridgeUrl": "wss://gopherhole.ai/ws",
50
+ * "bridgeUrl": "wss://hub.gopherhole.ai/ws",
51
51
  * "apiKey": "gph_your_api_key"
52
52
  * }
53
53
  * }
@@ -55,7 +55,7 @@ export interface A2AResponse {
55
55
  */
56
56
  export interface A2AChannelConfig {
57
57
  enabled?: boolean;
58
- bridgeUrl?: string; // WebSocket URL (default: wss://gopherhole.ai/ws)
58
+ bridgeUrl?: string; // WebSocket URL (default: wss://hub.gopherhole.ai/ws)
59
59
  apiKey?: string; // GopherHole API key (gph_...)
60
60
  agentId?: string; // Our agent ID (default: "openclaw")
61
61
  agentName?: string; // Display name for agent card