mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 22:34:32 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -2,6 +2,7 @@ import { withProgress } from "../cli/progress.js";
|
||||
import { loadConfig, resolveGatewayPort } from "../config/config.js";
|
||||
import { probeGateway } from "../gateway/probe.js";
|
||||
import { discoverGatewayBeacons } from "../infra/bonjour-discovery.js";
|
||||
import { resolveWideAreaDiscoveryDomain } from "../infra/widearea-dns.js";
|
||||
import { resolveSshConfig } from "../infra/ssh-config.js";
|
||||
import { parseSshTarget, startSshPortForward } from "../infra/ssh-tunnel.js";
|
||||
import type { RuntimeEnv } from "../runtime.js";
|
||||
@@ -38,6 +39,9 @@ export async function gatewayStatusCommand(
|
||||
const cfg = loadConfig();
|
||||
const rich = isRich() && opts.json !== true;
|
||||
const overallTimeoutMs = parseTimeoutMs(opts.timeout, 3000);
|
||||
const wideAreaDomain = resolveWideAreaDiscoveryDomain({
|
||||
configDomain: cfg.discovery?.wideArea?.domain,
|
||||
});
|
||||
|
||||
const baseTargets = resolveTargets(cfg, opts.url);
|
||||
const network = buildNetworkHints(cfg);
|
||||
@@ -45,6 +49,7 @@ export async function gatewayStatusCommand(
|
||||
const discoveryTimeoutMs = Math.min(1200, overallTimeoutMs);
|
||||
const discoveryPromise = discoverGatewayBeacons({
|
||||
timeoutMs: discoveryTimeoutMs,
|
||||
wideAreaDomain,
|
||||
});
|
||||
|
||||
let sshTarget = sanitizeSshTarget(opts.ssh) ?? sanitizeSshTarget(cfg.gateway?.remote?.sshTarget);
|
||||
@@ -276,10 +281,11 @@ export async function gatewayStatusCommand(
|
||||
|
||||
runtime.log("");
|
||||
runtime.log(colorize(rich, theme.heading, "Discovery (this machine)"));
|
||||
const discoveryDomains = wideAreaDomain ? `local. + ${wideAreaDomain}` : "local.";
|
||||
runtime.log(
|
||||
discovery.length > 0
|
||||
? `Found ${discovery.length} gateway(s) via Bonjour (local. + moltbot.internal.)`
|
||||
: "Found 0 gateways via Bonjour (local. + moltbot.internal.)",
|
||||
? `Found ${discovery.length} gateway(s) via Bonjour (${discoveryDomains})`
|
||||
: `Found 0 gateways via Bonjour (${discoveryDomains})`,
|
||||
);
|
||||
if (discovery.length === 0) {
|
||||
runtime.log(
|
||||
|
||||
Reference in New Issue
Block a user