68 lines
2.1 KiB
TypeScript
68 lines
2.1 KiB
TypeScript
import { AbstractAgent } from "@ag-ui/client";
|
|
import React from "react";
|
|
import { z } from "zod";
|
|
|
|
//#region src/components/MCPAppsActivityRenderer.d.ts
|
|
/**
|
|
* Activity type for MCP Apps events - must match the middleware's MCPAppsActivityType
|
|
*/
|
|
declare const MCPAppsActivityType = "mcp-apps";
|
|
declare const MCPAppsActivityContentSchema: z.ZodObject<{
|
|
result: z.ZodObject<{
|
|
content: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
structuredContent: z.ZodOptional<z.ZodAny>;
|
|
isError: z.ZodOptional<z.ZodBoolean>;
|
|
}, "strip", z.ZodTypeAny, {
|
|
content?: any[] | undefined;
|
|
structuredContent?: any;
|
|
isError?: boolean | undefined;
|
|
}, {
|
|
content?: any[] | undefined;
|
|
structuredContent?: any;
|
|
isError?: boolean | undefined;
|
|
}>;
|
|
resourceUri: z.ZodString;
|
|
serverHash: z.ZodString;
|
|
serverId: z.ZodOptional<z.ZodString>;
|
|
toolInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
}, "strip", z.ZodTypeAny, {
|
|
result: {
|
|
content?: any[] | undefined;
|
|
structuredContent?: any;
|
|
isError?: boolean | undefined;
|
|
};
|
|
resourceUri: string;
|
|
serverHash: string;
|
|
serverId?: string | undefined;
|
|
toolInput?: Record<string, unknown> | undefined;
|
|
}, {
|
|
result: {
|
|
content?: any[] | undefined;
|
|
structuredContent?: any;
|
|
isError?: boolean | undefined;
|
|
};
|
|
resourceUri: string;
|
|
serverHash: string;
|
|
serverId?: string | undefined;
|
|
toolInput?: Record<string, unknown> | undefined;
|
|
}>;
|
|
type MCPAppsActivityContent = z.infer<typeof MCPAppsActivityContentSchema>;
|
|
/**
|
|
* Props for the activity renderer component
|
|
*/
|
|
interface MCPAppsActivityRendererProps {
|
|
activityType: string;
|
|
content: MCPAppsActivityContent;
|
|
message: unknown;
|
|
agent: AbstractAgent | undefined;
|
|
}
|
|
/**
|
|
* MCP Apps Extension Activity Renderer
|
|
*
|
|
* Renders MCP Apps UI in a sandboxed iframe with full protocol support.
|
|
* Fetches resource content on-demand via proxied MCP requests.
|
|
*/
|
|
declare const MCPAppsActivityRenderer: React.FC<MCPAppsActivityRendererProps>;
|
|
//#endregion
|
|
export { MCPAppsActivityContent, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType };
|
|
//# sourceMappingURL=MCPAppsActivityRenderer.d.cts.map
|