feat(mcp): run_pipeline + propose_pipeline MCP tools — R12 (closes #100)#113
Merged
Conversation
Wraps devagentic's ``executeWorkflowPipeline`` (NousResearch#258) + ``writeWorkflowPipeline`` (NousResearch#261) mutations as MCP tools so workers can compose + execute pipelines directly through their tool surface. R12 of devagentic#210 (flow-aware router umbrella). ## Tools registered | Tool | Wraps | Returns | |---|---|---| | ``run_pipeline(pipeline_id, user_id)`` | ``executeWorkflowPipeline`` | ``PipelineRun {runId, status, nodeOutcomes, ...}`` | | ``propose_pipeline(name, intent, version, nodes, edges, user_id, lineage_ref?, produced_by?)`` | ``writeWorkflowPipeline`` | ``Doc {id, content, tags, source, ts}`` | Composes naturally: ``propose_pipeline → doc_id → run_pipeline``. ## Devagentic-side resolver verification Schemas read directly from devagentic ``api.py`` via gh api: - ``executeWorkflowPipeline(pipelineId: String!, userId: String!) -> PipelineRun`` (api.py:21628) - ``writeWorkflowPipeline(name, intent, version, nodes, edges, userId, lineageRef?, producedBy?) -> Doc`` (api.py:21576) Arg-name camelCase conversion (``pipeline_id`` → ``pipelineId``, ``lineage_ref`` → ``lineageRef``, etc.) matches strawberry's default. Note: #100's body referenced ``ShadowNodeRef`` as the propose_pipeline return — the actual mutation returns ``Doc``. Implementing the real shape. ## Tests - 10 new client-level tests in ``tests/plugins/devagentic-mutations/test_client.py``: * ``run_pipeline``: empty-args fail-soft (1), happy path with arg threading + nested nodeOutcomes (1), non-dict fail-soft (1). * ``propose_pipeline``: empty-args fail-soft (3), invalid-version-type fail-soft (3 parametrized), invalid nodes/edges-type fail-soft (2), happy path with all args threaded (1), optional-args-null-when-omitted (1), non-dict fail-soft (1). - Contract test in ``tests/test_mcp_defensive_registrars.py`` extended: ``run_pipeline`` + ``propose_pipeline`` added to the required-G2/R12 tool set (now 17 named devagentic tools). - 184 total green across affected suites — no regression. ## Composition Unblocks the worker-side pipeline-economy use case in devagentic#210 R12. Workers can now author + execute pipelines without shelling out to ``python api.py``. The recent #99 / #110 fixes (PRs #108 + #111) ensure tool_calls with empty content + populated tool_calls on Groq/strict-validator paths don't cascade through the empty-retry loop, so R12 tools are usable from client-tier dispatches.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #100. R12 of devagentic#210. Two new MCP tools wrap executeWorkflowPipeline (NousResearch#258) + writeWorkflowPipeline (NousResearch#261); workers compose pipelines via propose_pipeline + execute via run_pipeline. 10 new client tests + contract extension. 184 total green. Unblocked by #108 + #111. Wheel rebuild as v0.18.0 after merge.