feat: add managed local tool environments
GoodBuddy can now provide managed Node.js and on-demand Python to local Skills and stdio MCP servers, or validate an explicitly selected custom interpreter. The Capabilities and tools settings page exposes source selection, diagnostics, installation progress, cancellation, and removal while new processes receive immutable PATH snapshots. Application settings migrate to v10. Local terminal and remote Host environments remain unchanged. Windows x64 native-source Node and Python paths are validated; OSS mirror publication, redistributed license resources, and the remaining native platform probes are recorded as release blockers. Release note: 新增工具执行环境,可为本机 Skills 和 stdio MCP 使用 GoodBuddy 托管的 Node.js、按需安装的 Python,或经过验证的自定义解释器。
This commit is contained in:
@@ -2,19 +2,24 @@ import { Client } from '@modelcontextprotocol/sdk/client/index.js'
|
||||
import type { McpServerTestResult } from '../../shared/capability-contracts'
|
||||
import type { ResolvedMcpServer } from './capability-service'
|
||||
import { createMcpTransport } from './mcp-client-transport'
|
||||
import type { LaunchEnvironmentProvider } from '../local-tool-environment'
|
||||
|
||||
const MCP_TEST_TOTAL_TIMEOUT_MS = 12_000
|
||||
const MCP_TEST_INACTIVITY_TIMEOUT_MS = 8_000
|
||||
|
||||
export async function testMcpServer(
|
||||
server: ResolvedMcpServer,
|
||||
signal?: AbortSignal
|
||||
signal?: AbortSignal,
|
||||
launchEnvironmentProvider?: LaunchEnvironmentProvider
|
||||
): Promise<McpServerTestResult> {
|
||||
const client = new Client({
|
||||
name: 'goodbuddy',
|
||||
version: '0.1.0'
|
||||
})
|
||||
const transport = createMcpTransport(server)
|
||||
const transport = createMcpTransport(
|
||||
server,
|
||||
launchEnvironmentProvider
|
||||
)
|
||||
const controller = new AbortController()
|
||||
let timedOut = false
|
||||
const abortFromCaller = (): void => {
|
||||
|
||||
Reference in New Issue
Block a user