@akshar5/cohall 0.4.4 → 0.4.5

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.
@@ -1,7 +1,8 @@
1
1
  [Unit]
2
2
  Description=Cohall relay
3
- After=network-online.target
3
+ After=network-online.target cohall-relay.socket
4
4
  Wants=network-online.target
5
+ Requires=cohall-relay.socket
5
6
 
6
7
  [Service]
7
8
  Type=simple
@@ -9,6 +10,7 @@ User=cohall
9
10
  Group=cohall
10
11
  EnvironmentFile=/etc/cohall/relay.env
11
12
  ExecStart=/usr/local/bin/cohall relay
13
+ Sockets=cohall-relay.socket
12
14
  Restart=on-failure
13
15
  RestartSec=3
14
16
  UMask=0077
@@ -0,0 +1,11 @@
1
+ [Unit]
2
+ Description=Cohall relay socket
3
+
4
+ [Socket]
5
+ ListenStream=127.0.0.1:8787
6
+ NoDelay=true
7
+ FileDescriptorName=cohall-relay
8
+ Service=cohall-relay.service
9
+
10
+ [Install]
11
+ WantedBy=sockets.target
package/docs/services.md CHANGED
@@ -41,16 +41,23 @@ COHALL_TOKEN=replace-with-a-random-owner-token
41
41
  COHALL_DATA_DIR=/var/lib/cohall
42
42
  ```
43
43
 
44
- Install `deploy/systemd/cohall-relay.service`, then:
44
+ Install `deploy/systemd/cohall-relay.service` and
45
+ `deploy/systemd/cohall-relay.socket`. The packaged socket listens on loopback;
46
+ change `ListenStream` to the relay's private Tailscale address when devices
47
+ connect directly over Tailscale. Then:
45
48
 
46
49
  ```bash
47
50
  systemctl daemon-reload
51
+ systemctl enable --now cohall-relay.socket
48
52
  systemctl enable --now cohall-relay
49
53
  journalctl -u cohall-relay -f
50
54
  ```
51
55
 
52
56
  Expose the relay only through a private network such as Tailscale or an HTTPS
53
- reverse proxy. Device connections are outbound WebSockets.
57
+ reverse proxy. Device connections are outbound WebSockets. The socket unit keeps
58
+ the listener available across relay service restarts: new connections wait for
59
+ the replacement process instead of failing. Existing WebSockets reconnect, and
60
+ durable tasks resume after the replacement relay starts.
54
61
 
55
62
  ## macOS
56
63
 
@@ -89,7 +96,9 @@ logon and restarts it after failures.
89
96
  Run `cohall upgrade` from a global npm, Bun, or pnpm installation. It updates
90
97
  that installation and restarts only active managed Cohall services, with relays
91
98
  restarted before device daemons. Active services restart even when the installed
92
- files already match the requested version. A delegated upgrade can finish after
99
+ files already match the requested version. A systemd relay installed with the
100
+ packaged socket unit keeps accepting new connections while its process restarts.
101
+ A delegated upgrade can finish after
93
102
  restarting its own device daemon: a durable receipt records the restart attempt,
94
103
  and a delegated caller leaves that marker for the replacement task to consume
95
104
  after reconnecting, even when a service manager returns before ending the old process.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akshar5/cohall",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Let coding agents delegate work across your own devices.",
5
5
  "keywords": [
6
6
  "agents",