UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

22 lines • 1.1 kB
import { MCPConfig } from '../../../core/mcp/config.ts'; import { CommandSpec } from '../../spec/types.ts'; import { CLI } from '../types.ts'; import type { MCPSource, MCPTool } from './types.ts'; /** * Refuse a tool list no CLI can be made from: no tools, a name that reads * as an option, or two names that become the same subcommand. */ export declare function checkNames(tools: readonly MCPTool[]): void; /** One tool's subcommand: its first line, the rest and its compact schema. */ export declare function leaf(tool: MCPTool): CommandSpec; /** The CLI an MCP server's tool list becomes, one subcommand a tool. Throws MCPToolsError. */ export declare function buildCli(source: MCPSource): CLI; /** * Read a streamable-HTTP MCP server's tools and build its CLI. Install it * with `ws.registerCli(name, cli, config)`. * * Throws MCPToolsError when the server cannot be listed or its tools * cannot be made into a CLI, and ZodError for a config MCPConfig refuses. */ export declare function mcpCli(config: MCPConfig | Record<string, unknown>): Promise<CLI>; //# sourceMappingURL=build.d.ts.map