UNPKG

histoire

Version:

A fast story book powered by Vite

192 lines • 7.76 kB
import { z } from 'zod/v4'; /** Retained PNG metadata; binary content is separately served through artifact resource. */ export declare const mcpScreenshotResultSchema: z.ZodObject<{ storyId: z.ZodString; variantId: z.ZodString; width: z.ZodNumber; height: z.ZodNumber; mimeType: z.ZodLiteral<"image/png">; bytes: z.ZodNumber; sha256: z.ZodString; artifactUri: z.ZodString; }, z.core.$strict>; /** Existing shared summary with explicit development/deployment execution engine. */ export declare const mcpTestResultSchema: z.ZodObject<{ storyId: z.ZodString; variantId: z.ZodOptional<z.ZodString>; engine: z.ZodEnum<{ "built-preview": "built-preview"; "project-vitest": "project-vitest"; }>; summary: z.ZodType<import("@histoire/protocol").HistoireTestRunSummary, unknown, z.core.$ZodTypeInternals<import("@histoire/protocol").HistoireTestRunSummary, unknown>>; truncated: z.ZodBoolean; }, z.core.$strict>; /** Exact owned operation, with one terminal transition and captured generation. */ export declare const mcpOperationSchema: z.ZodObject<{ operationId: z.ZodUUID; projectId: z.ZodString; epoch: z.ZodUUID; revision: z.ZodString; kind: z.ZodEnum<{ "inspect-accessibility": "inspect-accessibility"; "inspect-dom": "inspect-dom"; "inspect-variant": "inspect-variant"; "runtime-diagnostics": "runtime-diagnostics"; screenshot: "screenshot"; tests: "tests"; }>; state: z.ZodEnum<{ cancelled: "cancelled"; cancelling: "cancelling"; completed: "completed"; failed: "failed"; queued: "queued"; running: "running"; }>; createdAt: z.ZodISODateTime; startedAt: z.ZodOptional<z.ZodISODateTime>; finishedAt: z.ZodOptional<z.ZodISODateTime>; result: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{ storyId: z.ZodString; variantId: z.ZodString; width: z.ZodNumber; height: z.ZodNumber; mimeType: z.ZodLiteral<"image/png">; bytes: z.ZodNumber; sha256: z.ZodString; artifactUri: z.ZodString; }, z.core.$strict>, z.ZodObject<{ storyId: z.ZodString; variantId: z.ZodOptional<z.ZodString>; engine: z.ZodEnum<{ "built-preview": "built-preview"; "project-vitest": "project-vitest"; }>; summary: z.ZodType<import("@histoire/protocol").HistoireTestRunSummary, unknown, z.core.$ZodTypeInternals<import("@histoire/protocol").HistoireTestRunSummary, unknown>>; truncated: z.ZodBoolean; }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{ storyId: z.ZodString; variantId: z.ZodString; viewport: z.ZodObject<{ width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strict>; truncated: z.ZodBoolean; inspection: z.ZodLiteral<"variant">; state: z.ZodRecord<z.ZodString, z.ZodJSONSchema>; propsAvailable: z.ZodBoolean; components: z.ZodArray<z.ZodObject<{ name: z.ZodString; index: z.ZodNumber; props: z.ZodArray<z.ZodObject<{ name: z.ZodString; types: z.ZodOptional<z.ZodArray<z.ZodString>>; required: z.ZodOptional<z.ZodBoolean>; default: z.ZodOptional<z.ZodJSONSchema>; value: z.ZodOptional<z.ZodJSONSchema>; values: z.ZodOptional<z.ZodArray<z.ZodJSONSchema>>; }, z.core.$strict>>; }, z.core.$strict>>; omittedValues: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ storyId: z.ZodString; variantId: z.ZodString; viewport: z.ZodObject<{ width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strict>; truncated: z.ZodBoolean; inspection: z.ZodLiteral<"dom">; matched: z.ZodBoolean; nodes: z.ZodArray<z.ZodObject<{ index: z.ZodNumber; parentIndex: z.ZodNullable<z.ZodNumber>; tag: z.ZodString; attributes: z.ZodRecord<z.ZodString, z.ZodString>; text: z.ZodString; rect: z.ZodObject<{ x: z.ZodNumber; y: z.ZodNumber; width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strict>; styles: z.ZodRecord<z.ZodString, z.ZodString>; }, z.core.$strict>>; }, z.core.$strict>, z.ZodObject<{ storyId: z.ZodString; variantId: z.ZodString; viewport: z.ZodObject<{ width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strict>; truncated: z.ZodBoolean; inspection: z.ZodLiteral<"accessibility">; matched: z.ZodBoolean; snapshot: z.ZodString; totalCharacters: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ storyId: z.ZodString; variantId: z.ZodString; viewport: z.ZodObject<{ width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strict>; truncated: z.ZodBoolean; inspection: z.ZodLiteral<"diagnostics">; previewReady: z.ZodBoolean; readinessError: z.ZodOptional<z.ZodString>; entries: z.ZodArray<z.ZodObject<{ kind: z.ZodEnum<{ console: "console"; "http-error": "http-error"; "page-error": "page-error"; "request-failed": "request-failed"; }>; level: z.ZodOptional<z.ZodString>; message: z.ZodString; url: z.ZodOptional<z.ZodString>; status: z.ZodOptional<z.ZodNumber>; }, z.core.$strict>>; droppedCount: z.ZodNumber; }, z.core.$strict>], "inspection">]>>; error: z.ZodOptional<z.ZodObject<{ code: z.ZodEnum<{ ARTIFACT_NOT_FOUND: "ARTIFACT_NOT_FOUND"; BROWSER_UNAVAILABLE: "BROWSER_UNAVAILABLE"; CANCELLED: "CANCELLED"; CAPABILITY_UNAVAILABLE: "CAPABILITY_UNAVAILABLE"; COLLECTION_FAILED: "COLLECTION_FAILED"; CURSOR_EXPIRED: "CURSOR_EXPIRED"; DEPENDENCY_MISSING: "DEPENDENCY_MISSING"; DOCS_NOT_FOUND: "DOCS_NOT_FOUND"; INTERNAL_ERROR: "INTERNAL_ERROR"; INVALID_CURSOR: "INVALID_CURSOR"; INVALID_SELECTOR: "INVALID_SELECTOR"; OPERATION_NOT_FOUND: "OPERATION_NOT_FOUND"; PATH_OUTSIDE_ROOT: "PATH_OUTSIDE_ROOT"; PREVIEW_NOT_READY: "PREVIEW_NOT_READY"; PROJECT_CLOSED: "PROJECT_CLOSED"; PROJECT_RESTARTING: "PROJECT_RESTARTING"; PROJECT_STARTING: "PROJECT_STARTING"; QUEUE_FULL: "QUEUE_FULL"; REQUEST_KEY_CONFLICT: "REQUEST_KEY_CONFLICT"; RESULT_TOO_LARGE: "RESULT_TOO_LARGE"; SOURCE_UNAVAILABLE: "SOURCE_UNAVAILABLE"; STALE_REVISION: "STALE_REVISION"; STORY_AMBIGUOUS: "STORY_AMBIGUOUS"; STORY_NOT_FOUND: "STORY_NOT_FOUND"; TIMEOUT: "TIMEOUT"; VARIANT_NOT_FOUND: "VARIANT_NOT_FOUND"; }>; message: z.ZodString; retryable: z.ZodBoolean; details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>; }, z.core.$strict>>; }, z.core.$strict>; /** Public operation DTO. */ export type McpOperation = z.infer<typeof mcpOperationSchema>; /** Public screenshot result DTO. */ export type McpScreenshotResult = z.infer<typeof mcpScreenshotResultSchema>; /** Public test result DTO reusing shared summary. */ export type McpTestResult = z.infer<typeof mcpTestResultSchema>; //# sourceMappingURL=operation-schema.d.ts.map