openclaw-bridge 0.4.6 → 0.4.8

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/dist/cli.js CHANGED
@@ -823,14 +823,28 @@ function checkAndFixBridgeConfig() {
823
823
  changed = true;
824
824
  fixes++;
825
825
  }
826
- // Fix 3: Check required fields
826
+ // Fix 3: Ensure gateway.auth is configured (needed for callGatewayAPI)
827
+ if (!config.gateway?.auth?.token) {
828
+ config.gateway = config.gateway || {};
829
+ config.gateway.auth = config.gateway.auth || {};
830
+ if (!config.gateway.auth.mode)
831
+ config.gateway.auth.mode = "token";
832
+ if (!config.gateway.auth.token) {
833
+ const token = `bridge-${bridgeConfig.agentId || "agent"}-${Date.now().toString(36)}`;
834
+ config.gateway.auth.token = token;
835
+ console.log(` [${configPath}] Added gateway.auth.token`);
836
+ changed = true;
837
+ fixes++;
838
+ }
839
+ }
840
+ // Fix 4: Check required fields
827
841
  const required = ["role", "agentId", "agentName"];
828
842
  for (const field of required) {
829
843
  if (!bridgeConfig[field]) {
830
844
  console.log(` [${configPath}] WARNING: missing required field "${field}" in bridge config`);
831
845
  }
832
846
  }
833
- // Fix 4: Check fileRelay and registry baseUrls aren't pointing to localhost in remote setup
847
+ // Fix 5: Check fileRelay and registry baseUrls aren't pointing to localhost in remote setup
834
848
  if (bridgeConfig.registry?.baseUrl && bridgeConfig.fileRelay?.baseUrl) {
835
849
  const regUrl = bridgeConfig.registry.baseUrl;
836
850
  const relayUrl = bridgeConfig.fileRelay.baseUrl;
package/dist/index.js CHANGED
@@ -224,6 +224,8 @@ ${nameMapping}
224
224
  });
225
225
  entry.agentId = newAgentId;
226
226
  entry.agentName = newAgentName;
227
+ config.agentId = newAgentId;
228
+ config.agentName = newAgentName;
227
229
  // Persist the renamed agentId to openclaw.json so it survives restarts
228
230
  const configPath = process.env.OPENCLAW_CONFIG_PATH;
229
231
  if (configPath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-bridge",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "author": "Bill Zhao (https://www.linkedin.com/in/billzhaodi/)",
5
5
  "description": "OpenClaw plugin for cross-gateway communication — agent discovery, file transfer, real-time messaging, session handoff, and local process management. Install as plugin: openclaw plugins install openclaw-bridge",
6
6
  "type": "module",