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

@@ -1,18 +1,18 @@
import { describe, expect, it } from "vitest";
import type { MoltbotConfig } from "../config/config.js";
import type { OpenClawConfig } from "../config/config.js";
import type { SessionEntry } from "../config/sessions.js";
import { resolveSendPolicy } from "./send-policy.js";
describe("resolveSendPolicy", () => {
it("defaults to allow", () => {
const cfg = {} as MoltbotConfig;
const cfg = {} as OpenClawConfig;
expect(resolveSendPolicy({ cfg })).toBe("allow");
});
it("entry override wins", () => {
const cfg = {
session: { sendPolicy: { default: "allow" } },
} as MoltbotConfig;
} as OpenClawConfig;
const entry: SessionEntry = {
sessionId: "s",
updatedAt: 0,
@@ -34,7 +34,7 @@ describe("resolveSendPolicy", () => {
],
},
},
} as MoltbotConfig;
} as OpenClawConfig;
const entry: SessionEntry = {
sessionId: "s",
updatedAt: 0,
@@ -52,7 +52,7 @@ describe("resolveSendPolicy", () => {
rules: [{ action: "deny", match: { keyPrefix: "cron:" } }],
},
},
} as MoltbotConfig;
} as OpenClawConfig;
expect(resolveSendPolicy({ cfg, sessionKey: "cron:job-1" })).toBe("deny");
});
});

View File

@@ -1,4 +1,4 @@
import type { MoltbotConfig } from "../config/config.js";
import type { OpenClawConfig } from "../config/config.js";
import type { SessionChatType, SessionEntry } from "../config/sessions.js";
import { normalizeChatType } from "../channels/chat-type.js";
@@ -33,7 +33,7 @@ function deriveChatTypeFromKey(key?: string): SessionChatType | undefined {
}
export function resolveSendPolicy(params: {
cfg: MoltbotConfig;
cfg: OpenClawConfig;
entry?: SessionEntry;
sessionKey?: string;
channel?: string;