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,5 +1,5 @@
import { resolveDefaultAgentId } from "../agents/agent-scope.js";
import type { ClawdbotConfig } from "../config/config.js";
import type { MoltbotConfig } from "../config/config.js";
import { listBindings } from "./bindings.js";
import {
buildAgentMainSessionKey,
@@ -18,7 +18,7 @@ export type RoutePeer = {
};
export type ResolveAgentRouteInput = {
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
channel: string;
accountId?: string | null;
peer?: RoutePeer | null;
@@ -87,12 +87,12 @@ export function buildAgentSessionKey(params: {
});
}
function listAgents(cfg: ClawdbotConfig) {
function listAgents(cfg: MoltbotConfig) {
const agents = cfg.agents?.list;
return Array.isArray(agents) ? agents : [];
}
function pickFirstExistingAgentId(cfg: ClawdbotConfig, agentId: string): string {
function pickFirstExistingAgentId(cfg: MoltbotConfig, agentId: string): string {
const trimmed = (agentId ?? "").trim();
if (!trimmed) return sanitizeAgentId(resolveDefaultAgentId(cfg));
const normalized = normalizeAgentId(trimmed);