(events: CapturedEvent[])
| 16 | } |
| 17 | |
| 18 | function createSimulationContext(events: CapturedEvent[]): SimulationContext { |
| 19 | return { |
| 20 | workspaceId: "workspace-1", |
| 21 | assistantMessageId: "assistant-1", |
| 22 | canonicalModelString: "openai:gpt-5.5", |
| 23 | routedThroughGateway: false, |
| 24 | historySequence: 1, |
| 25 | systemMessageTokens: 123, |
| 26 | effectiveAgentId: "exec", |
| 27 | effectiveMode: "exec", |
| 28 | metadataMode: "exec", |
| 29 | effectiveThinkingLevel: "low", |
| 30 | emit: (event, data) => events.push({ event, data }), |
| 31 | }; |
| 32 | } |
| 33 | |
| 34 | function getCapturedEvent<T extends { type: string }>(events: CapturedEvent[], type: T["type"]): T { |
| 35 | const match = events.find((event) => event.event === type); |
no test coverage detected