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.
Files changed (36) hide show
  1. package/dist/interact/index.js +546 -133
  2. package/dist/server/tool-definitions.js +13 -9
  3. package/dist/server/tool-handlers.js +4 -4
  4. package/dist/server-core.js +1 -1
  5. package/docs/CHANGELOG.md +3 -0
  6. package/docs/ROADMAP.md +85 -209
  7. package/docs/specs-deltas/015-adjustable-control-support.md +541 -0
  8. package/package.json +1 -1
  9. package/skills/spec-review/SKILL.md +52 -0
  10. package/skills/spec-review/references/spec-review-checklist.md +13 -0
  11. package/skills/spec-review/references/spec-review-template.md +28 -0
  12. package/src/interact/index.ts +581 -138
  13. package/src/server/tool-definitions.ts +13 -9
  14. package/src/server/tool-handlers.ts +4 -4
  15. package/src/server-core.ts +1 -1
  16. package/src/types.ts +2 -0
  17. package/test/unit/interact/adjust_control.test.ts +586 -33
  18. package/test/unit/server/contract.test.ts +4 -0
  19. package/skills/rfc-review/SKILL.md +0 -52
  20. package/skills/rfc-review/references/rfc-review-checklist.md +0 -12
  21. package/skills/rfc-review/references/rfc-review-template.md +0 -28
  22. /package/docs/{rfcs → specs-deltas}/001-state-verification.md +0 -0
  23. /package/docs/{rfcs → specs-deltas}/002-richer-element-identity +0 -0
  24. /package/docs/{rfcs → specs-deltas}/003-wait-and-synchronization-reliability.md +0 -0
  25. /package/docs/{rfcs → specs-deltas}/004-action-verification-routing.md +0 -0
  26. /package/docs/{rfcs → specs-deltas}/005-unified-action-execution-and-verification-model.md +0 -0
  27. /package/docs/{rfcs → specs-deltas}/006-runtime-action-instrumentation-and-binding-layer.md +0 -0
  28. /package/docs/{rfcs → specs-deltas}/007-actionability-resolution-and-executable-target-selection.md +0 -0
  29. /package/docs/{rfcs → specs-deltas}/008-adjustable-control-support-and-semantic-value-manipulation.md +0 -0
  30. /package/docs/{rfcs → specs-deltas}/009-semantic-control-modeling-for-custom-and-composite-controls.md +0 -0
  31. /package/docs/{rfcs → specs-deltas}/010-verification-stabilization-and-temporal-convergence.md +0 -0
  32. /package/docs/{rfcs → specs-deltas}/011-recovery-and-replanning-for-failed-or-ambiguous-interaction-flows.md +0 -0
  33. /package/docs/{rfcs → specs-deltas}/011.1-recovery-contract-types-and-runtime-wiring-spec.md +0 -0
  34. /package/docs/{rfcs → specs-deltas}/012-action-trace-and-xecution-observability.md +0 -0
  35. /package/docs/{rfcs → specs-deltas}/013-wait-and-synchronization-reliability.md +0 -0
  36. /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 target placement when value_range is available; fall back to a drag only if the direct tap does not converge
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
- - Treat coordinate fallback as degraded mode
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
- - TIMEOUT → the control did not converge within bounded retries
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.', default: 0 },
612
- maxAttempts: { type: 'number', description: 'Maximum adjustment attempts.', default: 3 },
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
  {
@@ -282,12 +282,12 @@ async function handleAdjustControl(args: ToolCallArgs) {
282
282
  const element_id = getStringArg(args, 'element_id')
283
283
  const property = getStringArg(args, 'property') ?? 'value'
284
284
  const targetValue = requireNumberArg(args, 'targetValue')
285
- const tolerance = getNumberArg(args, 'tolerance') ?? 0
286
- const maxAttempts = getNumberArg(args, 'maxAttempts') ?? 3
285
+ const tolerance = getNumberArg(args, 'tolerance')
286
+ const maxAttempts = getNumberArg(args, 'maxAttempts')
287
287
  const platform = getStringArg(args, 'platform') as PlatformArg | undefined
288
288
  const deviceId = getStringArg(args, 'deviceId')
289
- if (!selector && !element_id) {
290
- throw new Error('Missing selector or element_id argument')
289
+ if ((!selector && !element_id) || (selector && element_id)) {
290
+ throw new Error('Exactly one of selector or element_id argument is required')
291
291
  }
292
292
  const res = await ToolsInteract.adjustControlHandler({
293
293
  selector: selector ?? undefined,
@@ -16,7 +16,7 @@ export { wrapResponse, toolDefinitions, handleToolCall }
16
16
 
17
17
  export const serverInfo = {
18
18
  name: 'mobile-debug-mcp',
19
- version: '0.30.1'
19
+ version: '0.30.2'
20
20
  }
21
21
 
22
22
  export function createServer() {
package/src/types.ts CHANGED
@@ -91,7 +91,9 @@ export interface UIElementState {
91
91
  value_range?: {
92
92
  min: number;
93
93
  max: number;
94
+ step?: number | null;
94
95
  } | null;
96
+ step?: number | null;
95
97
  }
96
98
 
97
99
  export interface SelectorConfidence {