Rebased schemas

This commit is contained in:
martinalong 2025-12-26 14:16:26 -08:00
commit e90c7945bc
No known key found for this signature in database

256
src/generated/schema.ts generated
View file

@ -533,139 +533,141 @@ export const McpUiToolResultNotificationSchema = z.object({
/** /**
* @description Rich context about the host environment provided to Guest UIs. * @description Rich context about the host environment provided to Guest UIs.
*/ */
export const McpUiHostContextSchema = z.looseObject({ export const McpUiHostContextSchema = z
/** @description Metadata of the tool call that instantiated this App. */ .object({
toolInfo: z /** @description Metadata of the tool call that instantiated this App. */
.object({ toolInfo: z
/** @description JSON-RPC id of the tools/call request. */ .object({
id: RequestIdSchema.describe("JSON-RPC id of the tools/call request."), /** @description JSON-RPC id of the tools/call request. */
/** @description Tool definition including name, inputSchema, etc. */ id: RequestIdSchema.describe("JSON-RPC id of the tools/call request."),
tool: ToolSchema.describe( /** @description Tool definition including name, inputSchema, etc. */
"Tool definition including name, inputSchema, etc.", tool: ToolSchema.describe(
), "Tool definition including name, inputSchema, etc.",
}) ),
.optional() })
.describe("Metadata of the tool call that instantiated this App."), .optional()
/** @description Current color theme preference. */ .describe("Metadata of the tool call that instantiated this App."),
theme: McpUiThemeSchema.optional().describe( /** @description Current color theme preference. */
"Current color theme preference.", theme: McpUiThemeSchema.optional().describe(
), "Current color theme preference.",
/** @description Style configuration for theming the app. */ ),
styles: McpUiHostStylesSchema.optional().describe( /** @description Style configuration for theming the app. */
"Style configuration for theming the app.", styles: McpUiHostStylesSchema.optional().describe(
), "Style configuration for theming the app.",
/** @description How the UI is currently displayed. */ ),
displayMode: McpUiDisplayModeSchema.optional().describe( /** @description How the UI is currently displayed. */
"How the UI is currently displayed.", displayMode: McpUiDisplayModeSchema.optional().describe(
), "How the UI is currently displayed.",
/** @description Display modes the host supports. */ ),
availableDisplayModes: z /** @description Display modes the host supports. */
.array(z.string()) availableDisplayModes: z
.optional() .array(z.string())
.describe("Display modes the host supports."), .optional()
/** .describe("Display modes the host supports."),
* @description Container dimensions. Represents the dimensions of the iframe or other /**
* container holding the app. Specify either width or maxWidth, and either height or maxHeight. * @description Container dimensions. Represents the dimensions of the iframe or other
*/ * container holding the app. Specify either width or maxWidth, and either height or maxHeight.
containerDimensions: z */
.union([ containerDimensions: z
z.object({ .union([
/** @description Fixed container height in pixels. */
height: z.number().describe("Fixed container height in pixels."),
}),
z.object({
/** @description Maximum container height in pixels. */
maxHeight: z
.union([z.number(), z.undefined()])
.optional()
.describe("Maximum container height in pixels."),
}),
])
.and(
z.union([
z.object({ z.object({
/** @description Fixed container width in pixels. */ /** @description Fixed container height in pixels. */
width: z.number().describe("Fixed container width in pixels."), height: z.number().describe("Fixed container height in pixels."),
}), }),
z.object({ z.object({
/** @description Maximum container width in pixels. */ /** @description Maximum container height in pixels. */
maxWidth: z maxHeight: z
.union([z.number(), z.undefined()]) .union([z.number(), z.undefined()])
.optional() .optional()
.describe("Maximum container width in pixels."), .describe("Maximum container height in pixels."),
}), }),
]), ])
) .and(
.optional() z.union([
.describe( z.object({
"Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight.", /** @description Fixed container width in pixels. */
), width: z.number().describe("Fixed container width in pixels."),
/** }),
* @description Window viewport dimensions. Represents the host window's viewport size, z.object({
* which provides additional information apps can use to make responsive layout decisions. /** @description Maximum container width in pixels. */
*/ maxWidth: z
viewport: z .union([z.number(), z.undefined()])
.object({ .optional()
/** @description Window viewport width in pixels. */ .describe("Maximum container width in pixels."),
width: z }),
.union([z.number(), z.undefined()]) ]),
.optional() )
.describe("Window viewport width in pixels."), .optional()
/** @description Window viewport height in pixels. */ .describe(
height: z "Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight.",
.union([z.number(), z.undefined()]) ),
.optional() /**
.describe("Window viewport height in pixels."), * @description Window viewport dimensions. Represents the host window's viewport size,
}) * which provides additional information apps can use to make responsive layout decisions.
.optional() */
.describe( viewport: z
"Window viewport dimensions. Represents the host window's viewport size,\nwhich provides additional information apps can use to make responsive layout decisions.", .object({
), /** @description Window viewport width in pixels. */
/** @description User's language and region preference in BCP 47 format. */ width: z
locale: z .union([z.number(), z.undefined()])
.string() .optional()
.optional() .describe("Window viewport width in pixels."),
.describe("User's language and region preference in BCP 47 format."), /** @description Window viewport height in pixels. */
/** @description User's timezone in IANA format. */ height: z
timeZone: z.string().optional().describe("User's timezone in IANA format."), .union([z.number(), z.undefined()])
/** @description Host application identifier. */ .optional()
userAgent: z.string().optional().describe("Host application identifier."), .describe("Window viewport height in pixels."),
/** @description Platform type for responsive design decisions. */ })
platform: z .optional()
.union([z.literal("web"), z.literal("desktop"), z.literal("mobile")]) .describe(
.optional() "Window viewport dimensions. Represents the host window's viewport size,\nwhich provides additional information apps can use to make responsive layout decisions.",
.describe("Platform type for responsive design decisions."), ),
/** @description Device input capabilities. */ /** @description User's language and region preference in BCP 47 format. */
deviceCapabilities: z locale: z
.object({ .string()
/** @description Whether the device supports touch input. */ .optional()
touch: z .describe("User's language and region preference in BCP 47 format."),
.boolean() /** @description User's timezone in IANA format. */
.optional() timeZone: z.string().optional().describe("User's timezone in IANA format."),
.describe("Whether the device supports touch input."), /** @description Host application identifier. */
/** @description Whether the device supports hover interactions. */ userAgent: z.string().optional().describe("Host application identifier."),
hover: z /** @description Platform type for responsive design decisions. */
.boolean() platform: z
.optional() .union([z.literal("web"), z.literal("desktop"), z.literal("mobile")])
.describe("Whether the device supports hover interactions."), .optional()
}) .describe("Platform type for responsive design decisions."),
.optional() /** @description Device input capabilities. */
.describe("Device input capabilities."), deviceCapabilities: z
/** @description Mobile safe area boundaries in pixels. */ .object({
safeAreaInsets: z /** @description Whether the device supports touch input. */
.object({ touch: z
/** @description Top safe area inset in pixels. */ .boolean()
top: z.number().describe("Top safe area inset in pixels."), .optional()
/** @description Right safe area inset in pixels. */ .describe("Whether the device supports touch input."),
right: z.number().describe("Right safe area inset in pixels."), /** @description Whether the device supports hover interactions. */
/** @description Bottom safe area inset in pixels. */ hover: z
bottom: z.number().describe("Bottom safe area inset in pixels."), .boolean()
/** @description Left safe area inset in pixels. */ .optional()
left: z.number().describe("Left safe area inset in pixels."), .describe("Whether the device supports hover interactions."),
}) })
.optional() .optional()
.describe("Mobile safe area boundaries in pixels."), .describe("Device input capabilities."),
}); /** @description Mobile safe area boundaries in pixels. */
safeAreaInsets: z
.object({
/** @description Top safe area inset in pixels. */
top: z.number().describe("Top safe area inset in pixels."),
/** @description Right safe area inset in pixels. */
right: z.number().describe("Right safe area inset in pixels."),
/** @description Bottom safe area inset in pixels. */
bottom: z.number().describe("Bottom safe area inset in pixels."),
/** @description Left safe area inset in pixels. */
left: z.number().describe("Left safe area inset in pixels."),
})
.optional()
.describe("Mobile safe area boundaries in pixels."),
})
.passthrough();
/** /**
* @description Notification that host context has changed (Host -> Guest UI). * @description Notification that host context has changed (Host -> Guest UI).