@ai-ecoverse/slicc 1.31.0 → 1.33.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.
Files changed (3) hide show
  1. package/README.md +27 -3
  2. package/bin/slicc.js +27 -1
  3. package/package.json +8 -7
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  `slicc` is SLICC's command line for seven, the SLICC on `*.sliccy.ai`. It is one binary for macOS, Windows and Linux. It launches and links browsers, and shares a machine's network, compute and browsers with a running seven over a WebRTC link. `npx sliccy` and Sliccstart.app run this binary. It replaces slicc-node and slicc-swift.
4
4
 
5
- **Status:** being built. `slicc` (the default flow), `slicc attach` (with the `cdp` capability), `slicc <join-url> follow`, remote control with `prompt`, `watch` and `abort`, host folders with `--mount`, `slicc browsers`, `slicc launch`, `update`, `--version` and `--help` work so far, plus a hidden diagnostic, `slicc <join-url> follow --signal-only [--timeout 2m]`. It attaches through the tray hub, prints a summary of the leader's offer (its size, media sections, candidate count and DTLS fingerprint) and the ICE server URLs (credentials are never printed), and exits without answering. The link protocol is drafted alongside seven's link exit and moves into this README once both sides pass a shared test.
5
+ **Status:** being built. `slicc` (the default flow), `slicc attach` (with the `cdp` capability), `slicc <join-url> follow`, remote control with `prompt`, `watch` and `abort`, host folders with `--mount`, `slicc browsers`, `slicc launch`, `update`, `install`, `--version` and `--help` work so far, plus a hidden diagnostic, `slicc <join-url> follow --signal-only [--timeout 2m]`. It attaches through the tray hub, prints a summary of the leader's offer (its size, media sections, candidate count and DTLS fingerprint) and the ICE server URLs (credentials are never printed), and exits without answering. The link protocol is drafted alongside seven's link exit and moves into this README once both sides pass a shared test.
6
6
 
7
7
  ## Commands (planned)
8
8
 
@@ -15,10 +15,11 @@
15
15
  | `slicc <join-url> prompt <text>`, `watch`, `abort` | send a prompt to seven's agent and stream its answer, follow the agent as it works, or abort its run; `--cdp <url>` instead of a join URL links locally (works now; see [Remote control](#remote-control-slicc-prompt-watch-and-abort)) |
16
16
  | `slicc browsers --json` | list running CDP endpoints and installed browsers, ranked |
