Skip to content

Use the installed agentic-flow CLI for MCP worker dispatch - #1549

Open
xixi-box wants to merge 1 commit into
ruvnet:mainfrom
xixi-box:fix/issue-1547-36563ff-13f262ac
Open

xixi-box wants to merge 1 commit into
ruvnet:mainfrom
xixi-box:fix/issue-1547-36563ff-13f262ac

Conversation

@xixi-box

Copy link
Copy Markdown
Contributor

Fixes #1547

Description

Use the installed agentic-flow CLI for MCP worker dispatch, status, and results. Fixes #1547.

Motivation

The pinned alpha printed its usage banner and exited zero, so the MCP tools presented help as worker output. Dispatch also reported success when the child failed.

Changes

  • Invoke a compatible installed CLI with an argument array and report missing runtimes, usage output, and child errors as MCP tool errors.
  • Keep the successful status and result formats and report when the dispatch prompt contains no triggers.
  • Document the runtime requirement and add regression coverage through ruvector mcp start.

Testing

Tests: node npm/packages/ruvector/test/mcp-workers.js.
Result: cd npm/packages/ruvector && npm install --no-package-lock --ignore-scripts --no-audit --no-fund --legacy-peer-deps --no-workspaces — passed after the initial workspace-mode install hit an unrelated peer-dependency conflict.
Result: cd npm/packages/ruvector && npm run build — passed. The build supplied dist for existing MCP tests.
Result: node npm/packages/ruvector/test/mcp-workers.js — base exited 1 with the pinned usage banner and success=true and with success=true after child exit 7. Patched exited 0 with seven passing cases. See OSSCOUT_BASE.log and OSSCOUT_PATCHED.log.
Result: cd npm/packages/ruvector && node test/mcp-command-security.js && node test/mcp-policy.js && node test/mcp-stdio.js && node test/mcp-handshake.js && node test/mcp-extras.js && node test/mcp-exploit-regression.js — all six scripts passed on patched sources. All six also passed individually or in smaller groups on base after npm run build supplied dist.
Result: cd npm/packages/ruvector && node /tmp/oss-scout-worker-runtime.f7WN5i/mcp-smoke.cjs — passed with installed agentic-flow 3.5.5. Both dispatch prompts returned No triggers detected in prompt, status returned No workers found, and JSON results returned [].
Result: git diff --check && node --check npm/packages/ruvector/bin/mcp-server.js && node --check npm/packages/ruvector/test/mcp-workers.js — passed.
Regression coverage: npm/packages/ruvector/test/mcp-workers.js.

Performance Impact

These three handlers launch the installed CLI directly and avoid npx package resolution and fetching.

Checklist

  • Tests added/updated
  • Documentation updated
  • Changelog updated
  • Code formatted (cargo fmt)
  • Lints passing (cargo clippy)
  • All tests passing (cargo test)

Signed-off-by: wangshun <96341168+xixi-box@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant