Fix indentation in Mermaid sequence diagrams

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 <noreply@anthropic.com>
This commit is contained in:
Jonathan Hefner 2025-11-21 15:52:24 -06:00
commit 1eaf7377ca

View file

@ -636,10 +636,10 @@ The typical lifecycle for rendering a UI resource:
```mermaid ```mermaid
sequenceDiagram sequenceDiagram
participant H as Host participant H as Host
participant S as MCP Server participant S as MCP Server
autonumber autonumber
S -->> H: resources/list (includes ui:// resources) S -->> H: resources/list (includes ui:// resources)
S -->> H: tools/list (includes tools with ui/resourceUri metadata) S -->> H: tools/list (includes tools with ui/resourceUri metadata)
``` ```
@ -648,37 +648,37 @@ sequenceDiagram
```mermaid ```mermaid
sequenceDiagram sequenceDiagram
participant H as Host participant H as Host
participant UI as Guest UI (iframe) participant UI as Guest UI (iframe)
participant P as Sandbox Proxy participant P as Sandbox Proxy
participant S as MCP Server participant S as MCP Server
autonumber autonumber
par UI Tool call par UI Tool call
H ->> S: tools/call to Tool with ui/resourceUri metadata H ->> S: tools/call to Tool with ui/resourceUri metadata
and UI initialization and UI initialization
alt Desktop/Native hosts alt Desktop/Native hosts
H ->> H: Render Guest UI in an iframe (HTML from the ui:// resource) H ->> H: Render Guest UI in an iframe (HTML from the ui:// resource)
else Web hosts else Web hosts
H ->> H: Render Sandbox Proxy in an iframe (different origin) H ->> H: Render Sandbox Proxy in an iframe (different origin)
P ->> H: ui/notifications/sandbox-ready P ->> H: ui/notifications/sandbox-ready
H -->> P: ui/notifications/sandbox-resource-ready (HTML content) H -->> P: ui/notifications/sandbox-resource-ready (HTML content)
P -> P: Render inner iframe with HTML P -> P: Render inner iframe with HTML
end end
UI ->> H: ui/initialize UI ->> H: ui/initialize
H -->> UI: McpUiInitializeResult (e.g., host-context, capabilities, etc.) H -->> UI: McpUiInitializeResult (e.g., host-context, capabilities, etc.)
UI ->> H: ui/notifications/initialized UI ->> H: ui/notifications/initialized
opt Stream Tool input to UI opt Stream Tool input to UI
H -->> UI: ui/notifications/tool-input-partial (0..n) H -->> UI: ui/notifications/tool-input-partial (0..n)
end end
H -->> UI: ui/notifications/tool-input (complete) H -->> UI: ui/notifications/tool-input (complete)
end end
alt Tool complete alt Tool complete
H -->> UI: ui/notifications/tool-result H -->> UI: ui/notifications/tool-result
else Tool cancelled else Tool cancelled
H -->> UI: ui/notifications/tool-cancelled H -->> UI: ui/notifications/tool-cancelled
end end
``` ```
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-*`. 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
```mermaid ```mermaid
sequenceDiagram sequenceDiagram
actor U as User / Agent actor U as User / Agent
participant H as Host participant H as Host
participant UI as Guest UI (iframe) participant UI as Guest UI (iframe)
participant S as MCP Server participant S as MCP Server
loop Interactive phase loop Interactive phase
U ->> UI: interaction (e.g., click) U ->> UI: interaction (e.g., click)
alt Tool call alt Tool call
UI ->> H: tools/call UI ->> H: tools/call
H ->> S: tools/call H ->> S: tools/call
opt Stream Tool input to UI opt Stream Tool input to UI
H -->> UI: ui/notifications/tool-input-partial (0..n) H -->> UI: ui/notifications/tool-input-partial (0..n)
end end
H -->> UI: ui/notifications/tool-input (complete) H -->> UI: ui/notifications/tool-input (complete)
H-->>UI: ui/notifications/tool-result H-->>UI: ui/notifications/tool-result
else Message else Message
UI ->> H: ui/message UI ->> H: ui/message
H -->> H: Process message and follow up H -->> H: Process message and follow up
else Notify else Notify
UI ->> H: notifications/message UI ->> H: notifications/message
H ->> H: Process notification and store in context H ->> H: Process notification and store in context
else Resource read else Resource read
UI ->> H: resources/read UI ->> H: resources/read
H ->> S: resources/read H ->> S: resources/read
S --> H: resources/read response S --> H: resources/read response
H --> UI: resources/read response H --> UI: resources/read response
end end
opt UI notifications opt UI notifications
UI ->> H: notifications (e.g., ui/notifications/size-change) UI ->> H: notifications (e.g., ui/notifications/size-change)
end end
opt Host notifications opt Host notifications
H ->> UI: notifications (e.g., ui/notifications/host-context-change) H ->> UI: notifications (e.g., ui/notifications/host-context-change)
end end
end end
``` ```
#### 6. Cleanup #### 6. Cleanup
```mermaid ```mermaid
sequenceDiagram sequenceDiagram
participant H as Host participant H as Host
participant UI as Guest UI (iframe) participant UI as Guest UI (iframe)
H ->> UI: ui/resource-teardown H ->> UI: ui/resource-teardown
UI --> UI: Graceful termination UI --> UI: Graceful termination
UI -->> H: ui/resource-teardown response UI -->> H: ui/resource-teardown response
H -x H: Tear down iframe and listeners H -x H: Tear down iframe and listeners
``` ```
Note: Cleanup may be triggered at any point in the lifecycle following UI initialization. Note: Cleanup may be triggered at any point in the lifecycle following UI initialization.