@volter/teams 0.2.31 → 0.2.32
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/machine-core.mjs +10 -3
- package/package.json +1 -1
package/machine-core.mjs
CHANGED
|
@@ -257,7 +257,13 @@ export class MachineCore extends EventEmitter {
|
|
|
257
257
|
// ---- connections ---------------------------------------------------------
|
|
258
258
|
|
|
259
259
|
/** The local door: whoever opened the owner-only socket is this OS user. */
|
|
260
|
-
|
|
260
|
+
#accept(socket) { return this.acceptLocal(socket); }
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* A local connection: one the socket accepted, or one made inside this daemon (`facts` mark it: the app door's
|
|
264
|
+
* relayed pages are `{ appDoor: true }`, which no client can claim, as it never reaches this through the socket).
|
|
265
|
+
*/
|
|
266
|
+
async acceptLocal(socket, facts = {}) {
|
|
261
267
|
let channel;
|
|
262
268
|
try {
|
|
263
269
|
channel = await Channel.accept(socket, { floor: this.floor });
|
|
@@ -266,8 +272,9 @@ export class MachineCore extends EventEmitter {
|
|
|
266
272
|
return;
|
|
267
273
|
}
|
|
268
274
|
const index = this.nextConnection++;
|
|
269
|
-
//
|
|
270
|
-
|
|
275
|
+
// Who is on its other end is what the client says (its claim), held to the daemon's live-session map; the socket is
|
|
276
|
+
// this user's alone (docs/architecture/overview.md, "Who is calling").
|
|
277
|
+
const entry = { ...facts, channel, admitted: LOCAL_OPERATOR, principal: 'local', socket };
|
|
271
278
|
this.connections.set(index, entry);
|
|
272
279
|
channel.on('stream', (stream, accept, refuse) => this.#routeStream(index, entry, stream, accept, refuse));
|
|
273
280
|
channel.on('close', () => { this.connections.delete(index); this.connectionClosed(index); });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/teams",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.32",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Volter Teams, the neutral team plane: machine identity and daemon core, the local door and server link, admission from machine grants, product doors, and the Teams server's neutral routes (company RFC 0008).",
|
|
6
6
|
"license": "MIT",
|