-
Notifications
You must be signed in to change notification settings - Fork 145
vmcp composition - Template Expander Enhancement #2611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/vmcp_composition_multistep
Are you sure you want to change the base?
vmcp composition - Template Expander Enhancement #2611
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/vmcp_composition_multistep #2611 +/- ##
===================================================================
+ Coverage 55.84% 55.90% +0.05%
===================================================================
Files 312 312
Lines 29542 29600 +58
===================================================================
+ Hits 16499 16549 +50
- Misses 11601 11608 +7
- Partials 1442 1443 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4a28565 to
df828cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the ExpandOutputFormat() method in the template expander to enable output aggregation for multi-step vMCP composite tool workflows. The enhancement allows workflow outputs to be formatted using Go templates with access to step results, workflow metadata, and input parameters.
- Adds
ExpandOutputFormat()method toTemplateExpanderinterface with comprehensive documentation - Implements template expansion with JSON validation and size limits (10MB)
- Includes helper method
buildWorkflowMetadata()to provide workflow metrics in templates
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pkg/vmcp/composer/composer.go | Adds ExpandOutputFormat() method to TemplateExpander interface with documentation of available template variables |
| pkg/vmcp/composer/template_expander.go | Implements ExpandOutputFormat() and buildWorkflowMetadata() with context cancellation checks, size limits, and JSON validation |
| pkg/vmcp/composer/template_expander_test.go | Adds comprehensive test coverage including edge cases for invalid templates, size limits, context cancellation, and various template patterns |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Successfully implemented the ExpandOutputFormat() method in the template expander to support output aggregation for multi-step vMCP composite tool workflows. Also integrate with the workflow
df828cc to
5e19d8e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Save timeout state | ||
| if e.stateStore != nil { | ||
| finalState := e.buildWorkflowStatus(workflowCtx, WorkflowStatusTimedOut) | ||
| finalState.StartTime = result.StartTime |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing LastUpdateTime assignment for consistency. The timeout case should also set finalState.LastUpdateTime = result.EndTime (after line 178) to match the pattern established in the failure cases at lines 198 and 232.
| finalState.StartTime = result.StartTime | |
| finalState.StartTime = result.StartTime | |
| finalState.LastUpdateTime = result.EndTime |
| // Save final workflow state | ||
| if e.stateStore != nil { | ||
| finalState := e.buildWorkflowStatus(workflowCtx, WorkflowStatusCompleted) | ||
| finalState.StartTime = result.StartTime |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing LastUpdateTime assignment for consistency. The successful completion case should also set finalState.LastUpdateTime = result.EndTime (after line 249) to match the pattern established in the failure cases at lines 198 and 232.
| finalState.StartTime = result.StartTime | |
| finalState.StartTime = result.StartTime | |
| finalState.LastUpdateTime = result.EndTime |
tgrunnagle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Approving in case you don't want to add the LastUpdateTime changes to this PR.
Successfully implemented the ExpandOutputFormat() method in the template expander to support
output aggregation for multi-step vMCP composite tool workflows.