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
+6 -6
View File
@@ -1,4 +1,4 @@
import type { ClawdbotConfig } from "../config/config.js";
import type { MoltbotConfig } from "../config/config.js";
import { DEFAULT_MODEL, DEFAULT_PROVIDER } from "./defaults.js";
import {
coerceToFailoverError,
@@ -48,7 +48,7 @@ function shouldRethrowAbort(err: unknown): boolean {
}
function buildAllowedModelKeys(
cfg: ClawdbotConfig | undefined,
cfg: MoltbotConfig | undefined,
defaultProvider: string,
): Set<string> | null {
const rawAllowlist = (() => {
@@ -66,7 +66,7 @@ function buildAllowedModelKeys(
}
function resolveImageFallbackCandidates(params: {
cfg: ClawdbotConfig | undefined;
cfg: MoltbotConfig | undefined;
defaultProvider: string;
modelOverride?: string;
}): ModelCandidate[] {
@@ -127,7 +127,7 @@ function resolveImageFallbackCandidates(params: {
}
function resolveFallbackCandidates(params: {
cfg: ClawdbotConfig | undefined;
cfg: MoltbotConfig | undefined;
provider: string;
model: string;
/** Optional explicit fallbacks list; when provided (even empty), replaces agents.defaults.model.fallbacks. */
@@ -191,7 +191,7 @@ function resolveFallbackCandidates(params: {
}
export async function runWithModelFallback<T>(params: {
cfg: ClawdbotConfig | undefined;
cfg: MoltbotConfig | undefined;
provider: string;
model: string;
agentDir?: string;
@@ -299,7 +299,7 @@ export async function runWithModelFallback<T>(params: {
}
export async function runWithImageModelFallback<T>(params: {
cfg: ClawdbotConfig | undefined;
cfg: MoltbotConfig | undefined;
modelOverride?: string;
run: (provider: string, model: string) => Promise<T>;
onError?: (attempt: {