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,12 +1,12 @@
import type { ClawdbotConfig } from "../config/config.js";
import type { MoltbotConfig } from "../config/config.js";
export type PluginEnableResult = {
config: ClawdbotConfig;
config: MoltbotConfig;
enabled: boolean;
reason?: string;
};
function ensureAllowlisted(cfg: ClawdbotConfig, pluginId: string): ClawdbotConfig {
function ensureAllowlisted(cfg: MoltbotConfig, pluginId: string): MoltbotConfig {
const allow = cfg.plugins?.allow;
if (!Array.isArray(allow) || allow.includes(pluginId)) return cfg;
return {
@@ -18,7 +18,7 @@ function ensureAllowlisted(cfg: ClawdbotConfig, pluginId: string): ClawdbotConfi
};
}
export function enablePluginInConfig(cfg: ClawdbotConfig, pluginId: string): PluginEnableResult {
export function enablePluginInConfig(cfg: MoltbotConfig, pluginId: string): PluginEnableResult {
if (cfg.plugins?.enabled === false) {
return { config: cfg, enabled: false, reason: "plugins disabled" };
}
@@ -33,7 +33,7 @@ export function enablePluginInConfig(cfg: ClawdbotConfig, pluginId: string): Plu
enabled: true,
},
};
let next: ClawdbotConfig = {
let next: MoltbotConfig = {
...cfg,
plugins: {
...cfg.plugins,