gopherhole_openclaw_a2a 0.4.0 → 0.4.1
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/SKILL.md +1 -1
- package/dist/src/gateway-client.js +17 -7
- package/dist/src/logger.js +1 -1
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -16,7 +16,7 @@ Add to your Clawdbot config:
|
|
|
16
16
|
channels:
|
|
17
17
|
a2a:
|
|
18
18
|
enabled: true
|
|
19
|
-
agentId: nova # Our identifier (default:
|
|
19
|
+
agentId: nova # Our identifier (default: openclaw)
|
|
20
20
|
agentName: Nova # Display name
|
|
21
21
|
bridgeUrl: ws://localhost:8080/a2a # A2A bridge/hub (optional)
|
|
22
22
|
agents: # Direct agent connections (optional)
|
|
@@ -17,14 +17,24 @@ let pendingChats = new Map(); // keyed by runId
|
|
|
17
17
|
let connected = false;
|
|
18
18
|
let handshakeComplete = false;
|
|
19
19
|
function getGatewayToken() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
// Try the current OpenClaw config location first, then the legacy
|
|
21
|
+
// Clawdbot path as a fallback for users still on older installs.
|
|
22
|
+
const candidates = [
|
|
23
|
+
join(homedir(), '.openclaw', 'openclaw.json'),
|
|
24
|
+
join(homedir(), '.clawdbot', 'clawdbot.json'),
|
|
25
|
+
];
|
|
26
|
+
for (const configPath of candidates) {
|
|
27
|
+
try {
|
|
28
|
+
const config = JSON.parse(readFileSync(configPath, 'utf8'));
|
|
29
|
+
const token = config?.gateway?.auth?.token;
|
|
30
|
+
if (token)
|
|
31
|
+
return token;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
// file missing or unparseable — try next
|
|
35
|
+
}
|
|
27
36
|
}
|
|
37
|
+
return null;
|
|
28
38
|
}
|
|
29
39
|
export async function connectToGateway(port = 18789) {
|
|
30
40
|
if (ws && connected && handshakeComplete)
|
package/dist/src/logger.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { appendFileSync, mkdirSync, existsSync } from 'fs';
|
|
6
6
|
import { join } from 'path';
|
|
7
7
|
import { homedir } from 'os';
|
|
8
|
-
const LOG_DIR = join(homedir(), '.
|
|
8
|
+
const LOG_DIR = join(homedir(), '.openclaw', 'logs');
|
|
9
9
|
const A2A_LOG_FILE = join(LOG_DIR, 'a2a.log');
|
|
10
10
|
// Ensure log directory exists
|
|
11
11
|
try {
|