mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 17:54:32 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { resolveGatewayPort } from "../../config/config.js";
|
||||
import type { MoltbotConfig, ConfigFileSnapshot } from "../../config/types.js";
|
||||
import type { OpenClawConfig, ConfigFileSnapshot } from "../../config/types.js";
|
||||
import type { GatewayProbeResult } from "../../gateway/probe.js";
|
||||
import { pickPrimaryTailnetIPv4 } from "../../infra/tailnet.js";
|
||||
import { colorize, theme } from "../../terminal/theme.js";
|
||||
@@ -79,7 +79,7 @@ function normalizeWsUrl(value: string): string | null {
|
||||
return trimmed;
|
||||
}
|
||||
|
||||
export function resolveTargets(cfg: MoltbotConfig, explicitUrl?: string): GatewayStatusTarget[] {
|
||||
export function resolveTargets(cfg: OpenClawConfig, explicitUrl?: string): GatewayStatusTarget[] {
|
||||
const targets: GatewayStatusTarget[] = [];
|
||||
const add = (t: GatewayStatusTarget) => {
|
||||
if (!targets.some((x) => x.url === t.url)) targets.push(t);
|
||||
@@ -124,7 +124,7 @@ export function sanitizeSshTarget(value: unknown): string | null {
|
||||
}
|
||||
|
||||
export function resolveAuthForTarget(
|
||||
cfg: MoltbotConfig,
|
||||
cfg: OpenClawConfig,
|
||||
target: GatewayStatusTarget,
|
||||
overrides: { token?: string; password?: string },
|
||||
): { token?: string; password?: string } {
|
||||
@@ -145,8 +145,8 @@ export function resolveAuthForTarget(
|
||||
};
|
||||
}
|
||||
|
||||
const envToken = process.env.CLAWDBOT_GATEWAY_TOKEN?.trim() || "";
|
||||
const envPassword = process.env.CLAWDBOT_GATEWAY_PASSWORD?.trim() || "";
|
||||
const envToken = process.env.OPENCLAW_GATEWAY_TOKEN?.trim() || "";
|
||||
const envPassword = process.env.OPENCLAW_GATEWAY_PASSWORD?.trim() || "";
|
||||
const cfgToken =
|
||||
typeof cfg.gateway?.auth?.token === "string" ? cfg.gateway.auth.token.trim() : "";
|
||||
const cfgPassword =
|
||||
@@ -239,7 +239,7 @@ export function extractConfigSummary(snapshotUnknown: unknown): GatewayConfigSum
|
||||
};
|
||||
}
|
||||
|
||||
export function buildNetworkHints(cfg: MoltbotConfig) {
|
||||
export function buildNetworkHints(cfg: OpenClawConfig) {
|
||||
const tailnetIPv4 = pickPrimaryTailnetIPv4();
|
||||
const port = resolveGatewayPort(cfg);
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user