import { createPagePaginationSchema, paginationInfoSchema } from './chunk-USZD5AX2.js';
import z from 'zod';

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

export { createStoredSkillBodySchema, createStoredSkillResponseSchema, deleteStoredSkillResponseSchema, getStoredSkillResponseSchema, listStoredSkillsQuerySchema, listStoredSkillsResponseSchema, publishStoredSkillBodySchema, publishStoredSkillResponseSchema, storedSkillIdPathParams, storedSkillSchema, updateStoredSkillBodySchema, updateStoredSkillResponseSchema };
//# sourceMappingURL=chunk-LW2FKUW5.js.map
//# sourceMappingURL=chunk-LW2FKUW5.js.map