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

@@ -2,7 +2,7 @@ import type { ChannelDock } from "../channels/dock.js";
import { getChannelDock, listChannelDocks } from "../channels/dock.js";
import type { ChannelId } from "../channels/plugins/types.js";
import { normalizeAnyChannelId } from "../channels/registry.js";
import type { ClawdbotConfig } from "../config/config.js";
import type { MoltbotConfig } from "../config/config.js";
import type { MsgContext } from "./templating.js";
export type CommandAuthorization = {
@@ -14,7 +14,7 @@ export type CommandAuthorization = {
to?: string;
};
function resolveProviderFromContext(ctx: MsgContext, cfg: ClawdbotConfig): ChannelId | undefined {
function resolveProviderFromContext(ctx: MsgContext, cfg: MoltbotConfig): ChannelId | undefined {
const direct =
normalizeAnyChannelId(ctx.Provider) ??
normalizeAnyChannelId(ctx.Surface) ??
@@ -44,7 +44,7 @@ function resolveProviderFromContext(ctx: MsgContext, cfg: ClawdbotConfig): Chann
function formatAllowFromList(params: {
dock?: ChannelDock;
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
accountId?: string | null;
allowFrom: Array<string | number>;
}): string[] {
@@ -58,7 +58,7 @@ function formatAllowFromList(params: {
function normalizeAllowFromEntry(params: {
dock?: ChannelDock;
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
accountId?: string | null;
value: string;
}): string[] {
@@ -74,7 +74,7 @@ function normalizeAllowFromEntry(params: {
function resolveSenderCandidates(params: {
dock?: ChannelDock;
providerId?: ChannelId;
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
accountId?: string | null;
senderId?: string | null;
senderE164?: string | null;
@@ -108,7 +108,7 @@ function resolveSenderCandidates(params: {
export function resolveCommandAuthorization(params: {
ctx: MsgContext;
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
commandAuthorized: boolean;
}): CommandAuthorization {
const { ctx, cfg, commandAuthorized } = params;