histoire
Version:
A fast story book powered by Vite
201 lines • 8.13 kB
TypeScript
import { z } from 'zod/v4';
/** Exact implemented inspection kinds and their public tool identities. */
export declare const MCP_INSPECTION_TOOLS: {
readonly 'inspect-variant': 'histoire_inspect_variant';
readonly 'inspect-dom': 'histoire_inspect_dom';
readonly 'inspect-accessibility': 'histoire_inspect_accessibility';
readonly 'runtime-diagnostics': 'histoire_get_runtime_diagnostics';
};
/** Strict browser inspection arguments with shared screenshot appearance policy. */
export declare const mcpInspectionInputSchemas: {
readonly histoire_inspect_variant: z.ZodObject<{
storyId: z.ZodString;
variantId: z.ZodString;
expectedRevision: z.ZodOptional<z.ZodString>;
requestKey: z.ZodString;
width: z.ZodDefault<z.ZodNumber>;
height: z.ZodDefault<z.ZodNumber>;
deviceScaleFactor: z.ZodDefault<z.ZodNumber>;
globals: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodTransform<Readonly<{
[x: string]: string | number | boolean;
}>, Record<string, string | number | boolean>>>>;
colorScheme: z.ZodOptional<z.ZodEnum<{
dark: "dark";
light: "light";
}>>;
textDirection: z.ZodDefault<z.ZodEnum<{
ltr: "ltr";
rtl: "rtl";
}>>;
}, z.core.$strict>;
readonly histoire_inspect_dom: z.ZodObject<{
storyId: z.ZodString;
variantId: z.ZodString;
expectedRevision: z.ZodOptional<z.ZodString>;
requestKey: z.ZodString;
width: z.ZodDefault<z.ZodNumber>;
height: z.ZodDefault<z.ZodNumber>;
deviceScaleFactor: z.ZodDefault<z.ZodNumber>;
globals: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodTransform<Readonly<{
[x: string]: string | number | boolean;
}>, Record<string, string | number | boolean>>>>;
colorScheme: z.ZodOptional<z.ZodEnum<{
dark: "dark";
light: "light";
}>>;
textDirection: z.ZodDefault<z.ZodEnum<{
ltr: "ltr";
rtl: "rtl";
}>>;
selector: z.ZodDefault<z.ZodString>;
maxNodes: z.ZodDefault<z.ZodNumber>;
maxDepth: z.ZodDefault<z.ZodNumber>;
}, z.core.$strict>;
readonly histoire_inspect_accessibility: z.ZodObject<{
storyId: z.ZodString;
variantId: z.ZodString;
expectedRevision: z.ZodOptional<z.ZodString>;
requestKey: z.ZodString;
width: z.ZodDefault<z.ZodNumber>;
height: z.ZodDefault<z.ZodNumber>;
deviceScaleFactor: z.ZodDefault<z.ZodNumber>;
globals: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodTransform<Readonly<{
[x: string]: string | number | boolean;
}>, Record<string, string | number | boolean>>>>;
colorScheme: z.ZodOptional<z.ZodEnum<{
dark: "dark";
light: "light";
}>>;
textDirection: z.ZodDefault<z.ZodEnum<{
ltr: "ltr";
rtl: "rtl";
}>>;
selector: z.ZodDefault<z.ZodString>;
maxCharacters: z.ZodDefault<z.ZodNumber>;
}, z.core.$strict>;
readonly histoire_get_runtime_diagnostics: z.ZodObject<{
storyId: z.ZodString;
variantId: z.ZodString;
expectedRevision: z.ZodOptional<z.ZodString>;
requestKey: z.ZodString;
width: z.ZodDefault<z.ZodNumber>;
height: z.ZodDefault<z.ZodNumber>;
deviceScaleFactor: z.ZodDefault<z.ZodNumber>;
globals: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, z.ZodTransform<Readonly<{
[x: string]: string | number | boolean;
}>, Record<string, string | number | boolean>>>>;
colorScheme: z.ZodOptional<z.ZodEnum<{
dark: "dark";
light: "light";
}>>;
textDirection: z.ZodDefault<z.ZodEnum<{
ltr: "ltr";
rtl: "rtl";
}>>;
observationMs: z.ZodDefault<z.ZodNumber>;
}, z.core.$strict>;
};
/** Bounded runtime telemetry excludes headers, bodies and argument objects. */
export declare const mcpRuntimeDiagnosticSchema: 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>;
/** Discriminated detached results, shared by polling, resources and worker validation. */
export declare const mcpInspectionResultSchema: 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">;
/** Public detached inspection DTO. */
export type McpInspectionResult = z.infer<typeof mcpInspectionResultSchema>;
/** Parsed public input shared by concrete isolated inspection executors. */
export type McpInspectionInput = z.infer<(typeof mcpInspectionInputSchemas)[keyof typeof mcpInspectionInputSchemas]>;
//# sourceMappingURL=inspection-schema.d.ts.map