instar 1.3.397 → 1.3.399
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/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +94 -1
- package/dist/commands/server.js.map +1 -1
- package/dist/core/MeshRpc.d.ts +3 -0
- package/dist/core/MeshRpc.d.ts.map +1 -1
- package/dist/core/MeshRpc.js +1 -0
- package/dist/core/MeshRpc.js.map +1 -1
- package/dist/core/types.d.ts +10 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/server/AgentServer.d.ts +14 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +12 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/StreamTicketStore.d.ts +54 -0
- package/dist/server/StreamTicketStore.d.ts.map +1 -0
- package/dist/server/StreamTicketStore.js +147 -0
- package/dist/server/StreamTicketStore.js.map +1 -0
- package/dist/server/WebSocketManager.d.ts +45 -0
- package/dist/server/WebSocketManager.d.ts.map +1 -1
- package/dist/server/WebSocketManager.js +178 -2
- package/dist/server/WebSocketManager.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +3 -3
- package/src/data/state-coherence-registry.json +13 -1
- package/upgrades/1.3.398.md +30 -0
- package/upgrades/1.3.399.md +34 -0
- package/upgrades/side-effects/dashboard-stream-phase2a-serving.md +69 -0
- package/upgrades/side-effects/dashboard-stream-phase2b-requesting.md +64 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Side-Effects Review — Pool dashboard streaming phase 2b (requesting side)
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `dashboard-stream-phase2b-requesting`
|
|
4
|
+
**Date:** `2026-06-07`
|
|
5
|
+
**Author:** `echo`
|
|
6
|
+
**Second-pass reviewer:** `not required`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
WebSocketManager routes a remote-machineId subscribe through a per-peer
|
|
11
|
+
PeerStreamProxy (phase 1) + a PoolStreamConnector (mint ticket via the phase-2a
|
|
12
|
+
mesh verb, open /pool-stream). Output fans back machine-tagged; input relayed;
|
|
13
|
+
honest error frames; transfer-staleness guard.
|
|
14
|
+
|
|
15
|
+
## Decision-point inventory
|
|
16
|
+
|
|
17
|
+
(1) Is a subscribe remote? → machineId present, !== self, AND session not
|
|
18
|
+
running locally (stale-hint guard). (2) Input on a remote sub → relayed
|
|
19
|
+
upstream (serving machine gates), never local tmux.
|
|
20
|
+
|
|
21
|
+
## 1. Over-block
|
|
22
|
+
|
|
23
|
+
A remote subscribe whose connector returns null (peer unreachable) surfaces
|
|
24
|
+
machine-unreachable — honest, not silent. A session that exists locally is
|
|
25
|
+
never routed remote (served locally) even with a remote hint.
|
|
26
|
+
|
|
27
|
+
## 2. Under-block
|
|
28
|
+
|
|
29
|
+
The browser client is trusted to supply the correct machineId (it rendered the
|
|
30
|
+
tile from /sessions?scope=pool). A wrong machineId routes to the wrong peer;
|
|
31
|
+
the serving peer only streams sessions IT runs, so a bad hint yields no output
|
|
32
|
+
(and the connector/ticket fail), not cross-talk. Local-existence is re-checked
|
|
33
|
+
server-side regardless of the hint.
|
|
34
|
+
|
|
35
|
+
## 3. Level-of-abstraction fit
|
|
36
|
+
|
|
37
|
+
Routing lives in WSManager.handleMessage beside the local path; the per-peer
|
|
38
|
+
link + reconnect/idle logic is the phase-1 PeerStreamProxy (reused, not
|
|
39
|
+
reimplemented); ticket-mint + ws-connect is the connector in server boot (it
|
|
40
|
+
owns meshClient + peerUrl). One streaming model; the remote path only swaps the
|
|
41
|
+
source.
|
|
42
|
+
|
|
43
|
+
## 4. Signal vs authority compliance
|
|
44
|
+
|
|
45
|
+
**Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
46
|
+
|
|
47
|
+
No new authority on the requesting side — it consumes the serving side's
|
|
48
|
+
authority (ticket, input gate). Errors are honest frames, never silent.
|
|
49
|
+
|
|
50
|
+
## 5. Interactions
|
|
51
|
+
|
|
52
|
+
- Local /ws path: unchanged for local sessions; only a machineId-tagged remote
|
|
53
|
+
subscribe diverges.
|
|
54
|
+
- PeerStreamProxy (phase 1): the per-peer multiplex/reconnect engine, reused.
|
|
55
|
+
- Serving side (phase 2a): the connector consumes its mesh verb + /pool-stream.
|
|
56
|
+
- Client close: drops all remote subs from their proxies (no leak).
|
|
57
|
+
- pool-stream-ticket verb: the connector mints with a sentinel session ('*') —
|
|
58
|
+
the ticket is per-connection, not session-bound.
|
|
59
|
+
|
|
60
|
+
## 6. External surfaces
|
|
61
|
+
|
|
62
|
+
No new HTTP/WS endpoint on the requesting side (it's a CLIENT of the peer's
|
|
63
|
+
/pool-stream). No new config (allowRemoteInput is serving-side). New AgentServer
|
|
64
|
+
options: poolStreamConnector + selfMachineId.
|