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

@@ -6,7 +6,7 @@ import {
resolveModelRefFromString,
} from "../../agents/model-selection.js";
import {
type ClawdbotConfig,
type MoltbotConfig,
readConfigFileSnapshot,
writeConfigFile,
} from "../../config/config.js";
@@ -31,8 +31,8 @@ export const formatMs = (value?: number | null) => {
};
export async function updateConfig(
mutator: (cfg: ClawdbotConfig) => ClawdbotConfig,
): Promise<ClawdbotConfig> {
mutator: (cfg: MoltbotConfig) => MoltbotConfig,
): Promise<MoltbotConfig> {
const snapshot = await readConfigFileSnapshot();
if (!snapshot.valid) {
const issues = snapshot.issues.map((issue) => `- ${issue.path}: ${issue.message}`).join("\n");
@@ -43,7 +43,7 @@ export async function updateConfig(
return next;
}
export function resolveModelTarget(params: { raw: string; cfg: ClawdbotConfig }): {
export function resolveModelTarget(params: { raw: string; cfg: MoltbotConfig }): {
provider: string;
model: string;
} {
@@ -62,7 +62,7 @@ export function resolveModelTarget(params: { raw: string; cfg: ClawdbotConfig })
return resolved.ref;
}
export function buildAllowlistSet(cfg: ClawdbotConfig): Set<string> {
export function buildAllowlistSet(cfg: MoltbotConfig): Set<string> {
const allowed = new Set<string>();
const models = cfg.agents?.defaults?.models ?? {};
for (const raw of Object.keys(models)) {