mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 04:41:25 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
|
||||
import { createMoltbotTools } from "../agents/moltbot-tools.js";
|
||||
import { createOpenClawTools } from "../agents/openclaw-tools.js";
|
||||
import {
|
||||
filterToolsByPolicy,
|
||||
resolveEffectiveToolPolicy,
|
||||
@@ -156,8 +156,10 @@ 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-moltbot-message-channel") ?? "");
|
||||
const accountId = getHeader(req, "x-moltbot-account-id")?.trim() || undefined;
|
||||
const messageChannel = normalizeMessageChannel(
|
||||
getHeader(req, "x-openclaw-message-channel") ?? "",
|
||||
);
|
||||
const accountId = getHeader(req, "x-openclaw-account-id")?.trim() || undefined;
|
||||
|
||||
const {
|
||||
agentId,
|
||||
@@ -194,7 +196,7 @@ export async function handleToolsInvokeHttpRequest(
|
||||
: undefined;
|
||||
|
||||
// Build tool list (core + plugin tools).
|
||||
const allTools = createMoltbotTools({
|
||||
const allTools = createOpenClawTools({
|
||||
agentSessionKey: sessionKey,
|
||||
agentChannel: messageChannel ?? undefined,
|
||||
agentAccountId: accountId,
|
||||
|
||||
Reference in New Issue
Block a user