From 54907045992dead0d4bfa6d17423aa564047ed56 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 1 May 2026 22:51:29 +0100 Subject: [PATCH] refactor: trim gateway mcp node exports --- src/gateway/live-agent-probes.ts | 4 ++-- src/gateway/mcp-http.protocol.ts | 2 +- src/gateway/mcp-http.request.ts | 2 +- src/gateway/node-catalog.ts | 8 ++++---- src/gateway/node-invoke-system-run-approval-match.ts | 2 +- src/gateway/node-pairing-auto-approve.ts | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gateway/live-agent-probes.ts b/src/gateway/live-agent-probes.ts index f5129b48563..ee627059752 100644 --- a/src/gateway/live-agent-probes.ts +++ b/src/gateway/live-agent-probes.ts @@ -5,7 +5,7 @@ import { normalizeOptionalLowercaseString } from "../shared/string-coerce.js"; const execFileAsync = promisify(execFile); -export type CronListCliResult = { +type CronListCliResult = { jobs?: Array<{ id?: string; name?: string; @@ -18,7 +18,7 @@ export type CronListCliResult = { export type CronListJob = NonNullable[number]; -export type LiveCronProbeSpec = { +type LiveCronProbeSpec = { nonce: string; name: string; message: string; diff --git a/src/gateway/mcp-http.protocol.ts b/src/gateway/mcp-http.protocol.ts index 5ddee46c0d6..c864e6d39ee 100644 --- a/src/gateway/mcp-http.protocol.ts +++ b/src/gateway/mcp-http.protocol.ts @@ -2,7 +2,7 @@ export const MCP_LOOPBACK_SERVER_NAME = "openclaw"; export const MCP_LOOPBACK_SERVER_VERSION = "0.1.0"; export const MCP_LOOPBACK_SUPPORTED_PROTOCOL_VERSIONS = ["2025-03-26", "2024-11-05"] as const; -export type JsonRpcId = string | number | null | undefined; +type JsonRpcId = string | number | null | undefined; export type JsonRpcRequest = { jsonrpc: "2.0"; diff --git a/src/gateway/mcp-http.request.ts b/src/gateway/mcp-http.request.ts index f97c726c668..82b69e2461c 100644 --- a/src/gateway/mcp-http.request.ts +++ b/src/gateway/mcp-http.request.ts @@ -25,7 +25,7 @@ function logMcpLoopbackHttp(step: string, details: Record): voi console.error(`[mcp-loopback] ${step} ${JSON.stringify(details)}`); } -export type McpRequestContext = { +type McpRequestContext = { sessionKey: string; messageProvider: string | undefined; accountId: string | undefined; diff --git a/src/gateway/node-catalog.ts b/src/gateway/node-catalog.ts index 493d0c2d39b..ba502bec4b7 100644 --- a/src/gateway/node-catalog.ts +++ b/src/gateway/node-catalog.ts @@ -4,7 +4,7 @@ import type { NodeListNode } from "../shared/node-list-types.js"; import { normalizeLowercaseStringOrEmpty } from "../shared/string-coerce.js"; import type { NodeSession } from "./node-registry.js"; -export type KnownNodeDevicePairingSource = { +type KnownNodeDevicePairingSource = { nodeId: string; displayName?: string; platform?: string; @@ -16,7 +16,7 @@ export type KnownNodeDevicePairingSource = { lastSeenReason?: string; }; -export type KnownNodeApprovedSource = { +type KnownNodeApprovedSource = { nodeId: string; displayName?: string; platform?: string; @@ -35,7 +35,7 @@ export type KnownNodeApprovedSource = { lastSeenReason?: string; }; -export type KnownNodeEntry = { +type KnownNodeEntry = { nodeId: string; devicePairing?: KnownNodeDevicePairingSource; nodePairing?: KnownNodeApprovedSource; @@ -43,7 +43,7 @@ export type KnownNodeEntry = { effective: NodeListNode; }; -export type KnownNodeCatalog = { +type KnownNodeCatalog = { entriesById: Map; }; diff --git a/src/gateway/node-invoke-system-run-approval-match.ts b/src/gateway/node-invoke-system-run-approval-match.ts index e52ee0e56ea..2773f81ee7c 100644 --- a/src/gateway/node-invoke-system-run-approval-match.ts +++ b/src/gateway/node-invoke-system-run-approval-match.ts @@ -6,7 +6,7 @@ import { type SystemRunApprovalMatchResult, } from "../infra/system-run-approval-binding.js"; -export type SystemRunApprovalBinding = { +type SystemRunApprovalBinding = { cwd: string | null; agentId: string | null; sessionKey: string | null; diff --git a/src/gateway/node-pairing-auto-approve.ts b/src/gateway/node-pairing-auto-approve.ts index 6f3fa1f0ede..f14aac02856 100644 --- a/src/gateway/node-pairing-auto-approve.ts +++ b/src/gateway/node-pairing-auto-approve.ts @@ -6,7 +6,7 @@ export type NodePairingAutoApproveReason = | "scope-upgrade" | "metadata-upgrade"; -export type NodePairingAutoApproveClientIpSource = +type NodePairingAutoApproveClientIpSource = | "direct" | "trusted-proxy" | "loopback-trusted-proxy"