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

@@ -1,18 +1,18 @@
import type { ClawdbotConfig } from "../config/config.js";
import type { MoltbotConfig } from "../config/config.js";
const DEFAULT_AGENT_TIMEOUT_SECONDS = 600;
const normalizeNumber = (value: unknown): number | undefined =>
typeof value === "number" && Number.isFinite(value) ? Math.floor(value) : undefined;
export function resolveAgentTimeoutSeconds(cfg?: ClawdbotConfig): number {
export function resolveAgentTimeoutSeconds(cfg?: MoltbotConfig): number {
const raw = normalizeNumber(cfg?.agents?.defaults?.timeoutSeconds);
const seconds = raw ?? DEFAULT_AGENT_TIMEOUT_SECONDS;
return Math.max(seconds, 1);
}
export function resolveAgentTimeoutMs(opts: {
cfg?: ClawdbotConfig;
cfg?: MoltbotConfig;
overrideMs?: number | null;
overrideSeconds?: number | null;
minMs?: number;