chore: introduce resolved config (#425)

This commit is contained in:
Pavel Feldman 2025-05-14 16:01:08 -07:00 committed by GitHub
parent 746c9fc124
commit fea50e6840
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 69 additions and 41 deletions

View file

@ -21,10 +21,10 @@ import { zodToJsonSchema } from 'zod-to-json-schema';
import { Context, packageJSON } from './context.js';
import { snapshotTools, visionTools } from './tools.js';
import type { Config } from '../config.js';
import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
import { FullConfig } from './config.js';
export async function createConnection(config: Config): Promise<Connection> {
export async function createConnection(config: FullConfig): Promise<Connection> {
const allTools = config.vision ? visionTools : snapshotTools;
const tools = allTools.filter(tool => !config.capabilities || tool.capability === 'core' || config.capabilities.includes(tool.capability));