Skip to content

Commit 0340c9d

Browse files
committed
docs
1 parent 4ba7089 commit 0340c9d

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

docs/protocol.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,27 @@ Content-Length: ...\r\n
4949

5050
## Lifecycle Messages
5151

52-
The protocol defines a set of lifecycle messages that manage the connection and state between the client (editor) and server (code assistant):
52+
The protocol defines a set of lifecycle messages that manage the connection and state between the client (editor) and server (code assistant).
53+
54+
=== "Initialization flow"
55+
56+
The following timeline illustrates the typical initialize handshake between client and server, including the actions done by server after initialization.
57+
58+
```mermaid
59+
sequenceDiagram
60+
autonumber
61+
participant C as Client / Editor
62+
participant S as ECA Server
63+
C->>+S: initialize (request)
64+
Note right of S: Save workspace-folders/capabilties
65+
S-->>-C: initialize (response)
66+
C->>+S: initialized (notification)
67+
Note right of S: Sync models: Request models.dev <br/>for models capabilities
68+
Note right of S: Notify which models/behaviors are <br/>avaialble and their defaults.
69+
S->>C: config/updated (notification)
70+
Note right of S: Init MCP servers
71+
S->>-C: tool/serverUpdated (notification)
72+
```
5373

5474
### Initialize (↩️)
5575

@@ -168,25 +188,6 @@ _Notification:_
168188
interface InitializedParams {}
169189
```
170190

171-
=== "Initialization flow"
172-
173-
The following timeline illustrates the typical initialize handshake between client and server, including the actions done by server after initializing.
174-
175-
```mermaid
176-
sequenceDiagram
177-
autonumber
178-
participant C as Client / Editor
179-
participant S as ECA Server
180-
C->>+S: initialize (request)
181-
S-->>-C: initialize (response)
182-
C->>+S: initialized (notification)
183-
Note right of S: Sync models: Request models.dev <br/>for models capabilities
184-
Note right of S: Tell which models/behaviors are <br/>avaialble and their defaults.
185-
S->>C: config/updated (notification)
186-
Note right of S: Init MCP servers
187-
S->>-C: tool/serverUpdated (notification)
188-
```
189-
190191
### Shutdown (↩️)
191192

192193
A request sent from the client to the server to gracefully shut down the connection. This message:

0 commit comments

Comments
 (0)