You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Corrects the indentation of nested block structures (alt, opt, par,
loop) in all four Mermaid sequence diagrams. Content inside nested
blocks is now properly indented relative to the block keywords, making
the hierarchical structure clearer and more readable.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Copy file name to clipboardExpand all lines: specification/draft/apps.mdx
+75-75Lines changed: 75 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -636,49 +636,49 @@ The typical lifecycle for rendering a UI resource:
636
636
637
637
```mermaid
638
638
sequenceDiagram
639
-
participant H as Host
640
-
participant S as MCP Server
639
+
participant H as Host
640
+
participant S as MCP Server
641
641
642
-
autonumber
643
-
S -->> H: resources/list (includes ui:// resources)
644
-
S -->> H: tools/list (includes tools with ui/resourceUri metadata)
642
+
autonumber
643
+
S -->> H: resources/list (includes ui:// resources)
644
+
S -->> H: tools/list (includes tools with ui/resourceUri metadata)
645
645
```
646
646
647
647
#### 2. UI Initialization (Desktop/Native Hosts)
648
648
649
649
```mermaid
650
650
sequenceDiagram
651
-
participant H as Host
652
-
participant UI as Guest UI (iframe)
653
-
participant P as Sandbox Proxy
654
-
participant S as MCP Server
655
-
656
-
autonumber
657
-
par UI Tool call
658
-
H ->> S: tools/call to Tool with ui/resourceUri metadata
659
-
and UI initialization
660
-
alt Desktop/Native hosts
661
-
H ->> H: Render Guest UI in an iframe (HTML from the ui:// resource)
662
-
else Web hosts
663
-
H ->> H: Render Sandbox Proxy in an iframe (different origin)
664
-
P ->> H: ui/notifications/sandbox-ready
665
-
H -->> P: ui/notifications/sandbox-resource-ready (HTML content)
666
-
P -> P: Render inner iframe with HTML
667
-
668
-
end
669
-
UI ->> H: ui/initialize
670
-
H -->> UI: McpUiInitializeResult (e.g., host-context, capabilities, etc.)
671
-
UI ->> H: ui/notifications/initialized
672
-
opt Stream Tool input to UI
673
-
H -->> UI: ui/notifications/tool-input-partial (0..n)
674
-
end
675
-
H -->> UI: ui/notifications/tool-input (complete)
676
-
end
677
-
alt Tool complete
678
-
H -->> UI: ui/notifications/tool-result
679
-
else Tool cancelled
680
-
H -->> UI: ui/notifications/tool-cancelled
681
-
end
651
+
participant H as Host
652
+
participant UI as Guest UI (iframe)
653
+
participant P as Sandbox Proxy
654
+
participant S as MCP Server
655
+
656
+
autonumber
657
+
par UI Tool call
658
+
H ->> S: tools/call to Tool with ui/resourceUri metadata
659
+
and UI initialization
660
+
alt Desktop/Native hosts
661
+
H ->> H: Render Guest UI in an iframe (HTML from the ui:// resource)
662
+
else Web hosts
663
+
H ->> H: Render Sandbox Proxy in an iframe (different origin)
664
+
P ->> H: ui/notifications/sandbox-ready
665
+
H -->> P: ui/notifications/sandbox-resource-ready (HTML content)
666
+
P -> P: Render inner iframe with HTML
667
+
668
+
end
669
+
UI ->> H: ui/initialize
670
+
H -->> UI: McpUiInitializeResult (e.g., host-context, capabilities, etc.)
671
+
UI ->> H: ui/notifications/initialized
672
+
opt Stream Tool input to UI
673
+
H -->> UI: ui/notifications/tool-input-partial (0..n)
674
+
end
675
+
H -->> UI: ui/notifications/tool-input (complete)
676
+
end
677
+
alt Tool complete
678
+
H -->> UI: ui/notifications/tool-result
679
+
else Tool cancelled
680
+
H -->> UI: ui/notifications/tool-cancelled
681
+
end
682
682
```
683
683
684
684
Note: when the Guest UI is rendered inside a sandbox, the sandbox transparently passes messages between the Guest UI and the Host, except for messages named `ui/notifications/sandbox-*`.
@@ -687,51 +687,51 @@ Note: when the Guest UI is rendered inside a sandbox, the sandbox transparently
687
687
688
688
```mermaid
689
689
sequenceDiagram
690
-
actor U as User / Agent
691
-
participant H as Host
692
-
participant UI as Guest UI (iframe)
693
-
participant S as MCP Server
694
-
loop Interactive phase
695
-
U ->> UI: interaction (e.g., click)
696
-
alt Tool call
697
-
UI ->> H: tools/call
698
-
H ->> S: tools/call
699
-
opt Stream Tool input to UI
700
-
H -->> UI: ui/notifications/tool-input-partial (0..n)
701
-
end
702
-
H -->> UI: ui/notifications/tool-input (complete)
703
-
H-->>UI: ui/notifications/tool-result
704
-
else Message
705
-
UI ->> H: ui/message
706
-
H -->> H: Process message and follow up
707
-
else Notify
708
-
UI ->> H: notifications/message
709
-
H ->> H: Process notification and store in context
0 commit comments