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,5 +1,5 @@
import { describe, expect, it } from "vitest";
import type { ClawdbotConfig } from "../config/config.js";
import type { MoltbotConfig } from "../config/config.js";
import {
resolveAgentConfig,
resolveAgentModelFallbacksOverride,
@@ -8,13 +8,13 @@ import {
describe("resolveAgentConfig", () => {
it("should return undefined when no agents config exists", () => {
const cfg: ClawdbotConfig = {};
const cfg: MoltbotConfig = {};
const result = resolveAgentConfig(cfg, "main");
expect(result).toBeUndefined();
});
it("should return undefined when agent id does not exist", () => {
const cfg: ClawdbotConfig = {
const cfg: MoltbotConfig = {
agents: {
list: [{ id: "main", workspace: "~/clawd" }],
},
@@ -24,7 +24,7 @@ describe("resolveAgentConfig", () => {
});
it("should return basic agent config", () => {
const cfg: ClawdbotConfig = {
const cfg: MoltbotConfig = {
agents: {
list: [
{
@@ -52,7 +52,7 @@ describe("resolveAgentConfig", () => {
});
it("supports per-agent model primary+fallbacks", () => {
const cfg: ClawdbotConfig = {
const cfg: MoltbotConfig = {
agents: {
defaults: {
model: {
@@ -76,7 +76,7 @@ describe("resolveAgentConfig", () => {
expect(resolveAgentModelFallbacksOverride(cfg, "linus")).toEqual(["openai/gpt-5.2"]);
// If fallbacks isn't present, we don't override the global fallbacks.
const cfgNoOverride: ClawdbotConfig = {
const cfgNoOverride: MoltbotConfig = {
agents: {
list: [
{
@@ -91,7 +91,7 @@ describe("resolveAgentConfig", () => {
expect(resolveAgentModelFallbacksOverride(cfgNoOverride, "linus")).toBe(undefined);
// Explicit empty list disables global fallbacks for that agent.
const cfgDisable: ClawdbotConfig = {
const cfgDisable: MoltbotConfig = {
agents: {
list: [
{
@@ -108,7 +108,7 @@ describe("resolveAgentConfig", () => {
});
it("should return agent-specific sandbox config", () => {
const cfg: ClawdbotConfig = {
const cfg: MoltbotConfig = {
agents: {
list: [
{
@@ -136,7 +136,7 @@ describe("resolveAgentConfig", () => {
});
it("should return agent-specific tools config", () => {
const cfg: ClawdbotConfig = {
const cfg: MoltbotConfig = {
agents: {
list: [
{
@@ -166,7 +166,7 @@ describe("resolveAgentConfig", () => {
});
it("should return both sandbox and tools config", () => {
const cfg: ClawdbotConfig = {
const cfg: MoltbotConfig = {
agents: {
list: [
{
@@ -190,7 +190,7 @@ describe("resolveAgentConfig", () => {
});
it("should normalize agent id", () => {
const cfg: ClawdbotConfig = {
const cfg: MoltbotConfig = {
agents: {
list: [{ id: "main", workspace: "~/clawd" }],
},