import z from 'zod';

// src/server/schemas/processors.ts
var processorIdPathParams = z.object({
  processorId: z.string().describe("Unique identifier for the processor")
});
var processorConfigurationSchema = z.object({
  agentId: z.string(),
  agentName: z.string(),
  type: z.enum(["input", "output"])
});
var processorListConfigurationSchema = z.object({
  agentId: z.string(),
  type: z.enum(["input", "output"])
});
var serializedProcessorSchema = z.object({
  id: z.string(),
  name: z.string().optional(),
  description: z.string().optional(),
  phases: z.array(z.enum(["input", "inputStep", "outputStream", "outputResult", "outputStep"])),
  agentIds: z.array(z.string()),
  configurations: z.array(processorListConfigurationSchema),
  isWorkflow: z.boolean()
});
var serializedProcessorDetailSchema = z.object({
  id: z.string(),
  name: z.string().optional(),
  description: z.string().optional(),
  phases: z.array(z.enum(["input", "inputStep", "outputStream", "outputResult", "outputStep"])),
  configurations: z.array(processorConfigurationSchema),
  isWorkflow: z.boolean()
});
var listProcessorsResponseSchema = z.record(z.string(), serializedProcessorSchema);
var messageContentSchema = z.object({
  format: z.literal(2).optional(),
  parts: z.array(z.any()).optional(),
  content: z.string().optional()
}).passthrough();
var processorMessageSchema = z.object({
  id: z.string(),
  role: z.enum(["user", "assistant", "system", "tool"]),
  createdAt: z.coerce.date().optional(),
  content: z.union([messageContentSchema, z.string()])
}).passthrough();
var executeProcessorBodySchema = z.object({
  phase: z.enum(["input", "inputStep", "outputStream", "outputResult", "outputStep"]),
  messages: z.array(processorMessageSchema),
  agentId: z.string().optional(),
  requestContext: z.record(z.string(), z.any()).optional()
});
var tripwireSchema = z.object({
  triggered: z.boolean(),
  reason: z.string().optional(),
  metadata: z.any().optional()
});
var executeProcessorResponseSchema = z.object({
  success: z.boolean(),
  phase: z.string(),
  messages: z.array(processorMessageSchema).optional(),
  messageList: z.object({
    messages: z.array(processorMessageSchema)
  }).optional(),
  tripwire: tripwireSchema.optional(),
  error: z.string().optional()
});

export { executeProcessorBodySchema, executeProcessorResponseSchema, listProcessorsResponseSchema, processorConfigurationSchema, processorIdPathParams, serializedProcessorDetailSchema, serializedProcessorSchema };
//# sourceMappingURL=chunk-PNJPBMSY.js.map
//# sourceMappingURL=chunk-PNJPBMSY.js.map