Documentation
¶
Overview ¶
Package appproto defines the local contract-of-record browser host/guest postMessage envelopes for the MCP UI extension layer.
These message types are intentionally distinct from MCP JSON-RPC method names between MCP clients and MCP servers.
Index ¶
Constants ¶
View Source
const ( MethodToolsCall = "mcpui:tools-call" MethodMessage = "mcpui:message" MethodOpenLink = "mcpui:open-link" MethodHostReady = "mcpui:host-ready" MethodToolInput = "mcpui:tool-input" MethodToolInputPartial = "mcpui:tool-input-partial" MethodToolResult = "mcpui:tool-result" MethodTeardown = "mcpui:teardown" MethodSizeChanged = "mcpui:size-changed" )
View Source
const Version = "1.0.0"
Version is the current local appproto envelope version.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Envelope ¶
type Envelope[T any] struct { Version string `json:"version"` Method string `json:"method"` Params T `json:"params"` }
func NewEnvelope ¶
type HostReadyParams ¶
type MessageParams ¶
type OpenLinkParams ¶
type SizeChangedParams ¶
type TeardownParams ¶
type ToolInputParams ¶
type ToolInputPartialParams ¶
type ToolResultParams ¶
type ToolResultParams struct {
WindowID string `json:"windowId"`
ResourceURI string `json:"resourceUri"`
ToolName string `json:"toolName"`
Content interface{} `json:"content,omitempty"`
StructuredContent map[string]interface{} `json:"structuredContent,omitempty"`
Meta map[string]interface{} `json:"_meta,omitempty"`
ProtocolVersion string `json:"protocolVersion"`
}
Click to show internal directories.
Click to hide internal directories.