refactor: rename to openclaw

This commit is contained in:
Peter Steinberger
2026-01-30 03:15:10 +01:00
parent 4583f88626
commit 9a7160786a
2357 changed files with 16688 additions and 16788 deletions

View File

@@ -4,7 +4,7 @@ import path from "node:path";
import { describe, expect, it } from "vitest";
import type { MoltbotConfig } from "../config/config.js";
import type { OpenClawConfig } from "../config/config.js";
import { resolveAgentAvatar } from "./identity-avatar.js";
async function writeFile(filePath: string, contents = "avatar") {
@@ -14,12 +14,12 @@ async function writeFile(filePath: string, contents = "avatar") {
describe("resolveAgentAvatar", () => {
it("resolves local avatar from config when inside workspace", async () => {
const root = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-avatar-"));
const root = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-avatar-"));
const workspace = path.join(root, "work");
const avatarPath = path.join(workspace, "avatars", "main.png");
await writeFile(avatarPath);
const cfg: MoltbotConfig = {
const cfg: OpenClawConfig = {
agents: {
list: [
{
@@ -41,13 +41,13 @@ describe("resolveAgentAvatar", () => {
});
it("rejects avatars outside the workspace", async () => {
const root = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-avatar-"));
const root = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-avatar-"));
const workspace = path.join(root, "work");
await fs.mkdir(workspace, { recursive: true });
const outsidePath = path.join(root, "outside.png");
await writeFile(outsidePath);
const cfg: MoltbotConfig = {
const cfg: OpenClawConfig = {
agents: {
list: [
{
@@ -67,7 +67,7 @@ describe("resolveAgentAvatar", () => {
});
it("falls back to IDENTITY.md when config has no avatar", async () => {
const root = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-avatar-"));
const root = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-avatar-"));
const workspace = path.join(root, "work");
const avatarPath = path.join(workspace, "avatars", "fallback.png");
await writeFile(avatarPath);
@@ -78,7 +78,7 @@ describe("resolveAgentAvatar", () => {
"utf-8",
);
const cfg: MoltbotConfig = {
const cfg: OpenClawConfig = {
agents: {
list: [{ id: "main", workspace }],
},
@@ -94,7 +94,7 @@ describe("resolveAgentAvatar", () => {
});
it("accepts remote and data avatars", () => {
const cfg: MoltbotConfig = {
const cfg: OpenClawConfig = {
agents: {
list: [
{ id: "main", identity: { avatar: "https://example.com/avatar.png" } },