refactor: trim gateway mcp node exports · openclaw/openclaw@5490704
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -5,7 +5,7 @@ import { normalizeOptionalLowercaseString } from "../shared/string-coerce.js";
|
5 | 5 | |
6 | 6 | const execFileAsync = promisify(execFile); |
7 | 7 | |
8 | | -export type CronListCliResult = { |
| 8 | +type CronListCliResult = { |
9 | 9 | jobs?: Array<{ |
10 | 10 | id?: string; |
11 | 11 | name?: string; |
@@ -18,7 +18,7 @@ export type CronListCliResult = {
|
18 | 18 | |
19 | 19 | export type CronListJob = NonNullable<CronListCliResult["jobs"]>[number]; |
20 | 20 | |
21 | | -export type LiveCronProbeSpec = { |
| 21 | +type LiveCronProbeSpec = { |
22 | 22 | nonce: string; |
23 | 23 | name: string; |
24 | 24 | message: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,7 @@ export const MCP_LOOPBACK_SERVER_NAME = "openclaw";
|
2 | 2 | export const MCP_LOOPBACK_SERVER_VERSION = "0.1.0"; |
3 | 3 | export const MCP_LOOPBACK_SUPPORTED_PROTOCOL_VERSIONS = ["2025-03-26", "2024-11-05"] as const; |
4 | 4 | |
5 | | -export type JsonRpcId = string | number | null | undefined; |
| 5 | +type JsonRpcId = string | number | null | undefined; |
6 | 6 | |
7 | 7 | export type JsonRpcRequest = { |
8 | 8 | jsonrpc: "2.0"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -25,7 +25,7 @@ function logMcpLoopbackHttp(step: string, details: Record<string, unknown>): voi
|
25 | 25 | console.error(`[mcp-loopback] ${step} ${JSON.stringify(details)}`); |
26 | 26 | } |
27 | 27 | |
28 | | -export type McpRequestContext = { |
| 28 | +type McpRequestContext = { |
29 | 29 | sessionKey: string; |
30 | 30 | messageProvider: string | undefined; |
31 | 31 | accountId: string | undefined; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ import type { NodeListNode } from "../shared/node-list-types.js";
|
4 | 4 | import { normalizeLowercaseStringOrEmpty } from "../shared/string-coerce.js"; |
5 | 5 | import type { NodeSession } from "./node-registry.js"; |
6 | 6 | |
7 | | -export type KnownNodeDevicePairingSource = { |
| 7 | +type KnownNodeDevicePairingSource = { |
8 | 8 | nodeId: string; |
9 | 9 | displayName?: string; |
10 | 10 | platform?: string; |
@@ -16,7 +16,7 @@ export type KnownNodeDevicePairingSource = {
|
16 | 16 | lastSeenReason?: string; |
17 | 17 | }; |
18 | 18 | |
19 | | -export type KnownNodeApprovedSource = { |
| 19 | +type KnownNodeApprovedSource = { |
20 | 20 | nodeId: string; |
21 | 21 | displayName?: string; |
22 | 22 | platform?: string; |
@@ -35,15 +35,15 @@ export type KnownNodeApprovedSource = {
|
35 | 35 | lastSeenReason?: string; |
36 | 36 | }; |
37 | 37 | |
38 | | -export type KnownNodeEntry = { |
| 38 | +type KnownNodeEntry = { |
39 | 39 | nodeId: string; |
40 | 40 | devicePairing?: KnownNodeDevicePairingSource; |
41 | 41 | nodePairing?: KnownNodeApprovedSource; |
42 | 42 | live?: NodeSession; |
43 | 43 | effective: NodeListNode; |
44 | 44 | }; |
45 | 45 | |
46 | | -export type KnownNodeCatalog = { |
| 46 | +type KnownNodeCatalog = { |
47 | 47 | entriesById: Map<string, KnownNodeEntry>; |
48 | 48 | }; |
49 | 49 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ import {
|
6 | 6 | type SystemRunApprovalMatchResult, |
7 | 7 | } from "../infra/system-run-approval-binding.js"; |
8 | 8 | |
9 | | -export type SystemRunApprovalBinding = { |
| 9 | +type SystemRunApprovalBinding = { |
10 | 10 | cwd: string | null; |
11 | 11 | agentId: string | null; |
12 | 12 | sessionKey: string | null; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ export type NodePairingAutoApproveReason =
|
6 | 6 | | "scope-upgrade" |
7 | 7 | | "metadata-upgrade"; |
8 | 8 | |
9 | | -export type NodePairingAutoApproveClientIpSource = |
| 9 | +type NodePairingAutoApproveClientIpSource = |
10 | 10 | | "direct" |
11 | 11 | | "trusted-proxy" |
12 | 12 | | "loopback-trusted-proxy" |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。