()
| 262 | // every resume leg), so the auth/source/version headers can't drift between the |
| 263 | // sequential path and the concurrent per-subagent resume legs. |
| 264 | function mothershipRequestHeaders(): Record<string, string> { |
| 265 | return { |
| 266 | 'Content-Type': 'application/json', |
| 267 | ...(env.COPILOT_API_KEY ? { 'x-api-key': env.COPILOT_API_KEY } : {}), |
| 268 | ...getMothershipSourceEnvHeaders(), |
| 269 | 'X-Client-Version': SIM_AGENT_VERSION, |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | // makeResumeLegContext / mergeResumeLegOutputs are a PAIR and must stay in |
| 274 | // lockstep: every field reset here is folded back there, and nothing else on |
no test coverage detected