mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 16:38:27 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -3,7 +3,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 {
|
||||
applyAgentBindings,
|
||||
applyAgentConfig,
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
describe("agents helpers", () => {
|
||||
it("buildAgentSummaries includes default + configured agents", () => {
|
||||
const cfg: MoltbotConfig = {
|
||||
const cfg: OpenClawConfig = {
|
||||
agents: {
|
||||
defaults: {
|
||||
workspace: "/main-ws",
|
||||
@@ -45,7 +45,7 @@ describe("agents helpers", () => {
|
||||
const work = summaries.find((summary) => summary.id === "work");
|
||||
|
||||
expect(main).toBeTruthy();
|
||||
expect(main?.workspace).toBe(path.join(os.homedir(), "clawd-main"));
|
||||
expect(main?.workspace).toBe(path.join(os.homedir(), ".openclaw", "workspace-main"));
|
||||
expect(main?.bindings).toBe(1);
|
||||
expect(main?.model).toBe("anthropic/claude");
|
||||
expect(main?.agentDir.endsWith(path.join("agents", "main", "agent"))).toBe(true);
|
||||
@@ -59,7 +59,7 @@ describe("agents helpers", () => {
|
||||
});
|
||||
|
||||
it("applyAgentConfig merges updates", () => {
|
||||
const cfg: MoltbotConfig = {
|
||||
const cfg: OpenClawConfig = {
|
||||
agents: {
|
||||
list: [{ id: "work", workspace: "/old-ws", model: "anthropic/claude" }],
|
||||
},
|
||||
@@ -80,7 +80,7 @@ describe("agents helpers", () => {
|
||||
});
|
||||
|
||||
it("applyAgentBindings skips duplicates and reports conflicts", () => {
|
||||
const cfg: MoltbotConfig = {
|
||||
const cfg: OpenClawConfig = {
|
||||
bindings: [
|
||||
{
|
||||
agentId: "main",
|
||||
@@ -111,7 +111,7 @@ describe("agents helpers", () => {
|
||||
});
|
||||
|
||||
it("pruneAgentConfig removes agent, bindings, and allowlist entries", () => {
|
||||
const cfg: MoltbotConfig = {
|
||||
const cfg: OpenClawConfig = {
|
||||
agents: {
|
||||
list: [
|
||||
{ id: "work", default: true, workspace: "/work-ws" },
|
||||
|
||||
Reference in New Issue
Block a user