Skip to content

Commit 03f6c07

Browse files
committed
chore: remove YAML workflow legacy code
- 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.
1 parent 4495d8a commit 03f6c07

24 files changed

+28
-6163
lines changed

Cargo.lock

Lines changed: 0 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/terminator-cli/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ path = "src/bin/cargo-terminator.rs"
2323
[dependencies]
2424
serde = { version = "1.0", features = ["derive"] }
2525
serde_json = "1.0.140"
26-
serde_yaml = "0.9"
2726
clap = { version = "4.4", features = ["derive", "env"] }
2827
tokio = { version = "1", features = [
2928
"rt",

crates/terminator-cli/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,7 +2165,7 @@ fn parse_workflow_content(content: &str) -> anyhow::Result<serde_json::Value> {
21652165
}
21662166

21672167
// Strategy 2: Try direct YAML workflow
2168-
if let Ok(val) = serde_yaml::from_str::<serde_json::Value>(content) {
2168+
if let Ok(val) = serde_json::from_str::<serde_json::Value>(content) {
21692169
// Check if it's a valid workflow (has steps field)
21702170
if val.get("steps").is_some() {
21712171
return Ok(val);
@@ -2185,17 +2185,17 @@ fn parse_workflow_content(content: &str) -> anyhow::Result<serde_json::Value> {
21852185
}
21862186

21872187
// Strategy 4: Try parsing as YAML wrapper first, then extract
2188-
if let Ok(val) = serde_yaml::from_str::<serde_json::Value>(content) {
2188+
if let Ok(val) = serde_json::from_str::<serde_json::Value>(content) {
21892189
if let Some(extracted) = extract_workflow_from_wrapper(&val)? {
21902190
return Ok(extracted);
21912191
}
21922192
}
21932193

21942194
Err(anyhow::anyhow!(
2195-
"Unable to parse content as JSON or YAML workflow or wrapper object. Content must either be:\n\
2195+
"Unable to parse content as JSON workflow or wrapper object. Content must either be:\n\
21962196
1. A workflow with 'steps' field\n\
21972197
2. A wrapper object with tool_name='execute_sequence' and 'arguments' field\n\
2198-
3. Valid JSON or YAML format"
2198+
3. Valid JSON format"
21992199
))
22002200
}
22012201

crates/terminator-mcp-agent/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ hostname = "0.4"
5454
reqwest = { version = "0.12.5", features = ["json", "blocking"] }
5555

5656
# YAML parsing support
57-
serde_yaml = "0.9"
5857

5958
# File search support for search_terminator_api tools
6059
glob = "0.3"

crates/terminator-mcp-agent/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub mod expression_eval;
66
pub mod helpers;
77
pub mod mcp_types;
88
pub mod omniparser;
9-
pub mod output_parser;
9+
1010
pub mod prompt;
1111
pub mod scripting_engine;
1212
pub mod sentry;
@@ -17,7 +17,7 @@ pub mod tool_logging;
1717
pub mod tree_formatter;
1818
pub mod utils;
1919
pub mod vision;
20-
pub mod workflow_format;
20+
2121
pub mod workflow_typescript;
2222

2323
// Re-export ui_tree_diff from terminator crate (single source of truth)

0 commit comments

Comments
 (0)