mcp-state-machine-test-framework 1.0.4 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +12 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -335,7 +335,9 @@ server.tool("execute_suite", "Ejecución de Suite Completa", { name: z.string()
|
|
|
335
335
|
server.tool("upsert_node", "Añadir o actualizar un nodo en el mapa de estados", {
|
|
336
336
|
mapName: z.string(),
|
|
337
337
|
nodeName: z.string(),
|
|
338
|
-
nodeData: z.
|
|
338
|
+
nodeData: z.object({
|
|
339
|
+
transiciones: z.any().optional()
|
|
340
|
+
}).passthrough()
|
|
339
341
|
}, async ({ mapName, nodeName, nodeData }) => {
|
|
340
342
|
const mapPath = path.join(__dirname, 'maps', mapName);
|
|
341
343
|
let map = { nodos: {} };
|
|
@@ -368,7 +370,9 @@ server.tool("upsert_node", "Añadir o actualizar un nodo en el mapa de estados",
|
|
|
368
370
|
return { content: [{ type: "text", text: `Nodo '${nodeName}' actualizado. Diagrama visual regenerado en maps/${mapName.replace('.json', '.md')}` }] };
|
|
369
371
|
});
|
|
370
372
|
|
|
371
|
-
server.tool("inspect_framework", "Inspeccionar integridad y listar entidades del framework", {
|
|
373
|
+
server.tool("inspect_framework", "Inspeccionar integridad y listar entidades del framework", {
|
|
374
|
+
filter: z.optional(z.string())
|
|
375
|
+
}, async () => {
|
|
372
376
|
const entities = { maps: [], test_cases: [], suites: [], health: [] };
|
|
373
377
|
const getFiles = async (dir) => {
|
|
374
378
|
try { return (await fs.readdir(path.join(__dirname, dir))).filter(f => f.endsWith('.json')); }
|
|
@@ -401,7 +405,10 @@ server.tool("inspect_framework", "Inspeccionar integridad y listar entidades del
|
|
|
401
405
|
|
|
402
406
|
server.tool("save_test_case", "Crear o actualizar un caso de prueba", {
|
|
403
407
|
name: z.string(),
|
|
404
|
-
steps: z.array(z.
|
|
408
|
+
steps: z.array(z.object({
|
|
409
|
+
name: z.string().optional(),
|
|
410
|
+
action: z.string().optional()
|
|
411
|
+
}).passthrough())
|
|
405
412
|
}, async ({ name, steps }) => {
|
|
406
413
|
const fileName = name.endsWith('.json') ? name : `${name}.json`;
|
|
407
414
|
const filePath = path.join(__dirname, 'test_cases', fileName);
|
|
@@ -415,8 +422,8 @@ server.tool("save_suite", "Crear o actualizar una suite de pruebas", {
|
|
|
415
422
|
name: z.string(),
|
|
416
423
|
state_map: z.string(),
|
|
417
424
|
tests: z.array(z.string()),
|
|
418
|
-
beforeSuite: z.
|
|
419
|
-
afterSuite: z.
|
|
425
|
+
beforeSuite: z.array(z.string()).optional().default([]),
|
|
426
|
+
afterSuite: z.array(z.string()).optional().default([])
|
|
420
427
|
}, async ({ name, state_map, tests, beforeSuite, afterSuite }) => {
|
|
421
428
|
const fileName = name.endsWith('.json') ? name : `${name}.json`;
|
|
422
429
|
const filePath = path.join(__dirname, 'suites', fileName);
|