( value: unknown, stepNumber: number, makeError: BatchStepErrorFactory = batchInvalidArgsError, )
| 50 | } |
| 51 | |
| 52 | export function parseBatchStepRuntime( |
| 53 | value: unknown, |
| 54 | stepNumber: number, |
| 55 | makeError: BatchStepErrorFactory = batchInvalidArgsError, |
| 56 | ): SessionRuntimeHints | undefined { |
| 57 | if (value === undefined) return undefined; |
| 58 | try { |
| 59 | return daemonRuntimeSchema.parse(value); |
| 60 | } catch (error) { |
| 61 | throw makeError( |
| 62 | `Batch step ${stepNumber} runtime is invalid: ${error instanceof Error ? error.message : String(error)}`, |
| 63 | ); |
| 64 | } |
| 65 | } |
no test coverage detected