mobile-debug-mcp 0.30.1 → 0.30.2
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/dist/interact/index.js +546 -133
- package/dist/server/tool-definitions.js +13 -9
- package/dist/server/tool-handlers.js +4 -4
- package/dist/server-core.js +1 -1
- package/docs/CHANGELOG.md +3 -0
- package/docs/ROADMAP.md +85 -209
- package/docs/specs-deltas/015-adjustable-control-support.md +541 -0
- package/package.json +1 -1
- package/skills/spec-review/SKILL.md +52 -0
- package/skills/spec-review/references/spec-review-checklist.md +13 -0
- package/skills/spec-review/references/spec-review-template.md +28 -0
- package/src/interact/index.ts +581 -138
- package/src/server/tool-definitions.ts +13 -9
- package/src/server/tool-handlers.ts +4 -4
- package/src/server-core.ts +1 -1
- package/src/types.ts +2 -0
- package/test/unit/interact/adjust_control.test.ts +586 -33
- package/test/unit/server/contract.test.ts +4 -0
- package/skills/rfc-review/SKILL.md +0 -52
- package/skills/rfc-review/references/rfc-review-checklist.md +0 -12
- package/skills/rfc-review/references/rfc-review-template.md +0 -28
- /package/docs/{rfcs → specs-deltas}/001-state-verification.md +0 -0
- /package/docs/{rfcs → specs-deltas}/002-richer-element-identity +0 -0
- /package/docs/{rfcs → specs-deltas}/003-wait-and-synchronization-reliability.md +0 -0
- /package/docs/{rfcs → specs-deltas}/004-action-verification-routing.md +0 -0
- /package/docs/{rfcs → specs-deltas}/005-unified-action-execution-and-verification-model.md +0 -0
- /package/docs/{rfcs → specs-deltas}/006-runtime-action-instrumentation-and-binding-layer.md +0 -0
- /package/docs/{rfcs → specs-deltas}/007-actionability-resolution-and-executable-target-selection.md +0 -0
- /package/docs/{rfcs → specs-deltas}/008-adjustable-control-support-and-semantic-value-manipulation.md +0 -0
- /package/docs/{rfcs → specs-deltas}/009-semantic-control-modeling-for-custom-and-composite-controls.md +0 -0
- /package/docs/{rfcs → specs-deltas}/010-verification-stabilization-and-temporal-convergence.md +0 -0
- /package/docs/{rfcs → specs-deltas}/011-recovery-and-replanning-for-failed-or-ambiguous-interaction-flows.md +0 -0
- /package/docs/{rfcs → specs-deltas}/011.1-recovery-contract-types-and-runtime-wiring-spec.md +0 -0
- /package/docs/{rfcs → specs-deltas}/012-action-trace-and-xecution-observability.md +0 -0
- /package/docs/{rfcs → specs-deltas}/013-wait-and-synchronization-reliability.md +0 -0
- /package/docs/{rfcs → specs-deltas}/014-actionability-resolution.md +0 -0
|
@@ -568,11 +568,11 @@ Adjust a numeric control value with verification.
|
|
|
568
568
|
This is the initial adjustable-control surface for slider-like controls and other controls that expose a numeric value or value_range.
|
|
569
569
|
|
|
570
570
|
Inputs:
|
|
571
|
-
- selector or element_id
|
|
571
|
+
- exactly one of selector or element_id
|
|
572
572
|
- property (defaults to "value")
|
|
573
573
|
- targetValue
|
|
574
|
-
- tolerance (optional)
|
|
575
|
-
- maxAttempts (optional)
|
|
574
|
+
- tolerance (optional; discrete default is 0, continuous default is max(step / 2, 1% of range) when omitted)
|
|
575
|
+
- maxAttempts (optional; defaults to 5)
|
|
576
576
|
- platform/deviceId (optional)
|
|
577
577
|
|
|
578
578
|
Output Structure:
|
|
@@ -584,14 +584,14 @@ Output Structure:
|
|
|
584
584
|
- success = true when the control converges within tolerance
|
|
585
585
|
|
|
586
586
|
Verification Guidance:
|
|
587
|
-
- Prefer direct
|
|
587
|
+
- Prefer direct platform adjustment when the runtime exposes it; then verified increment/decrement actions; use coordinate fallback only as degraded mode
|
|
588
588
|
- Use expect_state for the control value readback
|
|
589
|
-
-
|
|
589
|
+
- Do not use derived semantic metadata as proof of success
|
|
590
590
|
|
|
591
591
|
Failure Handling:
|
|
592
592
|
- ELEMENT_NOT_FOUND → re-resolve the control
|
|
593
593
|
- ELEMENT_NOT_INTERACTABLE → the control cannot be adjusted through the current runtime
|
|
594
|
-
-
|
|
594
|
+
- CONTROL_CONVERGENCE_FAILED → the control did not converge within bounded retries or the requested value is out of range
|
|
595
595
|
- UNKNOWN → capture a snapshot and stop`,
|
|
596
596
|
inputSchema: {
|
|
597
597
|
type: 'object',
|
|
@@ -608,12 +608,16 @@ Failure Handling:
|
|
|
608
608
|
element_id: { type: 'string', description: 'Optional previously resolved element identifier.' },
|
|
609
609
|
property: { type: 'string', description: 'Readable numeric state property to adjust.', default: 'value' },
|
|
610
610
|
targetValue: { type: 'number', description: 'Target numeric value.' },
|
|
611
|
-
tolerance: { type: 'number', description: 'Accepted numeric tolerance around the target value.
|
|
612
|
-
maxAttempts: { type: 'number', description: 'Maximum adjustment attempts.', default:
|
|
611
|
+
tolerance: { type: 'number', description: 'Accepted numeric tolerance around the target value. Defaults are derived from the readable control domain.' },
|
|
612
|
+
maxAttempts: { type: 'number', description: 'Maximum adjustment attempts.', default: 5 },
|
|
613
613
|
platform: { type: 'string', enum: ['android', 'ios'], description: 'Optional platform override' },
|
|
614
614
|
deviceId: { type: 'string', description: 'Optional device serial/udid' }
|
|
615
615
|
},
|
|
616
|
-
required: ['targetValue']
|
|
616
|
+
required: ['targetValue'],
|
|
617
|
+
oneOf: [
|
|
618
|
+
{ required: ['selector'] },
|
|
619
|
+
{ required: ['element_id'] }
|
|
620
|
+
]
|
|
617
621
|
}
|
|
618
622
|
},
|
|
619
623
|
{
|
|
@@ -231,12 +231,12 @@ async function handleAdjustControl(args) {
|
|
|
231
231
|
const element_id = getStringArg(args, 'element_id');
|
|
232
232
|
const property = getStringArg(args, 'property') ?? 'value';
|
|
233
233
|
const targetValue = requireNumberArg(args, 'targetValue');
|
|
234
|
-
const tolerance = getNumberArg(args, 'tolerance')
|
|
235
|
-
const maxAttempts = getNumberArg(args, 'maxAttempts')
|
|
234
|
+
const tolerance = getNumberArg(args, 'tolerance');
|
|
235
|
+
const maxAttempts = getNumberArg(args, 'maxAttempts');
|
|
236
236
|
const platform = getStringArg(args, 'platform');
|
|
237
237
|
const deviceId = getStringArg(args, 'deviceId');
|
|
238
|
-
if (!selector && !element_id) {
|
|
239
|
-
throw new Error('
|
|
238
|
+
if ((!selector && !element_id) || (selector && element_id)) {
|
|
239
|
+
throw new Error('Exactly one of selector or element_id argument is required');
|
|
240
240
|
}
|
|
241
241
|
const res = await ToolsInteract.adjustControlHandler({
|
|
242
242
|
selector: selector ?? undefined,
|
package/dist/server-core.js
CHANGED
|
@@ -6,7 +6,7 @@ import { handleToolCall } from './server/tool-handlers.js';
|
|
|
6
6
|
export { wrapResponse, toolDefinitions, handleToolCall };
|
|
7
7
|
export const serverInfo = {
|
|
8
8
|
name: 'mobile-debug-mcp',
|
|
9
|
-
version: '0.30.
|
|
9
|
+
version: '0.30.2'
|
|
10
10
|
};
|
|
11
11
|
export function createServer() {
|
|
12
12
|
const server = new Server(serverInfo, {
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the **Mobile Debug MCP** project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.30.2]
|
|
6
|
+
- improved slider interaction
|
|
7
|
+
|
|
5
8
|
## [0.30.1]
|
|
6
9
|
- Synced the server-reported version in `src/server-core.ts` with `package.json` so contract checks pass.
|
|
7
10
|
- Completed the RFC 013 wait/synchronization implementation, including scoped waits and freshness metadata.
|
package/docs/ROADMAP.md
CHANGED
|
@@ -1,124 +1,26 @@
|
|
|
1
1
|
# Mobile Debug MCP Roadmap
|
|
2
2
|
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
Ordered by:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
1. Impact on agent reliability
|
|
9
|
-
2. Reduction in retries / brittleness
|
|
10
|
-
3. Breadth of app coverage improved
|
|
11
|
-
4. Implementation complexity vs payoff
|
|
12
|
-
|
|
13
|
-
## Capability Status Definitions
|
|
14
|
-
|
|
15
|
-
- **Completed**
|
|
16
|
-
Capability implemented and considered part of the baseline platform.
|
|
17
|
-
|
|
18
|
-
- **Spec Ready**
|
|
19
|
-
Capability design or RFC is mature and implementation-ready, but not yet delivered.
|
|
20
|
-
|
|
21
|
-
- **Planned**
|
|
22
|
-
Capability is prioritized on the roadmap, but detailed specification and/or implementation work remains ahead.
|
|
23
|
-
|
|
24
|
-
## Program-Level Success Metrics
|
|
25
|
-
Track roadmap impact across releases using:
|
|
26
|
-
|
|
27
|
-
- Retry reduction rate (% fewer action retries per task)
|
|
28
|
-
- Element match success rate (% successful element targeting)
|
|
29
|
-
- Verification success rate (% expect_* checks passing first attempt)
|
|
30
|
-
- Wait success rate for asynchronous UI flows
|
|
31
|
-
- Custom control interaction success rate
|
|
32
|
-
- Gesture success rate
|
|
33
|
-
- Mean time to root cause during debugging
|
|
34
|
-
- Overall agent task completion rate
|
|
35
|
-
- Reduced sequencing errors in multi-step interaction flows
|
|
36
|
-
|
|
37
|
-
Primary KPI:
|
|
38
|
-
Higher task success with fewer retries.
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
# Roadmap Status Overview
|
|
43
|
-
|
|
44
|
-
## Completed Capabilities
|
|
45
|
-
|
|
46
|
-
- Stronger State Verification — Complete (Foundational verification layer shipped)
|
|
47
|
-
- Richer Element Identity — Complete (Identity and selector confidence foundations shipped)
|
|
48
|
-
- Better Compose / Custom Control Semantics — Complete (Semantic role enrichment and custom-adjustable inference shipped)
|
|
49
|
-
- Verification Stabilization and Temporal Convergence — Complete (Temporal verification and convergence logic shipped)
|
|
50
|
-
- Action Trace and Execution Observability — Complete (Structured execution trace model shipped)
|
|
51
|
-
- Wait and Synchronization Reliability — Complete (RFC 013 folded into the main spec and shipped behavior verified on emulator)
|
|
52
|
-
|
|
53
|
-
## Current Focus
|
|
3
|
+
## Done
|
|
54
4
|
|
|
5
|
+
- Stronger State Verification
|
|
6
|
+
- Richer Element Identity
|
|
7
|
+
- Better Compose / Custom Control Semantics
|
|
8
|
+
- Verification Stabilization and Temporal Convergence
|
|
9
|
+
- Action Trace and Execution Observability
|
|
10
|
+
- Wait and Synchronization Reliability
|
|
55
11
|
- Actionability Resolution
|
|
56
|
-
- Adjustable Control Precision Hardening
|
|
57
12
|
|
|
58
|
-
##
|
|
13
|
+
## Todo
|
|
59
14
|
|
|
15
|
+
- Adjustable Control Support
|
|
60
16
|
- Adjustable Control Precision Hardening
|
|
61
17
|
- Environment Auto-Configuration and Toolchain Discovery
|
|
62
|
-
- Adjustable Control Support
|
|
63
18
|
- Signal-Oriented Diagnostic Filtering
|
|
64
19
|
- Long Press Gesture
|
|
65
|
-
|
|
66
|
-
## Rationale
|
|
67
|
-
Reduce onboarding friction and improve developer experience by minimizing manual setup dependencies.
|
|
68
|
-
|
|
69
|
-
**Status:** Planned
|
|
70
|
-
|
|
71
|
-
Addresses friction around:
|
|
72
|
-
- manual idb installation
|
|
73
|
-
- manual adb path configuration
|
|
74
|
-
- manual xcrun path configuration
|
|
75
|
-
- environment drift across machines
|
|
76
|
-
- setup failures blocking first use
|
|
77
|
-
|
|
78
|
-
- Automatic discovery of adb
|
|
79
|
-
- Automatic discovery of xcrun
|
|
80
|
-
- idb detection and guided bootstrap support
|
|
81
|
-
- Startup toolchain validation
|
|
82
|
-
- Environment health diagnostics / doctor-style checks
|
|
83
|
-
- Minimal-manual-configuration defaults
|
|
84
|
-
- Runtime device/emulator health signals (crash detection, process lifecycle awareness)
|
|
85
|
-
- App stability monitoring during active sessions
|
|
86
|
-
|
|
87
|
-
## Expected Impact
|
|
88
|
-
High.
|
|
89
|
-
|
|
90
|
-
## Exit Criteria
|
|
91
|
-
- adb and xcrun auto-discovery implemented
|
|
92
|
-
- Missing dependencies surfaced with guided remediation
|
|
93
|
-
- Startup environment validation available
|
|
94
|
-
- Manual path configuration eliminated or minimized for standard setups
|
|
95
|
-
- First-run setup validated on representative developer environments
|
|
96
|
-
|
|
97
|
-
## Success Metrics
|
|
98
|
-
- Reduced setup friction during onboarding
|
|
99
|
-
- Lower environment configuration failures
|
|
100
|
-
- Faster time-to-first-successful-session
|
|
101
|
-
- Reduced support/debugging caused by local setup issues
|
|
102
|
-
- Reduced unknown-failure sessions caused by app or emulator instability
|
|
103
|
-
|
|
104
|
-
## Dependencies
|
|
105
|
-
Depends on:
|
|
106
|
-
- Stronger State Verification
|
|
107
|
-
- Richer Element Identity
|
|
108
|
-
|
|
109
|
-
Strengthens:
|
|
110
|
-
- Actionability Resolution
|
|
111
|
-
- Broader user adoption readiness
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## Later Horizon
|
|
116
|
-
|
|
20
|
+
- Runtime Debugger Introspection
|
|
117
21
|
- Pinch to Zoom
|
|
118
22
|
- Advanced Trace Correlation and Analysis
|
|
119
23
|
|
|
120
|
-
---
|
|
121
|
-
|
|
122
24
|
# Stronger State Verification
|
|
123
25
|
|
|
124
26
|
## Rationale
|
|
@@ -577,6 +479,81 @@ Depends on:
|
|
|
577
479
|
|
|
578
480
|
---
|
|
579
481
|
|
|
482
|
+
# Runtime Debugger Introspection
|
|
483
|
+
|
|
484
|
+
## Rationale
|
|
485
|
+
Enables agents to move from symptom observation to runtime causal analysis by inspecting paused application state during debugging sessions.
|
|
486
|
+
|
|
487
|
+
**Status:** Planned
|
|
488
|
+
|
|
489
|
+
Addresses limitations where agents:
|
|
490
|
+
- observe UI failures but cannot determine runtime cause
|
|
491
|
+
- cannot inspect ViewModel or controller state
|
|
492
|
+
- lack access to local variables and stack context
|
|
493
|
+
- cannot reason about async execution state
|
|
494
|
+
|
|
495
|
+
## Scope
|
|
496
|
+
Debugger-assisted runtime inspection primitives:
|
|
497
|
+
|
|
498
|
+
```javascript
|
|
499
|
+
debugger.pause_state()
|
|
500
|
+
debugger.stack_trace()
|
|
501
|
+
debugger.locals()
|
|
502
|
+
debugger.inspect_object(object_id)
|
|
503
|
+
debugger.evaluate(expression)
|
|
504
|
+
debugger.threads()
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
Includes:
|
|
508
|
+
- stack frame inspection
|
|
509
|
+
- local variable inspection
|
|
510
|
+
- object graph traversal
|
|
511
|
+
- thread inspection
|
|
512
|
+
- expression evaluation
|
|
513
|
+
- platform abstraction over JDWP / LLDB
|
|
514
|
+
- bounded object expansion and summarization
|
|
515
|
+
- coroutine/task inspection support
|
|
516
|
+
|
|
517
|
+
Future exploration:
|
|
518
|
+
- controlled stepping support
|
|
519
|
+
- debugger-assisted recovery workflows
|
|
520
|
+
|
|
521
|
+
## Expected Impact
|
|
522
|
+
Very high.
|
|
523
|
+
|
|
524
|
+
Transforms debugging from:
|
|
525
|
+
- surface-level symptom detection
|
|
526
|
+
|
|
527
|
+
toward:
|
|
528
|
+
- root-cause-oriented runtime reasoning
|
|
529
|
+
|
|
530
|
+
## Exit Criteria
|
|
531
|
+
- Paused runtime state accessible through MCP
|
|
532
|
+
- Local variable inspection implemented
|
|
533
|
+
- Stack trace inspection implemented
|
|
534
|
+
- Object inspection primitives implemented
|
|
535
|
+
- Runtime inspection validated on representative Android flows
|
|
536
|
+
- Object expansion safeguards implemented
|
|
537
|
+
- Expression evaluation available with safety limits
|
|
538
|
+
|
|
539
|
+
## Success Metrics
|
|
540
|
+
- Lower mean time-to-root-cause
|
|
541
|
+
- Higher causal diagnosis accuracy
|
|
542
|
+
- Reduced debugging iteration loops
|
|
543
|
+
- Faster identification of state-management failures
|
|
544
|
+
- Improved async/concurrency failure diagnosis
|
|
545
|
+
|
|
546
|
+
## Dependencies
|
|
547
|
+
Depends on:
|
|
548
|
+
- Action Trace and Execution Observability
|
|
549
|
+
- Stronger State Verification
|
|
550
|
+
- Wait and Synchronization Reliability
|
|
551
|
+
- Signal-Oriented Diagnostic Filtering
|
|
552
|
+
|
|
553
|
+
Strengthens:
|
|
554
|
+
- Advanced Trace Correlation and Analysis
|
|
555
|
+
- Future autonomous recovery systems
|
|
556
|
+
|
|
580
557
|
# Pinch to Zoom
|
|
581
558
|
|
|
582
559
|
## Rationale
|
|
@@ -658,104 +635,3 @@ Depends on:
|
|
|
658
635
|
- Stronger State Verification
|
|
659
636
|
- Richer Element Identity
|
|
660
637
|
- Wait and Synchronization Reliability
|
|
661
|
-
|
|
662
|
-
---
|
|
663
|
-
|
|
664
|
-
# Roadmap Sequence
|
|
665
|
-
|
|
666
|
-
## Dependency Summary
|
|
667
|
-
|
|
668
|
-
Foundation
|
|
669
|
-
- Stronger State Verification
|
|
670
|
-
- Richer Element Identity
|
|
671
|
-
|
|
672
|
-
Synchronization & Actionability
|
|
673
|
-
- Environment Auto-Configuration and Toolchain Discovery
|
|
674
|
-
- Wait and Synchronization Reliability
|
|
675
|
-
- Actionability Resolution
|
|
676
|
-
|
|
677
|
-
Control Precision & Observability
|
|
678
|
-
- Adjustable Control Support
|
|
679
|
-
- Adjustable Control Precision Hardening
|
|
680
|
-
- Better Compose / Custom Control Semantics
|
|
681
|
-
- Signal-Oriented Diagnostic Filtering
|
|
682
|
-
- Verification Stabilization and Temporal Convergence
|
|
683
|
-
|
|
684
|
-
Interaction Expansion
|
|
685
|
-
- Long Press Gesture
|
|
686
|
-
- Pinch to Zoom
|
|
687
|
-
|
|
688
|
-
Deep Observability
|
|
689
|
-
- Advanced Trace Correlation and Analysis
|
|
690
|
-
|
|
691
|
-
## Wave 1 (Current Focus)
|
|
692
|
-
- Stronger State Verification
|
|
693
|
-
- Richer Element Identity
|
|
694
|
-
- Wait and Synchronization Reliability
|
|
695
|
-
- Actionability Resolution
|
|
696
|
-
- Environment Auto-Configuration and Toolchain Discovery
|
|
697
|
-
|
|
698
|
-
Focus:
|
|
699
|
-
Make core loop reliable and reduce onboarding friction.
|
|
700
|
-
|
|
701
|
-
---
|
|
702
|
-
|
|
703
|
-
## Wave 2 (Control Precision + Diagnostics)
|
|
704
|
-
- Adjustable Control Support
|
|
705
|
-
- Adjustable Control Precision Hardening
|
|
706
|
-
- Better Compose / Custom Control Semantics
|
|
707
|
-
- Signal-Oriented Diagnostic Filtering
|
|
708
|
-
|
|
709
|
-
Focus:
|
|
710
|
-
Improve control precision, verification convergence, custom control reliability, and signal observability.
|
|
711
|
-
|
|
712
|
-
---
|
|
713
|
-
|
|
714
|
-
## Wave 3 (Interaction Expansion)
|
|
715
|
-
- Long Press Gesture
|
|
716
|
-
|
|
717
|
-
Focus:
|
|
718
|
-
Expand interaction capability after core control reliability is improved.
|
|
719
|
-
|
|
720
|
-
---
|
|
721
|
-
|
|
722
|
-
## Wave 4 (Advanced Gestures + Deep Observability)
|
|
723
|
-
- Pinch to Zoom
|
|
724
|
-
- Advanced Trace Correlation and Analysis
|
|
725
|
-
|
|
726
|
-
Focus:
|
|
727
|
-
Advanced gestures + deep observability.
|
|
728
|
-
|
|
729
|
-
---
|
|
730
|
-
|
|
731
|
-
# Roadmap Ordering
|
|
732
|
-
|
|
733
|
-
Roadmap Ordering:
|
|
734
|
-
1. Stronger State Verification
|
|
735
|
-
2. Richer Element Identity
|
|
736
|
-
3. Wait and Synchronization Reliability
|
|
737
|
-
4. Actionability Resolution
|
|
738
|
-
5. Adjustable Control Support
|
|
739
|
-
6. Adjustable Control Precision Hardening
|
|
740
|
-
7. Environment Auto-Configuration and Toolchain Discovery
|
|
741
|
-
8. Better Compose / Custom Control Semantics
|
|
742
|
-
9. Signal-Oriented Diagnostic Filtering
|
|
743
|
-
10. Long Press Gesture
|
|
744
|
-
11. Pinch to Zoom
|
|
745
|
-
12. Advanced Trace Correlation and Analysis
|
|
746
|
-
|
|
747
|
-
Rationale:
|
|
748
|
-
- Early roadmap items harden state, targeting, synchronization, environment readiness, and action execution.
|
|
749
|
-
- Mid roadmap items improve control precision and signal observability.
|
|
750
|
-
- Later interaction-focused items expand interaction coverage.
|
|
751
|
-
- Final observability work deepens debugging observability.
|
|
752
|
-
|
|
753
|
-
---
|
|
754
|
-
|
|
755
|
-
## Future Considerations
|
|
756
|
-
Still out of scope:
|
|
757
|
-
|
|
758
|
-
- Full autonomous recovery planning (deferred until after verification stabilization)
|
|
759
|
-
- Autonomous retry strategy
|
|
760
|
-
- MCP-level agent orchestration
|
|
761
|
-
- Autonomous recovery hinting (future consideration only)
|