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.
This commit is contained in:
31
packages/ion/src/schema/retry.ts
Normal file
31
packages/ion/src/schema/retry.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
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 (1–5 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 (1000–60000). */
|
||||
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>;
|
||||
Reference in New Issue
Block a user