UNPKG

@kya-os/cli

Version:

CLI for KYA-OS MCP-I setup and management

101 lines 3.4 kB
/** * Validation Schemas * Using Zod for runtime validation of CLI inputs */ import { z } from "zod"; /** * Agent name validation * - Must be 3-64 characters * - Only lowercase letters, numbers, and hyphens * - Must start with a letter * - Cannot end with a hyphen */ export declare const agentNameSchema: z.ZodString; /** * Agent description validation */ export declare const agentDescriptionSchema: z.ZodOptional<z.ZodString>; /** * Repository URL validation */ export declare const repositoryUrlSchema: z.ZodOptional<z.ZodString>; /** * DID validation */ export declare const didSchema: z.ZodString; /** * Environment variable validation */ export declare const envVariableSchema: z.ZodObject<{ MCP_IDENTITY_AGENT_DID: z.ZodString; MCP_IDENTITY_AGENT_PUBLIC_KEY: z.ZodString; MCP_IDENTITY_AGENT_PRIVATE_KEY: z.ZodString; MCP_IDENTITY_AGENT_ID: z.ZodString; MCP_IDENTITY_AGENT_SLUG: z.ZodString; }, "strip", z.ZodTypeAny, { MCP_IDENTITY_AGENT_DID: string; MCP_IDENTITY_AGENT_PUBLIC_KEY: string; MCP_IDENTITY_AGENT_PRIVATE_KEY: string; MCP_IDENTITY_AGENT_ID: string; MCP_IDENTITY_AGENT_SLUG: string; }, { MCP_IDENTITY_AGENT_DID: string; MCP_IDENTITY_AGENT_PUBLIC_KEY: string; MCP_IDENTITY_AGENT_PRIVATE_KEY: string; MCP_IDENTITY_AGENT_ID: string; MCP_IDENTITY_AGENT_SLUG: string; }>; /** * Init command options validation */ export declare const initOptionsSchema: z.ZodObject<{ name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodOptional<z.ZodString>>; repository: z.ZodOptional<z.ZodOptional<z.ZodString>>; platform: z.ZodOptional<z.ZodString>; skipRegistration: z.ZodOptional<z.ZodBoolean>; force: z.ZodOptional<z.ZodBoolean>; verbose: z.ZodOptional<z.ZodBoolean>; local: z.ZodOptional<z.ZodBoolean>; endpoint: z.ZodOptional<z.ZodString>; skipClaimCheck: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { name?: string | undefined; description?: string | undefined; repository?: string | undefined; platform?: string | undefined; skipRegistration?: boolean | undefined; force?: boolean | undefined; verbose?: boolean | undefined; local?: boolean | undefined; endpoint?: string | undefined; skipClaimCheck?: boolean | undefined; }, { name?: string | undefined; description?: string | undefined; repository?: string | undefined; platform?: string | undefined; skipRegistration?: boolean | undefined; force?: boolean | undefined; verbose?: boolean | undefined; local?: boolean | undefined; endpoint?: string | undefined; skipClaimCheck?: boolean | undefined; }>; /** * Platform validation */ export declare const platformSchema: z.ZodEnum<["vercel", "nextjs", "netlify", "cloudflare", "aws-lambda", "heroku", "docker", "nodejs", "other"]>; /** * Directory configuration validation */ export declare const directoryConfigSchema: z.ZodUnion<[z.ZodLiteral<"verified">, z.ZodLiteral<"none">, z.ZodArray<z.ZodString, "many">]>; /** * Validate input with helpful error messages */ export declare function validateInput<T>(schema: z.ZodSchema<T>, data: unknown, fieldName: string): T; /** * Safe parse with default value */ export declare function safeParseWithDefault<T>(schema: z.ZodSchema<T>, data: unknown, defaultValue: T): T; //# sourceMappingURL=validation.d.ts.map