Repository navigation
chore: upgrade to @metamask/client-mcp-core 0.16.1 and @metamask/device-mcp 0.10.0 - #41237
Conversation
…etamask/device-mcp to ^0.10.0
….16.1 and @metamask/device-mcp 0.10.0
…m launch Core 0.16 keeps the metroPort and deviceId that launch() returns as the session's Hermes defaults, so the setHermesDefaults call is no longer needed.
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning MetaMask internal reviewing guidelines:
|
Smart E2E Test SelectionSelected E2E tags: No E2E tests selected AI Confidence: 90 E2E reasoningExpand to readThe PR bumps two dev-only packages, @metamask/client-mcp-core (0.15 to 0.16.1) and @metamask/device-mcp (0.9 to 0.10). It also updates the LLM workflow provider in tests/llm-workflow/, with its test and README. package.json and yarn.lock are flagged critical, but the diffs only touch these devDependencies, and the lockfile changes match. Nothing in app runtime code, the Engine, or the Detox/Appium smoke infrastructure changed. The provider change only moves how metroPort and deviceId are returned from launch, and it affects the LLM workflow tooling alone. No smoke tags are needed. |
|



Description
Releases: client-mcp-core v0.16.0, v0.16.1. Skill PR: MetaMask/skills#329. Previous bump: #40496 and MetaMask/skills#298.
Problem
Core 0.15.0 kept the launch Metro port for
cdponly when it came from the--metro-portflag. #40496 worked around it: the session manager called the driver'ssetHermesDefaultsitself, soMM_METRO_PORTwas kept too. Core 0.16.0 (#128) reads optionalmetroPortanddeviceIdfrom thelaunch()result instead. The workaround is now a second path to the same driver call.Solution
launch()returns the resolved values. Core applies them when the launch flags do not set them.flowchart TD A["MM_METRO_PORT=8085 yarn mm launch (no --metro-port)"] --> B["MetaMaskMobileSessionManager.launch"] B --> C["resolveMetroPort: flag ?? MM_METRO_PORT"] C --> D["adapter.launch(resolved)"] D --> E["return sessionId, extensionId, state, metroPort, deviceId"] E --> F["core launch: input.metroPort ?? result.metroPort"] F --> G["driver.setHermesDefaults (in core)"] G --> H["mm cdp / hermes-targets: session port 8085"] classDef new fill:#fff3cd,stroke:#d39e00 class E newYellow boxes are new.
What changes for agents (live, iOS and Android)
cdpafterMM_METRO_PORT=8085 launchlaunch()result);sessionMetroPort: 8085,connected: trueambiguousnodeclicktakes it: taps at the node's bounds,targetends in(bounds). Other target commands:MM_TARGET_NOT_FOUND, exit 4, with ahinttype <field> ""MM_TYPE_FAILEDtextLength: 0MM_DAEMON_NOT_RUNNINGMM_INVALID_INPUT, no daemon started--timeout abcMM_INVALID_INPUT(exit 3 with no daemon)mm launch --help.mm-daemon.logtestid=,ref=,method=)Decisions for reviewers
metroPortasresolved.metroPort(can beundefined)setHermesDefaultstests instead of adding new onessetHermesDefaults. One checks the no-port case.MM_TARGET_NOT_FOUNDrow onlyReview guide
tests/llm-workflow/metamask-provider.tssetHermesDefaultscall is gone;launch()returnsmetroPortanddeviceIdtests/llm-workflow/__tests__/metamask-provider.test.tstests/llm-workflow/README.mdMM_TARGET_NOT_FOUNDrowpackage.json,yarn.lock^0.16.1and^0.10.0onlyCommits
chore(llm-workflow): bump @metamask/client-mcp-core to ^0.16.1 and @metamask/device-mcp to ^0.10.0package.jsononly.chore(llm-workflow): update yarn.lock for …^0.10.0.refactor(llm-workflow): return the resolved Metro port and device from launchdocs(llm-workflow): document client-mcp-core 0.16.1 changesTest layer placement
Unit tests in
tests/llm-workflow/__tests__/metamask-provider.test.ts(the session manager is dev tooling with mocked adapters). The live check is the manual run below.Changelog
CHANGELOG entry: null
Related issues
Refs: https://github.com/MetaMask/client-mcp-core/releases/tag/v0.16.1, MetaMask/client-mcp-core#128, MetaMask/skills#329, #40496
Manual testing steps
Screenshots/Recordings
Before
N/A (dev tooling only)
After
N/A (dev tooling only). Evidence is the sanitized text output below (the wallet holds real funds, so no wallet screenshots).
Testing
yarn test:unit:llm-workflow: 16 suites, 222 tests pass.yarn lint:tscexit 0;yarn dedupe --checkexit 0; Prettier, oxlint and ESLint on the changed files pass (oxlint reports two existing warnings on lines this PR does not touch).yarn.lockhas one@metamask/client-mcp-coreentry (0.16.1) and one@metamask/device-mcpentry (0.10.0). device-mcp resolves to 0.10.0 from the app root and from core.Live, read only, dev client on Metro 8085, real-funds wallet. Nothing was sent, signed or confirmed.
Medium_Phone_API_36.1)MM_METRO_PORT=8085 launch, no--metro-port, thenhermes-targetssessionMetroPort: 8085sessionMetroPort: 8085cdp1+1on the session portvalue: 2,connected: truevalue: 2,connected: truecdp --metro-port 8099MM_CDP_FAILED, message names port 8099get-text,wait-for,type,scroll-to-element,long-press,run-stepsMM_TARGET_NOT_FOUND, exit 4,hintwait-for,long-press)clickon an unnamed reftarget: "a11yRef:e17 (bounds)"target: "a11yRef:e8 (bounds)"type <field> ""textLength: 0textLength: 0frobnicate,launch --platform foo,--timeout abc,launch --help--timeout abcexit 2testid=…,ref=…,method=Runtime.evaluatecleanup,stopPre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Dev-only dependency bump and a small session-manager contract change for the
mmCLI; no production app code is modified.Overview
Upgrades the visual testing /
yarn mmworkflow dev dependencies to@metamask/client-mcp-core0.16.1 and@metamask/device-mcp0.10.0 (package.json+ lockfile).MetaMaskMobileSessionManager.launch()no longer calls the driver'ssetHermesDefaultsworkaround from the prior core bump; it now returnsmetroPortanddeviceIdfrom the resolved launch so core can wire Hermes/CDP (mm cdp,hermes-targets) when onlyMM_METRO_PORTis set. Unit tests were updated to assert the returned fields and thatsetHermesDefaultsis not invoked.The llm-workflow README records the new package versions, notes the iOS
type ""behavior via device-mcp, and expandsMM_TARGET_NOT_FOUNDguidance (ambiguous refs areclick-only; other commands get a hint).No application/runtime code changes—only
tests/llm-workflowand dev dependency versions.Reviewed by Cursor Bugbot for commit ccaeb35. Configure here.