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