import { createListVersionsResponseSchema, createCompareVersionsResponseSchema } from './chunk-H4AABNBB.js';
import { toolConfigSchema, conditionalFieldSchema, instructionsSchema, scorerConfigSchema, serializedMemoryConfigSchema, storedProcessorGraphSchema, toolsConfigSchema, modelConfigSchema } from './chunk-VKTJMAUK.js';
import { defaultOptionsSchema } from './chunk-7XBOJMBD.js';
import z from 'zod';

var mcpClientToolsConfigSchema = z.object({
  tools: z.record(z.string(), toolConfigSchema).optional()
});
var agentVersionPathParams = z.object({
  agentId: z.string().describe("Unique identifier for the stored agent")
});
var versionIdPathParams = z.object({
  agentId: z.string().describe("Unique identifier for the stored agent"),
  versionId: z.string().describe("Unique identifier for the version (UUID)")
});
var agentVersionSchema = z.object({
  id: z.string().describe("Unique identifier for the version (UUID)"),
  agentId: z.string().describe("ID of the agent this version belongs to"),
  versionNumber: z.number().describe("Sequential version number (1, 2, 3, ...)"),
  // Top-level config fields (from StorageAgentSnapshotType)
  name: z.string().describe("Name of the agent"),
  description: z.string().optional().describe("Description of the agent"),
  instructions: instructionsSchema,
  model: conditionalFieldSchema(modelConfigSchema).describe(
    "Model configuration \u2014 static value or array of conditional variants"
  ),
  tools: conditionalFieldSchema(toolsConfigSchema).optional().describe("Tool keys mapped to per-tool config \u2014 static or conditional"),
  defaultOptions: conditionalFieldSchema(defaultOptionsSchema).optional().describe("Default options for generate/stream calls \u2014 static or conditional"),
  workflows: conditionalFieldSchema(z.record(z.string(), toolConfigSchema)).optional().describe("Workflow keys with optional per-workflow config \u2014 static or conditional"),
  agents: conditionalFieldSchema(z.record(z.string(), toolConfigSchema)).optional().describe("Agent keys with optional per-agent config \u2014 static or conditional"),
  integrationTools: conditionalFieldSchema(z.record(z.string(), mcpClientToolsConfigSchema)).optional().describe("Map of tool provider IDs to their tool configurations \u2014 static or conditional"),
  mcpClients: conditionalFieldSchema(z.record(z.string(), mcpClientToolsConfigSchema)).optional().describe("Map of stored MCP client IDs to their tool configurations \u2014 static or conditional"),
  inputProcessors: conditionalFieldSchema(storedProcessorGraphSchema).optional().describe("Input processor graph \u2014 static or conditional"),
  outputProcessors: conditionalFieldSchema(storedProcessorGraphSchema).optional().describe("Output processor graph \u2014 static or conditional"),
  memory: conditionalFieldSchema(serializedMemoryConfigSchema).optional().describe("Memory configuration \u2014 static or conditional"),
  scorers: conditionalFieldSchema(z.record(z.string(), scorerConfigSchema)).optional().describe("Scorer keys with optional sampling config \u2014 static or conditional"),
  requestContextSchema: z.record(z.string(), z.unknown()).optional().describe("JSON Schema defining valid request context variables"),
  // Version metadata fields
  changedFields: z.array(z.string()).optional().describe("Array of field names that changed from the previous version"),
  changeMessage: z.string().optional().describe("Optional message describing the changes"),
  createdAt: z.coerce.date().describe("When this version was created")
});
var listVersionsResponseSchema = createListVersionsResponseSchema(agentVersionSchema);
var getVersionResponseSchema = agentVersionSchema;
var createVersionResponseSchema = agentVersionSchema.partial().merge(
  z.object({
    // These fields are always present in a version response
    id: z.string().describe("Unique identifier for the version (UUID)"),
    agentId: z.string().describe("ID of the agent this version belongs to"),
    versionNumber: z.number().describe("Sequential version number (1, 2, 3, ...)"),
    createdAt: z.coerce.date().describe("When this version was created")
  })
);
var restoreVersionResponseSchema = agentVersionSchema.describe(
  "The newly created version from the restored configuration"
);
var compareVersionsResponseSchema = createCompareVersionsResponseSchema(agentVersionSchema);

export { agentVersionPathParams, agentVersionSchema, compareVersionsResponseSchema, createVersionResponseSchema, getVersionResponseSchema, listVersionsResponseSchema, restoreVersionResponseSchema, versionIdPathParams };
//# sourceMappingURL=chunk-OP626LZY.js.map
//# sourceMappingURL=chunk-OP626LZY.js.map