refactor: trim gateway loopback helper exports

This commit is contained in:
Peter Steinberger
2026-05-02 03:12:39 +01:00
parent 27ea0249bd
commit 23178d933f
6 changed files with 4 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
export type McpLoopbackRuntime = {
type McpLoopbackRuntime = {
port: number;
ownerToken: string;
nonOwnerToken: string;

View File

@@ -1,11 +1,5 @@
import { applyOwnerOnlyToolPolicy } from "../agents/tool-policy.js";
import type { OpenClawConfig } from "../config/types.openclaw.js";
import {
clearActiveMcpLoopbackRuntimeByOwnerToken,
createMcpLoopbackServerConfig,
getActiveMcpLoopbackRuntime,
setActiveMcpLoopbackRuntime,
} from "./mcp-http.loopback-runtime.js";
import {
buildMcpToolSchema,
type McpLoopbackTool,
@@ -72,10 +66,3 @@ export class McpLoopbackToolCache {
return nextEntry;
}
}
export {
clearActiveMcpLoopbackRuntimeByOwnerToken,
createMcpLoopbackServerConfig,
getActiveMcpLoopbackRuntime,
setActiveMcpLoopbackRuntime,
};

View File

@@ -308,7 +308,7 @@ export function defaultGatewayBindMode(tailscaleMode?: string): GatewayBindMode
* @param host - The host address to test
* @returns True if we can successfully bind to this address
*/
export async function canBindToHost(host: string): Promise<boolean> {
async function canBindToHost(host: string): Promise<boolean> {
return new Promise((resolve) => {
const testServer = net.createServer();
testServer.once("error", () => {

View File

@@ -1,4 +1,4 @@
export type SystemRunApprovalGuardError = {
type SystemRunApprovalGuardError = {
ok: false;
message: string;
details: Record<string, unknown>;

View File

@@ -22,7 +22,6 @@ function requestMismatch(): SystemRunApprovalMatchResult {
}
export { toSystemRunApprovalMismatchError } from "../infra/system-run-approval-binding.js";
export type { SystemRunApprovalMatchResult } from "../infra/system-run-approval-binding.js";
export function evaluateSystemRunApprovalMatch(params: {
argv: string[];

View File

@@ -3,7 +3,7 @@ import path from "node:path";
import { getTailnetHostname } from "../infra/tailscale.js";
import { runExec } from "../process/exec.js";
export type ResolveBonjourCliPathOptions = {
type ResolveBonjourCliPathOptions = {
env?: NodeJS.ProcessEnv;
argv?: string[];
execPath?: string;