| 197 | } |
| 198 | |
| 199 | export async function build_simLogic( |
| 200 | params: BuildSimulatorParams, |
| 201 | executor: CommandExecutor, |
| 202 | ): Promise<void> { |
| 203 | const ctx = getHandlerContext(); |
| 204 | const prepared = await prepareBuildSimExecution(params, executor); |
| 205 | |
| 206 | ctx.emit(createBuildInvocationFragment('build-result', 'BUILD', prepared.invocationRequest)); |
| 207 | const executionContext = createStreamingExecutionContext(ctx); |
| 208 | const executeBuildSim = createBuildSimExecutor(executor, prepared); |
| 209 | const result = await executeBuildSim(params, executionContext); |
| 210 | |
| 211 | setXcodebuildStructuredOutput(ctx, 'build-result', result); |
| 212 | |
| 213 | if (!result.didError) { |
| 214 | ctx.nextStepParams = { |
| 215 | get_sim_app_path: { |
| 216 | ...(params.simulatorId |
| 217 | ? { simulatorId: params.simulatorId } |
| 218 | : { simulatorName: params.simulatorName ?? '' }), |
| 219 | scheme: params.scheme, |
| 220 | platform: prepared.detectedPlatform, |
| 221 | ...(params.derivedDataPath !== undefined |
| 222 | ? { derivedDataPath: params.derivedDataPath } |
| 223 | : {}), |
| 224 | }, |
| 225 | }; |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | export const schema = getSessionAwareToolSchemaShape({ |
| 230 | sessionAware: publicSchemaObject, |