Skip to content

Conversation

@plusplusoneplusplus
Copy link
Owner

Summary

This PR includes the following commits:

c26d216 feat: Add run_to_completion feature for synchronous script execution

Changes

  • mcp_tools/tests/test_run_to_completion.py
  • mcp_tools/tests/test_run_to_completion_integration.py
  • mcp_tools/tool.example.yaml
  • mcp_tools/yaml_tools.py

🤖 Generated with automated submission script

- Introduced a new configuration option `run_to_completion` in YAML tools, allowing scripts to wait indefinitely for completion and return final results.
- Updated the `YamlToolBase` class to handle synchronous execution when `run_to_completion` is enabled, including error handling and post-processing.
- Added a new example tool demonstrating the `run_to_completion` feature with various platform-specific scripts.
- Implemented integration tests to validate the functionality of the `run_to_completion` feature across different scenarios, including success, failure, and output limits.

This enhancement significantly improves the flexibility of script execution, allowing for more controlled and predictable outcomes in tool operations.
@plusplusoneplusplus plusplusoneplusplus enabled auto-merge (squash) July 29, 2025 01:55
…pt output

The tests were failing because shell command redirection wasn't capturing
output from compound commands using &&. Fixed by:

1. Using shell command grouping {{ }} (becomes { } after Python formatting)
   to ensure all commands in the group have their output redirected
2. Escaping braces in bash loops to prevent Python format string conflicts
3. Using appropriate command separators for each platform:
   - Linux/Darwin: && for conditional execution within groups
   - Windows: ; for command separation within groups

All 5 integration tests now pass, including the 3 that were originally failing.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@plusplusoneplusplus plusplusoneplusplus force-pushed the feature/feat-add-run-to-completion-feature-for-synchronous branch from 68092d7 to 34de6e5 Compare July 29, 2025 04:50
…atibility

The test_run_to_completion_with_output_limits was failing in CI because
bash brace expansion {1..20} was not working in the CI environment.
Replaced with more portable seq command:

- Linux/Darwin: seq 1 20 | while read i; do echo "Line $i of output"; done
- Windows: for /l %i in (1,1,20) do echo Line %i of output

This ensures the test generates multiple lines of output for testing
the output truncation functionality across different environments.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@plusplusoneplusplus plusplusoneplusplus force-pushed the feature/feat-add-run-to-completion-feature-for-synchronous branch from 34de6e5 to de5ccaa Compare July 29, 2025 06:21
@plusplusoneplusplus plusplusoneplusplus merged commit 034590c into main Jul 29, 2025
12 checks passed
@plusplusoneplusplus plusplusoneplusplus deleted the feature/feat-add-run-to-completion-feature-for-synchronous branch July 29, 2025 06:27
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.

2 participants