mobile-debug-mcp 0.30.1 → 0.31.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 +50 -5
- package/dist/interact/index.js +546 -133
- package/dist/manage/ios.js +1 -1
- package/dist/server/tool-definitions.js +13 -9
- package/dist/server/tool-handlers.js +4 -4
- package/dist/server-core.js +1 -1
- package/dist/system/index.js +485 -48
- package/dist/system/ios.js +15 -7
- package/dist/utils/android/utils.js +4 -4
- package/dist/utils/cli/idb/check-idb.js +10 -3
- package/dist/utils/cli/idb/idb-helper.js +47 -13
- package/dist/utils/ios/utils.js +5 -9
- package/docs/CHANGELOG.md +6 -0
- package/docs/ROADMAP.md +88 -212
- package/docs/specs/baseline-spec-v0.md +1 -1
- package/docs/specs-deltas/015-adjustable-control-support.md +541 -0
- package/docs/specs-deltas/016-environment-tools.md +533 -0
- package/docs/tools/TOOLS.md +2 -0
- package/docs/tools/manage.md +4 -2
- package/docs/tools/system.md +9 -2
- 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/manage/ios.ts +1 -1
- 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/system/index.ts +572 -50
- package/src/system/ios.ts +14 -7
- package/src/types.ts +2 -0
- package/src/utils/android/utils.ts +3 -3
- package/src/utils/cli/idb/check-idb.ts +11 -2
- package/src/utils/cli/idb/idb-helper.ts +49 -12
- package/src/utils/ios/utils.ts +4 -8
- package/test/unit/interact/adjust_control.test.ts +586 -33
- package/test/unit/interact/tap_element.test.ts +1 -1
- package/test/unit/server/contract.test.ts +4 -0
- package/test/unit/system/get_system_status.test.ts +3 -0
- package/test/unit/system/system_status.test.ts +40 -0
- package/test/unit/utils/idb_health.test.ts +74 -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
package/src/manage/ios.ts
CHANGED
|
@@ -283,7 +283,7 @@ export class iOSManage {
|
|
|
283
283
|
// Gather diagnostics for simctl failure
|
|
284
284
|
const diag = execCommandWithDiagnostics(['simctl', 'install', deviceId, toInstall], deviceId)
|
|
285
285
|
try {
|
|
286
|
-
const child = spawn(getIdbCmd(), ['--
|
|
286
|
+
const child = spawn(getIdbCmd(), ['list-targets', '--json'])
|
|
287
287
|
const idbExists = await new Promise<boolean>((resolve) => {
|
|
288
288
|
child.on('error', () => resolve(false));
|
|
289
289
|
child.on('close', (code) => resolve(code === 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
|
{
|
|
@@ -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')
|
|
286
|
-
const maxAttempts = getNumberArg(args, 'maxAttempts')
|
|
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('
|
|
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,
|