import type { MCPConfig, McpDirectoryWidgetTarget } from "../../mcp/build-server.js"; import type { ExternalAgentPolicy } from "../../mcp/external-agent-policy.js"; import type { McpDirectoryWidgetReadArgument } from "../../shared/embed-auth.js"; export interface AgentChatMcpIcon { src: string; mimeType?: string; sizes?: string[]; theme?: "light" | "dark"; } export interface AgentChatMcpOptions { enabled?: boolean; catalog?: "app" | "directory"; connectorCatalog?: string[]; directoryProfile?: { connectorCatalog: string[]; instructions?: string; widgets?: boolean; widgetTargets?: Record, result: unknown) => McpDirectoryWidgetTarget | null>; authorizeWidgetWrite?: NonNullable["authorizeWidgetWrite"]; widgetReadActionArguments?: Record>; widgetWriteActionArguments?: Record>; /** Actions whose capability-backed `mcp-widget` execution is strictly read-only. */ widgetReadOnlyActions?: readonly string[]; /** Unlisted public reads that are available only through a scoped widget ticket. */ widgetReadPublicActions?: readonly string[]; /** Unlisted authenticated reads available only through a scoped widget ticket. */ widgetReadPrivateActions?: readonly string[]; /** Authenticated reads surfaced on other agent profiles, but only scoped here. */ widgetReadAuthenticatedActions?: readonly string[]; /** Scoped reads minted only into a write capability that lists the mapped write action. */ widgetReadActionWriteGates?: Record; /** Omit the one shared resource title when tools have distinct invocation labels. */ widgetResourceTitle?: string | false; keyToolNames?: readonly string[]; toolDescriptions?: Record; toolParameterDescriptions?: Record>; hiddenToolParameters?: Record; projectResult?: (toolName: string, result: unknown) => unknown; }; externalAgents?: ExternalAgentPolicy; builtinCrossAppTools?: boolean; title?: string; description?: string; websiteUrl?: string; widgetDomain?: string; icons?: AgentChatMcpIcon[]; instructions?: string; keyToolNames?: readonly string[]; /** * The app's shell renders MCP approval reviews, as the toolkit's * `AppProviders` does; see `MCPConfig.appApprovalPage`. Without it, a * review link opens the framework's plain page, which works in any app. */ appApprovalPage?: boolean; } export interface AgentChatMcpLegacyInput { /** @deprecated Use `mcp.enabled: false`. */ disableMcp?: boolean; /** @deprecated Use `mcp.title` / `mcp.description` / `mcp.websiteUrl` / `mcp.icons`. */ mcpServerInfo?: { title?: string; description?: string; websiteUrl?: string; icons?: AgentChatMcpIcon[]; instructions?: string; }; /** @deprecated Use `mcp.connectorCatalog`. */ connectorCatalog?: string[]; /** @deprecated Use `mcp.externalAgents`. */ externalAgents?: ExternalAgentPolicy; initialToolNames?: readonly string[]; mcp?: AgentChatMcpOptions; } export interface ResolvedAgentChatMcp { enabled: boolean; catalog: "app" | "directory" | undefined; connectorCatalog: string[] | undefined; directoryProfile: AgentChatMcpOptions["directoryProfile"] | undefined; externalAgents: ExternalAgentPolicy | undefined; builtinCrossAppTools: boolean | undefined; title: string | undefined; description: string | undefined; websiteUrl: string | undefined; widgetDomain: string | undefined; icons: AgentChatMcpIcon[] | undefined; instructions: string | undefined; keyToolNames: readonly string[] | undefined; appApprovalPage: boolean; } export declare function resolveAgentChatMcpOptions(input: AgentChatMcpLegacyInput | undefined): ResolvedAgentChatMcp;