@ccmsg/protocol 1.15.0 → 1.16.0
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/package.json +1 -1
- package/src/control/peers.ts +6 -5
- package/src/fixtures/topics.ts +8 -0
package/package.json
CHANGED
package/src/control/peers.ts
CHANGED
|
@@ -57,7 +57,7 @@ export const StaleClientInfo = Type.Object(
|
|
|
57
57
|
);
|
|
58
58
|
export type StaleClientInfo = Static<typeof StaleClientInfo>;
|
|
59
59
|
|
|
60
|
-
/** One connected
|
|
60
|
+
/** One session an instance can call live (connected or not).
|
|
61
61
|
*
|
|
62
62
|
* The paths are the host's, so the entry names the instance holding them:
|
|
63
63
|
* `peers` carries every instance's sessions in one list, and two hosts' paths
|
|
@@ -122,10 +122,11 @@ export const PeerInfo = Type.Object(
|
|
|
122
122
|
send_message: Type.Optional(Type.Boolean()),
|
|
123
123
|
/** The build of the client that last greeted for this session. */
|
|
124
124
|
client_version: Type.Optional(Type.String()),
|
|
125
|
-
/** The generation
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
|
|
125
|
+
/** The generation the connected client speaks. Absent from a row that has
|
|
126
|
+
* no connection to read one from — the instance's state file names such a
|
|
127
|
+
* session live without any client ever having greeted it, so there is no
|
|
128
|
+
* generation to state. */
|
|
129
|
+
protocol_version: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
129
130
|
/** Set while some client of this session is being refused. */
|
|
130
131
|
stale_client: Type.Optional(StaleClientInfo),
|
|
131
132
|
},
|
package/src/fixtures/topics.ts
CHANGED
|
@@ -88,6 +88,14 @@ export const PEERS_FRAME: Static<typeof PeersFrame> = {
|
|
|
88
88
|
protocol_version: 2,
|
|
89
89
|
},
|
|
90
90
|
},
|
|
91
|
+
{
|
|
92
|
+
sid: "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
|
|
93
|
+
instance,
|
|
94
|
+
repo: "ccmsg",
|
|
95
|
+
ws: "daemon-v2",
|
|
96
|
+
cwd: "/repos/kawaz/ccmsg/daemon-v2",
|
|
97
|
+
state: "live_unmanaged",
|
|
98
|
+
},
|
|
91
99
|
],
|
|
92
100
|
last_live: [
|
|
93
101
|
{
|