quash-mcp 0.2.5__py3-none-any.whl → 0.2.7__py3-none-any.whl
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.
Potentially problematic release.
This version of quash-mcp might be problematic. Click here for more details.
- quash_mcp/tools/execute_v3.py +31 -4
- {quash_mcp-0.2.5.dist-info → quash_mcp-0.2.7.dist-info}/METADATA +1 -1
- {quash_mcp-0.2.5.dist-info → quash_mcp-0.2.7.dist-info}/RECORD +5 -5
- {quash_mcp-0.2.5.dist-info → quash_mcp-0.2.7.dist-info}/WHEEL +0 -0
- {quash_mcp-0.2.5.dist-info → quash_mcp-0.2.7.dist-info}/entry_points.txt +0 -0
quash_mcp/tools/execute_v3.py
CHANGED
|
@@ -14,15 +14,17 @@ from ..backend_client import get_backend_client
|
|
|
14
14
|
from ..device.state_capture import get_device_state
|
|
15
15
|
from ..device.adb_tools import AdbTools
|
|
16
16
|
|
|
17
|
-
# Import mahoraga components for tool
|
|
17
|
+
# Import mahoraga components for tool functions
|
|
18
18
|
try:
|
|
19
19
|
from mahoraga.tools import Tools, describe_tools
|
|
20
|
+
from mahoraga.tools.adb import AdbTools as MahoragaAdbTools
|
|
20
21
|
from mahoraga.agent.context.personas import DEFAULT
|
|
21
22
|
from mahoraga.agent.utils.async_utils import async_to_sync
|
|
22
23
|
except ImportError as e:
|
|
23
24
|
print(f"Warning: Could not import mahoraga components: {e}")
|
|
24
25
|
Tools = None
|
|
25
26
|
describe_tools = None
|
|
27
|
+
MahoragaAdbTools = None
|
|
26
28
|
DEFAULT = None
|
|
27
29
|
async_to_sync = None
|
|
28
30
|
|
|
@@ -134,10 +136,18 @@ async def execute_v3(
|
|
|
134
136
|
}
|
|
135
137
|
|
|
136
138
|
# Add tool functions to executor namespace (like start_app, swipe, etc.)
|
|
137
|
-
if describe_tools and DEFAULT:
|
|
139
|
+
if describe_tools and DEFAULT and MahoragaAdbTools:
|
|
138
140
|
try:
|
|
139
|
-
#
|
|
140
|
-
|
|
141
|
+
# Create a mahoraga AdbTools instance for tool execution
|
|
142
|
+
# This instance has all the tool methods like swipe, start_app, etc.
|
|
143
|
+
mahoraga_tools = MahoragaAdbTools(
|
|
144
|
+
serial=state.device_serial,
|
|
145
|
+
use_tcp=True,
|
|
146
|
+
remote_tcp_port=8080
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
# Get all tool functions from mahoraga AdbTools instance
|
|
150
|
+
tool_list = describe_tools(mahoraga_tools, exclude_tools=None)
|
|
141
151
|
|
|
142
152
|
# Filter by allowed tools from DEFAULT persona
|
|
143
153
|
allowed_tool_names = DEFAULT.allowed_tools if hasattr(DEFAULT, 'allowed_tools') else []
|
|
@@ -156,6 +166,8 @@ async def execute_v3(
|
|
|
156
166
|
log_progress(f"🔧 Loaded {len(filtered_tools)} tool functions: {list(filtered_tools.keys())}")
|
|
157
167
|
except Exception as e:
|
|
158
168
|
log_progress(f"⚠️ Warning: Could not load tool functions: {e}")
|
|
169
|
+
import traceback
|
|
170
|
+
log_progress(f"Traceback: {traceback.format_exc()}")
|
|
159
171
|
|
|
160
172
|
executor_locals = {}
|
|
161
173
|
|
|
@@ -175,6 +187,11 @@ async def execute_v3(
|
|
|
175
187
|
if not config["vision"]:
|
|
176
188
|
screenshot_bytes = None
|
|
177
189
|
|
|
190
|
+
# DEBUG: Log UI state
|
|
191
|
+
a11y_preview = ui_state_dict.get("a11y_tree", "")[:150]
|
|
192
|
+
log_progress(f"📱 UI State captured - A11y tree preview: {a11y_preview}...")
|
|
193
|
+
log_progress(f"📷 Screenshot: {'Present' if screenshot_bytes else 'None'}")
|
|
194
|
+
|
|
178
195
|
except Exception as e:
|
|
179
196
|
log_progress(f"⚠️ Warning: Failed to capture device state: {e}")
|
|
180
197
|
ui_state_dict = {
|
|
@@ -223,6 +240,16 @@ async def execute_v3(
|
|
|
223
240
|
code = action.get("code")
|
|
224
241
|
reasoning = action.get("reasoning")
|
|
225
242
|
|
|
243
|
+
# DEBUG: Log full backend response
|
|
244
|
+
log_progress(f"\n📋 DEBUG - Backend Response:")
|
|
245
|
+
log_progress(f" - Action type: {action_type}")
|
|
246
|
+
log_progress(f" - Completed: {step_result.get('completed', False)}")
|
|
247
|
+
log_progress(f" - Success: {step_result.get('success', None)}")
|
|
248
|
+
log_progress(f" - Code present: {bool(code)}")
|
|
249
|
+
if code:
|
|
250
|
+
log_progress(f" - Code: {code[:100]}..." if len(code) > 100 else f" - Code: {code}")
|
|
251
|
+
log_progress(f" - Assistant response: {step_result.get('assistant_response', '')[:200]}...\n")
|
|
252
|
+
|
|
226
253
|
# Log reasoning
|
|
227
254
|
if reasoning:
|
|
228
255
|
log_progress(f"🤔 Reasoning: {reasoning}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quash-mcp
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: Model Context Protocol server for Quash - AI-powered mobile automation agent
|
|
5
5
|
Project-URL: Homepage, https://quashbugs.com
|
|
6
6
|
Project-URL: Repository, https://github.com/quash/quash-mcp
|
|
@@ -14,10 +14,10 @@ quash_mcp/tools/configure.py,sha256=cv4RTolu6qae-XzyACSJUDrALfd0gYC-XE5s66_zfNk,
|
|
|
14
14
|
quash_mcp/tools/connect.py,sha256=Kc7RGRUgtd2sR_bv6U4CB4kWSaLfsDc5kBo9u4FEjzs,4799
|
|
15
15
|
quash_mcp/tools/execute.py,sha256=kR3VzIl31Lek-js4Hgxs-S_ls4YwKnbqkt79KFbvFuM,909
|
|
16
16
|
quash_mcp/tools/execute_v2_backup.py,sha256=waWnaD0dEVcOJgRBbqZo3HnxME1s6YUOn8aRbm4R3X4,6081
|
|
17
|
-
quash_mcp/tools/execute_v3.py,sha256=
|
|
17
|
+
quash_mcp/tools/execute_v3.py,sha256=Ya3XEh2fOBgVmytIShLkiWuAbpQKE4CNGUSamwJD92I,14250
|
|
18
18
|
quash_mcp/tools/runsuite.py,sha256=gohLk9FpN8v7F0a69fspqOqUexTcslpYf3qU-iIZZ3s,7220
|
|
19
19
|
quash_mcp/tools/usage.py,sha256=g76A6FO36fThoyRFG7q92QmS3Kh1pIKOrhYOzUdIubA,1155
|
|
20
|
-
quash_mcp-0.2.
|
|
21
|
-
quash_mcp-0.2.
|
|
22
|
-
quash_mcp-0.2.
|
|
23
|
-
quash_mcp-0.2.
|
|
20
|
+
quash_mcp-0.2.7.dist-info/METADATA,sha256=ECsH0GmJFNgNHritM3Mq1kjoRsSty4zS9FE_Cs-9eCs,8129
|
|
21
|
+
quash_mcp-0.2.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
22
|
+
quash_mcp-0.2.7.dist-info/entry_points.txt,sha256=9sbDxrx0ApGDVRS-IE3mQgSao3DwKnnV_k-_ipFn9QI,52
|
|
23
|
+
quash_mcp-0.2.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|