Add --cmd argument to agentic-workflows MCP server in dev mode#13974
Add --cmd argument to agentic-workflows MCP server in dev mode#13974
Conversation
- Add ActionMode field to MCPRendererOptions struct - Update renderAgenticWorkflowsMCPConfigWithOptions to add --cmd in dev mode - Update renderAgenticWorkflowsMCPConfigTOML to add --cmd in dev mode - Add ActionMode to WorkflowData and populate it from compiler - Update all engines (Copilot, Claude, Codex, Custom) to pass action mode - Add comprehensive tests for dev and release modes Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Update TestImportAgenticWorkflowsTool to check for the --cmd argument that is now added in dev mode. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…dev mode All tests passing, code formatted and linted successfully. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
❌ Changeset Generator failed. Please review the logs for details. |
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
Agent Container Tool Check ✅Smoke test results for common development tools in agent container:
Result: 10/12 tools fully functional ✅ * Java (21.0.10-7) and .NET binaries are present at their expected paths but cannot be executed directly in this bash environment (possibly a container security restriction or bash tool limitation). The binaries exist and are valid ELF executables. Test Coverage:
Overall Status: PASS - All critical development tools are accessible ✅
|
|
🧪 Smoke Test: PARTIAL PASS (8/9) PRs Reviewed:
Test Results: ✅✅ Overall: PARTIAL PASS cc: @pelikhan
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
There was a problem hiding this comment.
Pull request overview
This PR adds the --cmd flag to the agentic-workflows MCP server configuration in dev mode, enabling the MCP server to execute workflow commands by specifying the binary path in containerized environments.
Changes:
- Extended
MCPRendererOptionsandWorkflowDatawithActionModefield to propagate compilation mode - Updated MCP renderers to conditionally include
--cmd /opt/gh-aw/gh-awflag in dev mode, omitting it in release mode - Integrated ActionMode into all engine MCP renderers (Copilot, Claude, Codex, Custom) with defensive defaults
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/mcp_renderer.go | Added ActionMode field to MCPRendererOptions; updated unified renderer to conditionally include --cmd flag in TOML format |
| pkg/workflow/mcp_config_builtin.go | Updated helper functions to accept ActionMode parameter and conditionally render --cmd flag in both JSON and TOML formats |
| pkg/workflow/compiler_types.go | Extended WorkflowData struct with ActionMode field |
| pkg/workflow/compiler_orchestrator_workflow.go | Populated ActionMode from compiler state when building WorkflowData |
| pkg/workflow/copilot_mcp.go | Updated Copilot engine to extract and pass ActionMode to MCP renderer |
| pkg/workflow/claude_mcp.go | Updated Claude engine to extract and pass ActionMode to MCP renderer |
| pkg/workflow/codex_mcp.go | Updated Codex engine to extract and pass ActionMode to MCP renderer (both TOML and JSON renderers) |
| pkg/workflow/custom_engine.go | Updated Custom engine to extract and pass ActionMode to MCP renderer |
| pkg/workflow/mcp_config_refactor_test.go | Added comprehensive tests for dev and release modes in both Copilot and Claude/Custom configurations; updated TOML tests |
| pkg/workflow/importable_tools_test.go | Updated integration test to expect --cmd flag in dev mode |
| .github/workflows/*.lock.yml | Regenerated 20 workflow lock files with --cmd flag in dev mode |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The agentic-workflows MCP server configuration was missing the
--cmdflag in dev mode, which specifies the binary path for MCP server subprocess calls.Changes
MCPRendererOptionsandWorkflowDatawithActionModefield, populated from compiler staterenderAgenticWorkflowsMCPConfigWithOptionsandrenderAgenticWorkflowsMCPConfigTOMLto conditionally include--cmdflagResult
Dev mode now generates:
Release mode remains:
This ensures the MCP server can execute commands like
compile,status, etc. by invoking the correct binary in containerized environments.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.