| 1 | export type ClaudeRecordingQueryMode = |
| 2 | | "streaming" |
| 3 | | "restart" |
| 4 | | "resume_at_cursor" |
| 5 | | "fork_session" |
| 6 | | "fork_session_prior_turn" |
| 7 | | "fork_session_continue" |
| 8 | | "fork_session_siblings" |
| 9 | | "fork_session_merge_back" |
| 10 | | "fork_session_merge_back_siblings" |
| 11 | | "active_steering" |
| 12 | | "interrupt" |
| 13 | | "interrupt_restart"; |
| 14 | |
| 15 | export function validateClaudeReplayRecordingSelection(input: { |
| 16 | readonly scenario: string; |
| 17 | readonly configuredQueryMode: ClaudeRecordingQueryMode; |
| 18 | readonly selectedQueryMode: ClaudeRecordingQueryMode; |
| 19 | readonly configuredPromptCount: number; |
| 20 | readonly selectedPromptCount: number; |
| 21 | }): void { |
| 22 | if (input.selectedQueryMode !== input.configuredQueryMode) { |
| 23 | throw new Error( |
| 24 | `Claude replay fixture '${input.scenario}' uses query mode '${input.configuredQueryMode}', not '${input.selectedQueryMode}'. Select a scenario configured for the requested query mode.`, |
| 25 | ); |
| 26 | } |
| 27 | if (input.selectedPromptCount !== input.configuredPromptCount) { |
| 28 | throw new Error( |
| 29 | `Claude replay fixture '${input.scenario}' requires exactly ${input.configuredPromptCount} prompt(s) for query mode '${input.configuredQueryMode}', but received ${input.selectedPromptCount}.`, |
| 30 | ); |
| 31 | } |
| 32 | } |