( steps: NextStep[], catalog: ToolCatalog, preferredWorkflow: string, )
| 150 | } |
| 151 | |
| 152 | function normalizeNextSteps( |
| 153 | steps: NextStep[], |
| 154 | catalog: ToolCatalog, |
| 155 | preferredWorkflow: string, |
| 156 | ): NextStep[] { |
| 157 | return steps.map((step) => { |
| 158 | if (!step.tool) { |
| 159 | return step; |
| 160 | } |
| 161 | |
| 162 | const target = getNextStepTarget({ catalog, mcpName: step.tool, preferredWorkflow }); |
| 163 | if (!target) { |
| 164 | return step; |
| 165 | } |
| 166 | |
| 167 | return { |
| 168 | ...step, |
| 169 | tool: target.mcpName, |
| 170 | workflow: target.workflow, |
| 171 | cliTool: target.cliName, |
| 172 | }; |
| 173 | }); |
| 174 | } |
| 175 | |
| 176 | function isStructuredXcodebuildFailureSession(session: RenderSession): boolean { |
| 177 | const structuredOutput = session.getStructuredOutput?.(); |
no test coverage detected