'use strict';

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

var storedWorkspaceIdPathParams = v4.z.object({
  storedWorkspaceId: v4.z.string().describe("Unique identifier for the stored workspace")
});
var storageOrderBySchema = v4.z.object({
  field: v4.z.enum(["createdAt", "updatedAt"]).optional(),
  direction: v4.z.enum(["ASC", "DESC"]).optional()
});
var listStoredWorkspacesQuerySchema = chunkDIG2K5CV_cjs.createPagePaginationSchema(100).extend({
  orderBy: storageOrderBySchema.optional(),
  authorId: v4.z.string().optional().describe("Filter workspaces by author identifier"),
  metadata: v4.z.record(v4.z.string(), v4.z.unknown()).optional().describe("Filter workspaces by metadata key-value pairs")
});
var filesystemConfigSchema = v4.z.object({
  provider: v4.z.string().describe("Filesystem provider name"),
  config: v4.z.record(v4.z.string(), v4.z.unknown()).describe("Filesystem provider configuration")
});
var sandboxConfigSchema = v4.z.object({
  provider: v4.z.string().describe("Sandbox provider name"),
  config: v4.z.record(v4.z.string(), v4.z.unknown()).describe("Sandbox provider configuration")
});
var searchConfigSchema = v4.z.object({
  vectorProvider: v4.z.string().optional().describe("Vector store provider identifier"),
  vectorConfig: v4.z.record(v4.z.string(), v4.z.unknown()).optional().describe("Vector store provider-specific configuration"),
  embedderProvider: v4.z.string().optional().describe("Embedder provider identifier"),
  embedderModel: v4.z.string().optional().describe("Embedder model name"),
  embedderConfig: v4.z.record(v4.z.string(), v4.z.unknown()).optional().describe("Embedder provider-specific configuration"),
  bm25: v4.z.union([v4.z.boolean(), v4.z.object({ k1: v4.z.number().optional(), b: v4.z.number().optional() })]).optional().describe("BM25 keyword search config"),
  searchIndexName: v4.z.string().optional().describe("Custom index name for the vector store"),
  autoIndexPaths: v4.z.array(v4.z.string()).optional().describe("Paths to auto-index on init")
});
var workspaceToolConfigSchema = v4.z.object({
  enabled: v4.z.boolean().optional().describe("Whether the tool is enabled"),
  requireApproval: v4.z.boolean().optional().describe("Whether the tool requires user approval before execution"),
  requireReadBeforeWrite: v4.z.boolean().optional().describe("For write tools: require reading a file before writing to it")
});
var workspaceToolsConfigSchema = v4.z.object({
  enabled: v4.z.boolean().optional().describe("Default: whether all tools are enabled"),
  requireApproval: v4.z.boolean().optional().describe("Default: whether all tools require user approval"),
  tools: v4.z.record(v4.z.string(), workspaceToolConfigSchema).optional().describe("Per-tool overrides keyed by workspace tool name")
});
var snapshotConfigSchema = v4.z.object({
  name: v4.z.string().describe("Name of the workspace"),
  description: v4.z.string().optional().describe("Description of the workspace"),
  filesystem: filesystemConfigSchema.optional().describe("Filesystem configuration"),
  sandbox: sandboxConfigSchema.optional().describe("Sandbox configuration"),
  mounts: v4.z.record(v4.z.string(), filesystemConfigSchema).optional().describe("Mounted filesystems keyed by mount path"),
  search: searchConfigSchema.optional().describe("Search configuration"),
  skills: v4.z.array(v4.z.string()).optional().describe("Array of skill IDs"),
  tools: workspaceToolsConfigSchema.optional().describe("Workspace tool configuration"),
  autoSync: v4.z.boolean().optional().describe("Whether to automatically sync the workspace"),
  operationTimeout: v4.z.number().optional().describe("Operation timeout in milliseconds")
});
var createStoredWorkspaceBodySchema = 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"),
  metadata: v4.z.record(v4.z.string(), v4.z.unknown()).optional().describe("Additional metadata for the workspace")
}).merge(snapshotConfigSchema);
var updateStoredWorkspaceBodySchema = v4.z.object({
  authorId: v4.z.string().optional(),
  metadata: v4.z.record(v4.z.string(), v4.z.unknown()).optional()
}).partial().merge(snapshotConfigSchema.partial());
var storedWorkspaceSchema = v4.z.object({
  id: v4.z.string(),
  status: v4.z.string().describe("Workspace status: draft, published, or archived"),
  activeVersionId: v4.z.string().optional(),
  authorId: v4.z.string().optional(),
  metadata: v4.z.record(v4.z.string(), v4.z.unknown()).optional(),
  createdAt: v4.z.coerce.date(),
  updatedAt: v4.z.coerce.date(),
  name: v4.z.string().describe("Name of the workspace"),
  description: v4.z.string().optional().describe("Description of the workspace"),
  filesystem: filesystemConfigSchema.optional().describe("Filesystem configuration"),
  sandbox: sandboxConfigSchema.optional().describe("Sandbox configuration"),
  mounts: v4.z.record(v4.z.string(), filesystemConfigSchema).optional().describe("Mounted filesystems keyed by mount path"),
  search: searchConfigSchema.optional().describe("Search configuration"),
  skills: v4.z.array(v4.z.string()).optional().describe("Array of skill IDs"),
  tools: workspaceToolsConfigSchema.optional().describe("Workspace tool configuration"),
  autoSync: v4.z.boolean().optional().describe("Whether to automatically sync the workspace"),
  operationTimeout: v4.z.number().optional().describe("Operation timeout in milliseconds")
});
var listStoredWorkspacesResponseSchema = chunkDIG2K5CV_cjs.paginationInfoSchema.extend({
  workspaces: v4.z.array(storedWorkspaceSchema)
});
var getStoredWorkspaceResponseSchema = storedWorkspaceSchema;
var createStoredWorkspaceResponseSchema = storedWorkspaceSchema;
var updateStoredWorkspaceResponseSchema = v4.z.union([
  v4.z.object({
    id: v4.z.string(),
    status: v4.z.string(),
    activeVersionId: v4.z.string().optional(),
    authorId: v4.z.string().optional(),
    metadata: v4.z.record(v4.z.string(), v4.z.unknown()).optional(),
    createdAt: v4.z.coerce.date(),
    updatedAt: v4.z.coerce.date()
  }),
  storedWorkspaceSchema
]);
var deleteStoredWorkspaceResponseSchema = v4.z.object({
  success: v4.z.boolean(),
  message: v4.z.string()
});

exports.createStoredWorkspaceBodySchema = createStoredWorkspaceBodySchema;
exports.createStoredWorkspaceResponseSchema = createStoredWorkspaceResponseSchema;
exports.deleteStoredWorkspaceResponseSchema = deleteStoredWorkspaceResponseSchema;
exports.getStoredWorkspaceResponseSchema = getStoredWorkspaceResponseSchema;
exports.listStoredWorkspacesQuerySchema = listStoredWorkspacesQuerySchema;
exports.listStoredWorkspacesResponseSchema = listStoredWorkspacesResponseSchema;
exports.snapshotConfigSchema = snapshotConfigSchema;
exports.storedWorkspaceIdPathParams = storedWorkspaceIdPathParams;
exports.storedWorkspaceSchema = storedWorkspaceSchema;
exports.updateStoredWorkspaceBodySchema = updateStoredWorkspaceBodySchema;
exports.updateStoredWorkspaceResponseSchema = updateStoredWorkspaceResponseSchema;
//# sourceMappingURL=chunk-UH3MHVDF.cjs.map
//# sourceMappingURL=chunk-UH3MHVDF.cjs.map