Skip to content

Conversation

@louis030195
Copy link
Contributor

@louis030195 louis030195 commented Dec 10, 2025

Summary

This PR removes all legacy YAML workflow support, leaving only TypeScript workflows.

Breaking Changes

YAML workflows are no longer supported. Only TypeScript workflows are now supported.

What's Removed

  • YAML workflow execution engine (~2500 lines from server_sequence.rs)
  • output_parser.rs module (YAML-specific JavaScript output parsing)
  • workflow_format.rs (YAML vs TypeScript detection)
  • serde_yaml dependency from both terminator-mcp-agent and terminator-cli
  • All YAML example files (examples/*.yml)
  • YAML-related tests

Why

TypeScript workflows use context.data directly for structured output, making the JavaScript-based output_parser unnecessary. This simplifies the codebase significantly:

Before After
2757 lines in server_sequence.rs 198 lines
2 workflow formats 1 workflow format
serde_yaml dependency No YAML dependency

Migration

Convert YAML workflows to TypeScript format. See examples/simple_notepad_workflow/ for reference.

Testing

  • cargo check passes
  • cargo test --package terminator-mcp-agent --lib passes (86 tests)

Note

Remove all legacy YAML workflow support, making TypeScript the sole workflow format across CLI and MCP agent.

  • Core/Agent:
    • Remove YAML execution path: delete ~2.5k lines from server_sequence.rs, drop workflow_format.rs and output_parser.rs.
    • Enforce TypeScript-only workflows in execute_sequence; require url and route to workflow_typescript.
    • Delete YAML tests and fixtures (integration/unit) and example .yml workflows under examples/.
    • Adjust JS engine test calls to new execute_javascript_with_nodejs(...) signature.
  • CLI:
    • Drop YAML parsing: remove serde_yaml and YAML detection/paths; parsing now expects JSON only in parse_workflow_content and help text.
    • Update comments/logs to refer to generic "workflows" (non-YAML); keep TypeScript detection & delegation.
  • MCP Client:
    • Tweak retry logic comments to refer to generic "Workflows"; remove YAML-specific tests.
  • Dependencies:
    • Remove serde_yaml and unsafe-libyaml from workspace (Cargo.lock/Cargo.toml).

Written by Cursor Bugbot for commit 3282760. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on January 10

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

McpError::internal_error(format!("Failed to parse state file: {e}"), Some(json!({"error": e.to_string()})))
})?;
info!("Loaded workflow state from {:?}", state_file);
Ok(Some(state_data))
Copy link

Choose a reason for hiding this comment

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

Bug: State restoration passes wrapper object instead of inner state

The load_workflow_state function returns the entire persisted state wrapper object (containing last_step_id, last_step_index, state, and timestamp), but line 147 passes this directly as restored_state to the TypeScript workflow executor. The TypeScript workflow expects only the inner state field value, not the wrapper. This causes workflow resumption to fail because the TypeScript side receives incorrectly structured state data. The function should extract and return only state_data.get("state") instead of the full state_data object.

Fix in Cursor Fix in Web

- Remove output_parser.rs (YAML-only JavaScript output parsing)
- Remove workflow_format.rs (YAML vs TypeScript detection)
- Remove serde_yaml dependency from mcp-agent and cli
- Simplify server_sequence.rs to TypeScript-only execution
- Preserve full MCP event streaming (WorkflowEvent, peer notifications)
- Remove YAML example workflows
- Update tests to remove YAML-specific test cases
- CLI now only supports JSON workflow definitions

TypeScript workflows continue to work with all MCP notification features
including progress tracking, logging, and event streaming.
@louis030195 louis030195 force-pushed the chore/remove-yaml-legacy branch from 34d278c to 03f6c07 Compare December 10, 2025 19:54
- Remove YAML workflow comments and test assertions
- Simplify parse_workflow_content to remove duplicate strategies
- Fix test module closing brace
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