Skip to content

Commit 944a42f

Browse files
committed
fix: js engine and test
1 parent 435a21b commit 944a42f

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

terminator-mcp-agent/src/output_parser.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -467,37 +467,37 @@ mod tests {
467467

468468
fn get_quote_parser_definition() -> OutputParserDefinition {
469469
serde_json::from_value(json!({
470-
"itemContainerDefinition": {
471-
"nodeConditions": [{"property": "role", "op": "equals", "value": "Group"}],
472-
"childConditions": {
470+
"item_container_definition": {
471+
"node_conditions": [{"property": "role", "op": "equals", "value": "Group"}],
472+
"child_conditions": {
473473
"logic": "and",
474474
"conditions": [
475-
{"existsChild": {"conditions": [{"property": "name", "op": "startsWith", "value": "$"}]}},
476-
{"existsChild": {"conditions": [{"property": "name", "op": "equals", "value": "Monthly Price"}]}}
475+
{"exists_child": {"conditions": [{"property": "name", "op": "starts_with", "value": "$"}]}},
476+
{"exists_child": {"conditions": [{"property": "name", "op": "equals", "value": "Monthly Price"}]}}
477477
]
478478
}
479479
},
480-
"fieldsToExtract": {
480+
"fields_to_extract": {
481481
"carrierProduct": {
482-
"fromChild": {
482+
"from_child": {
483483
"conditions": [{"property": "name", "op": "contains", "value": ":"}],
484-
"extractProperty": "name"
484+
"extract_property": "name"
485485
}
486486
},
487487
"monthlyPrice": {
488-
"fromChild": {
489-
"conditions": [{"property": "name", "op": "startsWith", "value": "$"}],
490-
"extractProperty": "name"
488+
"from_child": {
489+
"conditions": [{"property": "name", "op": "starts_with", "value": "$"}],
490+
"extract_property": "name"
491491
}
492492
},
493493
"status": {
494-
"fromChildren": {
494+
"from_children": {
495495
"conditions": [
496496
{"property": "role", "op": "equals", "value": "Text"},
497-
{"property": "name", "op": "isOneOf", "value": ["Graded", "Discontinued", "Standard"]}
497+
{"property": "name", "op": "is_one_of", "value": ["Graded", "Discontinued", "Standard"]}
498498
],
499-
"extractProperty": "name",
500-
"joinWith": ", "
499+
"extract_property": "name",
500+
"join_with": ", "
501501
}
502502
}
503503
}

terminator-mcp-agent/src/scripting_engine.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,11 @@ async fn ensure_terminator_js_installed(runtime: &str) -> Result<std::path::Path
444444
);
445445
} else {
446446
info!(
447-
"[{}] terminator.js found, updating to latest version...",
447+
"[{}] terminator.js found, using existing version (skipping update for performance)...",
448448
runtime
449449
);
450+
// Skip update and use existing installation
451+
return Ok(script_dir);
450452
}
451453

452454
// Find the runtime executable

0 commit comments

Comments
 (0)