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

@@ -4,12 +4,12 @@ import path from "node:path";
import { describe, expect, it } from "vitest";
import type { ClawdbotConfig } from "../config/config.js";
import type { MoltbotConfig } from "../config/config.js";
import { loadCostUsageSummary, loadSessionCostSummary } from "./session-cost-usage.js";
describe("session cost usage", () => {
it("aggregates daily totals with log cost and pricing fallback", async () => {
const root = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-cost-"));
const root = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-cost-"));
const sessionsDir = path.join(root, "agents", "main", "sessions");
await fs.mkdir(sessionsDir, { recursive: true });
const sessionFile = path.join(sessionsDir, "sess-1.jsonl");
@@ -92,7 +92,7 @@ describe("session cost usage", () => {
},
},
},
} as ClawdbotConfig;
} as MoltbotConfig;
const originalState = process.env.CLAWDBOT_STATE_DIR;
process.env.CLAWDBOT_STATE_DIR = root;
@@ -108,7 +108,7 @@ describe("session cost usage", () => {
});
it("summarizes a single session file", async () => {
const root = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-cost-session-"));
const root = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-cost-session-"));
const sessionFile = path.join(root, "session.jsonl");
const now = new Date();