@ai-ecoverse/slicc-browsers 1.8.1 → 1.8.2

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/README.md CHANGED
@@ -94,7 +94,7 @@ Every feature builds for `wasm32-wasip1`.
94
94
  - `discardExceptions`: where the site pattern and the extra origins' hosts go, as a `list` of strings or as a `chrome-time-map`, a map from site to the time it was added (microseconds since 1601-01-01 UTC, as a decimal string);
95
95
  - `cleanExit`: values that mark the last exit clean;
96
96
  - `form` says where a key comes from: `six` (SLICC six's keys) or `chrome-154` (what Chrome 154 reads).
97
- - `protectedOrigins`: what browser control must never reach, see [Protected origins](#protected-origins). `domains` (`sliccy.ai`), `hosts` (`vault.sliccy.ai`), `schemes` (`https`, `http`), `innerSchemes` (`blob`, `filesystem`, `view-source`), `anySchemes` (`devtools`), `protectedSchemes` (`chrome`, `chrome-untrusted`, `chrome-extension`, `devtools`, `edge`, `brave`, `opera`, `vivaldi`, `arc`, `file`) with `schemeExceptions` (`chrome://newtab`, `edge://newtab`, `brave://newtab`, `opera://startpage`), `aboutScheme` (`chrome`), `targetTypes` (`browser_ui`), `inheriting` (`about:blank`, `about:srcdoc`), and `refusal`, the text of a refusal.
97
+ - `protectedOrigins`: what browser control must never reach, see [Protected origins](#protected-origins). `domains` (`sliccy.ai`), `hosts` (`vault.sliccy.ai`), `schemes` (`https`, `http`), `innerSchemes` (`blob`, `filesystem`, `view-source`), `anySchemes` (`devtools`), `protectedSchemes` (`chrome`, `chrome-untrusted`, `chrome-extension`, `devtools`, `edge`, `brave`, `opera`, `vivaldi`, `arc`, `file`) with `schemeExceptions` (`chrome://newtab`, `chrome://new-tab-page`, `chrome-untrusted://new-tab-page`, `edge://newtab`, `brave://newtab`, `opera://startpage`), `aboutScheme` (`chrome`), `targetTypes` (`browser_ui`), `inheriting` (`about:blank`, `about:srcdoc`), and `refusal`, the text of a refusal.
98
98
  - `profiles`: SLICC profiles live in `<config dir>/<root>/<name>`, and a snap's in `~/snap/<snap>/common/<snapRoot>/<name>`. `legacyRoot` is the old root, never scanned; on macOS's case-insensitive volume it is SLICC six's root too. `sixProfilePattern` matches six's profile names, case-insensitively. `namePattern` is a valid profile name. `six` describes SLICC six's Chrome profiles (see [SLICC six's profiles](#slicc-sixs-profiles)):
99
99
  - `roots`: six's profile root per OS (`macos`, `linux`, `windows`), a `base` location followed by the `path` segments. The base is its `env` when that is set and not empty (any value, as six takes it), else `home` under the home dir.
100
100
  - `defaultName` (`browser-coding-agent-chrome`), `defaultPort` (5710) and `portSuffix` (`-{port}`): six's profile for its serve port `<port>` is `<root>/<defaultName>`, with `portSuffix` added for any port other than `defaultPort`.
@@ -109,7 +109,7 @@ Browser control must never navigate to, open or attach to a target on seven's ow
109
109
  **URLs.** A URL is parsed the way the WHATWG URL Standard (and so the browser) parses it, so `https:\\seven.sliccy.ai`, a tab or newline inside the URL, `%2E`, `。` and full-width letters all reach seven. In Go and Rust that takes a WHATWG parser, not `net/url`. A URL that doesn't parse isn't protected; the browser doesn't load it either. Then:
110
110
  1. While its scheme is one of `innerSchemes`, the rest of the URL after `<scheme>:` takes its place, at most 8 times: `blob:https://seven.sliccy.ai/<uuid>` is `https://seven.sliccy.ai/<uuid>`.
111
111
  2. A scheme in `anySchemes` is protected whatever follows: a DevTools front end (`devtools://`) can be inspecting seven.
112
- 3. A scheme in `protectedSchemes` is protected like seven, whatever follows, except the `scheme://host` pairs in `schemeExceptions` (the new tab pages), on any path:
112
+ 3. A scheme in `protectedSchemes` is protected like seven, whatever follows, except the `scheme://host` pairs in `schemeExceptions` (the new tab pages), on any path. Match the parsed scheme and exact host, never a raw URL prefix: `chrome-untrusted://new-tab-page/one-google-bar?paramsencoded=` is excepted, but `chrome-untrusted://new-tab-page.evil/` and `chrome-untrusted://other/` remain protected. Chrome's new tab embeds the excepted untrusted host, and `chrome://new-tab-page/` can commit as itself when opened directly:
113
113
  - Chrome's privileged UI (`chrome://settings`, `chrome://password-manager`, `chrome-untrusted://…`, `devtools://`) and the same UI in the catalog's other Chromium browsers (`edge://settings/passwords`, `edge://wallet`, `brave://`, `opera://`, `vivaldi://`, `arc://`), since a client attaches to whatever browser answers;
114
114
  - `chrome-extension://`, every page, frame and extension target of every type: password-manager and wallet extensions keep secrets there. There are no default exceptions. Seven's own extension origin is already covered as a seven origin. If a guard ever needs an exception, it is a catalog entry by extension id with a reason, never a default;
115
115
  - `file://`: otherwise a tool could open `~/.ssh` or `~/.aws/credentials` in the real browser, around slicc's file-system fence. Adopters whose tests open local HTML through the guarded client move those fixtures to a local http server.
@@ -120,6 +120,8 @@ Browser control must never navigate to, open or attach to a target on seven's ow
120
120
 
121
121
  This is wider than the rule for finding seven (`seven.originHostPattern`, which leaves out the `excludedLabels` and `excludedLabelPrefixes`—`www`, `vault`, `vault-preview`, `get`, `mcpcat`, `echo`, and any `vault-*` prefix). Every `sliccy.ai` host shares the `sliccy.ai` cookies, and cookies ignore the port and, without `Secure`, the scheme. SLICC six lives on `www.sliccy.ai` and the apex, and its cookies matter. `*.kernel.localhost` is not protected: each port is its own origin, and the agent's own servers live there. An extra origin is matched exactly, so `http://127.0.0.1:5710` doesn't protect `http://127.0.0.1:5711`.
122
122
 
123
+ **New-tab checks (1.8.2).** In fresh default profiles on macOS, Chrome for Testing 156.0.8078.4 (Playwright build 1248) and Chrome 155.0.8059.82 commit `chrome://newtab/` to `chrome://new-tab-page/` and embed `chrome-untrusted://new-tab-page/one-google-bar?paramsencoded=` as an out-of-process frame. Direct `chrome://new-tab-page/` also commits as itself. Edge 155.0.4283.60 commits `edge://newtab/` to `https://ntp.msn.com/edge/ntp` with an `about:blank` child and no internal-scheme child observed; directly opening `edge://ntp/` returns `ERR_INVALID_URL`. These observations are for fresh default profiles, not every browser configuration. Brave, Opera and Vivaldi were not installed locally, and this repository's CI installs only Chromium, so their redirects and internal frames were not verified and no additional exceptions are inferred. Incognito Chrome and Edge new tabs omit the ordinary new tab's frame tree; the reachability vector therefore uses the default context.
124
+
123
125
  **The vault.** `vault.sliccy.ai` is in `hosts` by name, and vault branch previews (`vault-preview.sliccy.ai`, `vault-*.sliccy.ai`) are covered by the `sliccy.ai` domain rule. `sliccy.ai` already covers them all, but vault must stay protected even if `domains` ever changes: the vault must never be a CDP target for agent tools. The one exception is slicc-cli's own pairing attach for the vault, which is the CLI's own connection and not browser control handed to the agent.
124
126
 
125
127
  **Targets.** A target whose `TargetInfo.type` is one of `targetTypes` (`browser_ui`, Chrome's own UI such as `chrome://omnibox-popup.top-chrome/`) is always protected, whatever its URL. Otherwise a target's effective origin is its URL's (`TargetInfo.url`), except when the URL inherits the origin of whoever made the document: the empty URL, and `inheriting` with any query or fragment. Such a target is protected when it was protected before this URL (a seven tab that went to `about:blank` keeps seven's origin), or when its opener (`openerId`, else `openerFrameId`) is protected or unknown, for an opener closed before the program saw it. The URL, `openerFrameId` and `browserContextId` alone can't tell: a blank popup that seven opens has seven's origin and the URL `about:blank`. A program that holds a session to the target also has the document's real origin: the main frame's `securityOrigin` in `Page.frameNavigated`, and the default context's `origin` in `Runtime.executionContextCreated`. When one of those is protected, the target is protected too, until a URL with an origin of its own replaces it.
@@ -143,10 +145,12 @@ Every CDP guard runs the vectors in `guard-vectors.json` (schema `schema/guard-v
143
145
  - `C5.continue-request` and `C5.continue-response`, added next to `C5.document`;
144
146
  - the `C8` rows for privileged pages: `C8.navigate` (a page navigates to `chrome://settings`, `chrome://password-manager`, an extension page or `file:///`; refused), `C8.view-source` (the same through `view-source:`; refused), `C8.create` (`Target.createTarget` straight on those pages; refused), `C8.browser-ui-listed` (`Target.getTargets` lists no `browser_ui` target) and `C8.browser-ui-attach` (`Target.attachToTarget` by a `browser_ui` target's id; refused). All four have an unguarded control, since the guard refuses them only on the privileged target. Two cases aren't rows, because Chrome itself blocks them, so an unguarded client can't tell a guard from none: a page's `window.open('chrome://settings')`, and an `about:` alias such as `about:settings`, which `Page.navigate` and `Target.createTarget` both turn into `about:blank#blocked`. The `about:` aliases are in `protected.json` instead.
145
147
 
148
+ The `C8.newtab` reachability control attaches through the guard to a settled ordinary new tab, including its internal frames, then navigates that same tab to an ordinary document. Both legs must succeed, including without a guard. It uses the default browser context, since an incognito new tab omits the ordinary new tab's internal frames. It covers `chrome://newtab/` and directly opened `chrome://new-tab-page/`.
149
+
146
150
  **Top level.**
147
151
  - `schemaVersion` (1): guards pin it.
148
152
  - `setVersion`: the package version. The release flow stamps it into the npm package and the crate (`scripts/set-crate-version.mjs`). In git, and so in the Go module, it reads `0.0.0`; Go code gets the version from the module.
149
- - `targets`: the names a runner maps to a scheme, host and port: `seven`, `vault`, `vault-x` (a vault branch preview), `apex`, `own` (the client page's origin, `{client}`), `ordinary`, `ordinary-same-site`, `chrome-settings`, `chrome-passwords`, `chrome-extension-page` and `file-root`. Each has a `description` and, for the protected ones, a default `host`. `chrome-settings` (`chrome://settings/`), `chrome-passwords` (`chrome://password-manager/`), `chrome-extension-page` (a page of Chrome's built-in PDF viewer extension) and `file-root` (`file:///`) carry a `url`, which the runner uses unless `targets` maps the name to something else. No other URL in the file is one a runner must use.
153
+ - `targets`: the names a runner maps to a scheme, host and port: `seven`, `vault`, `vault-x` (a vault branch preview), `apex`, `own` (the client page's origin, `{client}`), `ordinary`, `ordinary-same-site`, `chrome-newtab`, `chrome-new-tab-page`, `chrome-settings`, `chrome-passwords`, `chrome-extension-page` and `file-root`. Each has a `description` and, for the protected ones, a default `host`. `chrome-newtab` (`chrome://newtab/`), `chrome-new-tab-page` (`chrome://new-tab-page/`), `chrome-settings` (`chrome://settings/`), `chrome-passwords` (`chrome://password-manager/`), `chrome-extension-page` (a page of Chrome's built-in PDF viewer extension) and `file-root` (`file:///`) carry a `url`, which the runner uses unless `targets` maps the name to something else. No other URL in the file is one a runner must use.
150
154
  - `variants`: the detach variants in ms. `prompt` and `lagging` are documented; a runner may add others, such as `lagging-8s`, and reports the name it ran.
151
155
  - `capabilities`: what a transport may lack. `autoAttach` covers `Target.setAutoAttach`, `children` steps and child sessions; `browserSession` covers calls on the browser session; `browserContexts` covers `Target.createBrowserContext` and `Target.disposeBrowserContext`.
152
156
  - `placeholders`: every `{name}` used in the vectors, with what it stands for. `{client}` is the client page's origin, which the runner maps.
@@ -279,7 +283,7 @@ otherwise they run serially. `capabilities` is an object of booleans or an array
279
283
  of supported names. `capabilities.scope` selects owner-specific rows.
280
284
 
281
285
  Map `ordinary`, `ordinary-same-site`, `seven`, `vault`, `vault-x`, `apex`, `own`
282
- and `client` to origins. `chrome-settings`, `chrome-passwords`, `chrome-extension-page` and `file-root` default to their `url`.
286
+ and `client` to origins. `chrome-newtab`, `chrome-new-tab-page`, `chrome-settings`, `chrome-passwords`, `chrome-extension-page` and `file-root` default to their `url`.
283
287
  `{browserUi}` is the id of one of Chrome's own `browser_ui` targets, which the runner looks up through
284
288
  its unguarded observer (or the client) before the row; a row that uses it fails when there is none.
285
289
  A vector with `"defaultContext": true` runs in the browser's default context even with the
@@ -393,7 +397,7 @@ Without `tls`, the server and logged URLs remain HTTP. It returns
393
397
  The server serves document, frame, redirect, CSP, authentication, data, image,
394
398
  canary and beacon paths. Configure host resolution in your test browser, not in
395
399
  the runner. `npm run test:guard` exercises Chromium twice with no guard, one target per
396
- invocation: controls must pass and guarded expectations must fail. For a single
400
+ invocation: controls must pass and guarded protection expectations must fail; the `C8.newtab` reachability control must instead pass both legs. For a single
397
401
  target use `GUARD_TARGET=seven npm run test:guard-target`. The fixture also serves
398
402
  `/live` image requests from stand-in documents, independently of injected code.
399
403
 
@@ -530,7 +534,7 @@ for case in corpus().cases {
530
534
  Go 1.26, Rust stable with `wasm32-wasip1`, Node ≥ 24.
531
535
  - `npm run corpus` regenerates `corpus.json` from `corpus/`; the pre-commit hook and CI fail when it's stale.
532
536
  - `npm run validate` checks `catalog.json`, `corpus.json`, `protected.json` and `guard-vectors.json` against the schemas, runs the protected-origin vectors through `protected.mjs`, and checks what a schema can't say: unique ids, bundle ids and names, known Windows roots, rising tiers, compiling patterns, known tokens, tier order, `sevenOpen`, `tabs` (which holds no entry of `sevenTabs`), `six` and `auto` in each `expected.json`, and no port from 9222 to 9229.
533
- - Every gate prints one verdict line when it passes: `validate: PASS …`, `corpus: PASS <n> cases` (`node scripts/corpus.mjs --check`), `major-guard: PASS v<version> fits <module>`, and `guard-sweep: PASS 9 targets` (`npm run test:guard-sweep`). CI runs each through `scripts/gate.mjs --expect <regex> -- <command>`, which fails when the command exits non-zero or prints no matching line, so a silent or early exit never reads as a pass. `gate.mjs --expect <regex> --in <file>` checks a log instead; the release job uses it on semantic-release's log for the major-guard line. `npm run test:gates` tests the gates, including runs through a symlinked checkout and a symlinked script.
537
+ - Every gate prints one verdict line when it passes: `validate: PASS …`, `corpus: PASS <n> cases` (`node scripts/corpus.mjs --check`), `major-guard: PASS v<version> fits <module>`, and `guard-sweep: PASS 11 targets` (`npm run test:guard-sweep`). CI runs each through `scripts/gate.mjs --expect <regex> -- <command>`, which fails when the command exits non-zero or prints no matching line, so a silent or early exit never reads as a pass. `gate.mjs --expect <regex> --in <file>` checks a log instead; the release job uses it on semantic-release's log for the major-guard line. `npm run test:gates` tests the gates, including runs through a symlinked checkout and a symlinked script.
534
538
  - `npm run lint`: the slicc lint tools (Biome, no comments, no unit tests in git, `AGENTS.md`), `gofmt`, `go mod tidy -diff`, `go vet`, golangci-lint, `cargo fmt --check` and clippy.
535
539
  - `npm test`: `validate`, the Go tests in `test/integration/`, and `cargo test --all-features`.
536
540
  - `npm run build`: the Go module, the crate (also for `wasm32-wasip1`), and `npm pack --dry-run`.
package/catalog.json CHANGED
@@ -720,7 +720,14 @@
720
720
  "arc",
721
721
  "file"
722
722
  ],
723
- "schemeExceptions": ["chrome://newtab", "edge://newtab", "brave://newtab", "opera://startpage"],
723
+ "schemeExceptions": [
724
+ "chrome://newtab",
725
+ "chrome://new-tab-page",
726
+ "chrome-untrusted://new-tab-page",
727
+ "edge://newtab",
728
+ "brave://newtab",
729
+ "opera://startpage"
730
+ ],
724
731
  "aboutScheme": "chrome",
725
732
  "targetTypes": ["browser_ui"],
726
733
  "inheriting": ["about:blank", "about:srcdoc"],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "setVersion": "1.8.1",
3
+ "setVersion": "1.8.2",
4
4
  "sources": [
5
5
  {
6
6
  "repo": "ai-ecoverse/slicc-cli",
@@ -49,6 +49,14 @@
49
49
  "ordinary-same-site": {
50
50
  "description": "an unprotected origin same-site with the target"
51
51
  },
52
+ "chrome-newtab": {
53
+ "url": "chrome://newtab/",
54
+ "description": "Chrome's ordinary new tab page, including its internal frames"
55
+ },
56
+ "chrome-new-tab-page": {
57
+ "url": "chrome://new-tab-page/",
58
+ "description": "Chrome's directly opened new tab page"
59
+ },
52
60
  "chrome-settings": {
53
61
  "url": "chrome://settings/",
54
62
  "description": "Chrome's settings page, a privileged chrome: page"
@@ -12357,6 +12365,82 @@
12357
12365
  },
12358
12366
  "expected": "as each vector"
12359
12367
  },
12368
+ {
12369
+ "id": "C8.newtab",
12370
+ "defaultContext": true,
12371
+ "family": "C",
12372
+ "kind": "cdp",
12373
+ "scope": "any",
12374
+ "setup": [
12375
+ {
12376
+ "page": "tab",
12377
+ "url": "{target}"
12378
+ }
12379
+ ],
12380
+ "trigger": [
12381
+ {
12382
+ "cdp": "Target.attachToTarget",
12383
+ "params": {
12384
+ "targetId": "{pageTarget}",
12385
+ "flatten": true
12386
+ },
12387
+ "session": "browser",
12388
+ "as": "attach",
12389
+ "requires": ["browserSession"]
12390
+ },
12391
+ {
12392
+ "page": "navigate",
12393
+ "url": "{ordinary}/doc?tag={tag}",
12394
+ "as": "navigate"
12395
+ },
12396
+ {
12397
+ "settle": {
12398
+ "title": "doc",
12399
+ "ms": 5000,
12400
+ "required": true
12401
+ }
12402
+ }
12403
+ ],
12404
+ "targets": ["chrome-newtab", "chrome-new-tab-page"],
12405
+ "requires": ["browserSession"],
12406
+ "observe": {
12407
+ "attached": {
12408
+ "means": "the guard attached to the settled new tab page",
12409
+ "check": {
12410
+ "result": "attach",
12411
+ "path": "ok",
12412
+ "equals": true,
12413
+ "observer": "client"
12414
+ }
12415
+ },
12416
+ "navigated": {
12417
+ "means": "the same tab reached an ordinary document through the guard",
12418
+ "check": {
12419
+ "title": "doc",
12420
+ "via": "unguarded",
12421
+ "observer": "unguarded"
12422
+ }
12423
+ }
12424
+ },
12425
+ "live": "the runner sees the ordinary document in the same tab",
12426
+ "control": {
12427
+ "origin": "ordinary",
12428
+ "via": "guard",
12429
+ "expected": {
12430
+ "attached": true,
12431
+ "navigated": true
12432
+ }
12433
+ },
12434
+ "expected": {
12435
+ "attached": true,
12436
+ "navigated": true
12437
+ },
12438
+ "liveCheck": {
12439
+ "title": "doc",
12440
+ "via": "unguarded",
12441
+ "observer": "unguarded"
12442
+ }
12443
+ },
12360
12444
  {
12361
12445
  "id": "C8.navigate",
12362
12446
  "family": "C",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-browsers",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "SLICC's shared browser catalog, JSON schemas and discovery conformance corpus",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
package/protected.json CHANGED
@@ -358,6 +358,34 @@
358
358
  "url": "chrome://newtab",
359
359
  "protected": false
360
360
  },
361
+ {
362
+ "url": "chrome://new-tab-page/",
363
+ "protected": false
364
+ },
365
+ {
366
+ "url": "chrome://new-tab-page",
367
+ "protected": false
368
+ },
369
+ {
370
+ "url": "chrome-untrusted://new-tab-page/one-google-bar?paramsencoded=",
371
+ "protected": false
372
+ },
373
+ {
374
+ "url": "chrome-untrusted://new-tab-page",
375
+ "protected": false
376
+ },
377
+ {
378
+ "url": "chrome://new-tab-page.evil/",
379
+ "protected": true
380
+ },
381
+ {
382
+ "url": "chrome-untrusted://new-tab-page.evil/",
383
+ "protected": true
384
+ },
385
+ {
386
+ "url": "chrome-untrusted://other/",
387
+ "protected": true
388
+ },
361
389
  {
362
390
  "url": "chrome://newtab-x/",
363
391
  "protected": true
@@ -162,6 +162,8 @@
162
162
  "vault-x",
163
163
  "apex",
164
164
  "own",
165
+ "chrome-newtab",
166
+ "chrome-new-tab-page",
165
167
  "chrome-settings",
166
168
  "chrome-passwords",
167
169
  "chrome-extension-page",