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 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: clawdbot)
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
- try {
21
- const configPath = join(homedir(), '.clawdbot', 'clawdbot.json');
22
- const config = JSON.parse(readFileSync(configPath, 'utf8'));
23
- return config?.gateway?.auth?.token ?? null;
24
- }
25
- catch {
26
- return null;
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)
@@ -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(), '.clawdbot', 'logs');
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gopherhole_openclaw_a2a",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
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",