refactor: trim mcp media exports

This commit is contained in:
Peter Steinberger
2026-05-02 00:07:42 +01:00
parent 42773cb89f
commit 4f9bbc4ff9
3 changed files with 7 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ export type ConversationDescriptor = {
updatedAt?: number | null;
};
export type SessionRow = {
type SessionRow = {
key: string;
channel?: string;
lastChannel?: string;
@@ -145,7 +145,7 @@ export function summarizeResult(
};
}
export function resolveConversationChannel(row: SessionRow): string | undefined {
function resolveConversationChannel(row: SessionRow): string | undefined {
return normalizeMessageChannel(
toText(row.deliveryContext?.channel) ??
toText(row.lastChannel) ??

View File

@@ -15,7 +15,7 @@ export function resolveOpenClawToolsForMcp(): AnyAgentTool[] {
return [createCronTool()];
}
export function createOpenClawToolsMcpServer(
function createOpenClawToolsMcpServer(
params: {
tools?: AnyAgentTool[];
} = {},
@@ -24,7 +24,7 @@ export function createOpenClawToolsMcpServer(
return createToolsMcpServer({ name: "openclaw-tools", tools });
}
export async function serveOpenClawToolsMcp(): Promise<void> {
async function serveOpenClawToolsMcp(): Promise<void> {
const server = createOpenClawToolsMcpServer();
await connectToolsMcpServerToStdio(server);
}

View File

@@ -3,7 +3,7 @@ import { safeFileURLToPath } from "../infra/local-file-access.js";
import { resolveUserPath } from "../utils.js";
import { getMediaDir, resolveMediaBufferPath } from "./store.js";
export type MediaReferenceErrorCode = "invalid-path" | "path-not-allowed";
type MediaReferenceErrorCode = "invalid-path" | "path-not-allowed";
export class MediaReferenceError extends Error {
code: MediaReferenceErrorCode;
@@ -15,7 +15,7 @@ export class MediaReferenceError extends Error {
}
}
export type InboundMediaReference = {
type InboundMediaReference = {
id: string;
normalizedSource: string;
physicalPath: string;
@@ -30,7 +30,7 @@ export function normalizeMediaReferenceSource(source: string): string {
return trimmed.replace(/^\s*MEDIA\s*:\s*/i, "").trim();
}
export type MediaReferenceSourceInfo = {
type MediaReferenceSourceInfo = {
hasScheme: boolean;
hasUnsupportedScheme: boolean;
isDataUrl: boolean;