tao-shen Claude Opus 4.6 (1M context) commited on
Commit
7691726
·
1 Parent(s): c7a536f

fix: always enable a2a-gateway plugin — Adam/Eve couldn't receive messages

Browse files

Root cause: a2a-gateway plugin was only added to plugin_allow when
A2A_PEERS env var was set. Adam/Eve spaces didn't have A2A_PEERS,
so the gateway never loaded, port 18800 had nothing listening, and
all A2A calls from conversation-loop returned 404.

- Always include a2a-gateway in plugin_allow list
- Always configure a2a-gateway server (port 18800) regardless of peers
- Peers remain optional (for outbound connections)

This is why the chatroom only showed God's messages — Adam/Eve never
received or responded to any A2A requests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. scripts/sync_hf.py +20 -20
scripts/sync_hf.py CHANGED
@@ -484,11 +484,9 @@ class OpenClawFullSync:
484
  }
485
  print("[SYNC] ACP enabled: backend=acpx, agent=claude")
486
 
487
- # Plugin whitelist
488
  data.setdefault("plugins", {}).setdefault("entries", {})
489
- plugin_allow = ["telegram", "whatsapp", "coding-agent", "acpx"]
490
- if A2A_PEERS:
491
- plugin_allow.append("a2a-gateway")
492
  data["plugins"]["allow"] = plugin_allow
493
 
494
  # ── acpx Plugin Configuration (ACP backend) ──
@@ -518,9 +516,11 @@ class OpenClawFullSync:
518
  elif isinstance(data["plugins"]["entries"]["telegram"], dict):
519
  data["plugins"]["entries"]["telegram"]["enabled"] = True
520
 
521
- # ── A2A Gateway Plugin Configuration (only if A2A_PEERS is set) ──
 
 
 
522
  if A2A_PEERS:
523
- peers = []
524
  for peer_url in A2A_PEERS.split(","):
525
  peer_url = peer_url.strip()
526
  if not peer_url:
@@ -532,21 +532,21 @@ class OpenClawFullSync:
532
  })
533
  print(f"[SYNC] A2A peer: {name} → {peer_url}")
534
 
535
- data["plugins"]["entries"]["a2a-gateway"] = {
536
- "enabled": True,
537
- "config": {
538
- "agentCard": {
539
- "name": AGENT_NAME,
540
- "description": f"{AGENT_NAME} - HuggingClaw A2A Agent",
541
- "skills": [{"id": "chat", "name": "chat", "description": "Chat bridge"}]
542
- },
543
- "server": {"host": "0.0.0.0", "port": 18800},
544
- "security": {"inboundAuth": "none"},
545
- "routing": {"defaultAgentId": "main"},
546
- "peers": peers
547
- }
548
  }
549
- print(f"[SYNC] A2A gateway configured: name={AGENT_NAME}, port=18800, peers={len(peers)}")
 
550
 
551
  # ── Telegram channel defaults (open DM policy for HF Spaces) ──
552
  # Personal bot on HF Spaces — no need for strict pairing.
 
484
  }
485
  print("[SYNC] ACP enabled: backend=acpx, agent=claude")
486
 
487
+ # Plugin whitelist — a2a-gateway always enabled (all spaces receive A2A)
488
  data.setdefault("plugins", {}).setdefault("entries", {})
489
+ plugin_allow = ["telegram", "whatsapp", "coding-agent", "acpx", "a2a-gateway"]
 
 
490
  data["plugins"]["allow"] = plugin_allow
491
 
492
  # ── acpx Plugin Configuration (ACP backend) ──
 
516
  elif isinstance(data["plugins"]["entries"]["telegram"], dict):
517
  data["plugins"]["entries"]["telegram"]["enabled"] = True
518
 
519
+ # ── A2A Gateway Plugin Configuration (always enabled) ──
520
+ # All spaces must accept inbound A2A messages from conversation-loop.
521
+ # Peers are optional (for outbound connections to other agents).
522
+ peers = []
523
  if A2A_PEERS:
 
524
  for peer_url in A2A_PEERS.split(","):
525
  peer_url = peer_url.strip()
526
  if not peer_url:
 
532
  })
533
  print(f"[SYNC] A2A peer: {name} → {peer_url}")
534
 
535
+ data["plugins"]["entries"]["a2a-gateway"] = {
536
+ "enabled": True,
537
+ "config": {
538
+ "agentCard": {
539
+ "name": AGENT_NAME,
540
+ "description": f"{AGENT_NAME} - HuggingClaw A2A Agent",
541
+ "skills": [{"id": "chat", "name": "chat", "description": "Chat bridge"}]
542
+ },
543
+ "server": {"host": "0.0.0.0", "port": 18800},
544
+ "security": {"inboundAuth": "none"},
545
+ "routing": {"defaultAgentId": "main"},
546
+ "peers": peers
 
547
  }
548
+ }
549
+ print(f"[SYNC] A2A gateway configured: name={AGENT_NAME}, port=18800, peers={len(peers)}")
550
 
551
  # ── Telegram channel defaults (open DM policy for HF Spaces) ──
552
  # Personal bot on HF Spaces — no need for strict pairing.