mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 19:44:30 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -10,13 +10,13 @@ import {
|
||||
resolveHooksGmailModel,
|
||||
} from "../agents/model-selection.js";
|
||||
import { formatCliCommand } from "../cli/command-format.js";
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import { CONFIG_PATH, readConfigFileSnapshot, writeConfigFile } from "../config/config.js";
|
||||
import { logConfigUpdated } from "../config/logging.js";
|
||||
import { resolveGatewayService } from "../daemon/service.js";
|
||||
import { resolveGatewayAuth } from "../gateway/auth.js";
|
||||
import { buildGatewayConnectionDetails } from "../gateway/call.js";
|
||||
import { resolveMoltbotPackageRoot } from "../infra/moltbot-root.js";
|
||||
import { resolveOpenClawPackageRoot } from "../infra/openclaw-root.js";
|
||||
import type { RuntimeEnv } from "../runtime.js";
|
||||
import { defaultRuntime } from "../runtime.js";
|
||||
import { note } from "../terminal/note.js";
|
||||
@@ -31,7 +31,6 @@ import { loadAndMaybeMigrateDoctorConfig } from "./doctor-config-flow.js";
|
||||
import { maybeRepairGatewayDaemon } from "./doctor-gateway-daemon-flow.js";
|
||||
import { checkGatewayHealth } from "./doctor-gateway-health.js";
|
||||
import {
|
||||
maybeMigrateLegacyGatewayService,
|
||||
maybeRepairGatewayServiceConfig,
|
||||
maybeScanExtraGatewayServices,
|
||||
} from "./doctor-gateway-services.js";
|
||||
@@ -39,6 +38,7 @@ import { noteSourceInstallIssues } from "./doctor-install.js";
|
||||
import {
|
||||
noteMacLaunchAgentOverrides,
|
||||
noteMacLaunchctlGatewayEnvOverrides,
|
||||
noteDeprecatedLegacyEnvVars,
|
||||
} from "./doctor-platform-notes.js";
|
||||
import { createDoctorPrompter, type DoctorOptions } from "./doctor-prompter.js";
|
||||
import { maybeRepairSandboxImages, noteSandboxScopeWarnings } from "./doctor-sandbox.js";
|
||||
@@ -58,7 +58,7 @@ import { ensureSystemdUserLingerInteractive } from "./systemd-linger.js";
|
||||
const intro = (message: string) => clackIntro(stylePromptTitle(message) ?? message);
|
||||
const outro = (message: string) => clackOutro(stylePromptTitle(message) ?? message);
|
||||
|
||||
function resolveMode(cfg: MoltbotConfig): "local" | "remote" {
|
||||
function resolveMode(cfg: OpenClawConfig): "local" | "remote" {
|
||||
return cfg.gateway?.mode === "remote" ? "remote" : "local";
|
||||
}
|
||||
|
||||
@@ -68,9 +68,9 @@ export async function doctorCommand(
|
||||
) {
|
||||
const prompter = createDoctorPrompter({ runtime, options });
|
||||
printWizardHeader(runtime);
|
||||
intro("Moltbot doctor");
|
||||
intro("OpenClaw doctor");
|
||||
|
||||
const root = await resolveMoltbotPackageRoot({
|
||||
const root = await resolveOpenClawPackageRoot({
|
||||
moduleUrl: import.meta.url,
|
||||
argv1: process.argv[1],
|
||||
cwd: process.cwd(),
|
||||
@@ -87,22 +87,23 @@ export async function doctorCommand(
|
||||
|
||||
await maybeRepairUiProtocolFreshness(runtime, prompter);
|
||||
noteSourceInstallIssues(root);
|
||||
noteDeprecatedLegacyEnvVars();
|
||||
|
||||
const configResult = await loadAndMaybeMigrateDoctorConfig({
|
||||
options,
|
||||
confirm: (p) => prompter.confirm(p),
|
||||
});
|
||||
let cfg: MoltbotConfig = configResult.cfg;
|
||||
let cfg: OpenClawConfig = configResult.cfg;
|
||||
|
||||
const configPath = configResult.path ?? CONFIG_PATH;
|
||||
if (!cfg.gateway?.mode) {
|
||||
const lines = [
|
||||
"gateway.mode is unset; gateway start will be blocked.",
|
||||
`Fix: run ${formatCliCommand("moltbot configure")} and set Gateway mode (local/remote).`,
|
||||
`Or set directly: ${formatCliCommand("moltbot config set gateway.mode local")}`,
|
||||
`Fix: run ${formatCliCommand("openclaw configure")} and set Gateway mode (local/remote).`,
|
||||
`Or set directly: ${formatCliCommand("openclaw config set gateway.mode local")}`,
|
||||
];
|
||||
if (!fs.existsSync(configPath)) {
|
||||
lines.push(`Missing config: run ${formatCliCommand("moltbot setup")} first.`);
|
||||
lines.push(`Missing config: run ${formatCliCommand("openclaw setup")} first.`);
|
||||
}
|
||||
note(lines.join("\n"), "Gateway");
|
||||
}
|
||||
@@ -184,7 +185,6 @@ export async function doctorCommand(
|
||||
cfg = await maybeRepairSandboxImages(cfg, runtime, prompter);
|
||||
noteSandboxScopeWarnings(cfg);
|
||||
|
||||
await maybeMigrateLegacyGatewayService(cfg, resolveMode(cfg), runtime, prompter);
|
||||
await maybeScanExtraGatewayServices(options);
|
||||
await maybeRepairGatewayServiceConfig(cfg, resolveMode(cfg), runtime, prompter);
|
||||
await noteMacLaunchAgentOverrides();
|
||||
@@ -282,7 +282,7 @@ export async function doctorCommand(
|
||||
runtime.log(`Backup: ${shortenHomePath(backupPath)}`);
|
||||
}
|
||||
} else {
|
||||
runtime.log(`Run "${formatCliCommand("moltbot doctor --fix")}" to apply changes.`);
|
||||
runtime.log(`Run "${formatCliCommand("openclaw doctor --fix")}" to apply changes.`);
|
||||
}
|
||||
|
||||
if (options.workspaceSuggestions !== false) {
|
||||
|
||||
Reference in New Issue
Block a user