mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:40:44 +00:00
refactor: trim gateway loopback helper exports
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export type McpLoopbackRuntime = {
|
||||
type McpLoopbackRuntime = {
|
||||
port: number;
|
||||
ownerToken: string;
|
||||
nonOwnerToken: string;
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export type SystemRunApprovalGuardError = {
|
||||
type SystemRunApprovalGuardError = {
|
||||
ok: false;
|
||||
message: string;
|
||||
details: Record<string, unknown>;
|
||||
|
||||
@@ -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[];
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user