eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
70 lines • 2.67 kB
TypeScript
import { z } from '#compiled/zod/index.js';
import { type SerializedData } from './serialization.js';
import type { PaginationOptions, ResolveData } from './shared.js';
export declare const StepStatusSchema: z.ZodEnum<{
pending: "pending";
running: "running";
completed: "completed";
failed: "failed";
cancelled: "cancelled";
}>;
/**
* Schema for workflow steps.
*
* Note: input/output use SerializedDataSchema to support both:
* - specVersion >= 2: Uint8Array (binary devalue format)
* - specVersion 1: any (legacy JSON format)
*/
export declare const StepSchema: z.ZodObject<{
runId: z.ZodString;
stepId: z.ZodString;
stepName: z.ZodString;
status: z.ZodEnum<{
pending: "pending";
running: "running";
completed: "completed";
failed: "failed";
cancelled: "cancelled";
}>;
input: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
output: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
error: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
attempt: z.ZodNumber;
startedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
completedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
createdAt: z.ZodCoercedDate<unknown>;
updatedAt: z.ZodCoercedDate<unknown>;
retryAfter: z.ZodOptional<z.ZodCoercedDate<unknown>>;
specVersion: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export type StepStatus = z.infer<typeof StepStatusSchema>;
export type Step = z.infer<typeof StepSchema>;
/**
* Step with input/output fields excluded (when resolveData='none').
* Used for listing steps without fetching the full serialized data.
*/
export type StepWithoutData = Omit<Step, 'input' | 'output'> & {
input: undefined;
output: undefined;
};
export interface CreateStepRequest {
stepId: string;
stepName: string;
input: SerializedData;
}
export interface UpdateStepRequest {
attempt?: number;
status?: StepStatus;
output?: SerializedData;
error?: SerializedData;
retryAfter?: Date;
}
export interface GetStepParams {
resolveData?: ResolveData;
}
export interface ListWorkflowRunStepsParams {
runId: string;
pagination?: PaginationOptions;
resolveData?: ResolveData;
}
//# sourceMappingURL=steps.d.ts.map