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.
- package/CLAUDE.md +74 -0
- package/LICENSE +21 -0
- package/README.md +370 -0
- package/dist/flutter/log-buffer.d.ts +14 -0
- package/dist/flutter/log-buffer.d.ts.map +1 -0
- package/dist/flutter/log-buffer.js +49 -0
- package/dist/flutter/log-buffer.js.map +1 -0
- package/dist/flutter/process.d.ts +30 -0
- package/dist/flutter/process.d.ts.map +1 -0
- package/dist/flutter/process.js +241 -0
- package/dist/flutter/process.js.map +1 -0
- package/dist/flutter/types.d.ts +31 -0
- package/dist/flutter/types.d.ts.map +1 -0
- package/dist/flutter/types.js +2 -0
- package/dist/flutter/types.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +207 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +18 -0
- package/dist/server.js.map +1 -0
- package/dist/session/manager.d.ts +74 -0
- package/dist/session/manager.d.ts.map +1 -0
- package/dist/session/manager.js +209 -0
- package/dist/session/manager.js.map +1 -0
- package/dist/session/state.d.ts +14 -0
- package/dist/session/state.d.ts.map +1 -0
- package/dist/session/state.js +42 -0
- package/dist/session/state.js.map +1 -0
- package/dist/session/types.d.ts +26 -0
- package/dist/session/types.d.ts.map +1 -0
- package/dist/session/types.js +2 -0
- package/dist/session/types.js.map +1 -0
- package/dist/simulator/idb.d.ts +42 -0
- package/dist/simulator/idb.d.ts.map +1 -0
- package/dist/simulator/idb.js +127 -0
- package/dist/simulator/idb.js.map +1 -0
- package/dist/simulator/simctl.d.ts +9 -0
- package/dist/simulator/simctl.d.ts.map +1 -0
- package/dist/simulator/simctl.js +96 -0
- package/dist/simulator/simctl.js.map +1 -0
- package/dist/simulator/types.d.ts +25 -0
- package/dist/simulator/types.d.ts.map +1 -0
- package/dist/simulator/types.js +2 -0
- package/dist/simulator/types.js.map +1 -0
- package/dist/tools/flutter-commands.d.ts +128 -0
- package/dist/tools/flutter-commands.d.ts.map +1 -0
- package/dist/tools/flutter-commands.js +275 -0
- package/dist/tools/flutter-commands.js.map +1 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +499 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/session.d.ts +38 -0
- package/dist/tools/session.d.ts.map +1 -0
- package/dist/tools/session.js +40 -0
- package/dist/tools/session.js.map +1 -0
- package/dist/tools/simulator-ui.d.ts +102 -0
- package/dist/tools/simulator-ui.d.ts.map +1 -0
- package/dist/tools/simulator-ui.js +117 -0
- package/dist/tools/simulator-ui.js.map +1 -0
- package/dist/tools/simulator.d.ts +7 -0
- package/dist/tools/simulator.d.ts.map +1 -0
- package/dist/tools/simulator.js +8 -0
- package/dist/tools/simulator.js.map +1 -0
- package/dist/transport.d.ts +4 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +20 -0
- package/dist/transport.js.map +1 -0
- package/dist/utils/exec.d.ts +29 -0
- package/dist/utils/exec.d.ts.map +1 -0
- package/dist/utils/exec.js +109 -0
- package/dist/utils/exec.js.map +1 -0
- package/dist/utils/logger.d.ts +17 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +60 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +76 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface DeviceType {
|
|
2
|
+
name: string;
|
|
3
|
+
identifier: string;
|
|
4
|
+
}
|
|
5
|
+
export interface SimulatorDevice {
|
|
6
|
+
udid: string;
|
|
7
|
+
name: string;
|
|
8
|
+
state: string;
|
|
9
|
+
deviceTypeIdentifier: string;
|
|
10
|
+
}
|
|
11
|
+
export interface SimctlListOutput {
|
|
12
|
+
devicetypes?: Array<{
|
|
13
|
+
name: string;
|
|
14
|
+
identifier: string;
|
|
15
|
+
}>;
|
|
16
|
+
devices?: {
|
|
17
|
+
[runtime: string]: Array<{
|
|
18
|
+
udid: string;
|
|
19
|
+
name: string;
|
|
20
|
+
state: string;
|
|
21
|
+
deviceTypeIdentifier: string;
|
|
22
|
+
}>;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/simulator/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,KAAK,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;IACH,OAAO,CAAC,EAAE;QACR,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;YACvB,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM,CAAC;YACb,KAAK,EAAE,MAAM,CAAC;YACd,oBAAoB,EAAE,MAAM,CAAC;SAC9B,CAAC,CAAC;KACJ,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/simulator/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const flutterRunSchema: z.ZodObject<{
|
|
3
|
+
sessionId: z.ZodString;
|
|
4
|
+
target: z.ZodOptional<z.ZodString>;
|
|
5
|
+
flavor: z.ZodOptional<z.ZodString>;
|
|
6
|
+
additionalArgs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
sessionId: string;
|
|
9
|
+
target?: string | undefined;
|
|
10
|
+
flavor?: string | undefined;
|
|
11
|
+
additionalArgs?: string[] | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
sessionId: string;
|
|
14
|
+
target?: string | undefined;
|
|
15
|
+
flavor?: string | undefined;
|
|
16
|
+
additionalArgs?: string[] | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const flutterCommandSchema: z.ZodObject<{
|
|
19
|
+
sessionId: z.ZodString;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
sessionId: string;
|
|
22
|
+
}, {
|
|
23
|
+
sessionId: string;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const flutterLogsSchema: z.ZodObject<{
|
|
26
|
+
sessionId: z.ZodString;
|
|
27
|
+
fromIndex: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
sessionId: string;
|
|
31
|
+
fromIndex?: number | undefined;
|
|
32
|
+
limit?: number | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
sessionId: string;
|
|
35
|
+
fromIndex?: number | undefined;
|
|
36
|
+
limit?: number | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
export declare function handleFlutterRun(args: z.infer<typeof flutterRunSchema>): Promise<{
|
|
39
|
+
success: boolean;
|
|
40
|
+
pid: number;
|
|
41
|
+
message: string;
|
|
42
|
+
}>;
|
|
43
|
+
export declare function handleFlutterStop(args: z.infer<typeof flutterCommandSchema>): {
|
|
44
|
+
success: boolean;
|
|
45
|
+
message: string;
|
|
46
|
+
};
|
|
47
|
+
export declare function handleFlutterHotReload(args: z.infer<typeof flutterCommandSchema>): {
|
|
48
|
+
success: boolean;
|
|
49
|
+
message: string;
|
|
50
|
+
};
|
|
51
|
+
export declare function handleFlutterHotRestart(args: z.infer<typeof flutterCommandSchema>): {
|
|
52
|
+
success: boolean;
|
|
53
|
+
message: string;
|
|
54
|
+
};
|
|
55
|
+
export declare function handleFlutterLogs(args: z.infer<typeof flutterLogsSchema>): {
|
|
56
|
+
logs: Array<{
|
|
57
|
+
line: string;
|
|
58
|
+
timestamp: string;
|
|
59
|
+
index: number;
|
|
60
|
+
}>;
|
|
61
|
+
nextIndex: number;
|
|
62
|
+
totalLines: number;
|
|
63
|
+
};
|
|
64
|
+
export declare const flutterBuildSchema: z.ZodObject<{
|
|
65
|
+
sessionId: z.ZodString;
|
|
66
|
+
flavor: z.ZodOptional<z.ZodString>;
|
|
67
|
+
additionalArgs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
sessionId: string;
|
|
70
|
+
flavor?: string | undefined;
|
|
71
|
+
additionalArgs?: string[] | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
sessionId: string;
|
|
74
|
+
flavor?: string | undefined;
|
|
75
|
+
additionalArgs?: string[] | undefined;
|
|
76
|
+
}>;
|
|
77
|
+
export declare const flutterTestSchema: z.ZodObject<{
|
|
78
|
+
sessionId: z.ZodString;
|
|
79
|
+
path: z.ZodOptional<z.ZodString>;
|
|
80
|
+
additionalArgs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
81
|
+
}, "strip", z.ZodTypeAny, {
|
|
82
|
+
sessionId: string;
|
|
83
|
+
path?: string | undefined;
|
|
84
|
+
additionalArgs?: string[] | undefined;
|
|
85
|
+
}, {
|
|
86
|
+
sessionId: string;
|
|
87
|
+
path?: string | undefined;
|
|
88
|
+
additionalArgs?: string[] | undefined;
|
|
89
|
+
}>;
|
|
90
|
+
export declare const flutterCleanSchema: z.ZodObject<{
|
|
91
|
+
sessionId: z.ZodString;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
sessionId: string;
|
|
94
|
+
}, {
|
|
95
|
+
sessionId: string;
|
|
96
|
+
}>;
|
|
97
|
+
/**
|
|
98
|
+
* Build the Flutter app for iOS without running it.
|
|
99
|
+
* This is a one-shot command that runs to completion.
|
|
100
|
+
*/
|
|
101
|
+
export declare function handleFlutterBuild(args: z.infer<typeof flutterBuildSchema>): Promise<{
|
|
102
|
+
success: boolean;
|
|
103
|
+
output: string;
|
|
104
|
+
exitCode: number;
|
|
105
|
+
message: string;
|
|
106
|
+
}>;
|
|
107
|
+
/**
|
|
108
|
+
* Run Flutter tests.
|
|
109
|
+
* This is a one-shot command that runs to completion.
|
|
110
|
+
*/
|
|
111
|
+
export declare function handleFlutterTest(args: z.infer<typeof flutterTestSchema>): Promise<{
|
|
112
|
+
success: boolean;
|
|
113
|
+
output: string;
|
|
114
|
+
exitCode: number;
|
|
115
|
+
message: string;
|
|
116
|
+
}>;
|
|
117
|
+
/**
|
|
118
|
+
* Clean the Flutter project build cache.
|
|
119
|
+
* This is a one-shot command that runs to completion.
|
|
120
|
+
* Removes build artifacts and cached files.
|
|
121
|
+
*/
|
|
122
|
+
export declare function handleFlutterClean(args: z.infer<typeof flutterCleanSchema>): Promise<{
|
|
123
|
+
success: boolean;
|
|
124
|
+
output: string;
|
|
125
|
+
exitCode: number;
|
|
126
|
+
message: string;
|
|
127
|
+
}>;
|
|
128
|
+
//# sourceMappingURL=flutter-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flutter-commands.d.ts","sourceRoot":"","sources":["../../src/tools/flutter-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0CxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAK3B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;EAE/B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EAI5B,CAAC;AAEH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,CA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AAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CAgDD;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,GACtC,OAAO,CAAC;IACT,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CAoCD;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,GACvC,OAAO,CAAC;IACT,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CA0BD"}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { sessionManager } from '../session/manager.js';
|
|
3
|
+
import { FlutterProcessManager } from '../flutter/process.js';
|
|
4
|
+
import { logger } from '../utils/logger.js';
|
|
5
|
+
import { exec, execFile } from '../utils/exec.js';
|
|
6
|
+
/**
|
|
7
|
+
* Execute a build script (pre or post) in the project directory.
|
|
8
|
+
* Scripts are executed using exec to allow shell features like pipes, &&, etc.
|
|
9
|
+
*
|
|
10
|
+
* @param script - Shell command to execute
|
|
11
|
+
* @param cwd - Working directory for the script
|
|
12
|
+
* @param scriptType - Type of script for logging (pre-build or post-build)
|
|
13
|
+
*/
|
|
14
|
+
async function executeScript(script, cwd, scriptType) {
|
|
15
|
+
logger.info(`Executing ${scriptType} script`, { script, cwd });
|
|
16
|
+
try {
|
|
17
|
+
const result = await exec(script, { cwd, timeout: 120000 }); // 2 minute timeout
|
|
18
|
+
if (result.exitCode !== 0) {
|
|
19
|
+
logger.warn(`${scriptType} script exited with non-zero code`, {
|
|
20
|
+
exitCode: result.exitCode,
|
|
21
|
+
stdout: result.stdout,
|
|
22
|
+
stderr: result.stderr,
|
|
23
|
+
});
|
|
24
|
+
// Don't throw - allow build to continue even if script fails
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
logger.info(`${scriptType} script completed successfully`, {
|
|
28
|
+
stdout: result.stdout,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
logger.error(`${scriptType} script failed`, { error: String(error) });
|
|
34
|
+
// Don't throw - allow build to continue even if script fails
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export const flutterRunSchema = z.object({
|
|
38
|
+
sessionId: z.string().describe('Session ID'),
|
|
39
|
+
target: z.string().optional().describe('Target file (e.g., lib/main.dart)'),
|
|
40
|
+
flavor: z.string().optional().describe('Build flavor'),
|
|
41
|
+
additionalArgs: z.array(z.string()).optional().describe('Additional Flutter arguments'),
|
|
42
|
+
});
|
|
43
|
+
export const flutterCommandSchema = z.object({
|
|
44
|
+
sessionId: z.string().describe('Session ID'),
|
|
45
|
+
});
|
|
46
|
+
export const flutterLogsSchema = z.object({
|
|
47
|
+
sessionId: z.string().describe('Session ID'),
|
|
48
|
+
fromIndex: z.number().optional().describe('Start index for log retrieval'),
|
|
49
|
+
limit: z.number().optional().describe('Maximum number of lines to return (default: 100)'),
|
|
50
|
+
});
|
|
51
|
+
export async function handleFlutterRun(args) {
|
|
52
|
+
logger.info('Tool: flutter_run', args);
|
|
53
|
+
const session = sessionManager.getSession(args.sessionId);
|
|
54
|
+
if (!session) {
|
|
55
|
+
throw new Error(`Session not found: ${args.sessionId}`);
|
|
56
|
+
}
|
|
57
|
+
if (session.flutterProcessManager) {
|
|
58
|
+
const status = session.flutterProcessManager.getStatus();
|
|
59
|
+
if (status && (status.status === 'running' || status.status === 'starting')) {
|
|
60
|
+
throw new Error('Flutter process already running for this session');
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// Execute pre-build script if configured
|
|
64
|
+
const preBuildScript = sessionManager.getPreBuildScript();
|
|
65
|
+
if (preBuildScript) {
|
|
66
|
+
await executeScript(preBuildScript, session.worktreePath, 'pre-build');
|
|
67
|
+
}
|
|
68
|
+
const processManager = new FlutterProcessManager();
|
|
69
|
+
session.flutterProcessManager = processManager;
|
|
70
|
+
const flutterProcess = await processManager.start({
|
|
71
|
+
worktreePath: session.worktreePath,
|
|
72
|
+
deviceId: session.simulatorUdid,
|
|
73
|
+
target: args.target,
|
|
74
|
+
flavor: args.flavor,
|
|
75
|
+
additionalArgs: args.additionalArgs,
|
|
76
|
+
});
|
|
77
|
+
// Execute post-build script if configured (don't await - run in background)
|
|
78
|
+
const postBuildScript = sessionManager.getPostBuildScript();
|
|
79
|
+
if (postBuildScript) {
|
|
80
|
+
executeScript(postBuildScript, session.worktreePath, 'post-build').catch((error) => {
|
|
81
|
+
logger.error('Post-build script error (non-blocking)', { error: String(error) });
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
success: true,
|
|
86
|
+
pid: flutterProcess.pid,
|
|
87
|
+
message: `Flutter process started (PID: ${String(flutterProcess.pid)})`,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export function handleFlutterStop(args) {
|
|
91
|
+
logger.info('Tool: flutter_stop', args);
|
|
92
|
+
const session = sessionManager.getSession(args.sessionId);
|
|
93
|
+
if (!session) {
|
|
94
|
+
throw new Error(`Session not found: ${args.sessionId}`);
|
|
95
|
+
}
|
|
96
|
+
if (!session.flutterProcessManager) {
|
|
97
|
+
throw new Error('No Flutter process running for this session');
|
|
98
|
+
}
|
|
99
|
+
const stopped = session.flutterProcessManager.stop();
|
|
100
|
+
return {
|
|
101
|
+
success: stopped,
|
|
102
|
+
message: stopped ? 'Flutter process stop signal sent' : 'No Flutter process to stop',
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
export function handleFlutterHotReload(args) {
|
|
106
|
+
logger.info('Tool: flutter_hot_reload', args);
|
|
107
|
+
const session = sessionManager.getSession(args.sessionId);
|
|
108
|
+
if (!session) {
|
|
109
|
+
throw new Error(`Session not found: ${args.sessionId}`);
|
|
110
|
+
}
|
|
111
|
+
if (!session.flutterProcessManager) {
|
|
112
|
+
throw new Error('No Flutter process running for this session');
|
|
113
|
+
}
|
|
114
|
+
const reloaded = session.flutterProcessManager.hotReload();
|
|
115
|
+
return {
|
|
116
|
+
success: reloaded,
|
|
117
|
+
message: reloaded ? 'Hot reload triggered' : 'Failed to trigger hot reload',
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
export function handleFlutterHotRestart(args) {
|
|
121
|
+
logger.info('Tool: flutter_hot_restart', args);
|
|
122
|
+
const session = sessionManager.getSession(args.sessionId);
|
|
123
|
+
if (!session) {
|
|
124
|
+
throw new Error(`Session not found: ${args.sessionId}`);
|
|
125
|
+
}
|
|
126
|
+
if (!session.flutterProcessManager) {
|
|
127
|
+
throw new Error('No Flutter process running for this session');
|
|
128
|
+
}
|
|
129
|
+
const restarted = session.flutterProcessManager.hotRestart();
|
|
130
|
+
return {
|
|
131
|
+
success: restarted,
|
|
132
|
+
message: restarted ? 'Hot restart triggered' : 'Failed to trigger hot restart',
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export function handleFlutterLogs(args) {
|
|
136
|
+
logger.info('Tool: flutter_logs', args);
|
|
137
|
+
const session = sessionManager.getSession(args.sessionId);
|
|
138
|
+
if (!session) {
|
|
139
|
+
throw new Error(`Session not found: ${args.sessionId}`);
|
|
140
|
+
}
|
|
141
|
+
if (!session.flutterProcessManager) {
|
|
142
|
+
return {
|
|
143
|
+
logs: [],
|
|
144
|
+
nextIndex: 0,
|
|
145
|
+
totalLines: 0,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
const result = session.flutterProcessManager.getLogs(args.fromIndex, args.limit);
|
|
149
|
+
return {
|
|
150
|
+
logs: result.logs.map((log) => ({
|
|
151
|
+
line: log.line,
|
|
152
|
+
timestamp: log.timestamp.toISOString(),
|
|
153
|
+
index: log.index,
|
|
154
|
+
})),
|
|
155
|
+
nextIndex: result.nextIndex,
|
|
156
|
+
totalLines: result.totalLines,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
export const flutterBuildSchema = z.object({
|
|
160
|
+
sessionId: z.string().describe('Session ID'),
|
|
161
|
+
flavor: z.string().optional().describe('Build flavor'),
|
|
162
|
+
additionalArgs: z.array(z.string()).optional().describe('Additional Flutter build arguments'),
|
|
163
|
+
});
|
|
164
|
+
export const flutterTestSchema = z.object({
|
|
165
|
+
sessionId: z.string().describe('Session ID'),
|
|
166
|
+
path: z.string().optional().describe('Test file or directory path (e.g., test/widget_test.dart)'),
|
|
167
|
+
additionalArgs: z.array(z.string()).optional().describe('Additional Flutter test arguments'),
|
|
168
|
+
});
|
|
169
|
+
export const flutterCleanSchema = z.object({
|
|
170
|
+
sessionId: z.string().describe('Session ID'),
|
|
171
|
+
});
|
|
172
|
+
/**
|
|
173
|
+
* Build the Flutter app for iOS without running it.
|
|
174
|
+
* This is a one-shot command that runs to completion.
|
|
175
|
+
*/
|
|
176
|
+
export async function handleFlutterBuild(args) {
|
|
177
|
+
logger.info('Tool: flutter_build', args);
|
|
178
|
+
const session = sessionManager.getSession(args.sessionId);
|
|
179
|
+
if (!session) {
|
|
180
|
+
throw new Error(`Session not found: ${args.sessionId}`);
|
|
181
|
+
}
|
|
182
|
+
// Execute pre-build script if configured
|
|
183
|
+
const preBuildScript = sessionManager.getPreBuildScript();
|
|
184
|
+
if (preBuildScript) {
|
|
185
|
+
await executeScript(preBuildScript, session.worktreePath, 'pre-build');
|
|
186
|
+
}
|
|
187
|
+
const buildArgs = ['build', 'ios'];
|
|
188
|
+
if (args.flavor) {
|
|
189
|
+
buildArgs.push('--flavor', args.flavor);
|
|
190
|
+
}
|
|
191
|
+
if (args.additionalArgs) {
|
|
192
|
+
buildArgs.push(...args.additionalArgs);
|
|
193
|
+
}
|
|
194
|
+
logger.info('Running flutter build', { args: buildArgs, cwd: session.worktreePath });
|
|
195
|
+
const result = await execFile('flutter', buildArgs, {
|
|
196
|
+
cwd: session.worktreePath,
|
|
197
|
+
timeout: 600000, // 10 minutes for builds
|
|
198
|
+
});
|
|
199
|
+
const success = result.exitCode === 0;
|
|
200
|
+
const output = result.stdout + (result.stderr ? `\n\nErrors:\n${result.stderr}` : '');
|
|
201
|
+
// Execute post-build script if configured
|
|
202
|
+
const postBuildScript = sessionManager.getPostBuildScript();
|
|
203
|
+
if (postBuildScript) {
|
|
204
|
+
await executeScript(postBuildScript, session.worktreePath, 'post-build');
|
|
205
|
+
}
|
|
206
|
+
return {
|
|
207
|
+
success,
|
|
208
|
+
output,
|
|
209
|
+
exitCode: result.exitCode,
|
|
210
|
+
message: success
|
|
211
|
+
? 'Build completed successfully'
|
|
212
|
+
: `Build failed with exit code ${String(result.exitCode)}`,
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Run Flutter tests.
|
|
217
|
+
* This is a one-shot command that runs to completion.
|
|
218
|
+
*/
|
|
219
|
+
export async function handleFlutterTest(args) {
|
|
220
|
+
logger.info('Tool: flutter_test', args);
|
|
221
|
+
const session = sessionManager.getSession(args.sessionId);
|
|
222
|
+
if (!session) {
|
|
223
|
+
throw new Error(`Session not found: ${args.sessionId}`);
|
|
224
|
+
}
|
|
225
|
+
const testArgs = ['test'];
|
|
226
|
+
if (args.path) {
|
|
227
|
+
testArgs.push(args.path);
|
|
228
|
+
}
|
|
229
|
+
if (args.additionalArgs) {
|
|
230
|
+
testArgs.push(...args.additionalArgs);
|
|
231
|
+
}
|
|
232
|
+
logger.info('Running flutter test', { args: testArgs, cwd: session.worktreePath });
|
|
233
|
+
const result = await execFile('flutter', testArgs, {
|
|
234
|
+
cwd: session.worktreePath,
|
|
235
|
+
timeout: 600000, // 10 minutes for tests
|
|
236
|
+
});
|
|
237
|
+
const success = result.exitCode === 0;
|
|
238
|
+
const output = result.stdout + (result.stderr ? `\n\nErrors:\n${result.stderr}` : '');
|
|
239
|
+
return {
|
|
240
|
+
success,
|
|
241
|
+
output,
|
|
242
|
+
exitCode: result.exitCode,
|
|
243
|
+
message: success
|
|
244
|
+
? 'Tests completed successfully'
|
|
245
|
+
: `Tests failed with exit code ${String(result.exitCode)}`,
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Clean the Flutter project build cache.
|
|
250
|
+
* This is a one-shot command that runs to completion.
|
|
251
|
+
* Removes build artifacts and cached files.
|
|
252
|
+
*/
|
|
253
|
+
export async function handleFlutterClean(args) {
|
|
254
|
+
logger.info('Tool: flutter_clean', args);
|
|
255
|
+
const session = sessionManager.getSession(args.sessionId);
|
|
256
|
+
if (!session) {
|
|
257
|
+
throw new Error(`Session not found: ${args.sessionId}`);
|
|
258
|
+
}
|
|
259
|
+
logger.info('Running flutter clean', { cwd: session.worktreePath });
|
|
260
|
+
const result = await execFile('flutter', ['clean'], {
|
|
261
|
+
cwd: session.worktreePath,
|
|
262
|
+
timeout: 120000, // 2 minutes for clean
|
|
263
|
+
});
|
|
264
|
+
const success = result.exitCode === 0;
|
|
265
|
+
const output = result.stdout + (result.stderr ? `\n\nErrors:\n${result.stderr}` : '');
|
|
266
|
+
return {
|
|
267
|
+
success,
|
|
268
|
+
output,
|
|
269
|
+
exitCode: result.exitCode,
|
|
270
|
+
message: success
|
|
271
|
+
? 'Clean completed successfully'
|
|
272
|
+
: `Clean failed with exit code ${String(result.exitCode)}`,
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
//# sourceMappingURL=flutter-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flutter-commands.js","sourceRoot":"","sources":["../../src/tools/flutter-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CA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