SaylorTwift's picture
SaylorTwift HF Staff
Add files using upload-large-folder tool
4e23b01 verified
Raw History Blame Contribute Delete
1.1 kB
import { z } from 'zod';
import { fileContentSchema, imageContentSchema, textContentSchema, videoContentSchema } from './message';
import { skillDescriptorSchema } from './skill';
export const listSkillsResponseSchema = z.object({
skills: z.array(skillDescriptorSchema),
});
export type ListSkillsResponse = z.infer<typeof listSkillsResponseSchema>;
export const activateSkillAttachmentSchema = z.discriminatedUnion('type', [
textContentSchema,
imageContentSchema,
videoContentSchema,
fileContentSchema,
]);
export type ActivateSkillAttachment = z.infer<typeof activateSkillAttachmentSchema>;
export const activateSkillRequestSchema = z.object({
args: z.string().optional(),
metadata: z.record(z.string(), z.unknown()).optional(),
attachments: z.array(activateSkillAttachmentSchema).optional(),
});
export type ActivateSkillRequest = z.infer<typeof activateSkillRequestSchema>;
export const activateSkillResultSchema = z.object({
activated: z.literal(true),
skill_name: z.string().min(1),
});
export type ActivateSkillResult = z.infer<typeof activateSkillResultSchema>;