File tree Expand file tree Collapse file tree 9 files changed +22
-13
lines changed
Expand file tree Collapse file tree 9 files changed +22
-13
lines changed Original file line number Diff line number Diff line change 5656 "husky" : " 9.1.7" ,
5757 "minimist" : " 1.2.5" ,
5858 "nano-staged" : " ^0.8.0" ,
59- "nx" : " 21 .1.2 " ,
59+ "nx" : " 22 .1.3 " ,
6060 "prettier" : " ^3.6.2" ,
6161 "pretty-quick" : " 3.1.3" ,
6262 "semver" : " 7.5.2" ,
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export default defineConfig({
2424 } ,
2525 '@silvia-odwyer/photon' ,
2626 '@silvia-odwyer/photon-node' ,
27+ '@modelcontextprotocol/sdk' ,
2728 ] ,
2829 } ,
2930 lib : [
Original file line number Diff line number Diff line change 11import { BaseMCPServer } from '@midscene/shared/mcp' ;
2- import { version } from '../package.json' ;
32import { AndroidMidsceneTools } from './android-tools.js' ;
43
4+ declare const __VERSION__ : string ;
5+
56/**
67 * Android MCP Server
78 * Provides MCP tools for Android automation through ADB
@@ -10,7 +11,7 @@ export class AndroidMCPServer extends BaseMCPServer {
1011 constructor ( ) {
1112 super ( {
1213 name : '@midscene/android-mcp' ,
13- version,
14+ version : __VERSION__ ,
1415 description : 'Midscene MCP Server for Android automation' ,
1516 } ) ;
1617 }
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export default defineConfig({
2424 } ,
2525 '@silvia-odwyer/photon' ,
2626 '@silvia-odwyer/photon-node' ,
27+ '@modelcontextprotocol/sdk' ,
2728 ] ,
2829 } ,
2930 lib : [
Original file line number Diff line number Diff line change 11import { BaseMCPServer } from '@midscene/shared/mcp' ;
2- import { version } from '../package.json' ;
32import { IOSMidsceneTools } from './ios-tools.js' ;
43
4+ declare const __VERSION__ : string ;
5+
56/**
67 * iOS MCP Server
78 * Provides MCP tools for iOS automation through WebDriverAgent
@@ -10,7 +11,7 @@ export class IOSMCPServer extends BaseMCPServer {
1011 constructor ( ) {
1112 super ( {
1213 name : '@midscene/ios-mcp' ,
13- version,
14+ version : __VERSION__ ,
1415 description : 'Midscene MCP Server for iOS automation' ,
1516 } ) ;
1617 }
Original file line number Diff line number Diff line change @@ -64,11 +64,19 @@ export abstract class BaseMidsceneTools implements IMidsceneTools {
6464 } catch ( error ) {
6565 // Layer 2: Create temporary device instance to read actionSpace
6666 // This is expected behavior for bridge mode without URL or unconnected devices
67- const errorMessage = error instanceof Error ? error . message : String ( error ) ;
68- if ( errorMessage . includes ( 'requires a URL' ) || errorMessage . includes ( 'web_connect' ) ) {
69- debug ( 'Bridge mode detected - agent will be initialized on first web_connect call' ) ;
67+ const errorMessage =
68+ error instanceof Error ? error . message : String ( error ) ;
69+ if (
70+ errorMessage . includes ( 'requires a URL' ) ||
71+ errorMessage . includes ( 'web_connect' )
72+ ) {
73+ debug (
74+ 'Bridge mode detected - agent will be initialized on first web_connect call' ,
75+ ) ;
7076 } else {
71- debug ( 'Agent not available yet, using temporary device for action space' ) ;
77+ debug (
78+ 'Agent not available yet, using temporary device for action space' ,
79+ ) ;
7280 }
7381 const tempDevice = this . createTemporaryDevice ( ) ;
7482 actionSpace = tempDevice . actionSpace ( ) ;
Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ export function generateToolsFromActionSpace(
4747 ) => Promise < void > ;
4848 }
4949 ) . aiAction ( `Use the action "${ action . name } "` , {
50- planType : action . name ,
5150 ...args ,
5251 } ) ;
5352 }
@@ -143,6 +142,7 @@ export function generateCommonTools(
143142
144143 return {
145144 content : [ { type : 'text' , text : `Condition met: "${ assertion } "` } ] ,
145+ isError : false ,
146146 } ;
147147 } ,
148148 autoDestroy : true ,
Original file line number Diff line number Diff line change 2525 "inspect" : " node scripts/inspect.mjs"
2626 },
2727 "devDependencies" : {
28- "@midscene/android" : " workspace:*" ,
2928 "@midscene/core" : " workspace:*" ,
3029 "@midscene/report" : " workspace:*" ,
3130 "@midscene/shared" : " workspace:*" ,
Original file line number Diff line number Diff line change @@ -24,8 +24,6 @@ export default defineConfig({
2424 } ,
2525 '@silvia-odwyer/photon' ,
2626 '@silvia-odwyer/photon-node' ,
27- // External workspace dependencies
28- / ^ @ m i d s c e n e \/ .* / ,
2927 '@modelcontextprotocol/sdk' ,
3028 ] ,
3129 } ,
You can’t perform that action at this time.
0 commit comments