17
17
  | `slicc update [--check]` | replace this binary with the latest release (works now; see [Updates](#updates)) |
18
+ | `slicc install jerk\|fnox` | install slicc-jerk or fnox into slicc's data folder (works now; see [Companion tools](#companion-tools)) |
18
19
 
19
20
  ## Install
20
21
 
21
- - **npm:** `npm install -g @ai-ecoverse/slicc`, or `npx @ai-ecoverse/slicc`. The package is a small Node launcher; npm picks one of the platform packages `@ai-ecoverse/slicc-<os>-<arch>` (`darwin`, `linux`, `windows` × `amd64`, `arm64`) through `optionalDependencies` and their `os` and `cpu` fields. The launcher runs that binary with the same arguments, stdio and environment plus `SLICC_LAUNCHER=npm`, forwards `SIGTERM`, `SIGHUP`, `SIGQUIT` and `SIGUSR2` to it, and `SIGINT` too when stdin is not a terminal (a terminal's Ctrl-C already reaches the binary; on Windows the console delivers Ctrl-C and Ctrl-Break to both). It exits with the binary's exit code, or dies of the same signal. An install with `--omit=optional` has no binary, and the launcher says so.
22
+ - **npm:** `npm install -g @ai-ecoverse/slicc`, or `npx @ai-ecoverse/slicc`. The package is a small Node launcher; npm picks one of the platform packages `@ai-ecoverse/slicc-<os>-<arch>` (`darwin`, `linux`, `windows` × `amd64`, `arm64`) through `optionalDependencies` and their `os` and `cpu` fields. The launcher runs that binary with the same arguments, stdio and environment plus `SLICC_LAUNCHER=npm`, forwards `SIGTERM`, `SIGHUP`, `SIGQUIT` and `SIGUSR2` to it, and `SIGINT` too when stdin is not a terminal (a terminal's Ctrl-C already reaches the binary; on Windows the console delivers Ctrl-C and Ctrl-Break to both). It exits with the binary's exit code, or dies of the same signal. An install with `--omit=optional` has no binary, and the launcher says so. The companion tools come the same way (see [Companion tools](#companion-tools)).
22
23
  - **GitHub releases:** every release of `ai-ecoverse/slicc-cli` carries `slicc-<os>-<arch>` (`.exe` on Windows) for all six targets, plus `SHA256SUMS`. See [Verifying a download](#verifying-a-download).
23
24
  - **Go:** `go install github.com/ai-ecoverse/slicc-cli/cmd/slicc@latest`. See [Install with Go](#install-with-go).
24
25
 
@@ -145,6 +146,21 @@ Signing:
145
146
  - **macOS:** the binaries are signed with a Developer ID, with the hardened runtime, and notarized. A bare binary can't carry a stapled ticket (only apps, disk images and installer packages can), so Gatekeeper checks the notarization online the first time it runs. Inside Sliccstart.app the binary is stapled with the app.
146
147
  - **Windows:** the binaries are unsigned for now. Authenticode signing through Azure Trusted Signing comes before general availability. Until then a browser download gets a SmartScreen warning, and AppLocker, WDAC or Intune policies can block the binary.
147
148
 
149
+ ## Companion tools
150
+
151
+ slicc works with two tools that run on this machine: slicc-jerk (`jerk`), which gets tokens for seven's vault, and fnox. slicc finds them on `PATH` or in `bin` of its data folder: `~/Library/Application Support/slicc` on macOS, `$XDG_DATA_HOME/slicc` (default `~/.local/share/slicc`) on Linux, `%LOCALAPPDATA%\slicc` on Windows. That folder is never shared over `fs` (see [Host folders](#host-folders)). When its `bin` exists, slicc appends it to its own `PATH` at start, so its children (the SSH runner, and jerk calling fnox) find the tools too; a copy already on `PATH` wins.
152
+
153
+ **With npm.** `@ai-ecoverse/slicc` and `sliccy` list `@ai-ecoverse/slicc-jerk` and `@ai-ecoverse/fnox` as `optionalDependencies` (`^` the latest release), but only those that are on the registry when the release is staged (`npm-stage.mjs --companions`); the others are left out with a notice. The publish check that waits for the platform packages doesn't wait for them. The launcher puts the `node_modules/.bin` of each installed companion package first on `PATH` for the binary, so `jerk` and `fnox` resolve for slicc and its children.
154
+
155
+ **`slicc install jerk|fnox`** installs one into the data folder's `bin`:
156
+ - `jerk` from the latest release of `ai-ecoverse/slicc-jerk`, `fnox` from the latest release of `ai-ecoverse/fnox-build`;
157
+ - **the release contract** (the same as slicc-cli's own): a plain binary `<name>-<os>-<arch>` (`.exe` on Windows; `darwin`, `linux`, `windows` × `amd64`, `arm64`), and `SHA256SUMS` with a line for it, both attested by the repo's `release.yml`;
158
+ - slicc checks the download against `SHA256SUMS`, then installs it only once its `--version` names the release's version, through a rename next to the old one (as `slicc update` does);
159
+ - it says `installed <name> <version> at <path>; its SHA-256 matches the release's SHA256SUMS (the attestation isn't checked yet)`, or `<name> <version> is already installed at <path>`;
160
+ - the GitHub API base follows `SLICC_UPDATE_API_BASE`, as for `update`.
161
+
162
+ Only a user runs `slicc install`. Nothing on a link starts an install.
163
+
148
164
  ## Updates
149
165
 
150
166
  `slicc update` replaces the running binary (symlinks resolved) with the latest GitHub release of `ai-ecoverse/slicc-cli`. It downloads the asset for this OS and CPU and checks it against the release's `SHA256SUMS`. The new binary has to answer `--version` with the release's version before anything is replaced. The swap is a rename next to the old binary; on Windows the running binary is first moved aside to `<name>.old`, which the next run deletes. `slicc update --check` only reports.
@@ -426,7 +442,7 @@ One WebRTC peer connection. seven offers and the node answers. The node:
426
442
  - **Resets with `EOPNOTSUPP`:** an OPEN for a kind it doesn't serve.
427
443
  - **Closes the link:** an unknown frame type, a short or malformed frame (END with a payload, CREDIT that isn't 4 bytes), stream id 0, a reused id, an id with the wrong parity (page streams are odd, node streams even), or a second OPEN on a stream channel.
428
444
 
429
- HELLO from `attach`: `{ "v": 1, "role": "node", "name", "host", "version", "mode": "local", "node", "caps": ["net", "http", "cdp"], "routes": { "prefixes": [], "exit": true }, "policy": { "allow", "deny", "summary" }, "browsers": [ … ] }`. `cdp` and `browsers` are there when at least one browser is listed (see [`cdp`](#cdp-browser-control)). With `--runner`, `caps` adds `"ssh"` and HELLO adds `"sshHostKey": "ssh-ed25519 AAAA…"`, the host key in `authorized_keys` form, so the page can write `<host>.slicc.internal <key>` into the kernel's `known_hosts`. With `--mount`, `caps` adds `"fs"` and HELLO adds `"mounts"` (see [Host folders](#host-folders)).
445
+ HELLO from `attach`: `{ "v": 1, "role": "node", "name", "host", "version", "mode": "local", "node", "caps": ["net", "http", "credentialed", "cdp"], "routes": { "prefixes": [], "exit": true }, "policy": { "allow", "deny", "summary" }, "browsers": [ … ] }`. `cdp` and `browsers` are there when at least one browser is listed (see [`cdp`](#cdp-browser-control)). With `--runner`, `caps` adds `"ssh"` and HELLO adds `"sshHostKey": "ssh-ed25519 AAAA…"`, the host key in `authorized_keys` form, so the page can write `<host>.slicc.internal <key>` into the kernel's `known_hosts`. With `--mount`, `caps` adds `"fs"` and HELLO adds `"mounts"` (see [Host folders](#host-folders)).
430
446
 
431
447
  **`ssh`** (cap `ssh`), page → node, with `--runner` only:
432
448
  - OPEN `{ "kind": "ssh" }`, OPENED `{}` at once. The stream's bytes are one SSH connection to the node's SSH server.
@@ -460,6 +476,14 @@ HELLO from `attach`: `{ "v": 1, "role": "node", "name", "host", "version", "mode
460
476
  - **RESET before the response head:** `EPROTO` for a malformed head or one of the refusals above, and for a `206` with a coding the node would decode, since its `Content-Range` wouldn't match. A failed fetch is `<code>: fetch failed: <reason>`, with `tcp`'s codes: `EACCES` for a policy refusal, `ENOTFOUND` for a name that doesn't resolve, `ETIMEDOUT`, `ECONNRESET`, and `ECONNREFUSED` for anything else, TLS failures included.
461
477
  - **After the head:** an upstream error or a broken coding mid-body is `RESET ECONNRESET`.
462
478
 
479
+ **`credentialed`** (node cap, no kind of its own), on every node that serves `http`. An `http` OPEN with `"credentialed": true` carries a credential the vault injected for a transit exit (link spec §5.13). For such a stream the node:
480
+ - refuses a URL that isn't `https:` on port 443 with `RESET EACCES: credentialed requests go only to https on port 443`, before anything is dialled;
481
+ - logs the request only as its method, scheme and host, as for every `http` stream, and never its path, query, headers or body, `SLICC_DEBUG` included;
482
+ - scrubs RESET messages: they carry the error's reason, never the URL's path or query, a header or a body byte;
483
+ - follows no redirects and keeps nothing: no cache, no cookies, nothing on disk.
484
+
485
+ Any value of `credentialed` other than `false` or `null` counts as true, so a malformed flag never sends a credential out as an ordinary request.
486
+
463
487
  **`kernel`** (page cap `kernel-in`), node → page:
464
488
  - OPEN `{ "kind": "kernel", "port" }`, sent only to a page whose HELLO lists `kernel-in`. The page dials that kernel port and answers OPENED or RESET (`ECONNREFUSED` when nothing listens). See [Kernel services](#kernel-services).
465
489
  - Then raw bytes both ways: the node's first DATA is everything it has read from the browser's connection so far, request head included. END half-closes, as for `tcp`.
package/bin/slicc.js CHANGED
@@ -4,6 +4,7 @@
4
4
  const { spawn } = require('node:child_process');
5
5
  const fs = require('node:fs');
6
6
  const os = require('node:os');
7
+ const path = require('node:path');
7
8
  const tty = require('node:tty');
8
9
 
9
10
  const targets = {
@@ -43,6 +44,31 @@ function binaryPath() {
43
44
  return bin;
44
45
  }
45
46
 
47
+ const companions = { '@ai-ecoverse/slicc-jerk': 'jerk', '@ai-ecoverse/fnox': 'fnox' };
48
+
49
+ function companionDirs() {
50
+ const names = (bin) => (process.platform === 'win32' ? [`${bin}.cmd`, `${bin}.exe`, bin] : [bin]);
51
+ const dirs = [];
52
+ for (const [pkg, bin] of Object.entries(companions)) {
53
+ for (const modules of require.resolve.paths(pkg) || []) {
54
+ if (!fs.existsSync(path.join(modules, pkg, 'package.json'))) continue;
55
+ const dir = path.join(modules, '.bin');
56
+ if (names(bin).some((n) => fs.existsSync(path.join(dir, n))) && !dirs.includes(dir)) dirs.push(dir);
57
+ break;
58
+ }
59
+ }
60
+ return dirs;
61
+ }
62
+
63
+ function childEnv() {
64
+ const env = { ...process.env, SLICC_LAUNCHER: 'npm' };
65
+ const dirs = companionDirs();
66
+ if (!dirs.length) return env;
67
+ const key = Object.keys(env).find((k) => k.toUpperCase() === 'PATH') || 'PATH';
68
+ env[key] = [...dirs, env[key]].filter(Boolean).join(path.delimiter);
69
+ return env;
70
+ }
71
+
46
72
  const forwarded =
47
73
  process.platform === 'win32' ? [] : ['SIGTERM', 'SIGHUP', 'SIGQUIT', 'SIGUSR2'];
48
74
  const swallowed = process.platform === 'win32' ? ['SIGINT', 'SIGBREAK'] : [];
@@ -52,7 +78,7 @@ if (process.platform !== 'win32') {
52
78
 
53
79
  const child = spawn(binaryPath(), process.argv.slice(2), {
54
80
  stdio: 'inherit',
55
- env: { ...process.env, SLICC_LAUNCHER: 'npm' },
81
+ env: childEnv(),
56
82
  });
57
83
 
58
84
  const handlers = new Map();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc",
3
- "version": "1.31.0",
3
+ "version": "1.33.0",
4
4
  "description": "SLICC's command line for seven: links a machine's network, compute and browsers to seven over WebRTC",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -18,11 +18,12 @@
18
18
  "node": ">=18"
19
19
  },
20
20
  "optionalDependencies": {
21
- "@ai-ecoverse/slicc-darwin-arm64": "1.31.0",
22
- "@ai-ecoverse/slicc-darwin-amd64": "1.31.0",
23
- "@ai-ecoverse/slicc-linux-arm64": "1.31.0",
24
- "@ai-ecoverse/slicc-linux-amd64": "1.31.0",
25
- "@ai-ecoverse/slicc-windows-arm64": "1.31.0",
26
- "@ai-ecoverse/slicc-windows-amd64": "1.31.0"
21
+ "@ai-ecoverse/slicc-darwin-arm64": "1.33.0",
22
+ "@ai-ecoverse/slicc-darwin-amd64": "1.33.0",
23
+ "@ai-ecoverse/slicc-linux-arm64": "1.33.0",
24
+ "@ai-ecoverse/slicc-linux-amd64": "1.33.0",
25
+ "@ai-ecoverse/slicc-windows-arm64": "1.33.0",
26
+ "@ai-ecoverse/slicc-windows-amd64": "1.33.0",
27
+ "@ai-ecoverse/slicc-jerk": "^0.0.0"
27
28
  }
28
29
  }