'use strict';

var chunkVTHT3PPM_cjs = require('./chunk-VTHT3PPM.cjs');
var chunkUSD6C4ZL_cjs = require('./chunk-USD6C4ZL.cjs');
var chunkCXL3KPGO_cjs = require('./chunk-CXL3KPGO.cjs');
var z = require('zod');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var z__default = /*#__PURE__*/_interopDefault(z);

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

exports.agentVersionPathParams = agentVersionPathParams;
exports.agentVersionSchema = agentVersionSchema;
exports.compareVersionsResponseSchema = compareVersionsResponseSchema;
exports.createVersionResponseSchema = createVersionResponseSchema;
exports.getVersionResponseSchema = getVersionResponseSchema;
exports.listVersionsResponseSchema = listVersionsResponseSchema;
exports.restoreVersionResponseSchema = restoreVersionResponseSchema;
exports.versionIdPathParams = versionIdPathParams;
//# sourceMappingURL=chunk-43MOXX6D.cjs.map
//# sourceMappingURL=chunk-43MOXX6D.cjs.map