Files
boocode/packages/ion/src/schema/retry.ts
indifferentketchup 02063072ab chore: add ion package, codesight wiki, work plans, ascli config
New @boocode/ion package (v0.0.1) for inference optimization network.
.codesight/ wiki artifacts for codebase documentation.
.omo/ work plans for openspec cleanup and enhanced file panel.
2026-06-07 22:16:45 +00:00

31 lines
905 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { z } from 'zod';
/**
* Retry configuration for a DAG node step.
*
* Controls how many times a step can be re-attempted on failure,
* the delay between attempts, and which classes of errors trigger a retry.
*/
export const stepRetryConfigSchema = z.object({
/** Maximum number of retry attempts (15 inclusive). */
max_attempts: z
.number()
.int()
.min(1, 'max_attempts must be at least 1')
.max(5, 'max_attempts must be at most 5'),
/** Milliseconds to wait between retry attempts (100060000). */
delay_ms: z
.number()
.int()
.min(1000, 'delay_ms must be at least 1000')
.max(60000, 'delay_ms must be at most 60000')
.optional(),
/** Which errors trigger a retry. Defaults to 'transient'. */
on_error: z
.enum(['transient', 'all'])
.default('transient'),
});
export type StepRetryConfig = z.infer<typeof stepRetryConfigSchema>;