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

@@ -11,16 +11,16 @@ import {
const ROOT_DIR = path.parse(process.cwd()).root;
const CONFIG_DIR = path.join(ROOT_DIR, "config");
const ETC_CLAWDBOT_DIR = path.join(ROOT_DIR, "etc", "clawdbot");
const ETC_CLAWDBOT_DIR = path.join(ROOT_DIR, "etc", "moltbot");
const SHARED_DIR = path.join(ROOT_DIR, "shared");
const DEFAULT_BASE_PATH = path.join(CONFIG_DIR, "clawdbot.json");
const DEFAULT_BASE_PATH = path.join(CONFIG_DIR, "moltbot.json");
function configPath(...parts: string[]) {
return path.join(CONFIG_DIR, ...parts);
}
function etcClawdbotPath(...parts: string[]) {
function etcMoltbotPath(...parts: string[]) {
return path.join(ETC_CLAWDBOT_DIR, ...parts);
}
@@ -70,7 +70,7 @@ describe("resolveConfigIncludes", () => {
});
it("resolves absolute path $include", () => {
const absolute = etcClawdbotPath("agents.json");
const absolute = etcMoltbotPath("agents.json");
const files = { [absolute]: { list: [{ id: "main" }] } };
const obj = { agents: { $include: absolute } };
expect(resolve(obj, files)).toEqual({
@@ -283,7 +283,7 @@ describe("resolveConfigIncludes", () => {
it("resolves parent directory references", () => {
const files = { [sharedPath("common.json")]: { shared: true } };
const obj = { $include: "../../shared/common.json" };
expect(resolve(obj, files, configPath("sub", "clawdbot.json"))).toEqual({
expect(resolve(obj, files, configPath("sub", "moltbot.json"))).toEqual({
shared: true,
});
});