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

@@ -17,7 +17,7 @@ import { EdgeTTS } from "node-edge-tts";
import type { ReplyPayload } from "../auto-reply/types.js";
import { normalizeChannelId } from "../channels/plugins/index.js";
import type { ChannelId } from "../channels/plugins/types.js";
import type { ClawdbotConfig } from "../config/config.js";
import type { MoltbotConfig } from "../config/config.js";
import type {
TtsConfig,
TtsAutoMode,
@@ -245,7 +245,7 @@ function resolveModelOverridePolicy(
};
}
export function resolveTtsConfig(cfg: ClawdbotConfig): ResolvedTtsConfig {
export function resolveTtsConfig(cfg: MoltbotConfig): ResolvedTtsConfig {
const raw: TtsConfig = cfg.messages?.tts ?? {};
const providerSource = raw.provider ? "config" : "default";
const edgeOutputFormat = raw.edge?.outputFormat?.trim();
@@ -330,7 +330,7 @@ export function resolveTtsAutoMode(params: {
return params.config.auto;
}
export function buildTtsSystemPromptHint(cfg: ClawdbotConfig): string | undefined {
export function buildTtsSystemPromptHint(cfg: MoltbotConfig): string | undefined {
const config = resolveTtsConfig(cfg);
const prefsPath = resolveTtsPrefsPath(config);
const autoMode = resolveTtsAutoMode({ config, prefsPath });
@@ -801,7 +801,7 @@ type SummaryModelSelection = {
};
function resolveSummaryModelRef(
cfg: ClawdbotConfig,
cfg: MoltbotConfig,
config: ResolvedTtsConfig,
): SummaryModelSelection {
const defaultRef = resolveDefaultModelForAgent({ cfg });
@@ -825,7 +825,7 @@ function isTextContentBlock(block: { type: string }): block is TextContent {
async function summarizeText(params: {
text: string;
targetLength: number;
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
config: ResolvedTtsConfig;
timeoutMs: number;
}): Promise<SummarizeResult> {
@@ -1070,7 +1070,7 @@ async function edgeTTS(params: {
export async function textToSpeech(params: {
text: string;
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
prefsPath?: string;
channel?: string;
overrides?: TtsDirectiveOverrides;
@@ -1241,7 +1241,7 @@ export async function textToSpeech(params: {
export async function textToSpeechTelephony(params: {
text: string;
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
prefsPath?: string;
}): Promise<TtsTelephonyResult> {
const config = resolveTtsConfig(params.cfg);
@@ -1335,7 +1335,7 @@ export async function textToSpeechTelephony(params: {
export async function maybeApplyTtsToPayload(params: {
payload: ReplyPayload;
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
channel?: string;
kind?: "tool" | "block" | "final";
inboundAudio?: boolean;