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 { beforeEach, describe, expect, it, vi } from "vitest";
import type { ClawdbotConfig } from "../../config/config.js";
import type { MoltbotConfig } from "../../config/config.js";
import type { MsgContext } from "../templating.js";
import type { GetReplyOptions, ReplyPayload } from "../types.js";
import type { ReplyDispatcher } from "./reply-dispatcher.js";
@@ -84,7 +84,7 @@ describe("dispatchReplyFromConfig", () => {
aborted: false,
});
mocks.routeReply.mockClear();
const cfg = {} as ClawdbotConfig;
const cfg = {} as MoltbotConfig;
const dispatcher = createDispatcher();
const ctx = buildTestCtx({
Provider: "slack",
@@ -96,7 +96,7 @@ describe("dispatchReplyFromConfig", () => {
const replyResolver = async (
_ctx: MsgContext,
_opts: GetReplyOptions | undefined,
_cfg: ClawdbotConfig,
_cfg: MoltbotConfig,
) => ({ text: "hi" }) satisfies ReplyPayload;
await dispatchReplyFromConfig({ ctx, cfg, dispatcher, replyResolver });
@@ -110,7 +110,7 @@ describe("dispatchReplyFromConfig", () => {
aborted: false,
});
mocks.routeReply.mockClear();
const cfg = {} as ClawdbotConfig;
const cfg = {} as MoltbotConfig;
const dispatcher = createDispatcher();
const ctx = buildTestCtx({
Provider: "slack",
@@ -123,7 +123,7 @@ describe("dispatchReplyFromConfig", () => {
const replyResolver = async (
_ctx: MsgContext,
_opts: GetReplyOptions | undefined,
_cfg: ClawdbotConfig,
_cfg: MoltbotConfig,
) => ({ text: "hi" }) satisfies ReplyPayload;
await dispatchReplyFromConfig({ ctx, cfg, dispatcher, replyResolver });
@@ -144,7 +144,7 @@ describe("dispatchReplyFromConfig", () => {
aborted: false,
});
mocks.routeReply.mockClear();
const cfg = {} as ClawdbotConfig;
const cfg = {} as MoltbotConfig;
const dispatcher = createDispatcher();
const ctx = buildTestCtx({
Provider: "slack",
@@ -155,7 +155,7 @@ describe("dispatchReplyFromConfig", () => {
const replyResolver = async (
_ctx: MsgContext,
opts: GetReplyOptions | undefined,
_cfg: ClawdbotConfig,
_cfg: MoltbotConfig,
) => {
expect(opts?.onToolResult).toBeUndefined();
return { text: "hi" } satisfies ReplyPayload;
@@ -175,7 +175,7 @@ describe("dispatchReplyFromConfig", () => {
handled: true,
aborted: true,
});
const cfg = {} as ClawdbotConfig;
const cfg = {} as MoltbotConfig;
const dispatcher = createDispatcher();
const ctx = buildTestCtx({
Provider: "telegram",
@@ -197,7 +197,7 @@ describe("dispatchReplyFromConfig", () => {
aborted: true,
stoppedSubagents: 2,
});
const cfg = {} as ClawdbotConfig;
const cfg = {} as MoltbotConfig;
const dispatcher = createDispatcher();
const ctx = buildTestCtx({
Provider: "telegram",
@@ -221,7 +221,7 @@ describe("dispatchReplyFromConfig", () => {
handled: false,
aborted: false,
});
const cfg = {} as ClawdbotConfig;
const cfg = {} as MoltbotConfig;
const ctx = buildTestCtx({
Provider: "whatsapp",
OriginatingChannel: "whatsapp",
@@ -252,7 +252,7 @@ describe("dispatchReplyFromConfig", () => {
aborted: false,
});
hookMocks.runner.hasHooks.mockReturnValue(true);
const cfg = {} as ClawdbotConfig;
const cfg = {} as MoltbotConfig;
const dispatcher = createDispatcher();
const ctx = buildTestCtx({
Provider: "slack",
@@ -302,7 +302,7 @@ describe("dispatchReplyFromConfig", () => {
handled: false,
aborted: false,
});
const cfg = { diagnostics: { enabled: true } } as ClawdbotConfig;
const cfg = { diagnostics: { enabled: true } } as MoltbotConfig;
const dispatcher = createDispatcher();
const ctx = buildTestCtx({
Provider: "slack",
@@ -335,7 +335,7 @@ describe("dispatchReplyFromConfig", () => {
handled: false,
aborted: false,
});
const cfg = { diagnostics: { enabled: true } } as ClawdbotConfig;
const cfg = { diagnostics: { enabled: true } } as MoltbotConfig;
const ctx = buildTestCtx({
Provider: "whatsapp",
OriginatingChannel: "whatsapp",