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,6 +1,6 @@
import { Type } from "@sinclair/typebox";
import type { ClawdbotConfig } from "../../config/config.js";
import type { MoltbotConfig } from "../../config/config.js";
import {
closeDispatcher,
createPinnedDispatcher,
@@ -61,7 +61,7 @@ const WebFetchSchema = Type.Object({
),
});
type WebFetchConfig = NonNullable<ClawdbotConfig["tools"]>["web"] extends infer Web
type WebFetchConfig = NonNullable<MoltbotConfig["tools"]>["web"] extends infer Web
? Web extends { fetch?: infer Fetch }
? Fetch
: undefined
@@ -78,7 +78,7 @@ type FirecrawlFetchConfig =
}
| undefined;
function resolveFetchConfig(cfg?: ClawdbotConfig): WebFetchConfig {
function resolveFetchConfig(cfg?: MoltbotConfig): WebFetchConfig {
const fetch = cfg?.tools?.web?.fetch;
if (!fetch || typeof fetch !== "object") return undefined;
return fetch as WebFetchConfig;
@@ -570,7 +570,7 @@ function resolveFirecrawlEndpoint(baseUrl: string): string {
}
export function createWebFetchTool(options?: {
config?: ClawdbotConfig;
config?: MoltbotConfig;
sandboxed?: boolean;
}): AnyAgentTool | null {
const fetch = resolveFetchConfig(options?.config);