mobile-debug-mcp 0.34.0 → 0.36.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/.agents/skills/mcp-builder/SKILL.md +44 -64
- package/.agents/skills/mcp-builder/references/build-flags.md +44 -43
- package/.agents/skills/mcp-builder/references/diagnostics-schema.md +4 -1
- package/.agents/skills/mcp-builder/references/toolchain-details.md +49 -62
- package/.agents/skills/spec-review/references/spec-review-checklist.md +7 -0
- package/.agents/skills/test-authoring/SKILL.md +7 -6
- package/.agents/skills/test-authoring/references/repo-test-layout.md +3 -1
- package/.agents/skills/test-authoring/references/test-authoring-workflow.md +16 -7
- package/.agents/skills/test-authoring/references/test-quality-checklist.md +2 -1
- package/.cursor-plugin/marketplace.json +1 -1
- package/.github/copilot-instructions.md +14 -36
- package/.github/workflows/ci.yml +4 -4
- package/AGENTS.md +12 -3
- package/CONTRIBUTING.md +79 -0
- package/README.md +218 -129
- package/agent-plugin/.antigravity-plugin/README.md +48 -0
- package/agent-plugin/.antigravity-plugin/plugin.json +18 -0
- package/agent-plugin/.claude-plugin/plugin.json +2 -2
- package/agent-plugin/.codex-plugin/plugin.json +1 -1
- package/agent-plugin/.cursor-plugin/plugin.json +2 -2
- package/agent-plugin/.mcp.json +1 -1
- package/agent-plugin/README.md +50 -11
- package/agent-plugin/cursor/.cursor-plugin/plugin.json +23 -0
- package/agent-plugin/cursor/LICENSE +201 -0
- package/agent-plugin/cursor/README.md +9 -0
- package/agent-plugin/cursor/skills/mobile-debug-mcp/SKILL.md +253 -0
- package/agent-plugin/mcp.json +1 -1
- package/agent-plugin/mcp_config.json +13 -0
- package/agent-plugin/plugin.json +1 -1
- package/agent-plugin/skills/mobile-debug-mcp/SKILL.md +62 -17
- package/dist/contracts/execution-controls.js +24 -0
- package/dist/contracts/selector.js +8 -0
- package/dist/contracts/target.js +15 -0
- package/dist/contracts/ui.js +1 -0
- package/dist/debugger/android.js +2 -1
- package/dist/debugger/diagnostics.js +54 -0
- package/dist/debugger/guard.js +4 -4
- package/dist/debugger/ios-worker.js +62 -0
- package/dist/debugger/ios.js +57 -0
- package/dist/debugger/protocol.js +33 -0
- package/dist/debugger/sessions.js +133 -74
- package/dist/debugger/worker.js +59 -46
- package/dist/interact/adjustment/adjustment-context.js +41 -0
- package/dist/interact/adjustment/adjustment-gestures.js +55 -0
- package/dist/interact/adjustment/adjustment-plan.js +18 -0
- package/dist/interact/adjustment/adjustment-resolution.js +127 -0
- package/dist/interact/adjustment/adjustment-result.js +19 -0
- package/dist/interact/adjustment/adjustment-semantic.js +64 -0
- package/dist/interact/adjustment/adjustment-verification.js +35 -0
- package/dist/interact/adjustment/adjustment.js +52 -0
- package/dist/interact/adjustment/control-geometry.js +87 -0
- package/dist/interact/adjustment/control-values.js +136 -0
- package/dist/interact/adjustment/slider-labels.js +84 -0
- package/dist/interact/assertions/screen-assertion.js +37 -0
- package/dist/interact/assertions/state-assertion-context.js +35 -0
- package/dist/interact/assertions/state-assertion.js +76 -0
- package/dist/interact/assertions/state-comparison.js +141 -0
- package/dist/interact/assertions/visibility-assertion.js +34 -0
- package/dist/interact/conditional-action.js +12 -7
- package/dist/interact/index.js +77 -3092
- package/dist/interact/input-service.js +1 -0
- package/dist/interact/interaction-trace.js +21 -0
- package/dist/interact/model.js +1 -0
- package/dist/interact/observation.js +1 -0
- package/dist/interact/targeting/candidate-ancestor.js +58 -0
- package/dist/interact/targeting/candidate-result.js +23 -0
- package/dist/interact/targeting/candidate-scoring.js +50 -0
- package/dist/interact/targeting/element-helpers.js +216 -0
- package/dist/interact/targeting/find-element.js +65 -0
- package/dist/interact/targeting/nearby-control.js +56 -0
- package/dist/interact/targeting/resolved-elements.js +21 -0
- package/dist/interact/targeting/tap-target.js +17 -0
- package/dist/interact/targeting/target-scope.js +104 -0
- package/dist/interact/waits/legacy-log-wait.js +38 -0
- package/dist/interact/waits/legacy-wait-observations.js +103 -0
- package/dist/interact/waits/legacy-wait-state.js +34 -0
- package/dist/interact/waits/legacy-wait.js +48 -0
- package/dist/interact/waits/screen-wait.js +49 -0
- package/dist/interact/waits/ui-change-helpers.js +157 -0
- package/dist/interact/waits/ui-change-state.js +18 -0
- package/dist/interact/waits/ui-change-wait.js +77 -0
- package/dist/interact/waits/ui-wait-condition.js +56 -0
- package/dist/interact/waits/ui-wait-state.js +38 -0
- package/dist/interact/waits/ui-wait.js +106 -0
- package/dist/manage/android.js +55 -51
- package/dist/manage/index.js +38 -75
- package/dist/manage/ios/build-types.js +1 -0
- package/dist/manage/ios/build.js +210 -0
- package/dist/manage/ios/project-discovery.js +29 -0
- package/dist/manage/ios/scheme.js +18 -0
- package/dist/manage/ios.js +44 -256
- package/dist/observe/android/context.js +1 -0
- package/dist/observe/android/current-screen.js +55 -0
- package/dist/observe/android/fingerprint.js +13 -0
- package/dist/observe/android/log-stream.js +132 -0
- package/dist/observe/android/logs.js +107 -0
- package/dist/observe/android/screenshot.js +70 -0
- package/dist/observe/android/ui-tree.js +107 -0
- package/dist/observe/android.js +16 -520
- package/dist/observe/evidence.js +114 -75
- package/dist/observe/index.js +16 -263
- package/dist/observe/ios/context.js +16 -0
- package/dist/observe/ios/fingerprint.js +12 -0
- package/dist/observe/ios/log-stream.js +105 -0
- package/dist/observe/ios/logs.js +168 -0
- package/dist/observe/ios/screenshot.js +22 -0
- package/dist/observe/ios/ui-elements.js +241 -0
- package/dist/observe/ios/ui-tree.js +137 -0
- package/dist/observe/ios-trace/artifact.js +63 -0
- package/dist/observe/ios-trace/capabilities.js +86 -0
- package/dist/observe/ios-trace/native.js +93 -0
- package/dist/observe/ios-trace/notification.js +35 -0
- package/dist/observe/ios-trace/process.js +98 -0
- package/dist/observe/ios-trace/sessions.js +244 -0
- package/dist/observe/ios.js +17 -715
- package/dist/observe/logs/model.js +1 -0
- package/dist/{network → observe/network}/index.js +2 -2
- package/dist/observe/readiness-service.js +5 -3
- package/dist/observe/readiness.js +33 -14
- package/dist/observe/screenshot-encoding.js +41 -0
- package/dist/observe/snapshot-collection.js +79 -0
- package/dist/observe/snapshot-logs.js +30 -0
- package/dist/observe/snapshot-metadata.js +43 -31
- package/dist/observe/snapshot-semantic.js +115 -0
- package/dist/observe/system-trace-error.js +7 -0
- package/dist/observe/system-trace-router.js +81 -0
- package/dist/observe/system-trace.js +26 -21
- package/dist/runtime/action-results.js +270 -0
- package/dist/runtime/clock.js +4 -0
- package/dist/server/common.js +1 -256
- package/dist/server/definitions/assert.js +162 -0
- package/dist/server/definitions/diagnostic.js +118 -0
- package/dist/server/definitions/input.js +274 -0
- package/dist/server/definitions/manage.js +194 -0
- package/dist/server/definitions/observe.js +149 -0
- package/dist/server/definitions/target.js +138 -0
- package/dist/server/definitions/wait.js +105 -0
- package/dist/server/handlers/action-execution.js +163 -0
- package/dist/server/handlers/correlation.js +23 -0
- package/dist/server/handlers/debugger-handlers.js +67 -0
- package/dist/server/handlers/debugger-response.js +9 -0
- package/dist/server/handlers/diagnostic.js +77 -0
- package/dist/server/handlers/handler-types.js +1 -0
- package/dist/server/handlers/input.js +154 -0
- package/dist/server/handlers/interact.js +113 -0
- package/dist/server/handlers/journey-assertions.js +35 -0
- package/dist/server/handlers/journey.js +147 -0
- package/dist/server/handlers/manage.js +119 -0
- package/dist/server/handlers/observe.js +95 -0
- package/dist/server/handlers/payload.js +4 -0
- package/dist/server/handlers/tool-handlers.js +170 -0
- package/dist/server/schemas/condition-schema.js +2 -0
- package/dist/server/{debugger-schema.js → schemas/debugger-schema.js} +20 -12
- package/dist/server/{journey-schema.js → schemas/journey-schema.js} +7 -22
- package/dist/server/schemas/system-trace-schema.js +22 -0
- package/dist/server/tool-definitions.js +58 -1135
- package/dist/server-core.js +2 -2
- package/dist/server.js +4 -4
- package/dist/system/android-status.js +101 -0
- package/dist/system/android.js +37 -27
- package/dist/system/index.js +13 -439
- package/dist/system/ios-status.js +132 -0
- package/dist/system/ios.js +11 -8
- package/dist/system/model.js +1 -0
- package/dist/system/probes.js +105 -0
- package/dist/system/status-summary.js +43 -0
- package/dist/system/unsupported-status.js +52 -0
- package/dist/utils/android/commands.js +89 -0
- package/dist/utils/android/gradle.js +139 -0
- package/dist/utils/android/logs.js +103 -0
- package/dist/utils/android/ui-tree.js +233 -0
- package/dist/utils/android/utils.js +6 -564
- package/dist/utils/cli/idb/idb-helper.js +4 -6
- package/dist/utils/cli/idb/install-idb.js +13 -9
- package/dist/utils/cli/ios/preflight-ios.js +42 -38
- package/dist/utils/ios/utils.js +48 -46
- package/dist/utils/java.js +65 -49
- package/dist/utils/resolve-device.js +4 -2
- package/dist/utils/ui/index.js +26 -26
- package/docs/CHANGELOG.md +67 -1
- package/docs/README.md +38 -0
- package/docs/agent-plugin-installation-verification.md +39 -0
- package/docs/benchmarks/README.md +18 -0
- package/docs/benchmarks/interaction-latency/README.md +14 -0
- package/docs/benchmarks/interaction-latency/final.md +4 -1
- package/docs/benchmarks/interaction-latency/ios-validation.md +2 -0
- package/docs/benchmarks/ui-tree-performance/README.md +24 -16
- package/docs/benchmarks/ui-tree-performance/comparison.md +11 -10
- package/docs/code-structure.md +120 -0
- package/docs/specs/001-state-verification/spec.md +16 -14
- package/docs/specs/002-richer-element-identity/spec.md +12 -10
- package/docs/specs/003-wait-and-synchronization-reliability/spec.md +12 -10
- package/docs/specs/004-action-verification-routing/spec.md +3 -3
- package/docs/specs/005-unified-action-execution-and-verification-model/spec.md +2 -0
- package/docs/specs/006-runtime-action-instrumentation-and-binding-layer/spec.md +2 -0
- package/docs/specs/007-actionability-resolution-and-executable-target-selection/spec.md +3 -1
- package/docs/specs/008-adjustable-control-support-and-semantic-value-manipulation/spec.md +3 -4
- package/docs/specs/009-semantic-control-modeling-for-custom-and-composite-controls/spec.md +2 -0
- package/docs/specs/010-verification-stabilization-and-temporal-convergence/spec.md +2 -2
- package/docs/specs/011-recovery-and-replanning-for-failed-or-ambiguous-interaction-flows/spec.md +2 -2
- package/docs/specs/011.1-recovery-contract-types-and-runtime-wiring-spec/spec.md +2 -0
- package/docs/specs/012-action-trace-and-xecution-observability/spec.md +2 -3
- package/docs/specs/013-wait-and-synchronization-reliability/spec.md +19 -19
- package/docs/specs/014-actionability-resolution/spec.md +20 -18
- package/docs/specs/015-adjustable-control-support/spec.md +17 -15
- package/docs/specs/016-environment-tools/spec.md +20 -20
- package/docs/specs/018-interaction-latency-and-batched-journeys/spec.md +2 -0
- package/docs/specs/019-ui-tree-observation-performance/spec.md +3 -1
- package/docs/specs/020-conditional-actions/intent.md +5 -3
- package/docs/specs/020-conditional-actions/plan.md +8 -9
- package/docs/specs/020-conditional-actions/spec.md +4 -2
- package/docs/specs/021-app-readiness-signals/intent.md +4 -2
- package/docs/specs/021-app-readiness-signals/plan.md +7 -6
- package/docs/specs/021-app-readiness-signals/spec.md +3 -1
- package/docs/specs/022-correlated-evidence/intent.md +4 -4
- package/docs/specs/022-correlated-evidence/plan.md +10 -11
- package/docs/specs/022-correlated-evidence/spec.md +3 -1
- package/docs/specs/023-android-system-traces/intent.md +3 -2
- package/docs/specs/023-android-system-traces/plan.md +5 -7
- package/docs/specs/023-android-system-traces/spec.md +3 -1
- package/docs/specs/024-android-heap-dump-capture/intent.md +3 -1
- package/docs/specs/025-android-runtime-debugger/intent.md +4 -3
- package/docs/specs/025-android-runtime-debugger/plan.md +3 -1
- package/docs/specs/025-android-runtime-debugger/spec.md +4 -3
- package/docs/specs/026-code-structure-and-quality-gates/health-plan.md +88 -0
- package/docs/specs/026-code-structure-and-quality-gates/intent.md +47 -0
- package/docs/specs/026-code-structure-and-quality-gates/plan.md +191 -0
- package/docs/specs/026-code-structure-and-quality-gates/spec.md +138 -0
- package/docs/specs/026-code-structure-and-quality-gates/verification-final.json +200 -0
- package/docs/specs/026-code-structure-and-quality-gates/verification-thin-facade.json +154 -0
- package/docs/specs/026-code-structure-and-quality-gates/verification.json +136 -0
- package/docs/specs/027-debugger-failure-diagnostics/intent.md +43 -0
- package/docs/specs/027-debugger-failure-diagnostics/plan.md +86 -0
- package/docs/specs/027-debugger-failure-diagnostics/spec.md +133 -0
- package/docs/specs/028-compact-debugger-responses/intent.md +41 -0
- package/docs/specs/028-compact-debugger-responses/plan.md +112 -0
- package/docs/specs/028-compact-debugger-responses/spec.md +108 -0
- package/docs/specs/029-kotlin-locals-validation/report.md +119 -0
- package/docs/specs/030-android-coroutine-validation/evidence.json +475 -0
- package/docs/specs/030-android-coroutine-validation/intent.md +47 -0
- package/docs/specs/030-android-coroutine-validation/plan.md +147 -0
- package/docs/specs/030-android-coroutine-validation/report.md +240 -0
- package/docs/specs/030-android-coroutine-validation/spec.md +107 -0
- package/docs/specs/031-ios-system-traces/intent.md +38 -0
- package/docs/specs/031-ios-system-traces/investigation.md +92 -0
- package/docs/specs/031-ios-system-traces/late-run-failure-evidence.json +32 -0
- package/docs/specs/031-ios-system-traces/plan.md +138 -0
- package/docs/specs/031-ios-system-traces/pr102-monitor-evidence.json +22 -0
- package/docs/specs/031-ios-system-traces/simulator-evidence.json +47 -0
- package/docs/specs/031-ios-system-traces/spec.md +135 -0
- package/docs/specs/032-ios-runtime-debugger/evidence.json +176 -0
- package/docs/specs/032-ios-runtime-debugger/intent.md +38 -0
- package/docs/specs/032-ios-runtime-debugger/plan.md +95 -0
- package/docs/specs/032-ios-runtime-debugger/report.md +205 -0
- package/docs/specs/032-ios-runtime-debugger/spec.md +153 -0
- package/docs/tools/TOOLS.md +31 -18
- package/docs/tools/{evidence.md → correlated-evidence.md} +9 -1
- package/docs/tools/debugger.md +120 -4
- package/docs/tools/interact.md +42 -20
- package/docs/tools/manage.md +25 -44
- package/docs/tools/observe.md +55 -23
- package/docs/tools/system-traces.md +89 -14
- package/docs/tools/system.md +12 -5
- package/package.json +12 -8
- package/scripts/agent-plugin.mjs +55 -5
- package/scripts/architecture-graph.mjs +69 -0
- package/scripts/check-architecture.mjs +47 -0
- package/scripts/code-quality-baseline.json +1 -0
- package/scripts/code-quality.mjs +161 -0
- package/src/contracts/execution-controls.ts +26 -0
- package/src/contracts/selector.ts +17 -0
- package/src/contracts/target.ts +19 -0
- package/src/contracts/ui.ts +94 -0
- package/src/debugger/android.ts +3 -2
- package/src/debugger/diagnostics.ts +43 -0
- package/src/debugger/guard.ts +10 -5
- package/src/debugger/ios-worker.ts +49 -0
- package/src/debugger/ios.ts +45 -0
- package/{worker → src/debugger/java}/DebuggerWorker.java +9 -3
- package/src/debugger/lldb/breakpoints.py +51 -0
- package/src/debugger/lldb/inspection.py +109 -0
- package/src/debugger/lldb/worker.py +203 -0
- package/src/debugger/protocol.ts +37 -0
- package/src/debugger/sessions.ts +326 -155
- package/src/debugger/worker.ts +57 -41
- package/src/interact/adjustment/adjustment-context.ts +83 -0
- package/src/interact/adjustment/adjustment-gestures.ts +48 -0
- package/src/interact/adjustment/adjustment-plan.ts +23 -0
- package/src/interact/adjustment/adjustment-resolution.ts +104 -0
- package/src/interact/adjustment/adjustment-result.ts +34 -0
- package/src/interact/adjustment/adjustment-semantic.ts +53 -0
- package/src/interact/adjustment/adjustment-verification.ts +60 -0
- package/src/interact/adjustment/adjustment.ts +49 -0
- package/src/interact/adjustment/control-geometry.ts +120 -0
- package/src/interact/adjustment/control-values.ts +141 -0
- package/src/interact/adjustment/slider-labels.ts +84 -0
- package/src/interact/assertions/screen-assertion.ts +39 -0
- package/src/interact/assertions/state-assertion-context.ts +48 -0
- package/src/interact/assertions/state-assertion.ts +64 -0
- package/src/interact/assertions/state-comparison.ts +168 -0
- package/src/interact/assertions/visibility-assertion.ts +41 -0
- package/src/interact/conditional-action.ts +18 -12
- package/src/interact/index.ts +89 -3494
- package/src/interact/input-service.ts +11 -0
- package/src/interact/interaction-trace.ts +36 -0
- package/src/interact/model.ts +109 -0
- package/src/interact/observation.ts +7 -0
- package/src/interact/targeting/candidate-ancestor.ts +49 -0
- package/src/interact/targeting/candidate-result.ts +24 -0
- package/src/interact/targeting/candidate-scoring.ts +42 -0
- package/src/interact/targeting/element-helpers.ts +243 -0
- package/src/interact/targeting/find-element.ts +47 -0
- package/src/interact/targeting/nearby-control.ts +46 -0
- package/src/interact/targeting/resolved-elements.ts +20 -0
- package/src/interact/targeting/tap-target.ts +22 -0
- package/src/interact/targeting/target-scope.ts +121 -0
- package/src/interact/waits/legacy-log-wait.ts +30 -0
- package/src/interact/waits/legacy-wait-observations.ts +55 -0
- package/src/interact/waits/legacy-wait-state.ts +48 -0
- package/src/interact/waits/legacy-wait.ts +34 -0
- package/src/interact/waits/screen-wait.ts +37 -0
- package/src/interact/waits/ui-change-helpers.ts +184 -0
- package/src/interact/waits/ui-change-state.ts +26 -0
- package/src/interact/waits/ui-change-wait.ts +59 -0
- package/src/interact/waits/ui-wait-condition.ts +52 -0
- package/src/interact/waits/ui-wait-state.ts +55 -0
- package/src/interact/waits/ui-wait.ts +84 -0
- package/src/manage/android.ts +56 -50
- package/src/manage/index.ts +63 -93
- package/src/manage/ios/build-types.ts +14 -0
- package/src/manage/ios/build.ts +230 -0
- package/src/manage/ios/project-discovery.ts +26 -0
- package/src/manage/ios/scheme.ts +16 -0
- package/src/manage/ios.ts +67 -298
- package/src/observe/android/context.ts +1 -0
- package/src/observe/android/current-screen.ts +63 -0
- package/src/observe/android/fingerprint.ts +13 -0
- package/src/observe/android/log-stream.ts +127 -0
- package/src/observe/android/logs.ts +110 -0
- package/src/observe/android/screenshot.ts +79 -0
- package/src/observe/android/ui-tree.ts +113 -0
- package/src/observe/android.ts +17 -531
- package/src/observe/evidence.ts +122 -70
- package/src/observe/index.ts +24 -286
- package/src/observe/ios/context.ts +22 -0
- package/src/observe/ios/fingerprint.ts +12 -0
- package/src/observe/ios/log-stream.ts +103 -0
- package/src/observe/ios/logs.ts +179 -0
- package/src/observe/ios/screenshot.ts +26 -0
- package/src/observe/ios/ui-elements.ts +266 -0
- package/src/observe/ios/ui-tree.ts +143 -0
- package/src/observe/ios-trace/artifact.ts +55 -0
- package/src/observe/ios-trace/capabilities.ts +74 -0
- package/src/observe/ios-trace/native.ts +72 -0
- package/src/observe/ios-trace/notification.ts +30 -0
- package/src/observe/ios-trace/process.ts +82 -0
- package/src/observe/ios-trace/sessions.ts +204 -0
- package/src/observe/ios.ts +18 -749
- package/src/observe/logs/model.ts +11 -0
- package/src/{network → observe/network}/index.ts +2 -2
- package/src/observe/readiness-service.ts +6 -4
- package/src/observe/readiness.ts +42 -21
- package/src/observe/screenshot-encoding.ts +32 -0
- package/src/observe/snapshot-collection.ts +69 -0
- package/src/observe/snapshot-logs.ts +26 -0
- package/src/observe/snapshot-metadata.ts +51 -31
- package/src/observe/snapshot-semantic.ts +153 -0
- package/src/observe/system-trace-error.ts +3 -0
- package/src/observe/system-trace-router.ts +61 -0
- package/src/observe/system-trace.ts +28 -19
- package/src/runtime/action-results.ts +376 -0
- package/src/runtime/clock.ts +9 -0
- package/src/server/common.ts +9 -359
- package/src/server/definitions/assert.ts +164 -0
- package/src/server/definitions/diagnostic.ts +120 -0
- package/src/server/definitions/input.ts +276 -0
- package/src/server/definitions/manage.ts +196 -0
- package/src/server/definitions/observe.ts +151 -0
- package/src/server/definitions/target.ts +140 -0
- package/src/server/definitions/wait.ts +107 -0
- package/src/server/handlers/action-execution.ts +164 -0
- package/src/server/handlers/correlation.ts +20 -0
- package/src/server/handlers/debugger-handlers.ts +58 -0
- package/src/server/handlers/debugger-response.ts +7 -0
- package/src/server/handlers/diagnostic.ts +86 -0
- package/src/server/handlers/handler-types.ts +7 -0
- package/src/server/handlers/input.ts +173 -0
- package/src/server/handlers/interact.ts +135 -0
- package/src/server/handlers/journey-assertions.ts +39 -0
- package/src/server/handlers/journey.ts +132 -0
- package/src/server/handlers/manage.ts +141 -0
- package/src/server/handlers/observe.ts +116 -0
- package/src/server/handlers/payload.ts +36 -0
- package/src/server/handlers/tool-handlers.ts +170 -0
- package/src/server/schemas/condition-schema.ts +2 -0
- package/src/server/schemas/debugger-schema.ts +46 -0
- package/src/server/{journey-schema.ts → schemas/journey-schema.ts} +7 -22
- package/src/server/schemas/system-trace-schema.ts +23 -0
- package/src/server/tool-definitions.ts +67 -1143
- package/src/server-core.ts +2 -2
- package/src/server.ts +4 -4
- package/src/system/android-status.ts +124 -0
- package/src/system/android.ts +33 -21
- package/src/system/index.ts +21 -525
- package/src/system/ios-status.ts +147 -0
- package/src/system/ios.ts +14 -10
- package/src/system/model.ts +41 -0
- package/src/system/probes.ts +114 -0
- package/src/system/status-summary.ts +47 -0
- package/src/system/unsupported-status.ts +55 -0
- package/src/types.ts +16 -106
- package/src/utils/android/commands.ts +81 -0
- package/src/utils/android/gradle.ts +132 -0
- package/src/utils/android/logs.ts +103 -0
- package/src/utils/android/ui-tree.ts +239 -0
- package/src/utils/android/utils.ts +16 -556
- package/src/utils/cli/idb/check-idb.ts +4 -4
- package/src/utils/cli/idb/idb-helper.ts +6 -8
- package/src/utils/cli/idb/install-idb.ts +15 -9
- package/src/utils/cli/ios/preflight-ios.ts +39 -31
- package/src/utils/cli/ios/run-ios-ui-tree-tap.ts +4 -4
- package/src/utils/ios/utils.ts +60 -61
- package/src/utils/java.ts +62 -43
- package/src/utils/resolve-device.ts +9 -6
- package/src/utils/ui/index.ts +28 -28
- package/test/device/automated/debugger/coroutine-lifecycle.ts +27 -0
- package/test/device/automated/debugger/coroutine-support.ts +140 -0
- package/test/device/automated/debugger/coroutine.android.test.ts +169 -0
- package/test/device/automated/debugger/kotlin.android.test.ts +127 -0
- package/test/device/automated/debugger/runtime.android.test.ts +19 -3
- package/test/device/automated/debugger/runtime.ios.test.ts +221 -0
- package/test/device/automated/interact/interaction.android.test.ts +56 -0
- package/test/device/automated/observe/ios-system-trace.smoke.ts +119 -0
- package/test/device/automated/observe/system-trace.smoke.ts +1 -1
- package/test/device/manual/interact/modul8_selector_tap.manual.ts +1 -1
- package/test/fixtures/contracts/tool-definitions.json +3696 -0
- package/test/fixtures/coroutine-app/MainActivity.kt +100 -0
- package/test/fixtures/coroutine-app/README.md +48 -0
- package/test/fixtures/coroutine-app/build.ts +35 -0
- package/test/fixtures/debugger-app/MainActivity.java +21 -0
- package/test/fixtures/debugger-app/MainActivity.kt +32 -0
- package/test/fixtures/debugger-app/README.md +52 -0
- package/test/fixtures/debugger-app/build.ts +25 -15
- package/test/fixtures/ios-debugger-app/Main.swift +95 -0
- package/test/fixtures/ios-debugger-app/README.md +27 -0
- package/test/fixtures/ios-debugger-app/build.ts +21 -0
- package/test/fixtures/latency-journey-app/README.md +2 -0
- package/test/fixtures/readiness-app/README.md +2 -0
- package/test/helpers/ios-trace-shutdown.ts +29 -0
- package/test/unit/debugger/coroutine-lifecycle.test.ts +43 -0
- package/test/unit/debugger/diagnostic-sessions.test.ts +67 -0
- package/test/unit/debugger/diagnostics.test.ts +80 -0
- package/test/unit/debugger/guards.test.ts +4 -0
- package/test/unit/debugger/handle-guards.test.ts +88 -0
- package/test/unit/debugger/ios-preparation.test.ts +57 -0
- package/test/unit/debugger/ios.test.ts +104 -0
- package/test/unit/debugger/lldb-worker.py +166 -0
- package/test/unit/debugger/lldb-worker.test.ts +10 -0
- package/test/unit/debugger/preparation.test.ts +32 -0
- package/test/unit/debugger/protocol.test.ts +15 -0
- package/test/unit/debugger/sessions.test.ts +1 -1
- package/test/unit/interact/adjustment_service.test.ts +42 -0
- package/test/unit/interact/adjustment_verification.test.ts +35 -0
- package/test/unit/interact/clock_dependencies.test.ts +63 -0
- package/test/unit/interact/element_helpers.test.ts +19 -0
- package/test/unit/interact/legacy_wait_service.test.ts +17 -0
- package/test/unit/interact/state_comparison.test.ts +20 -0
- package/test/unit/interact/target_scope.test.ts +35 -0
- package/test/unit/network/get_network_activity.test.ts +1 -1
- package/test/unit/observe/ios-trace-native.test.ts +90 -0
- package/test/unit/observe/ios-trace-sessions.test.ts +131 -0
- package/test/unit/observe/readiness.test.ts +1 -1
- package/test/unit/observe/screenshot-encoding.test.ts +30 -0
- package/test/unit/observe/snapshot-logs.test.ts +14 -0
- package/test/unit/observe/system-trace-router.test.ts +49 -0
- package/test/unit/quality/agent-plugin-export.test.ts +38 -0
- package/test/unit/quality/architecture.test.ts +60 -0
- package/test/unit/quality/code-quality.test.ts +58 -0
- package/test/unit/quality/interaction_boundaries.test.ts +24 -0
- package/test/unit/server/conditional_actions.test.ts +1 -1
- package/test/unit/server/conditional_schema.test.ts +2 -2
- package/test/unit/server/debugger-response.test.ts +63 -0
- package/test/unit/server/system-trace.test.ts +12 -3
- package/test/unit/server/tool_definitions_parity.test.ts +8 -0
- package/dist/server/debugger-handlers.js +0 -38
- package/dist/server/system-trace-schema.js +0 -17
- package/dist/server/tool-handlers.js +0 -1000
- package/docs/ROADMAP.md +0 -646
- package/docs/benchmarks/ui-tree-performance/bridge-probe.json +0 -29
- package/docs/benchmarks/ui-tree-performance/initial-baseline.json +0 -59560
- package/docs/specs/baseline-spec-v0.md +0 -312
- package/docs/specs/mcp-tooling-spec-v1.md +0 -446
- package/src/server/debugger-handlers.ts +0 -29
- package/src/server/debugger-schema.ts +0 -37
- package/src/server/system-trace-schema.ts +0 -17
- package/src/server/tool-handlers.ts +0 -1008
- /package/dist/{server/condition-schema.js → contracts/condition.js} +0 -0
- /package/dist/server/{readiness-schema.js → schemas/readiness-schema.js} +0 -0
- /package/src/{server/condition-schema.ts → contracts/condition.ts} +0 -0
- /package/src/server/{readiness-schema.ts → schemas/readiness-schema.ts} +0 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Plan: compact debugger responses
|
|
2
|
+
|
|
3
|
+
[Approved intent](intent.md) · [Accepted specification](spec.md)
|
|
4
|
+
|
|
5
|
+
Intent and specification each approved with “yes” in this chat on 2026-11-02.
|
|
6
|
+
No commit, push or publication requested.
|
|
7
|
+
|
|
8
|
+
## Implementation
|
|
9
|
+
|
|
10
|
+
- [x] Add per-call schema mode and immutable response projection at the handler.
|
|
11
|
+
- [x] Test defaults, exact retention, failures and worker argument isolation.
|
|
12
|
+
- [x] Extend isolated Android journey for compact MCP calls and paired byte counts.
|
|
13
|
+
- [x] Align tool docs, changelog, usage skill and public schema fixture.
|
|
14
|
+
|
|
15
|
+
## Verification
|
|
16
|
+
|
|
17
|
+
Node >=22, JDK >=17; device fixture requires Android SDK/build-tools 36.
|
|
18
|
+
|
|
19
|
+
| Acceptance | Check |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| 1–3 | Focused response/schema/handler unit tests and existing debugger units |
|
|
22
|
+
| 4–5 | `MCP_DEBUGGER_DEVICE=emulator-5554 npm run test:device`; focused runtime fixture in both modes |
|
|
23
|
+
| 1–3, 6 | `npm run verify`; public definitions and plugin consistency |
|
|
24
|
+
|
|
25
|
+
Device journey uses only the existing isolated fixture. Record build fingerprint,
|
|
26
|
+
Android target, known stop/local, fresh Result 43 UI assertion, stale references,
|
|
27
|
+
detach and forward cleanup. Pair both projections of each captured full response;
|
|
28
|
+
exercise actual compact responses separately. Preserve existing fixture finally
|
|
29
|
+
cleanup. Physical Android and hosted CI remain separate evidence.
|
|
30
|
+
|
|
31
|
+
Initial sandbox ADB discovery cannot bind its listener; retry with execution
|
|
32
|
+
access. No dependency, release or Java worker change is needed. Review omission
|
|
33
|
+
rules and error paths against the accepted specification before completion.
|
|
34
|
+
|
|
35
|
+
## Results
|
|
36
|
+
|
|
37
|
+
Implementation and focused review complete. Schema changes add only the optional
|
|
38
|
+
mode to all eleven debugger tools; the compatibility fixture changed by exactly
|
|
39
|
+
those eleven properties. Projection omits exactly three top-level fields, retains
|
|
40
|
+
unknown future fields and never mutates session/worker data. Presentation input
|
|
41
|
+
is removed before session dispatch. Reviewed success/catch/validation paths,
|
|
42
|
+
null and unknown session handling, diagnostic retention and detach uncertainty.
|
|
43
|
+
|
|
44
|
+
The focused unit check passed for all tool projections, schema defaults/invalid
|
|
45
|
+
modes, success/failure, paused references, unknown fields, incomplete cleanup,
|
|
46
|
+
immutability, handler errors and session argument isolation. Documentation links
|
|
47
|
+
and `git diff --check` passed. Remaining maintainer/device results follow below.
|
|
48
|
+
|
|
49
|
+
### Paired response measurement
|
|
50
|
+
|
|
51
|
+
Node 22.23.4, emulator-5554, Android 16/API 36, MCP stdio. Server fingerprint
|
|
52
|
+
(dist plus Java sources):
|
|
53
|
+
`fd2f526b5ee310ba485dcb2c3d060a06fe221b24afe511fa669347586f3a3a42`.
|
|
54
|
+
Default/full fixture journey **passed**. Starting state: isolated fixture freshly
|
|
55
|
+
installed/launched. It established source stops, known local 42, shallow summaries,
|
|
56
|
+
into/over/out stepping, stale references, fresh UI Result 43 after resume,
|
|
57
|
+
missing-metadata limitations, cancellation, detach, process loss and active paused
|
|
58
|
+
server shutdown. Owned forwards and fixture package/temp data were cleaned up.
|
|
59
|
+
|
|
60
|
+
Measured UTF-8 bytes of `JSON.stringify` on each MCP tool-result envelope, with
|
|
61
|
+
its existing pretty-printed JSON text. Each compact result projects the same
|
|
62
|
+
captured full payload: IDs, timestamps and operation data are identical. This
|
|
63
|
+
excludes transport JSON-RPC framing. The core table selects the first occurrence
|
|
64
|
+
of each named operation from the extended fixture journey; extra pending/removal,
|
|
65
|
+
stepping, failure and recovery calls are excluded from this table.
|
|
66
|
+
|
|
67
|
+
| Core operation | Debug bytes | Compact bytes |
|
|
68
|
+
| --- | ---: | ---: |
|
|
69
|
+
| Attach | 1,141 | 1,141 |
|
|
70
|
+
| Set breakpoint | 1,640 | 1,063 |
|
|
71
|
+
| Stop event | 2,597 | 2,020 |
|
|
72
|
+
| Stack | 7,805 | 7,228 |
|
|
73
|
+
| Locals | 2,780 | 2,203 |
|
|
74
|
+
| Step | 2,346 | 1,769 |
|
|
75
|
+
| Resume | 2,346 | 1,769 |
|
|
76
|
+
| Detach | 1,122 | 545 |
|
|
77
|
+
| Total | 21,777 | 17,738 |
|
|
78
|
+
|
|
79
|
+
Core reduction: **18.55%** (4,039 bytes). Across all 37 measured debugger calls:
|
|
80
|
+
81,974 → 65,818 bytes, **19.71%**. Each projected routine response saved 577 bytes
|
|
81
|
+
for this fixture target; discovery/state saved zero by design. These are measured
|
|
82
|
+
fixture results, not a general performance target. Parsed structure preservation
|
|
83
|
+
is checked independently in units. Raw per-call counts are in
|
|
84
|
+
`/tmp/mobile-debug-82-device.log`; no private user-app values were used.
|
|
85
|
+
|
|
86
|
+
### Final verification
|
|
87
|
+
|
|
88
|
+
- `PATH=/private/tmp/mobile-debug-node22/node_modules/node/bin:$PATH npm run verify`:
|
|
89
|
+
**pass**, Node 22.23.4; lint/quality/architecture, TypeScript, all 89 unit files
|
|
90
|
+
and plugin consistency. Log: `/tmp/mobile-debug-82-verify-node22.log`.
|
|
91
|
+
Preliminary Node 23 verification also passed.
|
|
92
|
+
- `MCP_DEBUGGER_DEVICE=emulator-5554 npm run test:device` with Node 22.23.4:
|
|
93
|
+
**pass**, all 10 device files. Includes Android debugger and interaction,
|
|
94
|
+
Android/iOS screenshot/log/tree and correlated evidence, plus Android traces.
|
|
95
|
+
Log: `/tmp/mobile-debug-82-device.log`. iOS observation coverage establishes
|
|
96
|
+
no iOS debugger support. Trace artifacts removed; suite left Settings foreground.
|
|
97
|
+
- `MCP_DEBUGGER_DEVICE=emulator-5554 MCP_DEBUGGER_RESPONSE_MODE=compact npx tsx test/device/automated/debugger/runtime.android.test.ts`
|
|
98
|
+
with Node 22.23.4: **pass**, same server fingerprint/API as above. Actual MCP
|
|
99
|
+
calls verified omitted metadata on routine success/failure responses while
|
|
100
|
+
retaining known locals, stop/cursor/state, stale errors, stepping, resume UI,
|
|
101
|
+
process-loss and shutdown recovery. Fixture package/temp data and owned forwards
|
|
102
|
+
removed in finally; unrelated forwards preserved. Log:
|
|
103
|
+
`/tmp/mobile-debug-82-compact.log`. This run exercises compact output; its empty
|
|
104
|
+
measurement list means byte counts are taken only from the paired full run,
|
|
105
|
+
not that compact responses contain zero bytes.
|
|
106
|
+
|
|
107
|
+
Local maintainer verification additionally checks plugin consistency. Hosted CI
|
|
108
|
+
also compiles the Java worker with JDK 17 and checks package contents; those
|
|
109
|
+
hosted jobs were not run here. Android hosted integration is manual-dispatch
|
|
110
|
+
only. Physical Android debugger, real 60-second pause expiry, JDK 17 execution
|
|
111
|
+
and hosted CI remain **unrun**. No publication or installed-package claim is made.
|
|
112
|
+
Changes remain local, uncommitted and unpushed; issue status is unchanged.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Specification: compact debugger responses
|
|
2
|
+
|
|
3
|
+
[Approved intent](intent.md) · [Development process](../process.md)
|
|
4
|
+
|
|
5
|
+
Date: 2026-11-02. Status: accepted.
|
|
6
|
+
Source: [issue #82](https://github.com/clivejefferies/mobile-debug-tools/issues/82).
|
|
7
|
+
Intent approved by the maintainer with “yes” in this chat on 2026-11-02.
|
|
8
|
+
|
|
9
|
+
## Behaviour and compatibility
|
|
10
|
+
|
|
11
|
+
Add optional `responseMode: 'compact' | 'debug'` to all eleven existing debugger
|
|
12
|
+
tools. Omission defaults to `debug`, preserving the current response shape.
|
|
13
|
+
`debug` means the existing full response; do not introduce a separate `full`
|
|
14
|
+
alias. Mode selection applies to one call and never changes session state or
|
|
15
|
+
future defaults. Invalid modes return the existing `INVALID_ARGUMENT` error.
|
|
16
|
+
Input JSON schemas and strict runtime validation must agree.
|
|
17
|
+
|
|
18
|
+
Compact mode reduces repeated session metadata, not inspected application data.
|
|
19
|
+
It does not change breakpoints, suspension, stepping, locals, limits, event
|
|
20
|
+
delivery, timeouts, cancellation, cleanup or error classification. It must not
|
|
21
|
+
silently select compact output for existing clients.
|
|
22
|
+
|
|
23
|
+
## Exact response projection
|
|
24
|
+
|
|
25
|
+
Keep the current MCP text-content envelope and `isError` rules. JSON remains
|
|
26
|
+
formatted using the existing serializer; savings must come from omitted repeated
|
|
27
|
+
fields, not a whitespace-only change. Do not add a mode marker or rename fields.
|
|
28
|
+
|
|
29
|
+
For `get_debugger_capabilities`, `attach_debugger` and `get_debugger_state`,
|
|
30
|
+
compact and debug payloads are identical. These are explicit discovery and
|
|
31
|
+
session-baseline operations: callers need their resolved target, capabilities
|
|
32
|
+
and complete state. Clients can request state again to recover that baseline.
|
|
33
|
+
|
|
34
|
+
For the remaining eight tools, compact mode omits exactly these top-level fields
|
|
35
|
+
when the payload has a non-null `debug_session_id`:
|
|
36
|
+
|
|
37
|
+
- `device`
|
|
38
|
+
- `target`
|
|
39
|
+
- `capabilities`
|
|
40
|
+
|
|
41
|
+
Preserve every other field, including future fields unless separately specified.
|
|
42
|
+
In particular, retain `success`, `debug_session_id`, `state`, `captured_at_ms`,
|
|
43
|
+
`reason`, `stop`, `limitations`, `cleanup`, `error`, `execution_state`, `result`,
|
|
44
|
+
`breakpoints`, `events`, `next_cursor`, `overflow` and `timed_out` whenever present.
|
|
45
|
+
Do not prune nulls, empty collections or nested fields. Stack/frame/thread/stop
|
|
46
|
+
and breakpoint identifiers, locals metadata/truncation, pending breakpoints and
|
|
47
|
+
all event details therefore remain intact. Repeated stop information is retained
|
|
48
|
+
to make current execution state explicit.
|
|
49
|
+
|
|
50
|
+
Apply the same projection to success and failure payloads. A null-session
|
|
51
|
+
failure retains the existing complete payload, because no prior session baseline
|
|
52
|
+
can be assumed. A supplied but unknown session ID may be echoed as today; that
|
|
53
|
+
does not establish a valid session. `DEBUGGER_NOT_FOUND` remains explicit.
|
|
54
|
+
Neither mode may suppress diagnostics, error codes, retryability, limitations,
|
|
55
|
+
unknown execution outcomes or remaining cleanup resources. Diagnostic content
|
|
56
|
+
continues to use the bounded sanitized catalog introduced by #81.
|
|
57
|
+
|
|
58
|
+
## Lifecycle, safety and platforms
|
|
59
|
+
|
|
60
|
+
Projection occurs at the server response boundary after the existing operation
|
|
61
|
+
and error handling. It must not mutate session summaries, worker replies or
|
|
62
|
+
shared capability objects. Strip the presentation-only input before forwarding
|
|
63
|
+
command arguments to the session/Java worker. No Java protocol change is needed.
|
|
64
|
+
|
|
65
|
+
Device/process selection and session ownership are unchanged. A session ID
|
|
66
|
+
continues to identify the originally resolved Android target; omitting repeated
|
|
67
|
+
target metadata grants no ability to retarget it. Concurrency, deadlines,
|
|
68
|
+
cancellation and subprocess cleanup remain governed by existing contracts.
|
|
69
|
+
Detach must retain `execution_state: 'unknown'`, cleanup status and exact
|
|
70
|
+
remaining resources, including failed cleanup that requires a retry.
|
|
71
|
+
|
|
72
|
+
This covers the current Android debugger only. It adds no iOS support or new
|
|
73
|
+
prerequisites. Inspection still returns potentially private locals on request;
|
|
74
|
+
compact mode is not redaction. Do not persist real app values in benchmarks or
|
|
75
|
+
public artifacts. Use the isolated debugger fixture and synthetic failures.
|
|
76
|
+
|
|
77
|
+
## Acceptance and verification
|
|
78
|
+
|
|
79
|
+
1. All eleven registered tools accept both modes; omission and explicit `debug`
|
|
80
|
+
preserve legacy output structure. Invalid mode values fail validation.
|
|
81
|
+
2. Compact output follows the exact omission rule, preserving all other values
|
|
82
|
+
for success, paused/stale/unknown references, worker failure, timeout,
|
|
83
|
+
cancellation and incomplete cleanup. Full discovery/state remains available.
|
|
84
|
+
3. Presentation does not alter command arguments, shared data, session lifecycle
|
|
85
|
+
or device ownership. Existing debugger regression coverage remains passing.
|
|
86
|
+
4. Compare UTF-8 serialized MCP response bytes and parsed payload structure for
|
|
87
|
+
the same isolated attach → breakpoint → stop → stack → locals → step →
|
|
88
|
+
resume → detach journey. Project the same captured responses into both modes
|
|
89
|
+
for a paired comparison; separately exercise actual compact calls through
|
|
90
|
+
MCP. Report per-call/total bytes and percentage savings without a preset
|
|
91
|
+
target. Retain real IDs/timestamps in measurement, publishing only safe
|
|
92
|
+
aggregate results. Report unchanged discovery calls honestly.
|
|
93
|
+
5. Run `npm run verify`, applicable `npm run test:device` and a focused Android
|
|
94
|
+
fixture journey against the updated build. Record server build and target;
|
|
95
|
+
separate mocked checks, emulator results and physical-device/unrun coverage.
|
|
96
|
+
6. Update tool documentation, changelog and packaged usage guidance: default,
|
|
97
|
+
exact omissions, baseline recovery through state/debug mode, and privacy and
|
|
98
|
+
execution-state limitations. Check registration/runtime/plugin consistency.
|
|
99
|
+
|
|
100
|
+
Affected areas: debugger schemas/handler, a small response-projection helper,
|
|
101
|
+
unit and existing device fixture coverage, tool docs and packaged usage skill.
|
|
102
|
+
The main risk is accidentally hiding lifecycle or diagnostic evidence; an
|
|
103
|
+
explicit three-field omission rule and structural equality checks bound it.
|
|
104
|
+
|
|
105
|
+
## Approval
|
|
106
|
+
|
|
107
|
+
The maintainer accepted this complete specification with “yes” in this chat on
|
|
108
|
+
2026-11-02. Implementation is authorized within this scope.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Kotlin locals validation — issue #83
|
|
2
|
+
|
|
3
|
+
[Documentation](../../README.md) · [Debugger tools](../../tools/debugger.md) ·
|
|
4
|
+
[Fixture and reproduction](../../../test/fixtures/debugger-app/README.md)
|
|
5
|
+
|
|
6
|
+
Date: 2026-11-02. Source: [issue #83](https://github.com/clivejefferies/mobile-debug-tools/issues/83).
|
|
7
|
+
|
|
8
|
+
## Scope and method
|
|
9
|
+
|
|
10
|
+
The issue originated from empty locals observed while debugging Modul8. The
|
|
11
|
+
maintainer clarified in this chat: “you dont need modul8, that is just where we
|
|
12
|
+
found it”. Validation therefore uses an isolated Kotlin calculation, without
|
|
13
|
+
building, modifying or debugging Modul8. This is lightweight validation/test
|
|
14
|
+
work under the shared process, with no new debugger contract or capability.
|
|
15
|
+
|
|
16
|
+
Hypothesis: plain Kotlin arguments and initialized named locals are inspectable
|
|
17
|
+
through the existing Android debugger; absence before initialization is a scope
|
|
18
|
+
condition, not sufficient evidence of a worker defect.
|
|
19
|
+
|
|
20
|
+
The Kotlin variant of the existing disposable Android fixture uses
|
|
21
|
+
`dev.mobiledebugmcp.debugfixture.MainActivity.calculate(seed: Int)`. The same
|
|
22
|
+
build helper compiles the checked-in source and installs its generated APK.
|
|
23
|
+
Compiler local-variable tables are checked using `javap -p -c -l`; source/APK
|
|
24
|
+
and server fingerprints are recorded by the runner. No app instrumentation,
|
|
25
|
+
debug probes, coroutine support or production server change is introduced.
|
|
26
|
+
|
|
27
|
+
| Source stop (`MainActivity.kt`) | Expected observation |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| Line 28, before `known = seed + 35` | `seed=7`; `known` absent |
|
|
30
|
+
| Line 29, before `answer = known + 1` | `known=42`; `answer` absent |
|
|
31
|
+
| Line 30, before setting result text | `known=42`; `answer=43` |
|
|
32
|
+
|
|
33
|
+
The runner verifies actual source/method/line stops, reads stack/frame IDs and
|
|
34
|
+
locals using compact MCP calls, and checks that an earlier stop/frame is stale.
|
|
35
|
+
After removing breakpoints and resuming, detach must report complete cleanup
|
|
36
|
+
and preserve unrelated forwards. A fresh UI-tree assertion of `Kotlin result 43`
|
|
37
|
+
independently establishes execution recovery. Finally removes only the fixture
|
|
38
|
+
package and temporary build directory.
|
|
39
|
+
|
|
40
|
+
## Evidence and interpretation
|
|
41
|
+
|
|
42
|
+
Initial focused device journey: **PASS**, emulator-5554, Android 16/API 36,
|
|
43
|
+
Node 22.23.4, Kotlin JVM compiler/stdlib 2.0.21, Oracle JDK 17.0.11.
|
|
44
|
+
All three scope observations, stale-reference rejection, UI recovery and owned
|
|
45
|
+
forward cleanup passed. Log: `/tmp/mobile-debug-83-kotlin.log`.
|
|
46
|
+
|
|
47
|
+
Server fingerprint (dist plus Java sources):
|
|
48
|
+
`fd2f526b5ee310ba485dcb2c3d060a06fe221b24afe511fa669347586f3a3a42`.
|
|
49
|
+
Kotlin source SHA-256:
|
|
50
|
+
`79bab4babbfeb216f01fc6e53fc5400f6d0082628317e922951b11890d0eb8df`.
|
|
51
|
+
The final Kotlin journey in the full device run also **passed**. Its compiler
|
|
52
|
+
scope tables showed `seed` at bytecode offset 0 (length 50), `known` at offset 5
|
|
53
|
+
(length 45), and `answer` at offset 9 (length 41). These are class-file offsets,
|
|
54
|
+
not claimed DEX addresses. The runtime stops independently established the named
|
|
55
|
+
values above. Generated APK SHA-256:
|
|
56
|
+
`ea1ec8021f39ace2bbf5d7fb3aa18054eebd39395d4703dd77325d1e75d76804`.
|
|
57
|
+
Signing is ephemeral, so subsequent APK hashes can differ. The final run uses the
|
|
58
|
+
same source and server fingerprints. Log: `/tmp/mobile-debug-83-device.log`.
|
|
59
|
+
|
|
60
|
+
The before/after comparison shows usable named Kotlin values and intentional
|
|
61
|
+
scope absence on this path. No worker defect was reproduced; no runtime fix was
|
|
62
|
+
made. This does not prove the cause of every earlier empty-table observation.
|
|
63
|
+
The existing Java `NoLocals` fixture separately omits variable metadata and must
|
|
64
|
+
retain `availability: unknown` / `EMPTY_OR_UNAVAILABLE_VARIABLE_METADATA` on ART.
|
|
65
|
+
An empty table alone cannot distinguish a genuinely empty scope from unavailable
|
|
66
|
+
metadata. Compiler tables plus successful later value reads supply the stronger
|
|
67
|
+
evidence for this Kotlin case.
|
|
68
|
+
|
|
69
|
+
The first compiler attempt used cached Kotlin 2.0.21 with JDK 25, which failed
|
|
70
|
+
before device installation because that compiler could not parse the JDK version.
|
|
71
|
+
Using installed JDK 17 resolved it. Another initial assertion used case-sensitive
|
|
72
|
+
button text; matching native button text case-insensitively follows the existing
|
|
73
|
+
fixture convention. Both were test setup issues, not debugger defects. Temporary
|
|
74
|
+
output from the failed compilation was removed; the build helper now removes its
|
|
75
|
+
temporary directory on any build failure.
|
|
76
|
+
|
|
77
|
+
## Final checks and limits
|
|
78
|
+
|
|
79
|
+
`PATH=/private/tmp/mobile-debug-node22/node_modules/node/bin:$PATH npm run verify`
|
|
80
|
+
**passed** on Node 22.23.4: lint/quality/architecture, build, all 89 unit files,
|
|
81
|
+
and plugin consistency. Log: `/tmp/mobile-debug-83-verify.log`.
|
|
82
|
+
An isolated compiler-start failure check also passed: a missing compiler raises
|
|
83
|
+
an error and leaves no new temporary fixture directory. Changed relative links,
|
|
84
|
+
plugin consistency and `git diff --check` passed.
|
|
85
|
+
|
|
86
|
+
The full device suite **passed**, all 11 files, using:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
# With the documented compiler/stdlib/JDK variables set:
|
|
90
|
+
MCP_KOTLIN_DEVICE=emulator-5554 MCP_DEBUGGER_DEVICE=emulator-5554 npm run test:device
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Coverage: isolated Kotlin scopes and Java debugger/metadata/stepping/cleanup,
|
|
94
|
+
Android interactions, Android/iOS observation smoke checks and correlated
|
|
95
|
+
evidence, and Android traces. The suite removed its artifacts and left Settings
|
|
96
|
+
foreground. iOS observation results do not establish iOS runtime debugging.
|
|
97
|
+
Log: `/tmp/mobile-debug-83-device.log`.
|
|
98
|
+
|
|
99
|
+
Final review retained the attach session ID before asserting success so failed
|
|
100
|
+
attach cleanup can be retried in finally. Focused lint passed after this test-only
|
|
101
|
+
adjustment. The final focused Kotlin run **passed** on the same server/source,
|
|
102
|
+
compiler and emulator, with identical scope-table ranges and all observations.
|
|
103
|
+
Log: `/tmp/mobile-debug-83-final-kotlin.log`; final generated APK SHA-256:
|
|
104
|
+
`98b5401e1957bc1a8e61d7beec5ead63ece586d6c173db75d79af28cde7575aa`.
|
|
105
|
+
Owned forwards, fixture package and temporary output were removed. No unrelated
|
|
106
|
+
forward or user-app data was changed. Changes remain local, uncommitted and
|
|
107
|
+
unpushed; the issue/board status has not been changed.
|
|
108
|
+
|
|
109
|
+
Hosted CI additionally compiles the worker with JDK 17 and checks package
|
|
110
|
+
contents; those hosted checks were not run. The Kotlin journey is explicitly
|
|
111
|
+
opt-in and existing hosted workflows do not provision its compiler. This run
|
|
112
|
+
uses cached local compiler dependencies through a temporary CLI wrapper and the
|
|
113
|
+
matching stdlib; no compiler/cache artifacts are committed. Reproduction with a
|
|
114
|
+
standard Kotlin CLI installation is documented in the fixture README.
|
|
115
|
+
|
|
116
|
+
Physical-device debugging, other Kotlin/compiler versions,
|
|
117
|
+
coroutines, inline/suspend functions, optimization/obfuscation and hosted CI are
|
|
118
|
+
unrun. iOS runtime debugging remains unsupported. Only fixed synthetic fixture
|
|
119
|
+
values are included; no private app values are used or published.
|