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
Copy file name to clipboardExpand all lines: docs/protocol.md
+48-5Lines changed: 48 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ The protocol defines a set of lifecycle messages that manage the connection and
53
53
54
54
=== "Initialization flow"
55
55
56
-
The following timeline illustrates the typical initialize handshake between client and server, including the actions done by server after initialization.
56
+
Handshake between client and server, including the actions done by server after initialization.
57
57
58
58
```mermaid
59
59
sequenceDiagram
@@ -62,13 +62,29 @@ The protocol defines a set of lifecycle messages that manage the connection and
62
62
participant S as ECA Server
63
63
C->>+S: initialize (request)
64
64
Note right of S: Save workspace-folders/capabilties
65
-
S-->>-C: initialize (response)
66
-
C->>+S: initialized (notification)
65
+
S->>-C: initialize (response)
66
+
C--)+S: initialized (notification)
67
67
Note right of S: Sync models: Request models.dev <br/>for models capabilities
68
68
Note right of S: Notify which models/behaviors are <br/>avaialble and their defaults.
69
-
S->>C: config/updated (notification)
69
+
S--)C: config/updated (notification)
70
70
Note right of S: Init MCP servers
71
-
S->>-C: tool/serverUpdated (notification)
71
+
S--)-C: tool/serverUpdated (notification)
72
+
```
73
+
74
+
=== "Shutdown flow"
75
+
76
+
Shutdown process between client and server
77
+
78
+
```mermaid
79
+
sequenceDiagram
80
+
autonumber
81
+
participant C as Client / Editor
82
+
participant S as ECA Server
83
+
C->>+S: shutdown (request)
84
+
Note right of S: Finish MCP servers process
85
+
S-->>-C: shutdown (response)
86
+
C->>+S: exit (notification)
87
+
Note right of S: Server stops its process
72
88
```
73
89
74
90
### Initialize (↩️)
@@ -219,6 +235,33 @@ _Notification:_
219
235
220
236
## Code Assistant Features
221
237
238
+
=== "Chat: simple"
239
+
240
+
Example of a basic chat conversation with only texts:
241
+
242
+
```mermaid
243
+
sequenceDiagram
244
+
autonumber
245
+
participant C as Client / Editor
246
+
participant S as ECA Server
247
+
participant L as LLM
248
+
C->>+S: chat/prompt
249
+
Note over C,S: User sends: Hello there!
250
+
S->>C: chat/contentReceived (system: start)
251
+
Note right of S: Parse contexts,<br/>renew login,<br/>prepare prompt
252
+
S->>+L: Send prompt
253
+
S-->>-C: chat/prompt
254
+
Note over C,S: Request sent to LLM
255
+
loop LLM streaming
256
+
Note right of L: Returns first `Hel`,<br/>then `lo`, etc
257
+
L-->>S: Stream data
258
+
S->>C: chat/contentReceived (assistant: text)
259
+
260
+
end
261
+
L->>-S: Finish response
262
+
S->>C: chat/contentReceived (system: finished)
263
+
```
264
+
222
265
### Chat Prompt (↩️)
223
266
224
267
A request sent from client to server, starting or continuing a chat in natural language as an agent.
0 commit comments