@volter/teams 0.2.51 → 0.2.53
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/board-owner.mjs +6 -1
- package/browser-channel.d.ts +1 -1
- package/package.json +1 -1
package/board-owner.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// A home's board owner (`supercode workflow serve`, one per install: D152) answers every card verb on that home's boards
|
|
2
2
|
// over one local socket. The CLI and the machine daemon's board door hold nothing: each sends the verb here and renders
|
|
3
3
|
// the answer. The socket is the home's own (`<home>/board.sock`, beside the owner's lock `<home>/board.lock`), by the
|
|
4
|
-
// home's real path, so every process naming the home reaches the one owner whatever its environment.
|
|
4
|
+
// home's real path, so every process naming the home reaches the one owner whatever its environment. On Windows, where
|
|
5
|
+
// Node listens only on named pipes, it is the pipe named by that path.
|
|
5
6
|
//
|
|
6
7
|
// request: one JSON line { v: 1, argv | tool, board, caller, session, facts, cwd, stdin }
|
|
7
8
|
// argv the verb and its arguments, without --root or --board
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
import { existsSync, realpathSync } from 'node:fs';
|
|
20
21
|
import { connect } from 'node:net';
|
|
21
22
|
import { join, resolve } from 'node:path';
|
|
23
|
+
import { shortSocketPath } from './home.mjs';
|
|
22
24
|
|
|
23
25
|
/** A Unix socket's path is at most 104 bytes on macOS (108 on Linux), terminator included. */
|
|
24
26
|
const SOCKET_PATH_MAX = 103;
|
|
@@ -30,6 +32,9 @@ export function boardHome(root) {
|
|
|
30
32
|
|
|
31
33
|
/** The owner's socket for the home at `root`: the home's own, by its real path. */
|
|
32
34
|
export function boardOwnerSocket(root) {
|
|
35
|
+
// Node on Windows listens only on named pipes (on a socket path it is refused, EACCES): there the owner's door is the
|
|
36
|
+
// pipe named by that path, as the machine daemon's is
|
|
37
|
+
if (process.platform === 'win32') return shortSocketPath(boardHome(root), 'board.sock');
|
|
33
38
|
const path = join(boardHome(root), 'board.sock');
|
|
34
39
|
if (Buffer.byteLength(path) > SOCKET_PATH_MAX) throw new Error(`the home's board socket ${path} is longer than a Unix socket path may be (${SOCKET_PATH_MAX} bytes); keep the home at a shorter path`);
|
|
35
40
|
return path;
|
package/browser-channel.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export function openBrowserMachine(target: { origin: string; teamId: string; mac
|
|
|
47
47
|
*/
|
|
48
48
|
export function openBrowserSession(target: { origin: string; teamId: string; sessionId: string; token: string }, options?: ChannelOptions): Promise<BrowserChannel>;
|
|
49
49
|
|
|
50
|
-
/** The machine's answer to a typed turn. `waiting`: filed, typed
|
|
50
|
+
/** The machine's answer to a typed turn. `waiting`: filed, not typed yet. */
|
|
51
51
|
export type BrowserTurnAnswer =
|
|
52
52
|
| { code: 0; turn_id?: string; door?: 'runtime' | 'pane' | 'waiting'; text?: string }
|
|
53
53
|
| { code: number; text?: string };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/teams",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.53",
|
|
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",
|