terminator-mcp-agent 0.15.8 → 0.15.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +57 -1
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -113,6 +113,31 @@ stop_on_error: true
113
113
  include_detailed_results: true
114
114
  ```
115
115
 
116
+ With conditional jumps (`workflow_with_jumps.yml`):
117
+
118
+ ```yaml
119
+ steps:
120
+ - tool_name: validate_element
121
+ id: check_logged_in
122
+ arguments:
123
+ selector: "role:button|name:Logout"
124
+ jumps:
125
+ - if: "check_logged_in_status == 'success'"
126
+ to_id: main_app
127
+ reason: "User already logged in - skipping authentication"
128
+
129
+ - tool_name: click_element
130
+ id: login_flow
131
+ arguments:
132
+ selector: "role:button|name:Login"
133
+ # ... more login steps ...
134
+
135
+ - tool_name: click_element
136
+ id: main_app
137
+ arguments:
138
+ selector: "role:button|name:Dashboard"
139
+ ```
140
+
116
141
  Tool call wrapper format (`workflow.json`):
117
142
 
118
143
  ```json
@@ -207,7 +232,10 @@ The Terminator MCP agent offers two primary workflows for automating desktop tas
207
232
 
208
233
  This is the most powerful and flexible method. You build a workflow step-by-step, using MCP tools to inspect the UI and refine your actions.
209
234
 
210
- 1. **Inspect the UI**: Start by using `get_focused_window_tree` to understand the structure of your target application. This gives you the roles, names, and IDs of all elements.
235
+ 1. **Inspect the UI**: Start by using `get_focused_window_tree` to understand the structure of your target application. This gives you the roles, names, and IDs of all elements. For performance optimization:
236
+ - Use `include_tree: { max_depth: 2 }` to limit tree depth when you only need shallow inspection
237
+ - Use `include_tree: { from_selector: "role:Dialog" }` to get subtree from a specific element
238
+ - Use `include_tree: { from_selector: "true" }` to start from the currently focused element
211
239
  2. **Build a Sequence**: Create an `execute_sequence` tool call with a series of actions (`click_element`, `type_into_element`, etc.). Use robust selectors (like `role|name` or stable `properties:AutomationId:value` selectors) whenever possible.
212
240
  3. **Capture the Final State**: Ensure the last step in your sequence is an action that returns a UI tree. The `wait_for_element` tool with `include_tree: true` is perfect for this, as it captures the application's state after your automation has run.
213
241
  4. **Extract Structured Data with `output_parser`**: Add the `output_parser` argument to your `execute_sequence` call. Write JavaScript code to parse the final UI tree and extract structured data. If successful, the tool result will contain a `parsed_output` field with your clean JSON data.
@@ -688,6 +716,10 @@ The virtual display manager creates a memory-based display context that satisfie
688
716
  - Use specific selectors instead of broad element searches
689
717
  - Implement delays between rapid operations
690
718
  - Consider using `include_tree: false` for intermediate steps
719
+ - For tree extraction tools, optimize with:
720
+ - `include_tree: { max_depth: 2 }` - Limit depth for large trees
721
+ - `include_tree: { from_selector: "role:List" }` - Get subtree from specific element
722
+ - `include_tree: { from_selector: "true" }` - Start from focused element
691
723
 
692
724
  **JavaScript Performance**:
693
725
 
@@ -870,6 +902,30 @@ steps:
870
902
  - tool_name: run_command
871
903
  arguments:
872
904
  engine: javascript
905
+
906
+ # Tree Parameter Examples - Performance Optimization
907
+ - tool_name: get_window_tree
908
+ arguments:
909
+ pid: 1234
910
+ include_tree:
911
+ max_depth: 2 # Only get 2 levels deep
912
+
913
+ - tool_name: get_focused_window_tree
914
+ arguments:
915
+ include_tree:
916
+ from_selector: "role:Dialog" # Start tree from first dialog
917
+ max_depth: 3 # Limit depth from that point
918
+
919
+ - tool_name: get_focused_window_tree
920
+ arguments:
921
+ include_tree:
922
+ from_selector: "true" # Start from focused element
923
+
924
+ # Backward compatible - still works
925
+ - tool_name: get_window_tree
926
+ arguments:
927
+ pid: 1234
928
+ include_tree: true # Simple boolean form
873
929
  run: |
874
930
  // Direct variable access - auto-injected!
875
931
  const apps = check_apps_result || [];
package/package.json CHANGED
@@ -15,10 +15,10 @@
15
15
  ],
16
16
  "name": "terminator-mcp-agent",
17
17
  "optionalDependencies": {
18
- "terminator-mcp-darwin-arm64": "0.15.8",
19
- "terminator-mcp-darwin-x64": "0.15.8",
20
- "terminator-mcp-linux-x64-gnu": "0.15.8",
21
- "terminator-mcp-win32-x64-msvc": "0.15.8"
18
+ "terminator-mcp-darwin-arm64": "0.15.12",
19
+ "terminator-mcp-darwin-x64": "0.15.12",
20
+ "terminator-mcp-linux-x64-gnu": "0.15.12",
21
+ "terminator-mcp-win32-x64-msvc": "0.15.12"
22
22
  },
23
23
  "repository": {
24
24
  "type": "git",
@@ -30,5 +30,5 @@
30
30
  "sync-version": "node ./utils/sync-version.js",
31
31
  "update-badges": "node ./utils/update-badges.js"
32
32
  },
33
- "version": "0.15.8"
33
+ "version": "0.15.12"
34
34
  }