refactor: rename clawdbot to moltbot with legacy compat

This commit is contained in:
Peter Steinberger
2026-01-27 12:19:58 +00:00
parent 83460df96f
commit 6d16a658e5
1839 changed files with 11250 additions and 11199 deletions

View File

@@ -7,7 +7,7 @@ import {
DEFAULT_SANDBOX_IMAGE,
resolveSandboxScope,
} from "../agents/sandbox.js";
import type { ClawdbotConfig } from "../config/config.js";
import type { MoltbotConfig } from "../config/config.js";
import { runCommandWithTimeout, runExec } from "../process/exec.js";
import type { RuntimeEnv } from "../runtime.js";
import { note } from "../terminal/note.js";
@@ -87,17 +87,17 @@ async function dockerImageExists(image: string): Promise<boolean> {
}
}
function resolveSandboxDockerImage(cfg: ClawdbotConfig): string {
function resolveSandboxDockerImage(cfg: MoltbotConfig): string {
const image = cfg.agents?.defaults?.sandbox?.docker?.image?.trim();
return image ? image : DEFAULT_SANDBOX_IMAGE;
}
function resolveSandboxBrowserImage(cfg: ClawdbotConfig): string {
function resolveSandboxBrowserImage(cfg: MoltbotConfig): string {
const image = cfg.agents?.defaults?.sandbox?.browser?.image?.trim();
return image ? image : DEFAULT_SANDBOX_BROWSER_IMAGE;
}
function updateSandboxDockerImage(cfg: ClawdbotConfig, image: string): ClawdbotConfig {
function updateSandboxDockerImage(cfg: MoltbotConfig, image: string): MoltbotConfig {
return {
...cfg,
agents: {
@@ -116,7 +116,7 @@ function updateSandboxDockerImage(cfg: ClawdbotConfig, image: string): ClawdbotC
};
}
function updateSandboxBrowserImage(cfg: ClawdbotConfig, image: string): ClawdbotConfig {
function updateSandboxBrowserImage(cfg: MoltbotConfig, image: string): MoltbotConfig {
return {
...cfg,
agents: {
@@ -170,10 +170,10 @@ async function handleMissingSandboxImage(
}
export async function maybeRepairSandboxImages(
cfg: ClawdbotConfig,
cfg: MoltbotConfig,
runtime: RuntimeEnv,
prompter: DoctorPrompter,
): Promise<ClawdbotConfig> {
): Promise<MoltbotConfig> {
const sandbox = cfg.agents?.defaults?.sandbox;
const mode = sandbox?.mode ?? "off";
if (!sandbox || mode === "off") return cfg;
@@ -230,7 +230,7 @@ export async function maybeRepairSandboxImages(
return next;
}
export function noteSandboxScopeWarnings(cfg: ClawdbotConfig) {
export function noteSandboxScopeWarnings(cfg: MoltbotConfig) {
const globalSandbox = cfg.agents?.defaults?.sandbox;
const agents = Array.isArray(cfg.agents?.list) ? cfg.agents.list : [];
const warnings: string[] = [];