diff --git a/scripts/deadcode-exports.baseline.mjs b/scripts/deadcode-exports.baseline.mjs index 9db9a55453dd..d1b95915b444 100644 --- a/scripts/deadcode-exports.baseline.mjs +++ b/scripts/deadcode-exports.baseline.mjs @@ -824,16 +824,6 @@ export const KNIP_UNUSED_EXPORT_BASELINE = [ "src/acp/runtime/registry.ts: AcpRuntimeBackend", "src/agents/agent-bundle-lsp-runtime.ts: spawnLspServerProcess", "src/agents/agent-bundle-mcp-tools.ts: __testing", - "src/agents/agent-bundle-mcp-tools.ts: BundleMcpToolRuntime", - "src/agents/agent-bundle-mcp-tools.ts: completeDeferredSessionMcpRuntimeRetirement", - "src/agents/agent-bundle-mcp-tools.ts: createSessionMcpRuntime", - "src/agents/agent-bundle-mcp-tools.ts: disposeSessionMcpRuntime", - "src/agents/agent-bundle-mcp-tools.ts: getSessionMcpRuntimeManager", - "src/agents/agent-bundle-mcp-tools.ts: McpCatalogTool", - "src/agents/agent-bundle-mcp-tools.ts: McpServerCatalog", - "src/agents/agent-bundle-mcp-tools.ts: McpToolCatalog", - "src/agents/agent-bundle-mcp-tools.ts: SessionMcpRuntime", - "src/agents/agent-bundle-mcp-tools.ts: SessionMcpRuntimeManager", "src/agents/agent-bundle-mcp-tools.ts: testing", "src/agents/agent-hooks/compaction-instructions.ts: DEFAULT_COMPACTION_INSTRUCTIONS", "src/agents/agent-hooks/compaction-safeguard.ts: testing", diff --git a/src/agents/agent-bundle-mcp-runtime.test.ts b/src/agents/agent-bundle-mcp-runtime.test.ts index 0260d0904d2f..cb629ce20df2 100644 --- a/src/agents/agent-bundle-mcp-runtime.test.ts +++ b/src/agents/agent-bundle-mcp-runtime.test.ts @@ -7,11 +7,13 @@ import { expectDefined } from "@openclaw/normalization-core"; import { afterEach, describe, expect, it, vi } from "vitest"; import { cleanupTempDirs, makeTempDir } from "../../test/helpers/temp-dir.js"; import { useAutoCleanupTempDirTracker } from "../../test/helpers/temp-dir.js"; -import { createBundleMcpJsonSchemaValidator } from "./agent-bundle-mcp-runtime.js"; -import { cleanupBundleMcpHarness } from "./agent-bundle-mcp-test-harness.js"; import { completeDeferredSessionMcpRuntimeRetirement, + createBundleMcpJsonSchemaValidator, createSessionMcpRuntime, +} from "./agent-bundle-mcp-runtime.js"; +import { cleanupBundleMcpHarness } from "./agent-bundle-mcp-test-harness.js"; +import { getOrCreateSessionMcpRuntime, materializeBundleMcpToolsForRun, retireSessionMcpRuntime, diff --git a/src/agents/agent-bundle-mcp-runtime.ts b/src/agents/agent-bundle-mcp-runtime.ts index 12ced419521c..280f063138f4 100644 --- a/src/agents/agent-bundle-mcp-runtime.ts +++ b/src/agents/agent-bundle-mcp-runtime.ts @@ -1204,7 +1204,7 @@ function createSessionMcpRuntimeManager( }; } -export function getSessionMcpRuntimeManager(): SessionMcpRuntimeManager { +function getSessionMcpRuntimeManager(): SessionMcpRuntimeManager { return resolveGlobalSingleton(SESSION_MCP_RUNTIME_MANAGER_KEY, createSessionMcpRuntimeManager); } @@ -1232,7 +1232,7 @@ export function peekSessionMcpRuntime(params: { }); } -export async function disposeSessionMcpRuntime(sessionId: string): Promise { +async function disposeSessionMcpRuntime(sessionId: string): Promise { await getSessionMcpRuntimeManager().disposeSession(sessionId); } diff --git a/src/agents/agent-bundle-mcp-tools.ts b/src/agents/agent-bundle-mcp-tools.ts index 7a1b278e8537..209004fa33ff 100644 --- a/src/agents/agent-bundle-mcp-tools.ts +++ b/src/agents/agent-bundle-mcp-tools.ts @@ -1,22 +1,10 @@ /** Public facade for bundle MCP tool materialization and session-scoped runtime management. */ -export type { - BundleMcpToolRuntime, - McpCatalogTool, - McpServerCatalog, - McpToolCatalog, - McpToolCatalogDiagnostic, - SessionMcpRuntime, - SessionMcpRuntimeManager, -} from "./agent-bundle-mcp-types.js"; +export type { McpToolCatalogDiagnostic } from "./agent-bundle-mcp-types.js"; export { testing, testing as __testing, - completeDeferredSessionMcpRuntimeRetirement, - createSessionMcpRuntime, disposeAllSessionMcpRuntimes, - disposeSessionMcpRuntime, getOrCreateSessionMcpRuntime, - getSessionMcpRuntimeManager, peekSessionMcpRuntime, resolveSessionMcpConfigSummary, retireSessionMcpRuntime,