UNPKG

histoire

Version:

A fast story book powered by Vite

14 lines (13 loc) • 762 B
import { MCP_INSPECTION_TOOLS, mcpInspectionInputSchemas } from '../../protocol/inspection-schema.js'; import { resolveDevPreviewOptions } from '../dev.js'; import { createInspectionTask } from './task.js'; /** Install fixed inspection executors for dev HTTP and owned stdio workers. */ export function registerDevInspectionExecutors(operations, secret) { for (const kind of Object.keys(MCP_INSPECTION_TOOLS)) { operations.registerExecutor(kind, (input, capture) => { const target = mcpInspectionInputSchemas[MCP_INSPECTION_TOOLS[kind]].parse(input); const options = resolveDevPreviewOptions(target, capture); return createInspectionTask(kind, target, options, { root: options.root, secret }); }); } }