@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccmsg/protocol",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "Wire contract (schema + types + op attribute table) shared by the ccmsg daemon and web UI",
5
5
  "license": "MIT",
6
6
  "author": "kawaz",
@@ -57,7 +57,7 @@ export const StaleClientInfo = Type.Object(
57
57
  );
58
58
  export type StaleClientInfo = Static<typeof StaleClientInfo>;
59
59
 
60
- /** One connected session.
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 that client speaks. Always stated: a client that does not
126
- * announce one is refused, so there is no connected session whose
127
- * generation is a guess. */
128
- protocol_version: Type.Integer({ minimum: 1 }),
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
  },
@@ -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
  {