'use strict';

var chunkDIG2K5CV_cjs = require('./chunk-DIG2K5CV.cjs');
var v4 = require('zod/v4');

var storedSkillIdPathParams = v4.z.object({
  storedSkillId: v4.z.string().describe("Unique identifier for the stored skill")
});
var storageOrderBySchema = v4.z.object({
  field: v4.z.enum(["createdAt", "updatedAt"]).optional(),
  direction: v4.z.enum(["ASC", "DESC"]).optional()
});
var listStoredSkillsQuerySchema = chunkDIG2K5CV_cjs.createPagePaginationSchema(100).extend({
  orderBy: storageOrderBySchema.optional(),
  authorId: v4.z.string().optional().describe("Filter skills by author identifier"),
  metadata: v4.z.record(v4.z.string(), v4.z.unknown()).optional().describe("Filter skills by metadata key-value pairs")
});
var sourceSchema = v4.z.discriminatedUnion("type", [
  v4.z.object({
    type: v4.z.literal("external"),
    packagePath: v4.z.string().describe("Package path for external source")
  }),
  v4.z.object({
    type: v4.z.literal("local"),
    projectPath: v4.z.string().describe("Project path for local source")
  }),
  v4.z.object({
    type: v4.z.literal("managed"),
    mastraPath: v4.z.string().describe("Mastra path for managed source")
  })
]);
var snapshotConfigSchema = v4.z.object({
  name: v4.z.string().describe("Name of the skill"),
  description: v4.z.string().describe("Description of what the skill does and when to use it"),
  instructions: v4.z.string().describe("Markdown instructions for the skill"),
  license: v4.z.string().optional().describe("License identifier for the skill"),
  compatibility: v4.z.unknown().optional().describe("Compatibility requirements"),
  source: sourceSchema.optional().describe("Source location of the skill"),
  references: v4.z.array(v4.z.string()).optional().describe("List of reference file paths"),
  scripts: v4.z.array(v4.z.string()).optional().describe("List of script file paths"),
  assets: v4.z.array(v4.z.string()).optional().describe("List of asset file paths"),
  metadata: v4.z.record(v4.z.string(), v4.z.unknown()).optional().describe("Additional metadata for the skill")
});
var createStoredSkillBodySchema = v4.z.object({
  id: v4.z.string().optional().describe("Unique identifier. If not provided, derived from name."),
  authorId: v4.z.string().optional().describe("Author identifier for multi-tenant filtering")
}).merge(snapshotConfigSchema);
var updateStoredSkillBodySchema = v4.z.object({
  authorId: v4.z.string().optional()
}).partial().merge(snapshotConfigSchema.partial());
var storedSkillSchema = v4.z.object({
  id: v4.z.string(),
  status: v4.z.string().describe("Skill status: draft, published, or archived"),
  activeVersionId: v4.z.string().optional(),
  authorId: v4.z.string().optional(),
  createdAt: v4.z.coerce.date(),
  updatedAt: v4.z.coerce.date(),
  name: v4.z.string().describe("Name of the skill"),
  description: v4.z.string().describe("Description of what the skill does and when to use it"),
  instructions: v4.z.string().describe("Markdown instructions for the skill"),
  license: v4.z.string().optional().describe("License identifier for the skill"),
  compatibility: v4.z.unknown().optional().describe("Compatibility requirements"),
  source: sourceSchema.optional().describe("Source location of the skill"),
  references: v4.z.array(v4.z.string()).optional().describe("List of reference file paths"),
  scripts: v4.z.array(v4.z.string()).optional().describe("List of script file paths"),
  assets: v4.z.array(v4.z.string()).optional().describe("List of asset file paths"),
  metadata: v4.z.record(v4.z.string(), v4.z.unknown()).optional().describe("Additional metadata for the skill")
});
var listStoredSkillsResponseSchema = chunkDIG2K5CV_cjs.paginationInfoSchema.extend({
  skills: v4.z.array(storedSkillSchema)
});
var getStoredSkillResponseSchema = storedSkillSchema;
var createStoredSkillResponseSchema = storedSkillSchema;
var updateStoredSkillResponseSchema = v4.z.union([
  v4.z.object({
    id: v4.z.string(),
    status: v4.z.string(),
    activeVersionId: v4.z.string().optional(),
    authorId: v4.z.string().optional(),
    createdAt: v4.z.coerce.date(),
    updatedAt: v4.z.coerce.date()
  }),
  storedSkillSchema
]);
var deleteStoredSkillResponseSchema = v4.z.object({
  success: v4.z.boolean(),
  message: v4.z.string()
});
var publishStoredSkillBodySchema = v4.z.object({
  skillPath: v4.z.string().describe("Path to the skill directory on the server filesystem (containing SKILL.md)")
});
var publishStoredSkillResponseSchema = storedSkillSchema;

exports.createStoredSkillBodySchema = createStoredSkillBodySchema;
exports.createStoredSkillResponseSchema = createStoredSkillResponseSchema;
exports.deleteStoredSkillResponseSchema = deleteStoredSkillResponseSchema;
exports.getStoredSkillResponseSchema = getStoredSkillResponseSchema;
exports.listStoredSkillsQuerySchema = listStoredSkillsQuerySchema;
exports.listStoredSkillsResponseSchema = listStoredSkillsResponseSchema;
exports.publishStoredSkillBodySchema = publishStoredSkillBodySchema;
exports.publishStoredSkillResponseSchema = publishStoredSkillResponseSchema;
exports.storedSkillIdPathParams = storedSkillIdPathParams;
exports.storedSkillSchema = storedSkillSchema;
exports.updateStoredSkillBodySchema = updateStoredSkillBodySchema;
exports.updateStoredSkillResponseSchema = updateStoredSkillResponseSchema;
//# sourceMappingURL=chunk-Q2B7W7GA.cjs.map
//# sourceMappingURL=chunk-Q2B7W7GA.cjs.map