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,6 +1,6 @@
import type { IncomingMessage, ServerResponse } from "node:http";
import { createClawdbotTools } from "../agents/clawdbot-tools.js";
import { createMoltbotTools } from "../agents/moltbot-tools.js";
import {
filterToolsByPolicy,
resolveEffectiveToolPolicy,
@@ -117,10 +117,8 @@ export async function handleToolsInvokeHttpRequest(
!rawSessionKey || rawSessionKey === "main" ? resolveMainSessionKey(cfg) : rawSessionKey;
// Resolve message channel/account hints (optional headers) for policy inheritance.
const messageChannel = normalizeMessageChannel(
getHeader(req, "x-clawdbot-message-channel") ?? "",
);
const accountId = getHeader(req, "x-clawdbot-account-id")?.trim() || undefined;
const messageChannel = normalizeMessageChannel(getHeader(req, "x-moltbot-message-channel") ?? "");
const accountId = getHeader(req, "x-moltbot-account-id")?.trim() || undefined;
const {
agentId,
@@ -157,7 +155,7 @@ export async function handleToolsInvokeHttpRequest(
: undefined;
// Build tool list (core + plugin tools).
const allTools = createClawdbotTools({
const allTools = createMoltbotTools({
agentSessionKey: sessionKey,
agentChannel: messageChannel ?? undefined,
agentAccountId: accountId,