qriton 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/deploy/nats/README.md +7 -1
- package/dist/qriton.js +279 -276
- package/package.json +1 -1
- package/release/contract.json +1 -1
package/README.md
CHANGED
|
@@ -203,14 +203,14 @@ A backup that sends your conversation from a local model to a hosted provider al
|
|
|
203
203
|
|
|
204
204
|
## Several qritons on one network
|
|
205
205
|
|
|
206
|
-
Qriton instances on different machines can see each other and pass messages, for example asking the one on your Windows box to run the tests there. They meet through a [NATS](https://nats.io) server: any machine on your local network, or a relay on the internet ([Azure setup](https://unpkg.com/qriton/deploy/nats/README.md) is one option).
|
|
206
|
+
Qriton instances on different machines can see each other and pass messages, for example asking the one on your Windows box to run the tests there. They meet through a [NATS](https://nats.io) server: any machine on your local network, or a relay on the internet ([Azure setup](https://unpkg.com/qriton/deploy/nats/README.md) is one option). `qriton mesh server` prints a ready server configuration that admits your machines.
|
|
207
207
|
|
|
208
208
|
```bash
|
|
209
209
|
qriton mesh init nats://10.0.0.5:4222 # first machine: creates a group, prints an invite code
|
|
210
210
|
qriton mesh join <code> # every other machine
|
|
211
211
|
```
|
|
212
212
|
|
|
213
|
-
Then set `"mesh": { "enabled": true, "name": "laptop" }` in `~/.qriton/config.json` on each machine. In a session, `/peers` shows who is online (machine, project, model, busy or idle, and a fingerprint), `/tell <peer> <text>` sends a message, and `/mesh scan` finds NATS servers on your network. The model can also list peers and send messages; sending asks for approval unless you run in `full-auto`.
|
|
213
|
+
Then set `"mesh": { "enabled": true, "name": "laptop" }` in `~/.qriton/config.json` on each machine. Interactive sessions join the mesh; one-off `-p` runs stay private. In a session, `/peers` shows who is online (machine, project, model, busy or idle, and a fingerprint), `/tell <peer> <text>` sends a message, and `/mesh scan` finds NATS servers on your network. The model can also list peers and send messages; sending asks for approval unless you run in `full-auto`.
|
|
214
214
|
|
|
215
215
|
**Everything is end-to-end encrypted.** Each machine has its own keys, and every message is encrypted and signed before it leaves, so the NATS server, or anyone on the network, sees only random bytes on random-looking channels. Direct messages can be read by their recipient only, not even by other machines in the group. The invite code contains the group secret, so pass it only over a channel you trust. A relay on the internet also needs `tls://`, and per-machine keys (`qriton mesh status` prints the one to add to the server).
|
|
216
216
|
|
package/deploy/nats/README.md
CHANGED
|
@@ -40,7 +40,13 @@ Then close port 80 again (`az network nsg rule delete ...`, or open it only for
|
|
|
40
40
|
|
|
41
41
|
## 4. Configuration and machine keys
|
|
42
42
|
|
|
43
|
-
Copy `nats-server.
|
|
43
|
+
Copy `nats-server.service` from this folder to `/etc/systemd/system/nats-server.service`. For the configuration, collect each machine's **NATS user key** (`qriton mesh status` on it) and let qriton write the file, with your own machine's key included:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
qriton mesh server tls /etc/nats/tls/fullchain.pem /etc/nats/tls/privkey.pem UD4K2P7Q... > nats-server.conf
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Copy it to `/etc/nats/nats-server.conf`. Or start from `nats-server.conf` in this folder and add a line per machine to the `users` list:
|
|
44
50
|
|
|
45
51
|
```
|
|
46
52
|
users = [
|