@leclabs/agent-flow-navigator-mcp 1.1.0 → 1.3.0

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 CHANGED
@@ -186,6 +186,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
186
186
  properties: {
187
187
  workflowType: { type: "string", description: "Workflow ID to visualize" },
188
188
  currentStep: { type: "string", description: "Optional: highlight this step" },
189
+ filePath: {
190
+ type: "string",
191
+ description: "Optional: absolute path to save the diagram. Defaults to .flow/diagrams/{workflowType}.md",
192
+ },
189
193
  },
190
194
  required: ["workflowType"],
191
195
  },
@@ -229,6 +233,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
229
233
  workflowType: args.workflowType,
230
234
  result: args.result,
231
235
  description: args.description,
236
+ projectRoot: PROJECT_ROOT,
232
237
  });
233
238
  return jsonResponse(result);
234
239
  }
@@ -264,11 +269,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
264
269
  const source = store.getSource(args.workflowType);
265
270
  const markdown = generateDiagram(wfDef, args.currentStep);
266
271
 
267
- // Save diagram to file
268
- if (!existsSync(DIAGRAMS_PATH)) {
269
- mkdirSync(DIAGRAMS_PATH, { recursive: true });
272
+ // Save diagram to file (use provided path or default)
273
+ const filePath = args.filePath || join(DIAGRAMS_PATH, `${args.workflowType}.md`);
274
+ const fileDir = dirname(filePath);
275
+ if (!existsSync(fileDir)) {
276
+ mkdirSync(fileDir, { recursive: true });
270
277
  }
271
- const filePath = join(DIAGRAMS_PATH, `${args.workflowType}.md`);
272
278
  writeFileSync(filePath, markdown);
273
279
 
274
280
  return jsonResponse({ savedTo: filePath, source });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leclabs/agent-flow-navigator-mcp",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "MCP server that navigates agents through DAG-based workflows",
5
5
  "license": "MIT",
6
6
  "author": "leclabs",
@@ -15,7 +15,7 @@
15
15
  "type": "module",
16
16
  "scripts": {
17
17
  "start": "node index.js",
18
- "test": "node --test engine.test.js diagram.test.js store.test.js dialog.test.js copier.test.js catalog.test.js"
18
+ "test": "node --test engine.test.js diagram.test.js store.test.js dialog.test.js copier.test.js catalog.test.js refactor-workflow.test.js build-review-workflow.test.js"
19
19
  },
20
20
  "keywords": [
21
21
  "mcp",
package/types.d.ts CHANGED
@@ -51,6 +51,7 @@ export interface TaskNode {
51
51
  outputs?: string[];
52
52
  maxRetries?: number;
53
53
  config?: Record<string, unknown>;
54
+ context_files?: string[];
54
55
  }
55
56
 
56
57
  /**
@@ -66,6 +67,7 @@ export interface GateNode {
66
67
  outputs?: string[];
67
68
  maxRetries?: number;
68
69
  config?: Record<string, unknown>;
70
+ context_files?: string[];
69
71
  }
70
72
 
71
73
  /**