Skip to content

feat: add CreatePipeline MCP tool for CLI/MCP parity#68

Merged
dean0x merged 2 commits intomainfrom
feat/create-pipeline-mcp-tool
Mar 4, 2026
Merged

feat: add CreatePipeline MCP tool for CLI/MCP parity#68
dean0x merged 2 commits intomainfrom
feat/create-pipeline-mcp-tool

Conversation

@dean0x
Copy link
Owner

@dean0x dean0x commented Mar 4, 2026

Summary

  • Adds CreatePipeline MCP tool — the only functional gap between CLI and MCP before public launch
  • Extracts pipeline creation logic from CLI into ScheduleManagerService.createPipeline() (one business logic path, two adapters)
  • Refactors CLI beat pipeline command to call the shared service method (68 → 42 lines)

Changes

File Change
src/core/domain.ts 4 new interfaces: PipelineStepRequest, PipelineCreateRequest, PipelineStep, PipelineResult
src/core/interfaces.ts createPipeline() added to ScheduleService interface
src/services/schedule-manager.ts createPipeline() implementation — validates 2-20 steps, chains one-time schedules, stops on first error
src/adapters/mcp-adapter.ts Zod schema, switch case, tool definition, handler with shared + per-step path validation
src/cli/commands/pipeline.ts Refactored to call scheduleService.createPipeline(), added min 2-step validation
tests/unit/services/schedule-manager.test.ts +11 tests (bounds, chaining, priority/workDir inheritance, overrides, truncation, failure)
tests/unit/adapters/mcp-adapter.test.ts +6 tests (validation, success, priority pass-through, error handling)

Test plan

  • npm run build — clean compilation
  • npm run test:core — 331 passed
  • npm run test:handlers — 84 passed
  • npm run test:services — 131 passed
  • Schedule-manager tests — 44 passed (+11 new)
  • npm run test:adapters — 43 passed (+6 new)
  • npm run test:cli — 115 passed

Dean Sharon added 2 commits March 4, 2026 12:52
Extract pipeline creation logic from CLI into ScheduleManagerService.createPipeline(),
then expose it through both MCP (CreatePipeline tool) and CLI (refactored pipeline command).

- Add PipelineStepRequest, PipelineCreateRequest, PipelineStep, PipelineResult domain types
- Add createPipeline() to ScheduleService interface and ScheduleManagerService
- Add CreatePipeline MCP tool with Zod schema, path validation, and handler
- Refactor CLI pipeline command to use shared service method (68 → 42 lines)
- Add 11 service tests and 6 adapter tests for pipeline functionality
- Extract truncatePrompt() helper in schedule-manager.ts
- Fix stale 4-arg MCPAdapter constructor in adapter tests to use stubScheduleService
- Remove redundant PipelineStepRequest import and type annotation in MCP adapter
@dean0x dean0x merged commit 67dc63c into main Mar 4, 2026
1 check failed
@dean0x dean0x deleted the feat/create-pipeline-mcp-tool branch March 4, 2026 13:54
dean0x added a commit that referenced this pull request Mar 4, 2026
## Summary
- Bump version `0.4.0` → `0.4.1`
- Add release notes (`docs/releases/RELEASE_NOTES_v0.4.1.md`)
- Update CHANGELOG.md with `[0.4.1]` section
- Update FEATURES.md with `CreatePipeline` MCP tool entry

## Context
PR #68 (squash-merged) added the `CreatePipeline` MCP tool, closing the
CLI/MCP feature parity gap. This PR prepares the patch release.

## Test plan
- [x] `npm run build` passes
- [x] `npm run test:services` — 131 passed
- [x] `npm run test:adapters` — 43 passed
- [x] `npm run test:cli` — 115 passed
- [x] Release notes file exists
- [x] Version in `package.json` is `0.4.1`
- [ ] After merge: trigger GitHub Actions → Release → Run workflow

Co-authored-by: Dean Sharon <deanshrn@gmain.com>
@dean0x dean0x mentioned this pull request Mar 4, 2026
30 tasks
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