'use strict';

var z = require('zod');

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

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

// src/server/schemas/workspace.ts
z__default.default.object({
  path: z__default.default.string().describe("File or directory path (URL encoded)")
});
var workspaceIdPathParams = z__default.default.object({
  workspaceId: z__default.default.string().describe("Workspace ID")
});
var fsReadQuerySchema = z__default.default.object({
  path: z__default.default.string().describe("Path to the file to read"),
  encoding: z__default.default.string().optional().describe("Encoding for text files (default: utf-8)")
});
var fsListQuerySchema = z__default.default.object({
  path: z__default.default.string().describe("Path to the directory to list"),
  recursive: z__default.default.coerce.boolean().optional().describe("Include subdirectories")
});
var fsStatQuerySchema = z__default.default.object({
  path: z__default.default.string().describe("Path to get info about")
});
var fsDeleteQuerySchema = z__default.default.object({
  path: z__default.default.string().describe("Path to delete"),
  recursive: z__default.default.coerce.boolean().optional().describe("Delete directories recursively"),
  force: z__default.default.coerce.boolean().optional().describe("Don't error if path doesn't exist")
});
var fsWriteBodySchema = z__default.default.object({
  path: z__default.default.string().describe("Path to write to"),
  content: z__default.default.string().describe("Content to write (text or base64-encoded binary)"),
  encoding: z__default.default.enum(["utf-8", "base64"]).optional().default("utf-8").describe("Content encoding"),
  recursive: z__default.default.coerce.boolean().optional().describe("Create parent directories if needed")
});
var fsMkdirBodySchema = z__default.default.object({
  path: z__default.default.string().describe("Directory path to create"),
  recursive: z__default.default.coerce.boolean().optional().describe("Create parent directories if needed")
});
var fileEntrySchema = z__default.default.object({
  name: z__default.default.string(),
  type: z__default.default.enum(["file", "directory"]),
  size: z__default.default.number().optional(),
  mount: z__default.default.object({
    provider: z__default.default.string(),
    icon: z__default.default.string().optional(),
    displayName: z__default.default.string().optional(),
    description: z__default.default.string().optional(),
    status: z__default.default.enum([
      "pending",
      "initializing",
      "ready",
      "starting",
      "running",
      "stopping",
      "stopped",
      "destroying",
      "destroyed",
      "error"
    ]).optional(),
    error: z__default.default.string().optional()
  }).optional()
});
var fsReadResponseSchema = z__default.default.object({
  path: z__default.default.string(),
  content: z__default.default.string(),
  type: z__default.default.enum(["file", "directory"]),
  size: z__default.default.number().optional(),
  mimeType: z__default.default.string().optional()
});
var fsWriteResponseSchema = z__default.default.object({
  success: z__default.default.boolean(),
  path: z__default.default.string()
});
var fsListResponseSchema = z__default.default.object({
  path: z__default.default.string(),
  entries: z__default.default.array(fileEntrySchema)
});
var fsDeleteResponseSchema = z__default.default.object({
  success: z__default.default.boolean(),
  path: z__default.default.string()
});
var fsMkdirResponseSchema = z__default.default.object({
  success: z__default.default.boolean(),
  path: z__default.default.string()
});
var fsStatResponseSchema = z__default.default.object({
  path: z__default.default.string(),
  type: z__default.default.enum(["file", "directory"]),
  size: z__default.default.number().optional(),
  createdAt: z__default.default.string().optional(),
  modifiedAt: z__default.default.string().optional(),
  mimeType: z__default.default.string().optional()
});
var searchQuerySchema = z__default.default.object({
  query: z__default.default.string().describe("Search query text"),
  topK: z__default.default.coerce.number().optional().default(5).describe("Maximum number of results"),
  mode: z__default.default.enum(["bm25", "vector", "hybrid"]).optional().describe("Search mode"),
  minScore: z__default.default.coerce.number().optional().describe("Minimum relevance score threshold")
});
var searchResultSchema = z__default.default.object({
  id: z__default.default.string().describe("Document ID (file path)"),
  content: z__default.default.string(),
  score: z__default.default.number(),
  lineRange: z__default.default.object({
    start: z__default.default.number(),
    end: z__default.default.number()
  }).optional(),
  scoreDetails: z__default.default.object({
    vector: z__default.default.number().optional(),
    bm25: z__default.default.number().optional()
  }).optional()
});
var searchResponseSchema = z__default.default.object({
  results: z__default.default.array(searchResultSchema),
  query: z__default.default.string(),
  mode: z__default.default.enum(["bm25", "vector", "hybrid"])
});
var indexBodySchema = z__default.default.object({
  path: z__default.default.string().describe("Path to use as document ID"),
  content: z__default.default.string().describe("Content to index"),
  metadata: z__default.default.record(z__default.default.unknown()).optional().describe("Optional metadata")
});
var indexResponseSchema = z__default.default.object({
  success: z__default.default.boolean(),
  path: z__default.default.string()
});
var workspaceInfoResponseSchema = z__default.default.object({
  isWorkspaceConfigured: z__default.default.boolean(),
  id: z__default.default.string().optional(),
  name: z__default.default.string().optional(),
  status: z__default.default.string().optional(),
  capabilities: z__default.default.object({
    hasFilesystem: z__default.default.boolean(),
    hasSandbox: z__default.default.boolean(),
    canBM25: z__default.default.boolean(),
    canVector: z__default.default.boolean(),
    canHybrid: z__default.default.boolean(),
    hasSkills: z__default.default.boolean()
  }).optional(),
  safety: z__default.default.object({
    readOnly: z__default.default.boolean()
  }).optional()
});
var workspaceItemSchema = z__default.default.object({
  id: z__default.default.string(),
  name: z__default.default.string(),
  status: z__default.default.string(),
  source: z__default.default.enum(["mastra", "agent"]),
  agentId: z__default.default.string().optional(),
  agentName: z__default.default.string().optional(),
  capabilities: z__default.default.object({
    hasFilesystem: z__default.default.boolean(),
    hasSandbox: z__default.default.boolean(),
    canBM25: z__default.default.boolean(),
    canVector: z__default.default.boolean(),
    canHybrid: z__default.default.boolean(),
    hasSkills: z__default.default.boolean()
  }),
  safety: z__default.default.object({
    readOnly: z__default.default.boolean()
  })
});
var listWorkspacesResponseSchema = z__default.default.object({
  workspaces: z__default.default.array(workspaceItemSchema)
});
var skillNamePathParams = workspaceIdPathParams.extend({
  skillName: z__default.default.string().describe("Skill name identifier")
});
var skillReferencePathParams = skillNamePathParams.extend({
  referencePath: z__default.default.string().describe("Reference file path (URL encoded)")
});
var searchSkillsQuerySchema = z__default.default.object({
  query: z__default.default.string().describe("Search query text"),
  topK: z__default.default.coerce.number().optional().default(5).describe("Maximum number of results"),
  minScore: z__default.default.coerce.number().optional().describe("Minimum relevance score threshold"),
  skillNames: z__default.default.string().optional().describe("Comma-separated list of skill names to search within"),
  includeReferences: z__default.default.coerce.boolean().optional().default(true).describe("Include reference files in search")
});
var skillMetadataSchema = z__default.default.object({
  name: z__default.default.string(),
  description: z__default.default.string(),
  license: z__default.default.string().optional(),
  compatibility: z__default.default.unknown().optional(),
  metadata: z__default.default.record(z__default.default.unknown()).optional()
});
var skillSourceSchema = z__default.default.discriminatedUnion("type", [
  z__default.default.object({ type: z__default.default.literal("external"), packagePath: z__default.default.string() }),
  z__default.default.object({ type: z__default.default.literal("local"), projectPath: z__default.default.string() }),
  z__default.default.object({ type: z__default.default.literal("managed"), mastraPath: z__default.default.string() })
]);
var skillSchema = skillMetadataSchema.extend({
  path: z__default.default.string(),
  instructions: z__default.default.string(),
  source: skillSourceSchema,
  references: z__default.default.array(z__default.default.string()),
  scripts: z__default.default.array(z__default.default.string()),
  assets: z__default.default.array(z__default.default.string())
});
var skillsShSourceSchema = z__default.default.object({
  owner: z__default.default.string().describe("GitHub owner/org"),
  repo: z__default.default.string().describe("GitHub repository")
});
var skillMetadataWithPathSchema = skillMetadataSchema.extend({
  path: z__default.default.string().describe("Path to the skill directory"),
  /** Source info for skills installed via skills.sh (from .meta.json) */
  skillsShSource: skillsShSourceSchema.optional()
});
var listSkillsResponseSchema = z__default.default.object({
  skills: z__default.default.array(skillMetadataWithPathSchema),
  isSkillsConfigured: z__default.default.boolean().describe("Whether skills are configured in the workspace")
});
var getSkillResponseSchema = skillSchema;
var getAgentSkillResponseSchema = skillMetadataSchema.extend({
  path: z__default.default.string().optional(),
  instructions: z__default.default.string().optional(),
  source: skillSourceSchema.optional(),
  references: z__default.default.array(z__default.default.string()).optional(),
  scripts: z__default.default.array(z__default.default.string()).optional(),
  assets: z__default.default.array(z__default.default.string()).optional()
});
var skillReferenceResponseSchema = z__default.default.object({
  skillName: z__default.default.string(),
  referencePath: z__default.default.string(),
  content: z__default.default.string()
});
var listReferencesResponseSchema = z__default.default.object({
  skillName: z__default.default.string(),
  references: z__default.default.array(z__default.default.string())
});
var skillSearchResultSchema = z__default.default.object({
  skillName: z__default.default.string(),
  source: z__default.default.string(),
  content: z__default.default.string(),
  score: z__default.default.number(),
  lineRange: z__default.default.object({
    start: z__default.default.number(),
    end: z__default.default.number()
  }).optional(),
  scoreDetails: z__default.default.object({
    vector: z__default.default.number().optional(),
    bm25: z__default.default.number().optional()
  }).optional()
});
var searchSkillsResponseSchema = z__default.default.object({
  results: z__default.default.array(skillSearchResultSchema),
  query: z__default.default.string()
});
var skillsShSearchQuerySchema = z__default.default.object({
  q: z__default.default.string().describe("Search query"),
  limit: z__default.default.coerce.number().optional().default(10).describe("Maximum number of results")
});
var skillsShPopularQuerySchema = z__default.default.object({
  limit: z__default.default.coerce.number().optional().default(10).describe("Maximum number of results"),
  offset: z__default.default.coerce.number().optional().default(0).describe("Offset for pagination")
});
var skillsShSkillSchema = z__default.default.object({
  id: z__default.default.string(),
  name: z__default.default.string(),
  installs: z__default.default.number(),
  topSource: z__default.default.string()
});
var skillsShSearchResponseSchema = z__default.default.object({
  query: z__default.default.string(),
  searchType: z__default.default.string(),
  skills: z__default.default.array(skillsShSkillSchema),
  count: z__default.default.number()
});
var skillsShListResponseSchema = z__default.default.object({
  skills: z__default.default.array(skillsShSkillSchema),
  count: z__default.default.number(),
  limit: z__default.default.number(),
  offset: z__default.default.number()
});
var skillsShPreviewQuerySchema = z__default.default.object({
  owner: z__default.default.string().describe("GitHub repository owner"),
  repo: z__default.default.string().describe("GitHub repository name"),
  path: z__default.default.string().describe("Path to skill within repo")
});
var skillsShPreviewResponseSchema = z__default.default.object({
  content: z__default.default.string()
});
var skillsShInstallBodySchema = z__default.default.object({
  owner: z__default.default.string().describe("GitHub repository owner"),
  repo: z__default.default.string().describe("GitHub repository name"),
  skillName: z__default.default.string().describe("Skill name from skills.sh")
});
var skillsShInstallResponseSchema = z__default.default.object({
  success: z__default.default.boolean(),
  skillName: z__default.default.string(),
  installedPath: z__default.default.string(),
  filesWritten: z__default.default.number()
});
var skillsShRemoveBodySchema = z__default.default.object({
  skillName: z__default.default.string().describe("Name of the installed skill to remove")
});
var skillsShRemoveResponseSchema = z__default.default.object({
  success: z__default.default.boolean(),
  skillName: z__default.default.string(),
  removedPath: z__default.default.string()
});
var skillsShUpdateBodySchema = z__default.default.object({
  skillName: z__default.default.string().optional().describe("Specific skill to update, or omit to update all")
});
var skillsShUpdateResponseSchema = z__default.default.object({
  updated: z__default.default.array(
    z__default.default.object({
      skillName: z__default.default.string(),
      success: z__default.default.boolean(),
      filesWritten: z__default.default.number().optional(),
      error: z__default.default.string().optional()
    })
  )
});

