histoire
Version:
A fast story book powered by Vite
14 lines (13 loc) • 812 B
JavaScript
import { resolveNodePreviewOptions } from '../../../deploy/execution.js';
import { MCP_INSPECTION_TOOLS, mcpInspectionInputSchemas } from '../../protocol/inspection-schema.js';
import { createInspectionTask } from './task.js';
/** Immutable deployment needs only optional Playwright, never project source discovery. */
export function registerNodeInspectionExecutors(operations, launch, 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 = resolveNodePreviewOptions(target, capture, launch);
return createInspectionTask(kind, target, options, { root: options.root, secret });
});
}
}