docker-flutter-ios-simulator-mcp 0.1.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.
Files changed (80) hide show
  1. package/CLAUDE.md +74 -0
  2. package/LICENSE +21 -0
  3. package/README.md +370 -0
  4. package/dist/flutter/log-buffer.d.ts +14 -0
  5. package/dist/flutter/log-buffer.d.ts.map +1 -0
  6. package/dist/flutter/log-buffer.js +49 -0
  7. package/dist/flutter/log-buffer.js.map +1 -0
  8. package/dist/flutter/process.d.ts +30 -0
  9. package/dist/flutter/process.d.ts.map +1 -0
  10. package/dist/flutter/process.js +241 -0
  11. package/dist/flutter/process.js.map +1 -0
  12. package/dist/flutter/types.d.ts +31 -0
  13. package/dist/flutter/types.d.ts.map +1 -0
  14. package/dist/flutter/types.js +2 -0
  15. package/dist/flutter/types.js.map +1 -0
  16. package/dist/index.d.ts +3 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +207 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/server.d.ts +3 -0
  21. package/dist/server.d.ts.map +1 -0
  22. package/dist/server.js +18 -0
  23. package/dist/server.js.map +1 -0
  24. package/dist/session/manager.d.ts +74 -0
  25. package/dist/session/manager.d.ts.map +1 -0
  26. package/dist/session/manager.js +209 -0
  27. package/dist/session/manager.js.map +1 -0
  28. package/dist/session/state.d.ts +14 -0
  29. package/dist/session/state.d.ts.map +1 -0
  30. package/dist/session/state.js +42 -0
  31. package/dist/session/state.js.map +1 -0
  32. package/dist/session/types.d.ts +26 -0
  33. package/dist/session/types.d.ts.map +1 -0
  34. package/dist/session/types.js +2 -0
  35. package/dist/session/types.js.map +1 -0
  36. package/dist/simulator/idb.d.ts +42 -0
  37. package/dist/simulator/idb.d.ts.map +1 -0
  38. package/dist/simulator/idb.js +127 -0
  39. package/dist/simulator/idb.js.map +1 -0
  40. package/dist/simulator/simctl.d.ts +9 -0
  41. package/dist/simulator/simctl.d.ts.map +1 -0
  42. package/dist/simulator/simctl.js +96 -0
  43. package/dist/simulator/simctl.js.map +1 -0
  44. package/dist/simulator/types.d.ts +25 -0
  45. package/dist/simulator/types.d.ts.map +1 -0
  46. package/dist/simulator/types.js +2 -0
  47. package/dist/simulator/types.js.map +1 -0
  48. package/dist/tools/flutter-commands.d.ts +128 -0
  49. package/dist/tools/flutter-commands.d.ts.map +1 -0
  50. package/dist/tools/flutter-commands.js +275 -0
  51. package/dist/tools/flutter-commands.js.map +1 -0
  52. package/dist/tools/index.d.ts +3 -0
  53. package/dist/tools/index.d.ts.map +1 -0
  54. package/dist/tools/index.js +499 -0
  55. package/dist/tools/index.js.map +1 -0
  56. package/dist/tools/session.d.ts +38 -0
  57. package/dist/tools/session.d.ts.map +1 -0
  58. package/dist/tools/session.js +40 -0
  59. package/dist/tools/session.js.map +1 -0
  60. package/dist/tools/simulator-ui.d.ts +102 -0
  61. package/dist/tools/simulator-ui.d.ts.map +1 -0
  62. package/dist/tools/simulator-ui.js +117 -0
  63. package/dist/tools/simulator-ui.js.map +1 -0
  64. package/dist/tools/simulator.d.ts +7 -0
  65. package/dist/tools/simulator.d.ts.map +1 -0
  66. package/dist/tools/simulator.js +8 -0
  67. package/dist/tools/simulator.js.map +1 -0
  68. package/dist/transport.d.ts +4 -0
  69. package/dist/transport.d.ts.map +1 -0
  70. package/dist/transport.js +20 -0
  71. package/dist/transport.js.map +1 -0
  72. package/dist/utils/exec.d.ts +29 -0
  73. package/dist/utils/exec.d.ts.map +1 -0
  74. package/dist/utils/exec.js +109 -0
  75. package/dist/utils/exec.js.map +1 -0
  76. package/dist/utils/logger.d.ts +17 -0
  77. package/dist/utils/logger.d.ts.map +1 -0
  78. package/dist/utils/logger.js +60 -0
  79. package/dist/utils/logger.js.map +1 -0
  80. package/package.json +76 -0
