You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add element verification to open_application and navigate_browser
- Add verify_element_exists, verify_element_not_exists, verify_timeout_ms to OpenApplicationArgs
- Add verification fields to NavigateBrowserArgs
- Make verify_timeout_ms optional (Option<u64>) across all tools for backwards compatibility
- Add post-action verification logic to both open_application and navigate_browser implementations
- All verification timeouts default to 2000ms if not specified
All tools now have consistent optional verification fields with sensible defaults.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: crates/terminator-mcp-agent/src/utils.rs
+34-4Lines changed: 34 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -171,9 +171,8 @@ pub struct ActionOptions {
171
171
pubverify_element_not_exists:String,
172
172
173
173
#[schemars(
174
-
description = "Timeout in milliseconds for post-action verification. The system will poll until verification passes or timeout is reached. Defaults to 2000ms."
174
+
description = "Timeout in milliseconds for post-action verification. The system will poll until verification passes or timeout is reached. Defaults to 2000ms if not specified."
175
175
)]
176
-
#[serde(default)]
177
176
pubverify_timeout_ms:Option<u64>,
178
177
}
179
178
@@ -596,9 +595,9 @@ pub struct GlobalKeyArgs {
596
595
pubverify_element_not_exists:String,
597
596
598
597
#[schemars(
599
-
description = "REQUIRED: Timeout in milliseconds for post-action verification. The system will poll until verification passes or timeout is reached."
598
+
description = "Timeout in milliseconds for post-action verification. The system will poll until verification passes or timeout is reached. Defaults to 2000ms if not specified."
description = "Browser process name (e.g., 'chrome', 'msedge', 'firefox'). Will start the browser if not running."
782
781
)]
783
782
pubprocess:String,
783
+
784
+
#[schemars(
785
+
description = "REQUIRED: Selector that should exist after navigation completes. Used to verify the page loaded successfully. Use empty string \"\" to skip this check."
786
+
)]
787
+
pubverify_element_exists:String,
788
+
789
+
#[schemars(
790
+
description = "REQUIRED: Selector that should NOT exist after navigation completes. Use empty string \"\" to skip this check."
791
+
)]
792
+
pubverify_element_not_exists:String,
793
+
794
+
#[schemars(
795
+
description = "Timeout in milliseconds for post-action verification. The system will poll until verification passes or timeout is reached. Defaults to 2000ms if not specified."
#[schemars(description = "Name of the application to open")]
821
836
pubapp_name:String,
822
837
838
+
#[schemars(
839
+
description = "REQUIRED: Selector that should exist after the application opens. Used to verify the app loaded successfully (e.g., 'process:notepad|role:Document'). Use empty string \"\" to skip this check."
840
+
)]
841
+
pubverify_element_exists:String,
842
+
843
+
#[schemars(
844
+
description = "REQUIRED: Selector that should NOT exist after the application opens. Use empty string \"\" to skip this check."
845
+
)]
846
+
pubverify_element_not_exists:String,
847
+
848
+
#[schemars(
849
+
description = "Timeout in milliseconds for post-action verification. The system will poll until verification passes or timeout is reached. Defaults to 2000ms if not specified."
0 commit comments