'use strict';

var chunkZYXDUS6Q_cjs = require('./chunk-ZYXDUS6Q.cjs');
var z = require('zod');

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

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

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