Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ either, those tools fall back to `HERMES_METRO_PORT`, then `8081`.

Core captures `sessionManager.getPlatformDriver?.()` before calling the consumer's `cleanup()`, then calls the driver's optional `dispose()` hook. Disposal runs even when consumer cleanup fails. This applies to `mm cleanup`, forced relaunch, failed launch, daemon shutdown, and server startup rollback. A failed disposal fails that cleanup call and is retained for a later attempt. The daemon owns that retention (one per `createServer` instance), so a later `mm cleanup`, forced relaunch, or daemon stop retries it, whatever wrapper of the session manager a tool receives. Only the current session's cleanup and disposal can fail a call. Drivers retained from earlier sessions are retried best-effort and in parallel. When they fail again, the daemon writes a `[WARN]` line to its log, and the current cleanup or launch continues. Tools reach this retention through `ToolContext.cleanupSession()`; without it (a context built outside the daemon), the tools fall back to retention per session-manager object.

`MobilePlatformDriver.dispose()` delegates to its backend's optional `dispose()` hook. Core depends on `@metamask/device-mcp` ^0.9.0, so the consumer must create its backend from the same ^0.9.0 range: the Android fixes and the `dispose()` hook live in the consumer's copy of device-mcp. On iOS, the device-mcp `IdbBackend` uses a private IDB companion per backend, and disposal stops only that backend's companion and recording. The ADB backend has no disposal hook, so disposal does nothing on Android.
`MobilePlatformDriver.dispose()` delegates to its backend's optional `dispose()` hook. Core depends on `@metamask/device-mcp` ^0.10.0, so the consumer must create its backend from the same ^0.10.0 range: the device-mcp fixes and the `dispose()` hook live in the consumer's copy of device-mcp. On iOS, the device-mcp `IdbBackend` uses a private IDB companion per backend, and disposal stops only that backend's companion and recording. The ADB backend has no disposal hook, so disposal does nothing on Android.

Consumers must expose a session-owned driver through `getPlatformDriver()` and create a fresh driver/backend for each launch. If launch fails before the driver is exposed, the consumer must dispose that locally held driver in its own failure path. Direct calls to a consumer's `cleanup()` also remain the consumer's responsibility.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"hono": "^4.12.25"
},
"dependencies": {
"@metamask/device-mcp": "^0.9.0",
"@metamask/device-mcp": "^0.10.0",
"cosmiconfig": "^9.0.0",
"express": "^5.2.1",
"zod": "^4.4.3"
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ __metadata:
"@lavamoat/allow-scripts": "npm:^3.0.4"
"@lavamoat/preinstall-always-fail": "npm:^2.0.0"
"@metamask/auto-changelog": "npm:^5.3.0"
"@metamask/device-mcp": "npm:^0.9.0"
"@metamask/device-mcp": "npm:^0.10.0"
"@metamask/eslint-config": "npm:^15.0.0"
"@metamask/eslint-config-nodejs": "npm:^15.0.0"
"@metamask/eslint-config-typescript": "npm:^15.0.0"
Expand Down Expand Up @@ -968,15 +968,15 @@ __metadata:
languageName: unknown
linkType: soft

"@metamask/device-mcp@npm:^0.9.0":
version: 0.9.0
resolution: "@metamask/device-mcp@npm:0.9.0"
"@metamask/device-mcp@npm:^0.10.0":
version: 0.10.0
resolution: "@metamask/device-mcp@npm:0.10.0"
dependencies:
"@modelcontextprotocol/sdk": "npm:^1.32.0"
zod: "npm:^4.6.6"
bin:
device-mcp: ./dist/cli/device-mcp.mjs
checksum: 10/edffb339e331a1b2f7ad175ca24d277dfc08e75d4f7e7dcf14a1c72ab0abb659783e4025b72934386af135d0b9cbaabaa2ba2962336f0b646b29a29d51b5bdf5
checksum: 10/6e028567cb1d63d0777be410cf6f31838d5a645bf1c53d738ef895b105bd47abf361350625d7a93dba374c8a27b62546838e571d2a890ad1eb27a749d0bc015e
languageName: node
linkType: hard

Expand Down
Loading