import z from 'zod';

// src/server/schemas/a2a.ts
var a2aAgentIdPathParams = z.object({
  agentId: z.string().describe("Unique identifier for the agent")
});
var a2aTaskPathParams = a2aAgentIdPathParams.extend({
  taskId: z.string().describe("Unique identifier for the task")
});
var pushNotificationAuthenticationInfoSchema = z.object({
  schemes: z.array(z.string()).describe("Supported authentication schemes - e.g. Basic, Bearer"),
  credentials: z.string().optional().describe("Optional credentials")
});
var pushNotificationConfigSchema = z.object({
  url: z.string().describe("URL for sending the push notifications"),
  id: z.string().optional().describe("Push Notification ID - created by server to support multiple callbacks"),
  token: z.string().optional().describe("Token unique to this task/session"),
  authentication: pushNotificationAuthenticationInfoSchema.optional()
});
var messageSendConfigurationSchema = z.object({
  acceptedOutputModes: z.array(z.string()).describe("Accepted output modalities by the client"),
  blocking: z.boolean().optional().describe("If the server should treat the client as a blocking request"),
  historyLength: z.number().optional().describe("Number of recent messages to be retrieved"),
  pushNotificationConfig: pushNotificationConfigSchema.optional()
});
var textPartSchema = z.object({
  kind: z.literal("text").describe("Part type - text for TextParts"),
  text: z.string().describe("Text content"),
  metadata: z.record(z.string(), z.unknown()).optional().describe("Optional metadata associated with the part")
});
var fileWithBytesSchema = z.object({
  bytes: z.string().describe("base64 encoded content of the file"),
  mimeType: z.string().optional().describe("Optional mimeType for the file"),
  name: z.string().optional().describe("Optional name for the file")
});
var fileWithUriSchema = z.object({
  uri: z.string().describe("URL for the File content"),
  mimeType: z.string().optional().describe("Optional mimeType for the file"),
  name: z.string().optional().describe("Optional name for the file")
});
var filePartSchema = z.object({
  kind: z.literal("file").describe("Part type - file for FileParts"),
  file: z.union([fileWithBytesSchema, fileWithUriSchema]).describe("File content either as url or bytes"),
  metadata: z.record(z.string(), z.unknown()).optional().describe("Optional metadata associated with the part")
});
var dataPartSchema = z.object({
  kind: z.literal("data").describe("Part type - data for DataParts"),
  data: z.record(z.string(), z.unknown()).describe("Structured data content"),
  metadata: z.record(z.string(), z.unknown()).optional().describe("Optional metadata associated with the part")
});
var partSchema = z.union([textPartSchema, filePartSchema, dataPartSchema]);
var messageSchema = z.object({
  kind: z.literal("message").describe("Event type"),
  messageId: z.string().describe("Identifier created by the message creator"),
  role: z.enum(["user", "agent"]).describe("Message sender's role"),
  parts: z.array(partSchema).describe("Message content"),
  contextId: z.string().optional().describe("The context the message is associated with"),
  taskId: z.string().optional().describe("Identifier of task the message is related to"),
  referenceTaskIds: z.array(z.string()).optional().describe("List of tasks referenced as context by this message"),
  extensions: z.array(z.string()).optional().describe("The URIs of extensions that are present or contributed to this Message"),
  metadata: z.record(z.string(), z.unknown()).optional().describe("Extension metadata")
});
var messageSendParamsSchema = z.object({
  message: messageSchema,
  configuration: messageSendConfigurationSchema.optional(),
  metadata: z.record(z.string(), z.unknown()).optional().describe("Extension metadata")
});
var taskQueryParamsSchema = z.object({
  id: z.string().describe("Task id"),
  historyLength: z.number().optional().describe("Number of recent messages to be retrieved"),
  metadata: z.record(z.string(), z.unknown()).optional()
});
var taskIdParamsSchema = z.object({
  id: z.string().describe("Task id"),
  metadata: z.record(z.string(), z.unknown()).optional()
});
var messageSendBodySchema = z.object({
  message: messageSchema,
  metadata: z.record(z.string(), z.any()).optional()
});
var taskQueryBodySchema = z.object({
  id: z.string()
});
var agentExecutionParamsSchema = z.union([messageSendParamsSchema, taskQueryParamsSchema, taskIdParamsSchema]);
var agentExecutionBodySchema = z.object({
  jsonrpc: z.literal("2.0"),
  id: z.union([z.string(), z.number()]),
  method: z.enum(["message/send", "message/stream", "tasks/get", "tasks/cancel"]),
  params: agentExecutionParamsSchema
});
var agentCardResponseSchema = z.object({
  name: z.string(),
  description: z.string(),
  url: z.string(),
  provider: z.object({
    organization: z.string(),
    url: z.string()
  }).optional(),
  version: z.string(),
  capabilities: z.object({
    streaming: z.boolean().optional(),
    pushNotifications: z.boolean().optional(),
    stateTransitionHistory: z.boolean().optional()
  }),
  defaultInputModes: z.array(z.string()),
  defaultOutputModes: z.array(z.string()),
  skills: z.array(
    z.object({
      id: z.string(),
      name: z.string(),
      description: z.string(),
      tags: z.array(z.string()).optional()
    })
  )
});
var taskResponseSchema = z.unknown();
var agentExecutionResponseSchema = z.unknown();

export { a2aAgentIdPathParams, a2aTaskPathParams, agentCardResponseSchema, agentExecutionBodySchema, agentExecutionResponseSchema, messageSendBodySchema, taskQueryBodySchema, taskResponseSchema };
//# sourceMappingURL=chunk-KPMEA5UE.js.map
//# sourceMappingURL=chunk-KPMEA5UE.js.map