@ai-ecoverse/slicc-browsers 1.7.4 → 1.7.6
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 +3 -2
- package/catalog.json +1 -1
- package/guard-runner.mjs +25 -2
- package/guard-vectors.json +21 -6
- package/package.json +3 -3
- package/protected.json +4 -0
- package/schema/guard-vectors.schema.json +24 -0
package/README.md
CHANGED
|
@@ -87,7 +87,7 @@ Every feature builds for `wasm32-wasip1`.
|
|
|
87
87
|
- `names`: an endpoint's name when it isn't from a known browser's user-data dir: `electron` when the user agent contains `electronUserAgent`, else `products[<product>]` for the product before the `/` in `/json/version`'s `Browser`, else that product, else `fallback`;
|
|
88
88
|
- `process`: the process scan, see [The process source](#the-process-source).
|
|
89
89
|
- `seven`:
|
|
90
|
-
- `originScheme` and `originHostPattern`: a seven origin is `https://<host>` with a host matching the pattern, except for the `excludedLabels` (`www`, `vault`, `vault-preview`, `get`, `mcpcat`) and the `excludedLabelPrefixes` (`vault-`, which excludes `vault-feature-x` and any other vault branch preview). The bare apex (`sliccy.ai`, i.e. an empty label) never matches. An origin is compared without the scheme's default port (443 for `https`, 80 for `http`), so `https://seven.sliccy.ai:443` is seven and `https://seven.sliccy.ai:8443` is not. The same goes for extra seven origins;
|
|
90
|
+
- `originScheme` and `originHostPattern`: a seven origin is `https://<host>` with a host matching the pattern, except for the `excludedLabels` (`www`, `vault`, `vault-preview`, `get`, `mcpcat`, `echo`) and the `excludedLabelPrefixes` (`vault-`, which excludes `vault-feature-x` and any other vault branch preview). The bare apex (`sliccy.ai`, i.e. an empty label) never matches. An origin is compared without the scheme's default port (443 for `https`, 80 for `http`), so `https://seven.sliccy.ai:443` is seven and `https://seven.sliccy.ai:8443` is not. The same goes for extra seven origins;
|
|
91
91
|
- `sitePattern` (`[*.]sliccy.ai`);
|
|
92
92
|
- `switches` and `disabledFeatures`: the seven flags, all `--disable-features` values merged into one switch;
|
|
93
93
|
- `prefs`: values merged into a profile's `Default/Preferences` at the `path` of keys;
|
|
@@ -112,7 +112,7 @@ Browser control must never navigate to, open or attach to a target on seven's ow
|
|
|
112
112
|
3. A scheme in `schemes` is protected when its host is one of `hosts`, or one of `domains` or under one, at any depth and on any port. The host is lower-cased, and one trailing dot is dropped.
|
|
113
113
|
4. Any other URL is protected when its origin is one of the program's **extra origins**: the seven origins it accepts besides `sliccy.ai` (slicc-cli's `--origin` and `--page` origins), compared as `scheme://host[:port]` without the scheme's default port, with the host as in 3.
|
|
114
114
|
|
|
115
|
-
This is wider than the rule for finding seven (`seven.originHostPattern`, which leaves out the `excludedLabels` and `excludedLabelPrefixes`—`www`, `vault`, `vault-preview`, `get`, `mcpcat`, 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`.
|
|
115
|
+
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`.
|
|
116
116
|
|
|
117
117
|
**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.
|
|
118
118
|
|
|
@@ -173,6 +173,7 @@ Any `cdp`, `page` or `children` step can take `requires`, the capabilities it ne
|
|
|
173
173
|
- `{ "children": steps, "where"? }`: run these steps on each target auto-attached from then on, then resume it. `where` scopes them to the row's own target: `{ "openerId": "page" }` (opened by the row's page) or `{ "urlPrefix": url }`; other attached targets are resumed and otherwise left alone.
|
|
174
174
|
- `{ "settle": { "beacon"?, "title"?, "ms"?, "variant"?, "session"? } }`: wait for a beacon from `beacon`, for the page `title`, or for the session to detach. It waits up to `ms` (10000 by default), then another 600 ms. `variant` waits the run's detach variant instead.
|
|
175
175
|
- `{ "wait": ms }`.
|
|
176
|
+
- `{ "paused": { "url", "ms" } }`: wait until the client has seen the pause that an `answer` rule for `url` matches (`Fetch.requestPaused` at the rule's stage, or `Fetch.authRequired` for a `Fetch.continueWithAuth` rule). It waits up to `ms`. On the control leg, a pause that never comes fails the row with `paused: no pause for <url> within <ms>ms`. On the guarded leg the guard may hide that pause, so the step waits the full `ms` and doesn't fail. The C5 guessed-id vectors and `C5.auth` use it before their second request, so the probe's interception id falls between the two ids the guess spans.
|
|
176
177
|
- `{ "guess": { "between", "cdp", "params" }, "as" }`: the call for each request id between the ids paused for the two URLs.
|
|
177
178
|
- `{ "text": … }`: a step in words.
|
|
178
179
|
|
package/catalog.json
CHANGED
|
@@ -642,7 +642,7 @@
|
|
|
642
642
|
"seven": {
|
|
643
643
|
"originScheme": "https",
|
|
644
644
|
"originHostPattern": "^([a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)\\.sliccy\\.ai$",
|
|
645
|
-
"excludedLabels": ["www", "vault", "vault-preview", "get", "mcpcat"],
|
|
645
|
+
"excludedLabels": ["www", "vault", "vault-preview", "get", "mcpcat", "echo"],
|
|
646
646
|
"excludedLabelPrefixes": ["vault-"],
|
|
647
647
|
"sitePattern": "[*.]sliccy.ai",
|
|
648
648
|
"switches": [
|
package/guard-runner.mjs
CHANGED
|
@@ -471,14 +471,33 @@ class Execution {
|
|
|
471
471
|
this.pending.push(started);
|
|
472
472
|
}
|
|
473
473
|
|
|
474
|
-
|
|
474
|
+
rule(event) {
|
|
475
475
|
const p = event.params;
|
|
476
|
-
|
|
476
|
+
return this.answers.find(
|
|
477
477
|
(a) =>
|
|
478
478
|
a.url === p.request.url &&
|
|
479
479
|
(!a.stage || (a.stage === 'Response') === Boolean(p.responseStatusCode)) &&
|
|
480
480
|
(a.cdp === 'Fetch.continueWithAuth') === (event.method === 'Fetch.authRequired')
|
|
481
481
|
);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
async paused({ url, ms }) {
|
|
485
|
+
const seen = () =>
|
|
486
|
+
this.client.events
|
|
487
|
+
.slice(this.eventStart)
|
|
488
|
+
.some(
|
|
489
|
+
(event) =>
|
|
490
|
+
(event.method === 'Fetch.requestPaused' || event.method === 'Fetch.authRequired') &&
|
|
491
|
+
event.params?.request?.url === url &&
|
|
492
|
+
this.rule(event)?.url === url
|
|
493
|
+
);
|
|
494
|
+
if (!(await this.poll(seen, ms)) && this.side === 'control')
|
|
495
|
+
this.errors.push(`paused: no pause for ${url} within ${ms}ms`);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
async answer(event) {
|
|
499
|
+
const p = event.params;
|
|
500
|
+
const rule = this.rule(event);
|
|
482
501
|
if (rule?.hold) return;
|
|
483
502
|
const method =
|
|
484
503
|
rule?.cdp ??
|
|
@@ -570,6 +589,10 @@ class Execution {
|
|
|
570
589
|
await sleep(step.wait);
|
|
571
590
|
return;
|
|
572
591
|
}
|
|
592
|
+
if (step.paused) {
|
|
593
|
+
await this.paused(step.paused);
|
|
594
|
+
return;
|
|
595
|
+
}
|
|
573
596
|
if (step.settle) {
|
|
574
597
|
await this.settle(step.settle);
|
|
575
598
|
return;
|
package/guard-vectors.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"setVersion": "1.7.
|
|
3
|
+
"setVersion": "1.7.6",
|
|
4
4
|
"sources": [
|
|
5
5
|
{
|
|
6
6
|
"repo": "ai-ecoverse/slicc-cli",
|
|
@@ -6811,7 +6811,10 @@
|
|
|
6811
6811
|
"background": true
|
|
6812
6812
|
},
|
|
6813
6813
|
{
|
|
6814
|
-
"
|
|
6814
|
+
"paused": {
|
|
6815
|
+
"url": "{target}/auth/{tag}?n={tag}",
|
|
6816
|
+
"ms": 5000
|
|
6817
|
+
}
|
|
6815
6818
|
},
|
|
6816
6819
|
{
|
|
6817
6820
|
"page": "fetch",
|
|
@@ -6949,7 +6952,10 @@
|
|
|
6949
6952
|
"as": "body"
|
|
6950
6953
|
},
|
|
6951
6954
|
{
|
|
6952
|
-
"
|
|
6955
|
+
"paused": {
|
|
6956
|
+
"url": "{target}/data?n={tag}",
|
|
6957
|
+
"ms": 5000
|
|
6958
|
+
}
|
|
6953
6959
|
},
|
|
6954
6960
|
{
|
|
6955
6961
|
"page": "fetch",
|
|
@@ -7120,7 +7126,10 @@
|
|
|
7120
7126
|
"as": "body"
|
|
7121
7127
|
},
|
|
7122
7128
|
{
|
|
7123
|
-
"
|
|
7129
|
+
"paused": {
|
|
7130
|
+
"url": "{target}/data?n={tag}",
|
|
7131
|
+
"ms": 5000
|
|
7132
|
+
}
|
|
7124
7133
|
},
|
|
7125
7134
|
{
|
|
7126
7135
|
"page": "fetch",
|
|
@@ -7280,7 +7289,10 @@
|
|
|
7280
7289
|
"status": true
|
|
7281
7290
|
},
|
|
7282
7291
|
{
|
|
7283
|
-
"
|
|
7292
|
+
"paused": {
|
|
7293
|
+
"url": "{target}/data?n={tag}",
|
|
7294
|
+
"ms": 5000
|
|
7295
|
+
}
|
|
7284
7296
|
},
|
|
7285
7297
|
{
|
|
7286
7298
|
"page": "fetch",
|
|
@@ -7465,7 +7477,10 @@
|
|
|
7465
7477
|
"status": true
|
|
7466
7478
|
},
|
|
7467
7479
|
{
|
|
7468
|
-
"
|
|
7480
|
+
"paused": {
|
|
7481
|
+
"url": "{target}/auth/{tag}?n={tag}",
|
|
7482
|
+
"ms": 5000
|
|
7483
|
+
}
|
|
7469
7484
|
},
|
|
7470
7485
|
{
|
|
7471
7486
|
"page": "fetch",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-browsers",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.6",
|
|
4
4
|
"description": "SLICC's shared browser catalog, JSON schemas and discovery conformance corpus",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -65,13 +65,13 @@
|
|
|
65
65
|
"trust:dry": "npx fledgling sync --dry-run -y --skip-publish",
|
|
66
66
|
"release": "semantic-release",
|
|
67
67
|
"test:guard": "npm run test:guard-integration && npm run test:guard-sweep",
|
|
68
|
-
"test:guard-integration": "node --test test/integration/guard-fit.test.mjs test/integration/guard-chain.test.mjs test/integration/guard-validation.test.mjs test/integration/guard-liveness.test.mjs test/integration/guard-observations.test.mjs test/integration/guard-child-latency.test.mjs test/integration/guard-adoption.test.mjs test/integration/guard-scoping.test.mjs",
|
|
68
|
+
"test:guard-integration": "node --test test/integration/guard-fit.test.mjs test/integration/guard-chain.test.mjs test/integration/guard-validation.test.mjs test/integration/guard-liveness.test.mjs test/integration/guard-observations.test.mjs test/integration/guard-child-latency.test.mjs test/integration/guard-adoption.test.mjs test/integration/guard-scoping.test.mjs test/integration/guard-late-pause.test.mjs",
|
|
69
69
|
"test:guard-sweep": "node scripts/test-guards.mjs",
|
|
70
70
|
"test:guard-target": "node --test test/integration/guard-runner.test.mjs",
|
|
71
71
|
"test:unit:guard": "node --experimental-test-coverage --test --test-coverage-include=guard-runner.mjs --test-coverage-include=fixture-server.mjs --test-coverage-lines=100 test/unit/guard-*.test.mjs"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@ai-ecoverse/slicc-shared-web": "1.
|
|
74
|
+
"@ai-ecoverse/slicc-shared-web": "1.23.0",
|
|
75
75
|
"@biomejs/biome": "2.5.15",
|
|
76
76
|
"ajv": "8.20.0",
|
|
77
77
|
"ajv-formats": "3.0.1",
|
package/protected.json
CHANGED
|
@@ -616,6 +616,30 @@
|
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
618
|
},
|
|
619
|
+
{
|
|
620
|
+
"type": "object",
|
|
621
|
+
"additionalProperties": false,
|
|
622
|
+
"required": ["paused"],
|
|
623
|
+
"properties": {
|
|
624
|
+
"paused": {
|
|
625
|
+
"type": "object",
|
|
626
|
+
"additionalProperties": false,
|
|
627
|
+
"required": ["url", "ms"],
|
|
628
|
+
"properties": {
|
|
629
|
+
"url": {
|
|
630
|
+
"type": "string"
|
|
631
|
+
},
|
|
632
|
+
"ms": {
|
|
633
|
+
"type": "integer",
|
|
634
|
+
"minimum": 1
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
"on": {
|
|
639
|
+
"$ref": "#/$defs/on"
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
},
|
|
619
643
|
{
|
|
620
644
|
"type": "object",
|
|
621
645
|
"additionalProperties": false,
|