MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / createOpenSimExecutor

Function createOpenSimExecutor

src/mcp/tools/simulator/open_sim.ts:47–78  ·  view source on GitHub ↗
(
  executor: CommandExecutor,
)

Source from the content-addressed store, hash-verified

45}
46
47export function createOpenSimExecutor(
48 executor: CommandExecutor,
49): NonStreamingExecutor<OpenSimParams, OpenSimResult> {
50 return async (_params) => {
51 try {
52 const command = buildOpenSimulatorAppCommand();
53 if (command === null) {
54 return createOpenSimResult({ didError: false });
55 }
56
57 const result = await executor(command, 'Open Simulator', false);
58
59 if (!result.success) {
60 const diagnosticMessage = result.error ?? 'Unknown error';
61 return createOpenSimResult({
62 didError: true,
63 error: 'Open simulator operation failed.',
64 diagnosticMessage,
65 });
66 }
67
68 return createOpenSimResult({ didError: false });
69 } catch (error) {
70 const diagnosticMessage = toErrorMessage(error);
71 return createOpenSimResult({
72 didError: true,
73 error: 'Open simulator operation failed.',
74 diagnosticMessage,
75 });
76 }
77 };
78}
79
80export async function open_simLogic(
81 _params: OpenSimParams,

Callers 1

open_simLogicFunction · 0.85

Calls 4

toErrorMessageFunction · 0.90
createOpenSimResultFunction · 0.85
executorFunction · 0.50

Tested by

no test coverage detected