Skip to content

feat(workflow): MCP tools, skill, agentProviders#98

Draft
Waishnav wants to merge 3 commits into
pr/dw-4-cli-workerfrom
pr/dw-5-mcp-skill
Draft

feat(workflow): MCP tools, skill, agentProviders#98
Waishnav wants to merge 3 commits into
pr/dw-4-cli-workerfrom
pr/dw-5-mcp-skill

Conversation

@Waishnav

Copy link
Copy Markdown
Owner

Summary

  • MCP: run_workflow / workflow_status / workflow_cancel (gate: subagents)
  • Skill dynamic-workflows + seed both default skills on init
  • Skills gate: always include bundled skills root when subagents on
  • agentProviders on user/ServerConfig; init/doctor probe write-back

Stack

PR5 of 5 · base: pr/dw-4-cli-worker · tip of full stack

Test plan

  • tsx src/config.test.ts (seeds both skills)
  • tsx src/skills.test.ts
  • Server starts with subagents: true → tools registered
  • Disconnect MCP mid-run → worker continues (manual)
  • npm run typecheck / npm test

Waishnav and others added 3 commits July 21, 2026 17:42
Always include bundled skills root when subagents enabled so seeding
subagent-delegation no longer hides later skills. Seed dynamic-workflows
alongside subagent-delegation on init.

Co-Authored-By: Claude <noreply@anthropic.com>
Load ordered enable-list from config/env, probe available providers on
init and doctor, and filter workflow CLI providers by enabled∩live.

Co-Authored-By: Claude <noreply@anthropic.com>
Gate on config.subagents. run_workflow spawns the same detached worker
as CLI; status long-polls journal events; cancel requests cooperative stop.

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6808d75f-a70e-44b8-b905-33761fc27fea

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pr/dw-5-mcp-skill

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread src/workflow-tools.ts
title: "Workflow status",
description: "Drain events for a workflow run; optional long-poll yield.",
inputSchema: {
runId: z.string(),

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Status is authorized only by a global runId and is not scoped back to the open workspace. Please include workspaceId (or enforce equivalent ownership) and verify the run's workspaceId/root before returning events. The same check is needed for cancel and resume.

Comment thread src/workflow-tools.ts
const run = store.requestCancel(runId);
if (run.pid && (run.status === "running" || run.status === "starting")) {
try {
process.kill(run.pid, "SIGTERM");

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P0] MCP cancellation has no grace-period supervision or hard-kill/terminal fallback. It sends one SIGTERM and can leave the database row running forever if the worker dies before journaling. Please reuse the same shared cancellation supervisor as the CLI and guarantee run_cancelled plus terminal status.

@Waishnav

Copy link
Copy Markdown
Owner Author

agentProviders.enabled is currently applied inside workflow execution, but the rest of the agent surface is inconsistent: open_workspace still advertises every live provider and one-shot agent paths can use providers that the user disabled. Please centralize provider policy and reuse it for workflows, agents run, open_workspace, and doctor.

This PR also needs integration coverage for MCP disconnect survival, cancellation reaching a terminal state, paginated terminal event draining, and provider-config filtering.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant