UNPKG

histoire

Version:

A fast story book powered by Vite

49 lines • 2.24 kB
import { z } from 'zod'; /** Unknown display metadata is ignored while launch fields receive strict validation. */ declare const entrySchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; version: z.ZodOptional<z.ZodString>; icon: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string, unknown>>>; distribution: z.ZodOptional<z.ZodObject<{ npx: z.ZodOptional<z.ZodObject<{ package: z.ZodString; args: z.ZodDefault<z.ZodArray<z.ZodString>>; env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>; }, z.core.$strip>>; uvx: z.ZodOptional<z.ZodObject<{ package: z.ZodString; args: z.ZodDefault<z.ZodArray<z.ZodString>>; env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>; }, z.core.$strip>>; binary: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{ archive: z.ZodURL; cmd: z.ZodString; args: z.ZodDefault<z.ZodArray<z.ZodString>>; sha256: z.ZodOptional<z.ZodString>; }, z.core.$strip>>>; }, z.core.$strip>>; }, z.core.$strip>; /** Validated private catalog definition. */ export type AgentRegistryEntry = z.infer<typeof entrySchema>; /** Server-owned executable definition or archive preparation request. */ export interface AgentDistribution { /** Launch mechanism. */ kind: 'npx' | 'uvx' | 'binary'; /** Exact command, relative to archive for binaries. */ command: string; /** Exact argument boundaries. */ args: string[]; /** Registry defaults layered below private local overrides. */ env: Record<string, string>; /** Binary distribution URL. */ archive?: string; /** Optional published archive digest. */ sha256?: string; } /** Bad entries cannot erase a usable cached catalog or inject unsafe identities. */ export declare function parseAgentRegistry(value: unknown): AgentRegistryEntry[]; /** Prefer package runners, then exact OS/architecture binary without guessing aliases. */ export declare function resolveAgentDistribution(entry: AgentRegistryEntry, platform?: string, arch?: string): AgentDistribution | undefined; export {}; //# sourceMappingURL=registry-schema.d.ts.map