@@ -0,0 +1,499 @@
1
+ import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
2
+ import { sessionStartSchema, sessionEndSchema, handleSessionStart, handleSessionEnd, handleSessionList, } from './session.js';
3
+ import { handleSimulatorList } from './simulator.js';
4
+ import { flutterRunSchema, flutterCommandSchema, flutterLogsSchema, flutterBuildSchema, flutterTestSchema, flutterCleanSchema, handleFlutterRun, handleFlutterStop, handleFlutterHotReload, handleFlutterHotRestart, handleFlutterLogs, handleFlutterBuild, handleFlutterTest, handleFlutterClean, } from './flutter-commands.js';
5
+ import { uiTapSchema, uiTypeSchema, uiSwipeSchema, uiDescribeAllSchema, uiDescribePointSchema, screenshotSchema, handleUiTap, handleUiType, handleUiSwipe, handleUiDescribeAll, handleUiDescribePoint, handleScreenshot, } from './simulator-ui.js';
6
+ import { logger } from '../utils/logger.js';
7
+ export function registerTools(mcpServer) {
8
+ const server = mcpServer.server;
9
+ server.setRequestHandler(ListToolsRequestSchema, () => ({
10
+ tools: [
11
+ {
12
+ name: 'session_start',
13
+ description: 'Start a new Flutter development session. Creates and boots an iOS simulator, associates it with your Flutter project directory. This is always the first step - you must create a session before running Flutter or interacting with the simulator. Returns session ID (use this for all subsequent operations) and simulator UDID.',
14
+ inputSchema: {
15
+ type: 'object',
16
+ properties: {
17
+ worktreePath: {
18
+ type: 'string',
19
+ description: 'Absolute path to your Flutter project directory (the folder containing pubspec.yaml)',
20
+ },
21
+ deviceType: {
22
+ type: 'string',
23
+ description: 'iOS device type to simulate (e.g., "iPhone 16 Pro", "iPhone 15", "iPad Pro"). Defaults to "iPhone 16 Pro". Use simulator_list to see available types.',
24
+ },
25
+ },
26
+ required: ['worktreePath'],
27
+ },
28
+ },
29
+ {
30
+ name: 'session_end',
31
+ description: 'Clean up and end a Flutter development session. Gracefully stops the Flutter app, shuts down the simulator, and deletes it. Always call this when done to avoid leaving orphaned simulators running. Required before starting a new session for the same project.',
32
+ inputSchema: {
33
+ type: 'object',
34
+ properties: {
35
+ sessionId: {
36
+ type: 'string',
37
+ description: 'Session ID from session_start',
38
+ },
39
+ },
40
+ required: ['sessionId'],
41
+ },
42
+ },
43
+ {
44
+ name: 'session_list',
45
+ description: 'List all currently active Flutter development sessions. Shows session IDs, project paths, simulator UDIDs, and device types. Useful for checking what sessions are running or finding a session ID you forgot.',
46
+ inputSchema: {
47
+ type: 'object',
48
+ properties: {},
49
+ },
50
+ },
51
+ {
52
+ name: 'simulator_list',
53
+ description: 'List all available iOS device types that can be used for simulator creation. Use this to see valid options for the deviceType parameter in session_start (e.g., "iPhone 16 Pro", "iPhone 15", "iPad Pro 12.9-inch").',
54
+ inputSchema: {
55
+ type: 'object',
56
+ properties: {},
57
+ },
58
+ },
59
+ {
60
+ name: 'flutter_run',
61
+ description: 'Build and launch the Flutter app on the simulator. This starts the Flutter development server and runs your app. Returns immediately with process info - the app builds in the background. Use flutter_logs to monitor build progress and see any errors. First build may take 1-2 minutes.',
62
+ inputSchema: {
63
+ type: 'object',
64
+ properties: {
65
+ sessionId: {
66
+ type: 'string',
67
+ description: 'Session ID from session_start',
68
+ },
69
+ target: {
70
+ type: 'string',
71
+ description: 'Target entry point file (e.g., "lib/main.dart"). Defaults to lib/main.dart if not specified.',
72
+ },
73
+ flavor: {
74
+ type: 'string',
75
+ description: 'Build flavor for multi-flavor apps (e.g., "dev", "prod")',
76
+ },
77
+ additionalArgs: {
78
+ type: 'array',
79
+ items: { type: 'string' },
80
+ description: 'Additional Flutter CLI arguments',
81
+ },
82
+ },
83
+ required: ['sessionId'],
84
+ },
85
+ },
86
+ {
87
+ name: 'flutter_stop',
88
+ description: 'Stop the running Flutter app gracefully. Use this before ending the session or when you need to restart the app completely.',
89
+ inputSchema: {
90
+ type: 'object',
91
+ properties: {
92
+ sessionId: {
93
+ type: 'string',
94
+ description: 'Session ID from session_start',
95
+ },
96
+ },
97
+ required: ['sessionId'],
98
+ },
99
+ },
100
+ {
101
+ name: 'flutter_hot_reload',
102
+ description: 'Perform a hot reload - quickly inject updated code into the running app while preserving state. Use this after making code changes to see them instantly without restarting. Faster than hot restart but cannot handle certain changes (new dependencies, native code, etc).',
103
+ inputSchema: {
104
+ type: 'object',
105
+ properties: {
106
+ sessionId: {
107
+ type: 'string',
108
+ description: 'Session ID from session_start',
109
+ },
110
+ },
111
+ required: ['sessionId'],
112
+ },
113
+ },
114
+ {
115
+ name: 'flutter_hot_restart',
116
+ description: 'Perform a hot restart - restart the app from scratch while keeping the same build. Slower than hot reload but handles more types of changes. Use when hot reload fails or when you need to reset app state.',
117
+ inputSchema: {
118
+ type: 'object',
119
+ properties: {
120
+ sessionId: {
121
+ type: 'string',
122
+ description: 'Session ID from session_start',
123
+ },
124
+ },
125
+ required: ['sessionId'],
126
+ },
127
+ },
128
+ {
129
+ name: 'flutter_logs',
130
+ description: 'Retrieve Flutter build output and app logs. Logs are buffered in memory - use fromIndex to poll for new logs since your last check. Essential for monitoring build progress, debugging errors, and seeing app output (print statements, exceptions, etc).',
131
+ inputSchema: {
132
+ type: 'object',
133
+ properties: {
134
+ sessionId: {
135
+ type: 'string',
136
+ description: 'Session ID from session_start',
137
+ },
138
+ fromIndex: {
139
+ type: 'number',
140
+ description: 'Start reading from this log line index. Use the nextIndex from previous response to get only new logs. Omit to get all logs from the beginning.',
141
+ },
142
+ limit: {
143
+ type: 'number',
144
+ description: 'Maximum number of log lines to return (default: 100). Use smaller values for frequent polling.',
145
+ },
146
+ },
147
+ required: ['sessionId'],
148
+ },
149
+ },
150
+ {
151
+ name: 'flutter_build',
152
+ description: 'Build the Flutter app for iOS without running it. This is a one-shot command that compiles the app and returns the full build output. Useful for verifying builds succeed before deployment or testing. Unlike flutter_run, this does not start an ongoing process.',
153
+ inputSchema: {
154
+ type: 'object',
155
+ properties: {
156
+ sessionId: {
157
+ type: 'string',
158
+ description: 'Session ID from session_start',
159
+ },
160
+ flavor: {
161
+ type: 'string',
162
+ description: 'Build flavor (e.g., "dev", "prod")',
163
+ },
164
+ additionalArgs: {
165
+ type: 'array',
166
+ items: { type: 'string' },
167
+ description: 'Additional Flutter build arguments (e.g., ["--release", "--no-tree-shake-icons"])',
168
+ },
169
+ },
170
+ required: ['sessionId'],
171
+ },
172
+ },
173
+ {
174
+ name: 'flutter_test',
175
+ description: 'Run Flutter tests and return the results. This executes all tests (or specific test files if path is provided) and returns the complete test output including pass/fail status. Useful for continuous integration and verifying code quality.',
176
+ inputSchema: {
177
+ type: 'object',
178
+ properties: {
179
+ sessionId: {
180
+ type: 'string',
181
+ description: 'Session ID from session_start',
182
+ },
183
+ path: {
184
+ type: 'string',
185
+ description: 'Optional path to specific test file or directory (e.g., "test/widget_test.dart"). If omitted, runs all tests.',
186
+ },
187
+ additionalArgs: {
188
+ type: 'array',
189
+ items: { type: 'string' },
190
+ description: 'Additional Flutter test arguments (e.g., ["--coverage", "--reporter=json"])',
191
+ },
192
+ },
193
+ required: ['sessionId'],
194
+ },
195
+ },
196
+ {
197
+ name: 'flutter_clean',
198
+ description: 'Clean the Flutter project build cache and remove build artifacts. This removes the build/ directory and other cached files. Useful when builds fail or when switching between branches with different dependencies. Returns the output of the clean operation.',
199
+ inputSchema: {
200
+ type: 'object',
201
+ properties: {
202
+ sessionId: {
203
+ type: 'string',
204
+ description: 'Session ID from session_start',
205
+ },
206
+ },
207
+ required: ['sessionId'],
208
+ },
209
+ },
210
+ {
211
+ name: 'ui_tap',
212
+ description: 'Simulate a tap/touch on the simulator screen at specific coordinates. Use to interact with buttons, text fields, or any tappable UI element. Take a screenshot first to identify coordinates. Add duration for long press gestures.',
213
+ inputSchema: {
214
+ type: 'object',
215
+ properties: {
216
+ sessionId: {
217
+ type: 'string',
218
+ description: 'Session ID from session_start',
219
+ },
220
+ x: {
221
+ type: 'number',
222
+ description: 'X coordinate in points (horizontal position, 0=left edge)',
223
+ },
224
+ y: {
225
+ type: 'number',
226
+ description: 'Y coordinate in points (vertical position, 0=top edge)',
227
+ },
228
+ duration: {
229
+ type: 'number',
230
+ description: 'Hold duration in seconds for long press. Omit for regular tap.',
231
+ },
232
+ },
233
+ required: ['sessionId', 'x', 'y'],
234
+ },
235
+ },
236
+ {
237
+ name: 'ui_type',
238
+ description: 'Type text into the currently focused text field on the simulator. Tap on a text field first to focus it, then use this to enter text. Works for text fields, text areas, search boxes, etc.',
239
+ inputSchema: {
240
+ type: 'object',
241
+ properties: {
242
+ sessionId: {
243
+ type: 'string',
244
+ description: 'Session ID from session_start',
245
+ },
246
+ text: {
247
+ type: 'string',
248
+ description: 'Text to type into the focused field',
249
+ },
250
+ },
251
+ required: ['sessionId', 'text'],
252
+ },
253
+ },
254
+ {
255
+ name: 'ui_swipe',
256
+ description: 'Simulate a swipe gesture on the simulator screen. Use for scrolling, swiping between pages, pull-to-refresh, dismissing items, etc. Specify start and end coordinates to control direction and distance.',
257
+ inputSchema: {
258
+ type: 'object',
259
+ properties: {
260
+ sessionId: {
261
+ type: 'string',
262
+ description: 'Session ID from session_start',
263
+ },
264
+ x_start: {
265
+ type: 'number',
266
+ description: 'Starting X coordinate in points',
267
+ },
268
+ y_start: {
269
+ type: 'number',
270
+ description: 'Starting Y coordinate in points',
271
+ },
272
+ x_end: {
273
+ type: 'number',
274
+ description: 'Ending X coordinate in points',
275
+ },
276
+ y_end: {
277
+ type: 'number',
278
+ description: 'Ending Y coordinate in points',
279
+ },
280
+ duration: {
281
+ type: 'number',
282
+ description: 'Swipe duration in seconds. Slower swipes feel more natural.',
283
+ },
284
+ },
285
+ required: ['sessionId', 'x_start', 'y_start', 'x_end', 'y_end'],
286
+ },
287
+ },
288
+ {
289
+ name: 'ui_describe_all',
290
+ description: 'Get the complete accessibility tree for everything currently visible on screen. Returns detailed information about all UI elements including labels, roles, positions, and hierarchy. Use this to understand the screen structure and find elements to interact with.',
291
+ inputSchema: {
292
+ type: 'object',
293
+ properties: {
294
+ sessionId: {
295
+ type: 'string',
296
+ description: 'Session ID from session_start',
297
+ },
298
+ },
299
+ required: ['sessionId'],
300
+ },
301
+ },
302
+ {
303
+ name: 'ui_describe_point',
304
+ description: 'Get accessibility information for the specific UI element at given coordinates. Returns details about what element is at that position - useful for identifying buttons, labels, or interactive elements before tapping.',
305
+ inputSchema: {
306
+ type: 'object',
307
+ properties: {
308
+ sessionId: {
309
+ type: 'string',
310
+ description: 'Session ID from session_start',
311
+ },
312
+ x: {
313
+ type: 'number',
314
+ description: 'X coordinate in points to inspect',
315
+ },
316
+ y: {
317
+ type: 'number',
318
+ description: 'Y coordinate in points to inspect',
319
+ },
320
+ },
321
+ required: ['sessionId', 'x', 'y'],
322
+ },
323
+ },
324
+ {
325
+ name: 'screenshot',
326
+ description: 'Capture a screenshot of the current simulator screen. Returns the image directly in the response as PNG data - you will see the image automatically (no need to save to file). Essential for understanding what is currently displayed and identifying UI elements for interaction. Works seamlessly from Docker containers.',
327
+ inputSchema: {
328
+ type: 'object',
329
+ properties: {
330
+ sessionId: {
331
+ type: 'string',
332
+ description: 'Session ID from session_start',
333
+ },
334
+ },
335
+ required: ['sessionId'],
336
+ },
337
+ },
338
+ ],
339
+ }));
340
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
341
+ const { name, arguments: args } = request.params;
342
+ logger.info('Tool called', { name, args });
343
+ try {
344
+ switch (name) {
345
+ case 'session_start': {
346
+ const parsed = sessionStartSchema.parse(args);
347
+ const result = await handleSessionStart(parsed);
348
+ return {
349
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
350
+ };
351
+ }
352
+ case 'session_end': {
353
+ const parsed = sessionEndSchema.parse(args);
354
+ const result = await handleSessionEnd(parsed);
355
+ return {
356
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
357
+ };
358
+ }
359
+ case 'session_list': {
360
+ const result = handleSessionList();
361
+ return {
362
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
363
+ };
364
+ }
365
+ case 'simulator_list': {
366
+ const result = await handleSimulatorList();
367
+ return {
368
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
369
+ };
370
+ }
371
+ case 'flutter_run': {
372
+ const parsed = flutterRunSchema.parse(args);
373
+ const result = await handleFlutterRun(parsed);
374
+ return {
375
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
376
+ };
377
+ }
378
+ case 'flutter_stop': {
379
+ const parsed = flutterCommandSchema.parse(args);
380
+ const result = handleFlutterStop(parsed);
381
+ return {
382
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
383
+ };
384
+ }
385
+ case 'flutter_hot_reload': {
386
+ const parsed = flutterCommandSchema.parse(args);
387
+ const result = handleFlutterHotReload(parsed);
388
+ return {
389
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
390
+ };
391
+ }
392
+ case 'flutter_hot_restart': {
393
+ const parsed = flutterCommandSchema.parse(args);
394
+ const result = handleFlutterHotRestart(parsed);
395
+ return {
396
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
397
+ };
398
+ }
399
+ case 'flutter_logs': {
400
+ const parsed = flutterLogsSchema.parse(args);
401
+ const result = handleFlutterLogs(parsed);
402
+ return {
403
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
404
+ };
405
+ }
406
+ case 'flutter_build': {
407
+ const parsed = flutterBuildSchema.parse(args);
408
+ const result = await handleFlutterBuild(parsed);
409
+ return {
410
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
411
+ };
412
+ }
413
+ case 'flutter_test': {
414
+ const parsed = flutterTestSchema.parse(args);
415
+ const result = await handleFlutterTest(parsed);
416
+ return {
417
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
418
+ };
419
+ }
420
+ case 'flutter_clean': {
421
+ const parsed = flutterCleanSchema.parse(args);
422
+ const result = await handleFlutterClean(parsed);
423
+ return {
424
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
425
+ };
426
+ }
427
+ case 'ui_tap': {
428
+ const parsed = uiTapSchema.parse(args);
429
+ const result = await handleUiTap(parsed);
430
+ return {
431
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
432
+ };
433
+ }
434
+ case 'ui_type': {
435
+ const parsed = uiTypeSchema.parse(args);
436
+ const result = await handleUiType(parsed);
437
+ return {
438
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
439
+ };
440
+ }
441
+ case 'ui_swipe': {
442
+ const parsed = uiSwipeSchema.parse(args);
443
+ const result = await handleUiSwipe(parsed);
444
+ return {
445
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
446
+ };
447
+ }
448
+ case 'ui_describe_all': {
449
+ const parsed = uiDescribeAllSchema.parse(args);
450
+ const result = await handleUiDescribeAll(parsed);
451
+ return {
452
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
453
+ };
454
+ }
455
+ case 'ui_describe_point': {
456
+ const parsed = uiDescribePointSchema.parse(args);
457
+ const result = await handleUiDescribePoint(parsed);
458
+ return {
459
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
460
+ };
461
+ }
462
+ case 'screenshot': {
463
+ const parsed = screenshotSchema.parse(args);
464
+ const result = await handleScreenshot(parsed);
465
+ return {
466
+ content: [
467
+ {
468
+ type: 'image',
469
+ data: result.imageData,
470
+ mimeType: 'image/png',
471
+ },
472
+ {
473
+ type: 'text',
474
+ text: `Screenshot captured: ${result.path}\nSize: ${String(result.imageData.length)} bytes (base64)`,
475
+ },
476
+ ],
477
+ };
478
+ }
479
+ default:
480
+ throw new Error(`Unknown tool: ${name}`);
481
+ }
482
+ }
483
+ catch (error) {
484
+ const errorMessage = error instanceof Error ? error.message : String(error);
485
+ logger.error('Tool error', { name, error: errorMessage });
486
+ return {
487
+ content: [
488
+ {
489
+ type: 'text',
490
+ text: JSON.stringify({ error: errorMessage }, null, 2),
491
+ },
492
+ ],
493
+ isError: true,
494
+ };
495
+ }
496
+ });
497
+ logger.info('Tools registered');
498
+ }
499
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACnG,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,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ED;oBACE,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,YAAY,GAChB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACzD,MAAM,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;YAC1D,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;qBACvD;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { z } from 'zod';
2
+ export declare const sessionStartSchema: z.ZodObject<{
3
+ worktreePath: z.ZodString;
4
+ deviceType: z.ZodOptional<z.ZodString>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ worktreePath: string;
7
+ deviceType?: string | undefined;
8
+ }, {
9
+ worktreePath: string;
10
+ deviceType?: string | undefined;
11
+ }>;
12
+ export declare const sessionEndSchema: z.ZodObject<{
13
+ sessionId: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ sessionId: string;
16
+ }, {
17
+ sessionId: string;
18
+ }>;
19
+ export declare function handleSessionStart(args: z.infer<typeof sessionStartSchema>): Promise<{
20
+ sessionId: string;
21
+ simulatorUdid: string;
22
+ deviceType: string;
23
+ worktreePath: string;
24
+ }>;
25
+ export declare function handleSessionEnd(args: z.infer<typeof sessionEndSchema>): Promise<{
26
+ success: boolean;
27
+ message: string;
28
+ }>;
29
+ export declare function handleSessionList(): {
30
+ sessions: Array<{
31
+ id: string;
32
+ worktreePath: string;
33
+ simulatorUdid: string;
34
+ deviceType: string;
35
+ createdAt: string;
36
+ }>;
37
+ };
38
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/tools/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,kBAAkB;;;;;;;;;EAM7B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;EAE3B,CAAC;AAEH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,GACvC,OAAO,CAAC;IACT,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC,CAcD;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,GACrC,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAShD;AAED,wBAAgB,iBAAiB,IAAI;IACnC,QAAQ,EAAE,KAAK,CAAC;QACd,EAAE,EAAE,MAAM,CAAC;QACX,YAAY,EAAE,MAAM,CAAC;QACrB,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;CACJ,CAMA"}
@@ -0,0 +1,40 @@
1
+ import { z } from 'zod';
2
+ import { sessionManager } from '../session/manager.js';
3
+ import { logger } from '../utils/logger.js';
4
+ export const sessionStartSchema = z.object({
5
+ worktreePath: z.string().describe('Absolute path to Flutter project directory'),
6
+ deviceType: z
7
+ .string()
8
+ .optional()
9
+ .describe('iOS device type (e.g., "iPhone 16 Pro"). Defaults to "iPhone 16 Pro"'),
10
+ });
11
+ export const sessionEndSchema = z.object({
12
+ sessionId: z.string().describe('Session ID to end'),
13
+ });
14
+ export async function handleSessionStart(args) {
15
+ logger.info('Tool: session_start', args);
16
+ const session = await sessionManager.createSession({
17
+ worktreePath: args.worktreePath,
18
+ deviceType: args.deviceType,
19
+ });
20
+ return {
21
+ sessionId: session.id,
22
+ simulatorUdid: session.simulatorUdid,
23
+ deviceType: session.deviceType,
24
+ worktreePath: session.worktreePath,
25
+ };
26
+ }
27
+ export async function handleSessionEnd(args) {
28
+ logger.info('Tool: session_end', args);
29
+ await sessionManager.endSession(args.sessionId);
30
+ return {
31
+ success: true,
32
+ message: `Session ${args.sessionId} ended successfully`,
33
+ };
34
+ }
35
+ export function handleSessionList() {
36
+ logger.info('Tool: session_list');
37
+ const sessions = sessionManager.listSessions();
38
+ return { sessions };
39
+ }
40
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/tools/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;IAC/E,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,sEAAsE,CAAC;CACpF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,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