docs: update documentation for SSE migration

This commit is contained in:
2026-06-11 12:52:26 -04:00
parent bd9cf62872
commit 16d55a1a2f
2 changed files with 18 additions and 8 deletions
+8 -2
View File
@@ -2,7 +2,7 @@
## What this is
Noise is a Signal Messenger client for Emacs, written in Elisp. It communicates with a local `signal-cli` instance via JSON-RPC over HTTP (default: `localhost:9128`). Conversations are stored in SQLite via `emacs-sqlite3-api`.
Noise is a Signal Messenger client for Emacs, written in Elisp. It communicates with a local `signal-cli` instance via JSON-RPC over HTTP (default: `localhost:8080`). Conversations are stored in SQLite via `emacs-sqlite3-api`.
## Technology & Architecture
@@ -10,11 +10,13 @@ Noise is a Signal Messenger client for Emacs, written in Elisp. It communicates
|---|---|
| Language | Emacs Lisp (Elisp) |
| Message backend | `signal-cli` JSON-RPC (`signal-cli daemon`) |
| Real-time messages | SSE via `GET /api/v1/events` |
| Local storage | SQLite (`emacs-sqlite3-api`) |
| Runtime | GNU Emacs |
- All Signal protocol work is delegated to `signal-cli`. Noise is a *client* — it does not implement Signal crypto.
- The JSON-RPC interface is called over HTTP (not piped subprocess stdio), so requests are `POST http://localhost:9128/api/v1/rpc` with JSON-RPC 2.0 payloads.
- The JSON-RPC interface is called over HTTP (not piped subprocess stdio), so requests are `POST http://localhost:8080/api/v1/rpc` with JSON-RPC 2.0 payloads.
- Noise uses Server-Sent Events (SSE) to receive messages in real-time from signal-cli's `/api/v1/events` endpoint.
- SQLite is the single source of truth for local state: contacts, conversations, messages, read/unread markers.
- The address is configurable via the `noise-signal-cli-address` defcustom.
- The Signal account is configurable via the `noise-account` defcustom (nil for a single-account daemon; required when signal-cli has multiple accounts registered). Account-scoped RPC calls go through `noise-rpc-call-for-account`.
@@ -57,3 +59,7 @@ These come directly from the UI mockup (`signal-emacs-ui.html`) and README:
- Elisp files should be byte-compilable with `emacs -batch -f batch-byte-compile`.
- Follow Emacs buffer-naming conventions and major-mode patterns.
- Always respect `noise-signal-cli-address` as the configurable JSON-RPC endpoint.
- Uses SSE (Server-Sent Events) for real-time message reception.
- `noise-sse.el` handles connection and event parsing.
- `noise-receive.el` processes envelopes and updates UI.
- Automatic reconnection with exponential backoff.