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

@@ -18,12 +18,12 @@ const expectPerms = (actual: number, expected: number) => {
describe("security fix", () => {
it("tightens groupPolicy + filesystem perms", async () => {
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-security-fix-"));
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-security-fix-"));
const stateDir = path.join(tmp, "state");
await fs.mkdir(stateDir, { recursive: true });
await fs.chmod(stateDir, 0o755);
const configPath = path.join(stateDir, "clawdbot.json");
const configPath = path.join(stateDir, "moltbot.json");
await fs.writeFile(
configPath,
`${JSON.stringify(
@@ -90,11 +90,11 @@ describe("security fix", () => {
});
it("applies allowlist per-account and seeds WhatsApp groupAllowFrom from store", async () => {
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-security-fix-"));
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-security-fix-"));
const stateDir = path.join(tmp, "state");
await fs.mkdir(stateDir, { recursive: true });
const configPath = path.join(stateDir, "clawdbot.json");
const configPath = path.join(stateDir, "moltbot.json");
await fs.writeFile(
configPath,
`${JSON.stringify(
@@ -140,11 +140,11 @@ describe("security fix", () => {
});
it("does not seed WhatsApp groupAllowFrom if allowFrom is set", async () => {
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-security-fix-"));
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-security-fix-"));
const stateDir = path.join(tmp, "state");
await fs.mkdir(stateDir, { recursive: true });
const configPath = path.join(stateDir, "clawdbot.json");
const configPath = path.join(stateDir, "moltbot.json");
await fs.writeFile(
configPath,
`${JSON.stringify(
@@ -183,12 +183,12 @@ describe("security fix", () => {
});
it("returns ok=false for invalid config but still tightens perms", async () => {
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-security-fix-"));
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-security-fix-"));
const stateDir = path.join(tmp, "state");
await fs.mkdir(stateDir, { recursive: true });
await fs.chmod(stateDir, 0o755);
const configPath = path.join(stateDir, "clawdbot.json");
const configPath = path.join(stateDir, "moltbot.json");
await fs.writeFile(configPath, "{ this is not json }\n", "utf-8");
await fs.chmod(configPath, 0o644);
@@ -209,7 +209,7 @@ describe("security fix", () => {
});
it("tightens perms for credentials + agent auth/sessions + include files", async () => {
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-security-fix-"));
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-security-fix-"));
const stateDir = path.join(tmp, "state");
await fs.mkdir(stateDir, { recursive: true });
@@ -219,7 +219,7 @@ describe("security fix", () => {
await fs.writeFile(includePath, "{ logging: { redactSensitive: 'off' } }\n", "utf-8");
await fs.chmod(includePath, 0o644);
const configPath = path.join(stateDir, "clawdbot.json");
const configPath = path.join(stateDir, "moltbot.json");
await fs.writeFile(
configPath,
`{ "$include": "./includes/extra.json5", channels: { whatsapp: { groupPolicy: "open" } } }\n`,