exports.fsDeleteQuerySchema = fsDeleteQuerySchema;
exports.fsDeleteResponseSchema = fsDeleteResponseSchema;
exports.fsListQuerySchema = fsListQuerySchema;
exports.fsListResponseSchema = fsListResponseSchema;
exports.fsMkdirBodySchema = fsMkdirBodySchema;
exports.fsMkdirResponseSchema = fsMkdirResponseSchema;
exports.fsReadQuerySchema = fsReadQuerySchema;
exports.fsReadResponseSchema = fsReadResponseSchema;
exports.fsStatQuerySchema = fsStatQuerySchema;
exports.fsStatResponseSchema = fsStatResponseSchema;
exports.fsWriteBodySchema = fsWriteBodySchema;
exports.fsWriteResponseSchema = fsWriteResponseSchema;
exports.getAgentSkillResponseSchema = getAgentSkillResponseSchema;
exports.getSkillResponseSchema = getSkillResponseSchema;
exports.indexBodySchema = indexBodySchema;
exports.indexResponseSchema = indexResponseSchema;
exports.listReferencesResponseSchema = listReferencesResponseSchema;
exports.listSkillsResponseSchema = listSkillsResponseSchema;
exports.listWorkspacesResponseSchema = listWorkspacesResponseSchema;
exports.searchQuerySchema = searchQuerySchema;
exports.searchResponseSchema = searchResponseSchema;
exports.searchSkillsQuerySchema = searchSkillsQuerySchema;
exports.searchSkillsResponseSchema = searchSkillsResponseSchema;
exports.skillNamePathParams = skillNamePathParams;
exports.skillReferencePathParams = skillReferencePathParams;
exports.skillReferenceResponseSchema = skillReferenceResponseSchema;
exports.skillsShInstallBodySchema = skillsShInstallBodySchema;
exports.skillsShInstallResponseSchema = skillsShInstallResponseSchema;
exports.skillsShListResponseSchema = skillsShListResponseSchema;
exports.skillsShPopularQuerySchema = skillsShPopularQuerySchema;
exports.skillsShPreviewQuerySchema = skillsShPreviewQuerySchema;
exports.skillsShPreviewResponseSchema = skillsShPreviewResponseSchema;
exports.skillsShRemoveBodySchema = skillsShRemoveBodySchema;
exports.skillsShRemoveResponseSchema = skillsShRemoveResponseSchema;
exports.skillsShSearchQuerySchema = skillsShSearchQuerySchema;
exports.skillsShSearchResponseSchema = skillsShSearchResponseSchema;
exports.skillsShUpdateBodySchema = skillsShUpdateBodySchema;
exports.skillsShUpdateResponseSchema = skillsShUpdateResponseSchema;
exports.workspaceIdPathParams = workspaceIdPathParams;
exports.workspaceInfoResponseSchema = workspaceInfoResponseSchema;
//# sourceMappingURL=chunk-WLCN2OCY.cjs.map
//# sourceMappingURL=chunk-WLCN2OCY.cjs.map