@ai-ecoverse/slicc 1.29.3 → 1.30.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 (2) hide show
  1. package/README.md +56 -17
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -78,7 +78,7 @@ Six's `--version`, `version`, `--profile` and `--mount` are seven flags too, and
78
78
  | six's Go follower, also called `slicc` (`--install-cli`, `install-cli \| sh`) | whichever `slicc` comes first on `PATH` runs; `slicc --version` prints 6.x for six's |
79
79
  | `--serve-only --cdp-port=9222` | `slicc --cdp http://127.0.0.1:9222`, or `slicc attach --cdp …` |
80
80
  | `--mount=~/proj:/workspace/proj` | `--mount ~/proj[:proj][:ro]`, a name rather than a path; the folder is then mounted in seven |
81
- | `--profile leader` (QA), `SLICC_USER_DATA_DIR` | `--profile <name>`, a SLICC profile (see [`slicc launch`](#slicc-launch---browser-id---profile-name---url-url---headless---no-seven-flags---json)) |
81
+ | `--profile leader` (QA), `SLICC_USER_DATA_DIR` | `--profile <name>`, a SLICC profile (see [`slicc launch`](#slicc-launch---browser-id---profile-name---url-url---headless---no-seven-flags---json)); `--profile six` uses six's own Chrome profile in place, `SLICC_USER_DATA_DIR` included (see [Using SLICC six's Chrome profile](#using-slicc-sixs-chrome-profile)) |
82
82
  | `--prompt "…"` | `slicc prompt --cdp <url> "…"` once the link is up |
83
83
  | `--lead [url]`, `WORKER_BASE_URL` | `--page <url>` and `--origin <origin>` |
84
84
  | `--electron <app>`, `--kill` | `slicc --browser chrome --browser electron:<slug>`; quit the app first |
@@ -100,7 +100,39 @@ Six's `--version`, `version`, `--profile` and `--mount` are seven flags too, and
100
100
  - **Moved into seven:** `~/.slicc/crontab` and `~/.slicc/webhooks/` now live inside seven's kernel, not on the host.
101
101
  - **Update cache:** six's Go follower caches its update check in `<user cache dir>/slicc/update-check.json`, and this binary uses `update-check-seven.json` next to it. Both files have the same shape, so with one shared file, each binary would show the other's version and hold back the other's check.
102
102
  - **Kept by this binary:** `<config>/slicc/` holds `ssh_host_ed25519_key`, `tray-certs.json`, `tray-join.json` and `seven-profiles/`.
103
- - **Profiles:** six's Chrome profiles are `~/Library/Application Support/Slicc/profiles/browser-coding-agent-chrome[-<port>]` on macOS, `$XDG_STATE_HOME/slicc/profiles` on Linux and `%LOCALAPPDATA%\Slicc\profiles` on Windows (`chrome-launch.ts:119-148`). seven's live in `<config>/slicc/seven-profiles`, so a `--profile` never opens six's logins, and discovery never lists six's Chrome as a SLICC profile.
103
+ - **Profiles:** six's Chrome profiles are `~/Library/Application Support/Slicc/profiles/browser-coding-agent-chrome[-<port>]` on macOS, `$XDG_STATE_HOME/slicc/profiles` on Linux and `%LOCALAPPDATA%\Slicc\profiles` on Windows (`chrome-launch.ts:119-148`). seven's live in `<config>/slicc/seven-profiles`, so a SLICC `--profile <name>` never opens six's logins. Only `--profile six` does, in place; see [Using SLICC six's Chrome profile](#using-slicc-sixs-chrome-profile). Discovery lists six's Chrome marked `six: true`, last, and never chooses it.
104
+
105
+ ## Using SLICC six's Chrome profile
106
+
107
+ `slicc --profile six` and `slicc launch --profile six` use SLICC six's own Chrome profile, with its logins, cookies and extensions, in place: it is never copied, moved or migrated. `--profile six:<port>` picks the profile six uses for serve port `<port>`. Nothing else ever chooses six's profile: not the default, `--yes`, `--json`, `--browser` or a `--cdp` URL.
108
+
109
+ **Where it is**, as six resolves it ([ai-ecoverse/slicc](https://github.com/ai-ecoverse/slicc) at `65c5a79b4`, v6.247.17-8; the data is in [slicc-browsers](https://github.com/ai-ecoverse/slicc-browsers#slicc-sixs-profiles)' `catalog.json`, `profiles.six`):
110
+
111
+ | | where | six's code |
112
+ | --- | --- | --- |
113
+ | macOS | `~/Library/Application Support/Slicc/profiles/<name>` | `packages/node-server/src/chrome-launch.ts:124-126`; `packages/swift-server/Sources/Browser/ChromeLauncher.swift:314-322` |
114
+ | Linux | `$XDG_STATE_HOME/slicc/profiles/<name>`, else `~/.local/state/slicc/profiles/<name>` | `chrome-launch.ts:127-130` |
115
+ | Windows | `%LOCALAPPDATA%\Slicc\profiles\<name>`, else `~\AppData\Local\Slicc\profiles\<name>` | `chrome-launch.ts:131-134` |
116
+ | `<name>` | `browser-coding-agent-chrome` for `six` and `six:5710`, `browser-coding-agent-chrome-<port>` for `six:<port>` | `chrome-launch.ts:27`, `:147`; `ChromeLauncher.swift:5-6`, `:323` |
117
+ | `SLICC_USER_DATA_DIR` | when set and not blank, trimmed, it is six's profile for every port | `chrome-launch.ts:143-146` (node-server only) |
118
+ | six's own launch | `--remote-debugging-port=9222` by default, on that profile | `chrome-launch.ts:283`, `packages/node-server/src/runtime-flags.ts:47`; `ChromeLauncher.swift:213` |
119
+
120
+ A profile that doesn't exist is an error (`SLICC six's Chrome profile doesn't exist; start SLICC six once, or pick another --profile`); slicc never creates it. A path is six's when it is one of these dirs, compared case-insensitively and after resolving symlinks, so a symlink to six's profile, or a symlinked root, counts too.
121
+
122
+ **The lock comes first.** Chrome's lock is `SingletonLock` on macOS and Linux (a symlink to `<host>-<pid>`; live when that process is), and `lockfile` on Windows (live when it can't be opened exclusively; slicc opens it for reading and closes it at once).
123
+ - **Live and debuggable**, when the profile's `DevToolsActivePort` answers `/json/version` with its websocket path (usually six's 9222): slicc attaches to the running Chrome. `slicc` opens a seven tab in it (or uses one that is open) and links it, while six's node-server stays attached alongside. `slicc launch` prints its CDP URL, opens `--url` in a new tab when given, and waits.
124
+ - **Live and not debuggable:** slicc stops with exit 1: `six's Chrome is using this profile; close it, or use --browser/--profile to pick another`.
125
+ - **Free** (no lock, or a stale one): slicc launches the browser six used. That is the installed Chromium browser whose version is the profile's `Last Version` (or, without one, the version in `Local State`'s `user_experience_metrics.stability.stats_version`), the first in `slicc browsers`' id order when several match; otherwise Chrome stable. `--browser <id>` overrides it (for `slicc`, the first `--browser`; the others are extras as usual).
126
+
127
+ **Nothing is written to six's profile.** No seven prefs, no clean-exit marking, no removal of `DevToolsActivePort`, `Singleton*`, the session snapshot or any other file, no extensions added or removed, and no migration. The launch passes only runtime flags, which don't persist: `--remote-debugging-port=0 --user-data-dir=<six's profile> --no-first-run --no-default-browser-check`, the seven flags (left out with `slicc launch --no-seven-flags`), `--headless=new` with `--headless`, and the start page. A `DevToolsActivePort` that was there before the launch is ignored until Chrome writes a new one.
128
+
129
+ **What does persist** is only what Chrome itself keeps: browsing data from the session, and the seven tab in session restore, so six may reopen that tab the next time it starts Chrome.
130
+
131
+ **Going back:** quit (`q`, Ctrl-C, or `slicc launch`'s Ctrl-C), then start six as usual. A Chrome slicc launched is closed as for any launch; one slicc attached to keeps running. Nothing needs undoing: slicc keeps no record that points into six's profile.
132
+
133
+ **Output.** `slicc --profile six` skips the picker and prints plain lines (or NDJSON with `--json`). When it attaches, the `foreign-browser` notice and event follow `attached`, with `profile` `six` (or `six:<port>`): `slicc: using Chrome (profile six) at http://127.0.0.1:9222, which slicc didn't launch; opened a new seven tab. …`. A launch reports `launched` with `browser` `six`, `profile` `six` and `profileDir`. `slicc launch --profile six` prints `attached` and `detached` events when it attaches (see [`slicc launch`](#slicc-launch---browser-id---profile-name---url-url---headless---no-seven-flags---json)). Errors about six's profile go to telemetry as fixed messages, never with a path.
134
+
135
+ **In the picker** a `Chrome · SLICC six profile` row (`… six profile <port>` for a port variant) appears when that profile exists, with `SLICC six's own profile, used in place`, below every other row. It is never the best match and never preselected: Enter on it needs the cursor moved there, or the row selected with space. Picking it does the same as `--profile six`. A six endpoint in that profile is shown only through its row.
104
136
 
105
137
  ## Verifying a download
106
138
 
@@ -148,11 +180,12 @@ Release builds (a plain `X.Y.Z` version, linked in or, for `go install`, from th
148
180
  | `OPTEL_RATE`, `OPTEL_DEBUG` | go-optel's sampling rate and beacon logging |
149
181
  | `SLICC_LAUNCHER` | set to `npm` by the npm launcher; removed from the environment that `slicc` passes on |
150
182
  | `SLICC_DISCOVERY` | test-only: limits browser discovery, see [Development](#development) |
183
+ | `SLICC_USER_DATA_DIR`, `XDG_STATE_HOME` | read, as SLICC six reads them, only to find six's Chrome profile (see [Using SLICC six's Chrome profile](#using-slicc-sixs-chrome-profile)) |
151
184
 
152
185
  ## The default: `slicc`
153
186
 
154
187
  ```
155
- slicc [--browser <id>]... [--cdp <url>]... [--page <url>] [--origin <origin>]... [--profile <name>] [--headless]
188
+ slicc [--browser <id>]... [--cdp <url>]... [--page <url>] [--origin <origin>]... [--profile <name> | --profile six[:<port>]] [--headless]
156
189
  [--name <name>] [--kernel-port <n>] [--no-kernel] [--allow <rule>]... [--deny <rule>]... [--mount <path>[:<name>][:ro]]...
157
190
  [--yes] [--plain] [--json]
158
191
  [--runner <argv…> [--]] [--shell <argv…> [--]] [--eval <argv…> [--]] [--eval-quiet <dur>] [--sftp | --no-sftp]
@@ -167,18 +200,18 @@ slicc [--browser <id>]... [--cdp <url>]... [--page <url>] [--origin <origin>]...
167
200
  - a running endpoint without one: slicc opens `--page` in a new tab (`Target.createTarget`) and attaches;
168
201
  - an installed browser: slicc launches it as `slicc launch --url <page>` does, in its SLICC profile (`--profile`, or the one picked with `p`; default: the browser id), with the seven flags and prefs, and `--headless=new` with `--headless`, then attaches.
169
202
 
170
- Without `--browser`, the first row of the ranking that can host seven is chosen, an endpoint slicc didn't launch included. When that happens without the picker, slicc says so on stderr, for an endpoint that isn't in a SLICC profile and that no `--cdp` named: `slicc: using Google Chrome (profile default) at http://127.0.0.1:9222, which slicc didn't launch; opened a new seven tab. Use --browser or --cdp to choose another.` It says `found a seven tab` when one was open already. The profile is `default` for a browser's default user-data dir, the base name of the user-data dir otherwise, and left out (with its parentheses) when unknown. With `--json` the line comes as the `foreign-browser` event too. Picking a row in the picker, `--browser`, or a `--cdp` for that endpoint means the user chose it, and there is no notice. An Electron app can't host seven. Each further browser is an extra: an installed one is launched without a start page, and an endpoint is used as it is. Then the link is set up as for `slicc attach` (see [Local setup](#local-setup-slicc-attach)): over CDP with the browser that hosts seven, the first page tab on an allowed origin.
203
+ Without `--browser`, the first row of the ranking that can host seven is chosen, an endpoint slicc didn't launch included, but never one in SLICC six's profile. When that happens without the picker, slicc says so on stderr, for an endpoint that isn't in a SLICC profile and that no `--cdp` named: `slicc: using Google Chrome (profile default) at http://127.0.0.1:9222, which slicc didn't launch; opened a new seven tab. Use --browser or --cdp to choose another.` It says `found a seven tab` when one was open already. The profile is `default` for a browser's default user-data dir, the base name of the user-data dir otherwise, and left out (with its parentheses) when unknown. With `--json` the line comes as the `foreign-browser` event too. Picking a row in the picker, `--browser`, or a `--cdp` for that endpoint means the user chose it, and there is no notice. An Electron app can't host seven. Each further browser is an extra: an installed one is launched without a start page, and an endpoint is used as it is. Then the link is set up as for `slicc attach` (see [Local setup](#local-setup-slicc-attach)): over CDP with the browser that hosts seven, the first page tab on an allowed origin.
171
204
 
172
205
  **What the link offers:** `net` (tcp, resolve), `http`, and `cdp` with the browser that hosts seven (`seven: true`) and every extra, under the local policy with all of their debugging ports protected; and kernel services on `--kernel-port` (default 80; `--no-kernel` turns them off) when seven offers `kernel-in` (see [Kernel services](#kernel-services)); and `ssh` only with `--runner` (see [SSH server](#ssh-server)); and `fs` with each `--mount` folder (see [Host folders](#host-folders)). seven gets full control of every listed browser, the one it runs in too. The `cdp` list (HELLO `browsers`) has only the browser that hosts seven and the extras picked with `--browser` or in the picker; the other browsers discovery found are never offered.
173
206
 
174
207
  The cdp list follows the browsers: an extra that stops answering is taken off the list (`browser-gone`), and listed again with the same id when it answers on the same endpoint again (`browser-back`).
175
208
 
176
209
  **Flags.**
177
- - `--browser <id>`: an id from `slicc browsers` (an installed id such as `chrome`, or `cdp:<host>:<port>`), or a name, case-insensitively. Repeatable: the first hosts seven, the others are extras. Without it, the best match that can host seven.
210
+ - `--browser <id>`: an id from `slicc browsers` (an installed id such as `chrome`, or `cdp:<host>:<port>`), or a name, case-insensitively. Repeatable: the first hosts seven, the others are extras. Without it, the best match that can host seven. An endpoint in SLICC six's profile is refused (`<id> is SLICC six's Chrome; only --profile six uses it`).
178
211
  - `--cdp <url>`: also consider this CDP endpoint, as `slicc browsers --cdp`.
179
212
  - `--page <url>`: the seven page, default `https://seven.sliccy.ai/`. It must be `http` or `https`, and its origin is accepted as a seven origin.
180
213
  - `--origin`, `--name`, `--allow`, `--deny`, `--kernel-port`, `--no-kernel`, `--mount`, and the compute flags `--runner`, `--shell`, `--eval`, `--eval-quiet`, `--sftp`, `--no-sftp`: as for `slicc attach`. Without `--runner` there is no `ssh`.
181
- - `--profile <name>`: the SLICC profile for a launched browser that hosts seven.
214
+ - `--profile <name>`: the SLICC profile for a launched browser that hosts seven. `--profile six` and `--profile six:<port>` use SLICC six's own Chrome profile instead, without the picker (see [Using SLICC six's Chrome profile](#using-slicc-sixs-chrome-profile)).
182
215
  - `--headless`: launch browsers without a window.
183
216
  - `--yes`, `--plain`: no picker. `--json`: NDJSON events, below.
184
217
  - A flag of SLICC six's points back to six and exits 2 (see [Coming from SLICC six](#coming-from-slicc-six)). Any other flag, or an argument, is an error.
@@ -202,7 +235,7 @@ The cdp list follows the browsers: an extra that stops answering is taken off th
202
235
  - `discovered`: `entries`, the ranked list in the shape of `slicc browsers --json` (always a list).
203
236
  - `launched`: `browser` (the id), `name`, `version?`, `role` (`seven` or `extra`), `pid`, `profile?`, `profileDir?`, `cdp`, `webSocketDebuggerUrl`.
204
237
  - `attached`: `browser`, `name`, `version?`, `role`, `launched?` (`true` when this run launched it), `cdp`, `webSocketDebuggerUrl?`. For `seven` slicc is connected to it over CDP; an `extra` is listed for `cdp`.
205
- - `foreign-browser`: `browser`, `name`, `profile?`, `cdp`, `openedTab` (`true` when slicc opened the seven tab, `false` when one was open). It follows `attached` when the browser hosting seven is an endpoint slicc didn't launch and the user didn't choose it (see above). The same line goes to stderr.
238
+ - `foreign-browser`: `browser`, `name`, `profile?`, `cdp`, `openedTab` (`true` when slicc opened the seven tab, `false` when one was open). It follows `attached` when the browser hosting seven is an endpoint slicc didn't launch and the user didn't choose it (see above), and always when it is SLICC six's Chrome, with `profile` `six` or `six:<port>`. The same line goes to stderr.
206
239
  - `linked`: `peer?` (the name in seven's HELLO), `tab?` (the seven tab's URL), `caps`, `policy` (the summary).
207
240
  - `link-lost`: `reason?` when slicc or seven closed the link (`slicc is exiting`, seven's `bye` reason, `replaced by a new offer`), or `message?` for a failure. seven sets the link up again after a reload, and a new `linked` follows.
208
241
  - `browser-gone`, `browser-back`: `browser`, `name`, `role`. A browser stopped answering and left the cdp list, or answers again and is back on it.
@@ -225,9 +258,9 @@ The cdp list follows the browsers: an extra that stops answering is taken off th
225
258
  Lists running CDP endpoints and installed browsers, best match first. The browser tables (ids, names, bundle ids, install and user-data paths, Electron apps), the ranking tiers, the seven flags and prefs and the process-scan rules come from [slicc-browsers](https://github.com/ai-ecoverse/slicc-browsers)' `catalog.json`, which slicc-cdp's `playwright-cli` reads too. Its conformance corpus runs in `test/integration/corpus_test.go`.
226
259
 
227
260
  **Running endpoints** come from four places:
228
- - `DevToolsActivePort` files in the default user-data dirs of the browsers below, in each SLICC profile under the profiles dir (see `slicc launch`), and on Linux in the flatpak (`~/.var/app/<id>/config/…`) and snap (`~/snap/chromium/common/chromium`) dirs. The file's port must answer `/json/version` with the websocket path on the file's second line, otherwise the file is stale and ignored. A file without a second line starting with `/` is ignored too.
261
+ - `DevToolsActivePort` files in the default user-data dirs of the browsers below, in each SLICC profile under the profiles dir (see `slicc launch`), in SLICC six's profiles (see [Using SLICC six's Chrome profile](#using-slicc-sixs-chrome-profile)), and on Linux in the flatpak (`~/.var/app/<id>/config/…`) and snap (`~/snap/chromium/common/chromium`) dirs. The file's port must answer `/json/version` with the websocket path on the file's second line, otherwise the file is stale and ignored. A file without a second line starting with `/` is ignored too.
229
262
  - `GET /json/version` on `127.0.0.1:9222` to `9229`.
230
- - The process list (`ps -ax -o pid= -o command=`; on Windows `Get-CimInstance Win32_Process` with `ProcessId` and `CommandLine`, as JSON): each process started with `--remote-debugging-port=<n>` or `--remote-debugging-port <n>`. Pid 0, `slicc` itself, and commands run by a wrapper (`node`, `npx`, `tsx`, `npm`, `open`, `bash`, `zsh`, `sh`, `csh`, `fish`, `dash`, `timeout`, `env`, `sudo`, `caffeinate`, `cmd`, `powershell`, `pwsh`) are skipped. Port 0 means the port is in the `DevToolsActivePort` of the process's `--user-data-dir` (its value runs to the next whitespace followed by `--` or to the end, so paths with spaces work, and a quoted value runs to the matching quote), checked as above; without one, or with one under a `slicc/profiles` folder (six's), the process is skipped. Any other port is asked for `/json/version` on `127.0.0.1`. The exact rules are in [slicc-browsers](https://github.com/ai-ecoverse/slicc-browsers#the-process-source).
263
+ - The process list (`ps -ax -o pid= -o command=`; on Windows `Get-CimInstance Win32_Process` with `ProcessId` and `CommandLine`, as JSON): each process started with `--remote-debugging-port=<n>` or `--remote-debugging-port <n>`. Pid 0, `slicc` itself, and commands run by a wrapper (`node`, `npx`, `tsx`, `npm`, `open`, `bash`, `zsh`, `sh`, `csh`, `fish`, `dash`, `timeout`, `env`, `sudo`, `caffeinate`, `cmd`, `powershell`, `pwsh`) are skipped. Port 0 means the port is in the `DevToolsActivePort` of the process's `--user-data-dir` (its value runs to the next whitespace followed by `--` or to the end, so paths with spaces work, and a quoted value runs to the matching quote), checked as above; without one, or with one under a `slicc/profiles` folder that isn't one of six's profiles, the process is skipped. Any other port is asked for `/json/version` on `127.0.0.1`. The exact rules are in [slicc-browsers](https://github.com/ai-ecoverse/slicc-browsers#the-process-source).
231
264
  - Each `--cdp` URL: `http(s)://host:port`, `ws(s)://host:port/devtools/browser/<id>`, `host:port` or a bare port. One that doesn't answer is reported on stderr and left out; the exit status stays 0.
232
265
 
233
266
  Endpoints are merged by host and port. A `DevToolsActivePort` file wins over `--cdp`, which wins over the process list, which wins over the port probe. For each endpoint, `/json/version` gives the name, version and `webSocketDebuggerUrl`, and `/json/list` gives the seven tabs: `page` targets whose origin is `https://<label>.sliccy.ai`, other than `www` (`:443` is the same origin, any other port isn't). An endpoint's `cdp` has its host in lower case, with `localhost` and `::1` written as `127.0.0.1`. A `DevToolsActivePort` whose port is open but serves no `/json/version` (Chrome's opt-in remote debugging of a running browser) is listed as `wsOnly`, with the websocket URL from the file and no tab check.
@@ -239,7 +272,9 @@ Endpoints are merged by host and port. A `DevToolsActivePort` file wins over `--
239
272
  - **Windows:** `StartMenuInternet` and `App Paths` in the registry (current user, then machine), then the known paths under `%ProgramFiles%`, `%ProgramFiles(x86)%` and `%LOCALAPPDATA%`. The version is the highest version-named directory next to the executable. Electron apps are directories under `%LOCALAPPDATA%\Programs`, `%ProgramFiles%` and `%ProgramFiles(x86)%` with `resources\app.asar` (or `resources\app`) and Chromium's `.pak`/`.bin` files, and Squirrel installs (`%LOCALAPPDATA%\<app>\Update.exe` with `app-<version>` dirs).
240
273
  - **Linux:** snaps (`/snap/bin/<name>`), names on `PATH` (such as `google-chrome-stable`, `chromium`, `microsoft-edge-stable`, `brave-browser`), flatpaks (`~/.local/share/flatpak/app/<id>`, `/var/lib/flatpak/app/<id>`) and `.desktop` files in the XDG, flatpak and snap application dirs. Versions come from `/var/lib/dpkg/status`, a snap's `meta/snap.yaml`, or else `<browser> --version`. A `.desktop` program whose directory has `resources/app.asar` (or `resources/app`) and Chromium's data files is an Electron app.
241
274
 
242
- **Ranking.** Tiers, in order: 1 an endpoint with seven open, 2 any other running endpoint, 3 Chrome stable, 4 other Chromium browsers, 5 Electron apps. Endpoints sort by host, then port. Browsers sort in the id order above, Electron apps by name, then path. Versions below `MinChromiumMajor` (116) are left out: for endpoints by the `Chrome/<major>` in the user agent, and for installed Chrome, Edge and Chromium by their version, which is the Chromium version. Other browsers' versions are not Chromium versions and are not filtered.
275
+ **SLICC six's Chrome.** An endpoint that a source found in one of six's profiles is marked `six: true`: from its `DevToolsActivePort`, from a process whose `--user-data-dir` is six's (with port 0 its `DevToolsActivePort` is read), or from a port probe or `--cdp` URL whose port the process list maps to six's profile. A stale file marks nothing. It ranks last and is never chosen by itself (see [Using SLICC six's Chrome profile](#using-slicc-sixs-chrome-profile)).
276
+
277
+ **Ranking.** Tiers, in order: 1 an endpoint with seven open, 2 any other running endpoint, 3 Chrome stable, 4 other Chromium browsers, 5 Electron apps, 6 an endpoint in SLICC six's profile, with or without seven open. Endpoints sort by host, then port. Browsers sort in the id order above, Electron apps by name, then path. Versions below `MinChromiumMajor` (116) are left out: for endpoints by the `Chrome/<major>` in the user agent, and for installed Chrome, Edge and Chromium by their version, which is the Chromium version. Other browsers' versions are not Chromium versions and are not filtered.
243
278
 
244
279
  **`--json`** prints one document. Fields marked `?` are left out when empty; new fields may be added, existing ones keep their meaning. `playwright-cli list --json` prints the same shape. This section is its spec; [slicc-browsers' `schema/browsers.schema.json`](https://github.com/ai-ecoverse/slicc-browsers/blob/main/schema/browsers.schema.json) is a JSON Schema copy of it.
245
280
 
@@ -291,23 +326,24 @@ Endpoints are merged by host and port. A `DevToolsActivePort` file wins over `--
291
326
  }
292
327
  ```
293
328
 
294
- - Entry: `id` (an installed id, or `cdp:<host>:<port>`), `kind` (`endpoint` or `installed`), `tier` (1–5), `name`, `version?`, and either `endpoint` or `installed`.
295
- - `endpoint`: `cdp` (the HTTP base URL), `webSocketDebuggerUrl`, `name`, `version?`, `product?` and `userAgent?` (from `/json/version`), `source` (`devtools-active-port`, `flag`, `process` or `probe`), `browser?` (the installed id whose user-data dir held the file), `userDataDir?` (the dir that held the file, or a process's `--user-data-dir`), `profile?` (the SLICC profile name), `wsOnly?`, `sevenOpen`, `sevenTabs` (always a list).
329
+ - Entry: `id` (an installed id, or `cdp:<host>:<port>`), `kind` (`endpoint` or `installed`), `tier` (1–6), `name`, `version?`, and either `endpoint` or `installed`.
330
+ - `endpoint`: `cdp` (the HTTP base URL), `webSocketDebuggerUrl`, `name`, `version?`, `product?` and `userAgent?` (from `/json/version`), `source` (`devtools-active-port`, `flag`, `process` or `probe`), `browser?` (the installed id whose user-data dir held the file), `userDataDir?` (the dir that held the file, or a process's `--user-data-dir`), `profile?` (the SLICC profile name), `wsOnly?`, `six?` (`true` for SLICC six's Chrome), `sevenOpen`, `sevenTabs` (always a list).
296
331
  - `installed`: `id`, `name`, `engine` (`chromium` or `electron`), `channel?`, `version?`, `path` (the `.app`, executable or flatpak dir), `executable` (for a flatpak, the `flatpak` binary), `bundleId?`, `via?` (`snap` or `flatpak`), `package?` (the snap or flatpak id), `userDataDir?` (the browser's default), `debugSupport` (`supported`, `disabled` or `unknown`), `debugBuild?`.
297
332
 
298
- Without `--json`, the same list is a table: id, name, version, state and where.
333
+ Without `--json`, the same list is a table: id, name, version, state and where. The state of six's Chrome ends with `SLICC six's profile`.
299
334
 
300
335
  ### `slicc launch [--browser <id>] [--profile <name>] [--url <url>] [--headless] [--no-seven-flags] [--json]`
301
336
 
302
337
  Launches a browser with CDP and keeps running until interrupted (Ctrl-C, `SIGINT` or `SIGTERM`; on Windows Ctrl-C or Ctrl-Break). Then it closes the browser it started and exits 0. If the browser exits by itself, `slicc launch` exits 0 too.
303
338
 
304
339
  - `--browser` takes an installed id from `slicc browsers` (or its name, case-insensitively). The default is the best installed Chromium browser in the ranking above.
305
- - Chromium browsers always get a separate SLICC profile, `<config dir>/slicc/seven-profiles/<name>`, because Chrome 136 and later ignore CDP flags on the default profile. The config dir is `~/Library/Application Support` on macOS, `%APPDATA%` on Windows and `$XDG_CONFIG_HOME` (or `~/.config`) on Linux. A snap's profiles live in `~/snap/<snap>/common/slicc/seven-profiles`, the only place it can write. The profiles dir is shared with slicc-cdp's `playwright-cli`, whose `open` launches into the same `<name>` dirs. Both tools reuse a browser that is still running there, through its `DevToolsActivePort`. `--profile` is the name (letters, digits, `.`, `_`, `-`; default: the browser id). A profile another browser process still holds is refused.
340
+ - `--profile six` and `--profile six:<port>` use SLICC six's own Chrome profile in place: `slicc launch` attaches to six's Chrome when it is running with CDP, refuses when it runs without, and otherwise launches the browser six used (or `--browser`) in it, writing nothing to the profile. None of the profile steps below apply. See [Using SLICC six's Chrome profile](#using-slicc-sixs-chrome-profile).
341
+ - Chromium browsers always get a separate SLICC profile, `<config dir>/slicc/seven-profiles/<name>`, because Chrome 136 and later ignore CDP flags on the default profile. The config dir is `~/Library/Application Support` on macOS, `%APPDATA%` on Windows and `$XDG_CONFIG_HOME` (or `~/.config`) on Linux. A snap's profiles live in `~/snap/<snap>/common/slicc/seven-profiles`, the only place it can write. The profiles dir is shared with slicc-cdp's `playwright-cli`, whose `open` launches into the same `<name>` dirs. Both tools reuse a browser that is still running there, through its `DevToolsActivePort`. `--profile` is the name (letters, digits, `.`, `_`, `-`; default: the browser id). A profile another browser process still holds is refused, and so is one that is SLICC six's (when `SLICC_USER_DATA_DIR` points at it, say), before anything in it is touched.
306
342
  - **Older profiles.** Earlier versions kept profiles in `<config dir>/slicc/profiles`. On macOS's default case-insensitive volume, that is the same folder as SLICC six's `~/Library/Application Support/Slicc/profiles`. `slicc`, `slicc browsers` and `slicc launch` move them once, and do the same for each snap's `slicc/profiles`.
307
343
  - Each profile dir is renamed into `seven-profiles`, which is created when missing. `playwright-cli` may already have created it.
308
344
  - Once every profile has been looked at, the move writes `seven-profiles/.migrated-from-profiles` and never runs again. A run that is cut short picks up where it stopped next time.
309
345
  - A name that already exists in `seven-profiles` stays in the old folder, with the notice `slicc: profile <name> stays in <old>, since <new>/<name> already exists`.
310
- - Left alone: six's profiles (`browser-coding-agent-chrome` and `browser-coding-agent-chrome-<port>`), dotfiles (six's `.profile-migration-complete`), and anything that isn't a valid profile name.
346
+ - Left alone: six's profiles (`browser-coding-agent-chrome` and `browser-coding-agent-chrome-<port>`, in any case, and the `SLICC_USER_DATA_DIR` dir; nothing moves at all when the old folder is in one of them), dotfiles (six's `.profile-migration-complete`), and anything that isn't a valid profile name.
311
347
  - A profile whose `SingletonLock` points at a live process stays where it is, with a one-line notice on stderr: `slicc: profile <name> is in use by process <pid>, so it stays in <old>; quit that browser, then move it to <new>`.
312
348
  - `slicc/profiles` is never scanned or launched into afterwards.
313
349
  - Before the launch, a stale `DevToolsActivePort`, Chrome's `Singleton*` files and the session-restore snapshot are removed, and the last exit is marked clean, so only the start page opens.
@@ -321,6 +357,7 @@ Plain output: the CDP HTTP URL on stdout, status lines on stderr. With `--json`,
321
357
  - `{"event":"launched","id","name","version","engine","pid","profile","profileDir","cdp","webSocketDebuggerUrl"}` (`version`, `profile` and `profileDir` are left out when empty);
322
358
  - `{"event":"closed"}` after `slicc launch` closed the browser;
323
359
  - `{"event":"exited"}` when the browser exited by itself;
360
+ - with `--profile six`, when six's Chrome was already running: `{"event":"attached","id","name","version","engine","profile","profileDir","cdp","webSocketDebuggerUrl"}` instead of `launched`, then `{"event":"detached"}` on Ctrl-C (six's Chrome keeps running) or `exited` when it quits;
324
361
  - `{"event":"error","message"}`, then exit 1.
325
362
 
326
363
  ## Local setup: `slicc attach`
@@ -839,9 +876,11 @@ Front ends and capabilities follow a node's links with `node.Node.Subscribe(func
839
876
  **Test isolation: `SLICC_DISCOVERY`** (test-only). When it is set, browser discovery (`slicc browsers`, the default flow, and `browser.Discover` in the same process) never probes ports 9222–9229, never reads the process list, and finds only `--cdp` URLs, plus:
840
877
  - `isolated`, or any value not listed here: nothing else;
841
878
  - `installed`: installed browsers too;
842
- - `home`: installed browsers, and the `DevToolsActivePort` files under the home and config dirs from the environment (`HOME`, `APPDATA`, `LOCALAPPDATA`, `XDG_CONFIG_HOME`).
879
+ - `home`: installed browsers, and the `DevToolsActivePort` files under the home and config dirs from the environment (`HOME`, `APPDATA`, `LOCALAPPDATA`, `XDG_CONFIG_HOME`), SLICC six's profiles included (`XDG_STATE_HOME`, `SLICC_USER_DATA_DIR`).
880
+
881
+ In the same process, probe ports, dirs and a process list passed in explicitly (`Options.ProbePorts`, `Options.Home`, `Options.ProfilesDir`, and `Options.Processes`, which returns the output of the process-list command) are still used. `Options.Transport` and `Options.Dial` replace discovery's HTTP transport and TCP dial; the corpus test fakes every server with them, and its process list is fake too. `test/integration`'s `TestMain` sets `SLICC_DISCOVERY=isolated` and unsets `SLICC_USER_DATA_DIR`, and points `HOME`, `APPDATA` and the XDG dirs, `XDG_STATE_HOME` included (and `USERPROFILE` and `LOCALAPPDATA` except on Windows, where a Chrome started with temporary ones never writes `DevToolsActivePort`) at a temporary directory for itself and every `slicc` it starts, so no test can reach the browsers of the machine it runs on. Tests opt in to more with a fake home or fake endpoints. The Chrome the harness starts itself gets the real environment.
843
882
 
844
- In the same process, probe ports, dirs and a process list passed in explicitly (`Options.ProbePorts`, `Options.Home`, `Options.ProfilesDir`, and `Options.Processes`, which returns the output of the process-list command) are still used. `Options.Transport` and `Options.Dial` replace discovery's HTTP transport and TCP dial; the corpus test fakes every server with them, and its process list is fake too. `test/integration`'s `TestMain` sets `SLICC_DISCOVERY=isolated` and points `HOME`, `APPDATA` and the XDG dirs (and `USERPROFILE` and `LOCALAPPDATA` except on Windows, where a Chrome started with temporary ones never writes `DevToolsActivePort`) at a temporary directory for itself and every `slicc` it starts, so no test can reach the browsers of the machine it runs on. Tests opt in to more with a fake home or fake endpoints. The Chrome the harness starts itself gets the real environment.
883
+ **SLICC six's profile in tests.** The `--profile six` tests build fake six profile trees in a fake home only: each OS's layout, a mixed-case name, a symlinked profile and root, `SingletonLock` (or `lockfile`) live, stale and absent, and debuggable endpoints that are fakes or the harness's own headless Chrome on a free port. They check the trees byte for byte after a launch, an attach and an exit. A fake browser (`testdata/fakechrome`) stands in for Chrome where a real one would write to the profile itself. The one real-Chrome launch into a fake six profile checks that nothing was seeded; on Windows it puts that profile at `SLICC_USER_DATA_DIR` in a temporary dir, since that Chrome keeps the real `LOCALAPPDATA` (see below).
845
884
 
846
885
  **Port guard.** On CI (`CI` set), or with `SLICC_TEST_PORT_GUARD=1`, `TestMain` holds `127.0.0.1:9222` to `9229` (and `[::1]` where it can) for the whole run, and the run fails if anything connects to them, other than the one test that lends a port to its own fake browser. On CI a port it can't hold fails the run. Off CI it is off by default, so a developer's own Chrome on those ports is never touched; the guarded tests then skip.
847
886
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc",
3
- "version": "1.29.3",
3
+ "version": "1.30.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,11 @@
18
18
  "node": ">=18"
19
19
  },
20
20
  "optionalDependencies": {
21
- "@ai-ecoverse/slicc-darwin-arm64": "1.29.3",
22
- "@ai-ecoverse/slicc-darwin-amd64": "1.29.3",
23
- "@ai-ecoverse/slicc-linux-arm64": "1.29.3",
24
- "@ai-ecoverse/slicc-linux-amd64": "1.29.3",
25
- "@ai-ecoverse/slicc-windows-arm64": "1.29.3",
26
- "@ai-ecoverse/slicc-windows-amd64": "1.29.3"
21
+ "@ai-ecoverse/slicc-darwin-arm64": "1.30.0",
22
+ "@ai-ecoverse/slicc-darwin-amd64": "1.30.0",
23
+ "@ai-ecoverse/slicc-linux-arm64": "1.30.0",
24
+ "@ai-ecoverse/slicc-linux-amd64": "1.30.0",
25
+ "@ai-ecoverse/slicc-windows-arm64": "1.30.0",
26
+ "@ai-ecoverse/slicc-windows-amd64": "1.30.0"
27
27
  }
28
28
  }