25 lines
682 B
TypeScript
25 lines
682 B
TypeScript
import { z } from "zod";
|
|
|
|
export const registerSchema = z.object({
|
|
name: z.string().min(1).max(100),
|
|
platform: z.string().optional(),
|
|
model: z.string().optional(),
|
|
});
|
|
|
|
export const heartbeatSchema = z.object({
|
|
name: z.string().optional(),
|
|
model: z.string().optional(),
|
|
platform: z.string().optional(),
|
|
});
|
|
|
|
export const taskSchema = z.object({
|
|
summary: z.string().max(500),
|
|
durationMs: z.number().positive(),
|
|
model: z.string().optional(),
|
|
toolsUsed: z.array(z.string()).optional(),
|
|
});
|
|
|
|
export type RegisterInput = z.infer<typeof registerSchema>;
|
|
export type HeartbeatInput = z.infer<typeof heartbeatSchema>;
|
|
export type TaskInput = z.infer<typeof taskSchema>;
|