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 { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { ClawdbotConfig } from "../config/config.js";
import type { MoltbotConfig } from "../config/config.js";
const note = vi.hoisted(() => vi.fn());
@@ -36,7 +36,7 @@ describe("noteSecurityWarnings gateway exposure", () => {
const lastMessage = () => String(note.mock.calls.at(-1)?.[0] ?? "");
it("warns when exposed without auth", async () => {
const cfg = { gateway: { bind: "lan" } } as ClawdbotConfig;
const cfg = { gateway: { bind: "lan" } } as MoltbotConfig;
await noteSecurityWarnings(cfg);
const message = lastMessage();
expect(message).toContain("CRITICAL");
@@ -45,7 +45,7 @@ describe("noteSecurityWarnings gateway exposure", () => {
it("uses env token to avoid critical warning", async () => {
process.env.CLAWDBOT_GATEWAY_TOKEN = "token-123";
const cfg = { gateway: { bind: "lan" } } as ClawdbotConfig;
const cfg = { gateway: { bind: "lan" } } as MoltbotConfig;
await noteSecurityWarnings(cfg);
const message = lastMessage();
expect(message).toContain("WARNING");
@@ -55,14 +55,14 @@ describe("noteSecurityWarnings gateway exposure", () => {
it("treats whitespace token as missing", async () => {
const cfg = {
gateway: { bind: "lan", auth: { mode: "token", token: " " } },
} as ClawdbotConfig;
} as MoltbotConfig;
await noteSecurityWarnings(cfg);
const message = lastMessage();
expect(message).toContain("CRITICAL");
});
it("skips warning for loopback bind", async () => {
const cfg = { gateway: { bind: "loopback" } } as ClawdbotConfig;
const cfg = { gateway: { bind: "loopback" } } as MoltbotConfig;
await noteSecurityWarnings(cfg);
const message = lastMessage();
expect(message).toContain("No channel security warnings detected");