Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970export const MAX_TASKS = 100;export const MAX_TASK_NAME = 120;export const MAX_TASK_INSTRUCTIONS = 8000;export const MAX_TASK_RUN_PAGE = 100;
export type TaskSchedule = | { kind: "once"; at: string } | { kind: "cron"; expression: string; timezone: "UTC" };
export interface TaskInput { name: string; instructions: string; schedule: TaskSchedule; enabled: boolean;}
export interface CreateTaskInput extends TaskInput { id: string; conversationId: string;}
export interface TaskDefinition extends CreateTaskInput { version: number; createdAt: string; updatedAt: string;}
export type TaskRunStatus = | "dispatching" | "dispatch_error" | "pending" | "running" | "completed" | "aborted" | "skipped" | "error";
export interface TaskRun { id: string; taskId: string; taskVersion: number; conversationId: string; submissionId: string; source: "scheduled" | "manual"; scheduledFor: string; createdAt: string; status: TaskRunStatus; startedAt: string | null; completedAt: string | null; failureCode: "dispatch_failed" | "turn_failed" | "turn_aborted" | "turn_skipped" | null;}
export interface TaskSummary extends TaskDefinition { previousRun: TaskRun | null; /** Actual native alarm time, or null when disabled, consumed or unavailable. */ nextRunAt: string | null; schedulingError?: "schedule_unavailable" | null;}
export interface TaskRunCursor { createdAt: string; id: string;}
export interface TaskRunPage { runs: TaskRun[]; nextCursor: TaskRunCursor | null;}