Add project documentation and reference materials
Include Luna AI Assistant design docs covering channels, configuration, core architecture, memory, scheduler, and skills. Add reference docs from OpenClaw and ZeroClaw projects, plus Mistral and OpenAI API specs.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# CLI Channel
|
||||
|
||||
The CLI connects to Luna via SignalR. `CliChannel` is a server-side adapter that bridges the SignalR hub to the `IChannel` interface defined in [[Channels]].
|
||||
|
||||
## How It Works
|
||||
|
||||
`CliChannel` wraps `IChatHubContext` from [[Core]] to send streaming responses back to the connected SignalR client. The flow:
|
||||
|
||||
1. The `ChatHub` receives a message from the CLI client over SignalR.
|
||||
2. `ChatHub` calls `RaiseMessageReceived` on the `CliChannel` instance.
|
||||
3. The [[Channels|ChannelManager]] picks up the event and routes it through `SessionManager.RouteMessagesAsync`.
|
||||
4. The resulting `IAsyncEnumerable<ChatStreamUpdate>` is passed back to `CliChannel.SendStreamingMessageAsync`.
|
||||
5. `CliChannel` forwards the stream to the SignalR client via `IChatHubContext`.
|
||||
|
||||
## Key Characteristics
|
||||
|
||||
- **Server-side adapter**: `CliChannel` lives on the server; the actual CLI is a separate SignalR client.
|
||||
- **Single connection**: One `CliChannel` instance maps to the SignalR hub connection.
|
||||
- **No polling**: Unlike [[Telegram Channel]], the CLI uses persistent WebSocket connections via SignalR.
|
||||
|
||||
## Namespace
|
||||
|
||||
`Luna.Channels.Cli`
|
||||
Reference in New Issue
Block a user