gopherhole_openclaw_a2a 0.4.6 → 0.4.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.
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Gateway WebSocket Client
|
|
3
|
-
* Sends messages to the
|
|
3
|
+
* Sends messages to the OpenClaw gateway via its WebSocket protocol
|
|
4
4
|
*
|
|
5
5
|
* chat.send is non-blocking - it returns a runId immediately and
|
|
6
6
|
* streams the response via chat events. We accumulate deltas and
|
|
7
7
|
* resolve when we get state: "final".
|
|
8
8
|
*/
|
|
9
|
+
export declare const GATEWAY_PROTOCOL_VERSION = 4;
|
|
9
10
|
export declare function connectToGateway(port?: number): Promise<void>;
|
|
10
11
|
export declare function callGateway(method: string, params: Record<string, unknown>, timeoutMs?: number): Promise<unknown>;
|
|
11
12
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Gateway WebSocket Client
|
|
3
|
-
* Sends messages to the
|
|
3
|
+
* Sends messages to the OpenClaw gateway via its WebSocket protocol
|
|
4
4
|
*
|
|
5
5
|
* chat.send is non-blocking - it returns a runId immediately and
|
|
6
6
|
* streams the response via chat events. We accumulate deltas and
|
|
@@ -16,6 +16,10 @@ let pendingRequests = new Map();
|
|
|
16
16
|
let pendingChats = new Map(); // keyed by runId
|
|
17
17
|
let connected = false;
|
|
18
18
|
let handshakeComplete = false;
|
|
19
|
+
// OpenClaw 2026.7+ requires gateway protocol v4. Keep this explicit so a
|
|
20
|
+
// protocol bump fails a focused compatibility test instead of silently
|
|
21
|
+
// breaking inbound A2A replies at runtime.
|
|
22
|
+
export const GATEWAY_PROTOCOL_VERSION = 4;
|
|
19
23
|
function getGatewayToken() {
|
|
20
24
|
// Try the current OpenClaw config location first, then the legacy
|
|
21
25
|
// Clawdbot path as a fallback for users still on older installs.
|
|
@@ -56,12 +60,12 @@ export async function connectToGateway(port = 18789) {
|
|
|
56
60
|
id: connectId,
|
|
57
61
|
method: 'connect',
|
|
58
62
|
params: {
|
|
59
|
-
minProtocol:
|
|
60
|
-
maxProtocol:
|
|
63
|
+
minProtocol: GATEWAY_PROTOCOL_VERSION,
|
|
64
|
+
maxProtocol: GATEWAY_PROTOCOL_VERSION,
|
|
61
65
|
client: {
|
|
62
66
|
id: 'gateway-client',
|
|
63
67
|
displayName: 'A2A Channel Plugin',
|
|
64
|
-
version: '0.
|
|
68
|
+
version: '0.4.7',
|
|
65
69
|
platform: process.platform,
|
|
66
70
|
mode: 'backend',
|
|
67
71
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gopherhole_openclaw_a2a",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.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",
|
|
@@ -53,4 +53,4 @@
|
|
|
53
53
|
"README.md",
|
|
54
54
|
"SKILL.md"
|
|
55
55
|
]
|
|
56
|
-
}
|
|
56
|
+
}
|