@hypothesi/tauri-mcp-server 0.7.0 → 0.8.0

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.
package/README.md CHANGED
@@ -65,59 +65,66 @@ The MCP server supports connecting to multiple Tauri apps simultaneously. Each a
65
65
  **Example Usage:**
66
66
  ```javascript
67
67
  // Connect to first app
68
- await tauri_driver_session({ action: "start", port: 9223 })
68
+ await driver_session({ action: "start", port: 9223 })
69
69
 
70
70
  // Connect to second app
71
- await tauri_driver_session({ action: "start", port: 9224 })
71
+ await driver_session({ action: "start", port: 9224 })
72
72
 
73
73
  // Check status - shows both apps with default indicator
74
- await tauri_driver_session({ action: "status" })
74
+ await driver_session({ action: "status" })
75
75
 
76
76
  // Use default app (most recent - port 9224)
77
- await tauri_webview_screenshot()
77
+ await webview_screenshot()
78
78
 
79
79
  // Target specific app by port
80
- await tauri_webview_screenshot({ appIdentifier: 9223 })
80
+ await webview_screenshot({ appIdentifier: 9223 })
81
81
 
82
82
  // Stop specific app
83
- await tauri_driver_session({ action: "stop", appIdentifier: 9223 })
83
+ await driver_session({ action: "stop", appIdentifier: 9223 })
84
84
 
85
85
  // Stop all apps
86
- await tauri_driver_session({ action: "stop" })
86
+ await driver_session({ action: "stop" })
87
87
  ```
88
88
 
89
- ## Available Tools (16 total)
89
+ ## Available Tools (18 total)
90
+
91
+ ### Setup & Configuration
92
+
93
+ | Tool | Description |
94
+ |------|-------------|
95
+ | `get_setup_instructions` | Get setup/update instructions for the MCP Bridge plugin |
90
96
 
91
97
  ### UI Automation
92
98
 
93
99
  | Tool | Description |
94
100
  |------|-------------|
95
- | `tauri_driver_session` | Start/stop/status automation session |
96
- | `tauri_webview_find_element` | Find elements by selector |
97
- | `tauri_read_logs` | Read console, Android, iOS, or system logs |
98
- | `tauri_webview_interact` | Click, scroll, swipe, focus, long-press |
99
- | `tauri_webview_screenshot` | Capture webview screenshots |
100
- | `tauri_webview_keyboard` | Type text or send key events |
101
- | `tauri_webview_wait_for` | Wait for elements, text, or events |
102
- | `tauri_webview_get_styles` | Get computed CSS styles |
103
- | `tauri_webview_execute_js` | Execute JavaScript in webview |
104
- | `tauri_manage_window` | List windows, get info, or resize |
101
+ | `driver_session` | Start/stop/status automation session |
102
+ | `webview_find_element` | Find elements by CSS selector, XPath, text, or ref ID |
103
+ | `read_logs` | Read console, Android, iOS, or system logs |
104
+ | `webview_interact` | Click, scroll, swipe, focus, long-press |
105
+ | `webview_screenshot` | Capture webview screenshots (JPEG default) |
106
+ | `webview_keyboard` | Type text or send key events |
107
+ | `webview_wait_for` | Wait for elements, text, or events |
108
+ | `webview_get_styles` | Get computed CSS styles |
109
+ | `webview_execute_js` | Execute JavaScript in webview |
110
+ | `webview_dom_snapshot` | Get structured DOM snapshot (accessibility or structure) |
111
+ | `manage_window` | List windows, get info, or resize |
105
112
 
106
113
  ### IPC & Plugin
107
114
 
108
115
  | Tool | Description |
109
116
  |------|-------------|
110
- | `tauri_ipc_execute_command` | Execute Tauri IPC commands |
111
- | `tauri_ipc_get_backend_state` | Get app metadata and state |
112
- | `tauri_ipc_monitor` | Start/stop IPC monitoring |
113
- | `tauri_ipc_get_captured` | Get captured IPC traffic |
114
- | `tauri_ipc_emit_event` | Emit custom events |
117
+ | `ipc_execute_command` | Execute Tauri IPC commands |
118
+ | `ipc_get_backend_state` | Get app metadata and state |
119
+ | `ipc_monitor` | Start/stop IPC monitoring |
120
+ | `ipc_get_captured` | Get captured IPC traffic |
121
+ | `ipc_emit_event` | Emit custom events |
115
122
 
116
123
  ### Mobile Development
117
124
 
118
125
  | Tool | Description |
119
126
  |------|-------------|
120
- | `tauri_list_devices` | List Android devices and iOS simulators |
127
+ | `list_devices` | List Android devices and iOS simulators |
121
128
 
122
129
  ## Links
123
130
 
@@ -0,0 +1,29 @@
1
+ /**
2
+ * aria-api library loader
3
+ *
4
+ * Bundles aria-api for browser injection. Provides comprehensive W3C-compliant
5
+ * accessibility computation including:
6
+ * - WAI-ARIA 1.3 role computation
7
+ * - HTML-AAM 1.0 implicit role mappings
8
+ * - Accessible Name and Description Computation 1.2
9
+ * - aria-owns relationship handling
10
+ */
11
+ import { readFileSync } from 'fs';
12
+ import { dirname, join } from 'path';
13
+ import { fileURLToPath } from 'url';
14
+ const currentDir = dirname(fileURLToPath(import.meta.url));
15
+ let ariaApiSource = null;
16
+ /** Script ID used for the aria-api library in the script registry. */
17
+ export const ARIA_API_SCRIPT_ID = '__mcp_aria_api__';
18
+ /**
19
+ * Get the aria-api library source code.
20
+ * Loaded lazily and cached.
21
+ */
22
+ export function getAriaApiSource() {
23
+ if (ariaApiSource === null) {
24
+ // Load pre-bundled aria-api (created by build script)
25
+ const bundlePath = join(currentDir, 'aria-api.bundle.js');
26
+ ariaApiSource = readFileSync(bundlePath, 'utf-8');
27
+ }
28
+ return ariaApiSource;
29
+ }