@ai-ecoverse/slicc-browsers 1.47.0 → 1.49.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.
Binary file
package/engine.mjs CHANGED
@@ -29,6 +29,8 @@ function valid(op, result) {
29
29
  typeof result.digest === 'string' &&
30
30
  /^[0-9a-f]{16}$/.test(result.digest)
31
31
  );
32
+ case 'refusal':
33
+ return typeof result === 'string' && result.startsWith('slicc: refused: ');
32
34
  case 'har':
33
35
  return result === 'include' || result === 'exclude';
34
36
  case 'storageKey':
@@ -53,8 +55,29 @@ function exchange(wasm, method, input) {
53
55
  return answer.ok;
54
56
  }
55
57
 
58
+ function encode(value) {
59
+ return encoder.encode(
60
+ JSON.stringify(value, (_, v) => (typeof v === 'string' ? v.toWellFormed() : v))
61
+ );
62
+ }
63
+
64
+ function preserveTargetComparison(request) {
65
+ if (
66
+ request?.op !== 'target' ||
67
+ typeof request.url !== 'string' ||
68
+ typeof request.unreachableURL !== 'string'
69
+ )
70
+ return request;
71
+ if (
72
+ request.url !== request.unreachableURL &&
73
+ request.url.toWellFormed() === request.unreachableURL.toWellFormed()
74
+ )
75
+ return { ...request, unreachableURL: undefined };
76
+ return request;
77
+ }
78
+
56
79
  function binding(module, config) {
57
- const input = encoder.encode(JSON.stringify(config));
80
+ const input = encode(config);
58
81
  function create() {
59
82
  const wasm = new WebAssembly.Instance(module).exports;
60
83
  if (wasm.engine_abi() !== 1) throw new Error('unsupported engine ABI');
@@ -66,7 +89,11 @@ function binding(module, config) {
66
89
  function call(request) {
67
90
  try {
68
91
  instance ??= create();
69
- const result = exchange(instance, 'engine_call', encoder.encode(JSON.stringify(request)));
92
+ const wire =
93
+ request.op === 'batch' && Array.isArray(request.calls)
94
+ ? { ...request, calls: request.calls.map(preserveTargetComparison) }
95
+ : preserveTargetComparison(request);
96
+ const result = exchange(instance, 'engine_call', encode(wire));
70
97
  const ok =
71
98
  request.op === 'batch'
72
99
  ? Array.isArray(result) &&
@@ -92,6 +119,9 @@ function binding(module, config) {
92
119
  storageKey: (key) => call({ op: 'storageKey', key }),
93
120
  extensionFrame: (url) => call({ op: 'extensionFrame', url }),
94
121
  har: (url) => call({ op: 'har', url }),
122
+ zoneHost: (host) => call({ op: 'zoneHost', host }),
123
+ inheriting: (url) => call({ op: 'inheriting', url }),
124
+ refusal: (key) => call({ op: 'refusal', key }),
95
125
  info: () => call({ op: 'info' }),
96
126
  batch: (calls) => call({ op: 'batch', calls }),
97
127
  };
package/guard-driver.mjs CHANGED
@@ -67,6 +67,38 @@ function named(list, n = { i: 0 }) {
67
67
 
68
68
  const flatten = (list) => list.flatMap((s) => [s, ...flatten(s.children ?? [])]);
69
69
 
70
+ const rawSteps = new Set([
71
+ 'answer',
72
+ 'bfcacheRestore',
73
+ 'cdp',
74
+ 'children',
75
+ 'closeProtectedShape',
76
+ 'cookiePlant',
77
+ 'errorPage',
78
+ 'extensionFrame',
79
+ 'extensionWorld',
80
+ 'frameRead',
81
+ 'guess',
82
+ 'isolatedWorld',
83
+ 'paused',
84
+ 'probeSessions',
85
+ 'protectedParentIframes',
86
+ 'rawTarget',
87
+ 'redirectSecret',
88
+ 'signInHold',
89
+ 'spawnWorker',
90
+ 'unparseable',
91
+ ]);
92
+
93
+ export function lacksRawCdp(vector, capabilities) {
94
+ if (capabilities?.rawCdp !== false || vector?.kind !== 'cdp') return false;
95
+ return [...(vector.setup ?? []), ...(vector.trigger ?? [])].some(
96
+ (step) =>
97
+ (step.requires ?? []).every((cap) => has(capabilities, cap)) &&
98
+ Object.keys(step).some((kind) => rawSteps.has(kind))
99
+ );
100
+ }
101
+
70
102
  const has = (capabilities, capability) =>
71
103
  Array.isArray(capabilities)
72
104
  ? capabilities.includes(capability)
@@ -421,7 +453,7 @@ const needsBrowser = (vector, cap, declared) =>
421
453
  (cap === 'browserSession' && browserContextStep(vector, declared)) ||
422
454
  (cap === 'browserStorage' && declared.includes('browserSession') && cookieStorageRow(vector));
423
455
 
424
- function skipWhy(vector, row, known, guard, declared) {
456
+ function skipWhy(vector, row, known, guard, declared, runCapabilities) {
425
457
  const { reason } = row;
426
458
  if (typeof reason !== 'string' || reason === '') return 'skip without a reason';
427
459
  if (reason === skipReason(vector, row.target, guard)) return null;
@@ -430,6 +462,10 @@ function skipWhy(vector, row, known, guard, declared) {
430
462
  return canTrustedEmulation(vector)
431
463
  ? null
432
464
  : `skip with a reason the runner never gives: ${reason}`;
465
+ if (reason === 'not-supported:rawCdp')
466
+ return lacksRawCdp(vector, runCapabilities)
467
+ ? null
468
+ : 'rawCdp skip without a required raw step and explicit opt-out';
433
469
  if (reason.startsWith('not-supported:')) {
434
470
  const cap = reason.slice('not-supported:'.length);
435
471
  if (
@@ -474,7 +510,8 @@ function forgeries(set, results, guard, capabilitiesList) {
474
510
  const why = [];
475
511
  if (legs.includes('not-run') && vector?.kind !== 'text')
476
512
  why.push('not-run on a vector that is not kind text');
477
- if (legs.includes('skip')) why.push(skipWhy(vector, row, known, guard, declared));
513
+ if (legs.includes('skip'))
514
+ why.push(skipWhy(vector, row, known, guard, declared, capabilitiesList));
478
515
  why.push(...observationWhy(vector, row, declared));
479
516
  const found = why.filter(Boolean);
480
517
  if (!found.length) return [];
@@ -494,8 +531,23 @@ export function summary({ guard, sha, set, results, capabilities: runCapabilitie
494
531
  .flatMap((row) => uniq('transport').map((transport) => ({ ...row, transport })))
495
532
  .filter((r) => !has.has(q([r.id, r.target, r.variant, r.transport])));
496
533
  const forged = forgeries(set, results, guard, runCapabilities);
497
- const pass =
534
+ const valid =
498
535
  results.length > 0 && missing.length === 0 && forged.length === 0 && results.every(passed);
536
+ const optedOut = runCapabilities?.rawCdp === false;
537
+ const nothingRan =
538
+ optedOut && results.every((row) => row.guarded === 'skip' || row.guarded === 'not-run');
539
+ const pass = valid && !nothingRan;
540
+ const verdict = !valid ? 'GUARD-FAIL' : nothingRan ? 'GUARD-INCOMPLETE' : 'GUARD-PASS';
541
+ let rawNote = '';
542
+ if (optedOut) {
543
+ const raw = new Set(
544
+ set.vectors
545
+ .filter((vector) => lacksRawCdp(vector, runCapabilities))
546
+ .map((vector) => vector.id)
547
+ );
548
+ const skipped = results.filter((row) => raw.has(row.id) && row.guarded === 'skip').length;
549
+ rawNote = ` rawCdp:false (${skipped} raw-CDP ${skipped === 1 ? 'row' : 'rows'} not run)`;
550
+ }
499
551
  const name = `@ai-ecoverse/slicc-browsers@${set.setVersion}`;
500
552
  return {
501
553
  set: name,
@@ -513,7 +565,8 @@ export function summary({ guard, sha, set, results, capabilities: runCapabilitie
513
565
  missing,
514
566
  forged,
515
567
  pass,
516
- line: `${pass ? 'GUARD-PASS' : 'GUARD-FAIL'} ${guard}@${sha} (vectors ${name})${forged.length ? ` forged ${forged.length}` : ''}`,
568
+ ...(optedOut ? { rawCdpOptOut: true } : {}),
569
+ line: `${verdict} ${guard}@${sha} (vectors ${name})${forged.length ? ` forged ${forged.length}` : ''}${rawNote}`,
517
570
  };
518
571
  }
519
572
 
package/guard-runner.mjs CHANGED
@@ -21,6 +21,7 @@ import {
21
21
  inapplicable,
22
22
  isRefusal,
23
23
  knownOrigins,
24
+ lacksRawCdp,
24
25
  loadedAfter,
25
26
  originDefaults,
26
27
  outcome,
@@ -3332,6 +3333,7 @@ async function executeRow(job, opts, made, set, slot, index, flights) {
3332
3333
  cookieStorageRow(vector)
3333
3334
  )
3334
3335
  return skipRow(base, 'not-supported:browserStorage');
3336
+ if (lacksRawCdp(vector, opts.capabilities)) return skipRow(base, 'not-supported:rawCdp');
3335
3337
  const observerReason = observerSkip(vector, opts, made, clients);
3336
3338
  if (observerReason) return skipRow(base, observerReason);
3337
3339
  const legs = {};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "setVersion": "1.47.0",
3
+ "setVersion": "1.49.0",
4
4
  "sources": [
5
5
  {
6
6
  "repo": "ai-ecoverse/slicc-cli",
@@ -105,6 +105,7 @@
105
105
  "lagging": 8000
106
106
  },
107
107
  "capabilities": {
108
+ "rawCdp": "the guard exposes raw CDP commands and sessions; defaults to true",
108
109
  "autoAttach": "Target.setAutoAttach, the children steps and child sessions",
109
110
  "browserSession": "session-less Target.* and Browser.* calls on the browser session; session-less Storage.* there is browserStorage",
110
111
  "browserStorage": "session-less Storage.* calls on the browser session, with or without browserContextId; needs browserSession; a run that declares browserSession without browserStorage skips every row with a page-or-browser Storage.getCookies, Storage.setCookies or Storage.clearCookies step as not-supported:browserStorage; a run that declares neither sends those steps on the row's page session",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-browsers",
3
- "version": "1.47.0",
3
+ "version": "1.49.0",
4
4
  "description": "SLICC's shared browser catalog, JSON schemas and discovery conformance corpus",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -84,9 +84,9 @@
84
84
  "corpus": "node scripts/corpus.mjs",
85
85
  "engine": "PATH=\"$HOME/.cargo/bin:$PATH\" node scripts/engine.mjs",
86
86
  "validate": "node scripts/validate.mjs",
87
- "lint": "export PATH=\"$HOME/.cargo/bin:$PATH\" && if [ \"$(uname -s)\" = Darwin ]; then echo 'Skipping byte comparison on macOS; Linux CI owns the wasm bytes.'; else git ls-files --error-unmatch engine/engine.wasm engine/engine-wasm.mjs > /dev/null && npm run engine && git diff --exit-code -- engine/engine.wasm engine/engine-wasm.mjs; fi && slicc-lint && test -z \"$(gofmt -l .)\" && go mod tidy -diff && go vet ./... && GOOS=darwin go vet ./... && GOOS=windows go vet ./... && golangci-lint run && cargo fmt --all --check && cargo clippy --workspace --locked --all-features --all-targets -- -D warnings && cargo check --target wasm32-wasip1 --no-default-features --locked && cargo check --target wasm32-wasip1 --features serde --locked && cargo check --target wasm32-wasip1 --all-features --locked",
87
+ "lint": "export PATH=\"$HOME/.cargo/bin:$PATH\" && if [ \"$(uname -s)\" = Darwin ]; then echo 'Skipping byte comparison on macOS; Linux CI owns the wasm bytes.'; else git ls-files --error-unmatch engine/engine.wasm engine/engine-wasm.mjs > /dev/null && npm run engine && git diff --exit-code -- engine/engine.wasm engine/engine-wasm.mjs protected.mjs; fi && node scripts/protected-bundle.mjs --check && slicc-lint && test -z \"$(gofmt -l .)\" && go mod tidy -diff && go vet ./... && GOOS=darwin go vet ./... && GOOS=windows go vet ./... && golangci-lint run && cargo fmt --all --check && cargo clippy --workspace --locked --all-features --all-targets -- -D warnings && cargo check --target wasm32-wasip1 --no-default-features --locked && cargo check --target wasm32-wasip1 --features serde --locked && cargo check --target wasm32-wasip1 --all-features --locked",
88
88
  "format": "biome check --write . && gofmt -w . && cargo fmt --all",
89
- "test": "export PATH=\"$HOME/.cargo/bin:$PATH\" && node --test --test-concurrency=1 test/integration/debugger-stage1-packaging.test.mjs test/integration/debugger-raw-control.test.mjs test/integration/debugger-cleanup.test.mjs test/integration/debugger-stage1-install-vectors.test.mjs test/integration/protected-premise.test.mjs test/integration/protected-zones.test.mjs test/integration/debugger-stage1-vectors.test.mjs test/integration/self-contained.test.mjs test/integration/seven-corpus.test.mjs test/integration/browser-runner.test.mjs test/integration/fixture-client.test.mjs test/integration/guard-redirect-carrier.test.mjs test/integration/guard-redirect-session-end.test.mjs test/integration/guard-redirect-history.test.mjs test/integration/guard-redirect-iframe.test.mjs test/integration/guard-redirect-through.test.mjs test/integration/guard-incomplete.test.mjs test/integration/guard-unparseable-wipe.test.mjs test/integration/guard-browser-ui.test.mjs test/integration/guard-snapshot-settle.test.mjs test/integration/guard-stall.test.mjs test/integration/guard-forged.test.mjs test/integration/guard-trusted-emulation.test.mjs test/integration/guard-exit-steps.test.mjs test/integration/guard-exit-refusal.test.mjs test/integration/guard-frame-read.test.mjs test/integration/guard-bfcache.test.mjs test/integration/guard-bfcache-marker.test.mjs test/integration/guard-bfcache-history.test.mjs test/integration/guard-bfcache-review.test.mjs test/integration/guard-bfcache-quarantine.test.mjs test/integration/guard-error-page-navigation.test.mjs test/integration/guard-error-page-events.test.mjs test/integration/guard-error-page-reload.test.mjs test/integration/guard-close-protected.test.mjs test/integration/guard-close-protected-shapes.test.mjs test/integration/guard-close-protected-shapes-chrome.test.mjs test/integration/guard-ordinary-idp-cookies.test.mjs test/integration/guard-protected-parent-iframes.test.mjs test/integration/guard-protected-parent-iframes-chrome.test.mjs test/integration/guard-error-frame-class.test.mjs test/integration/guard-sign-in-hold.test.mjs test/integration/guard-cookie-plant-chrome.test.mjs test/integration/guard-cookie-plant.test.mjs test/integration/guard-protected-parent-page.test.mjs test/integration/guard-protected-parent-page-chrome.test.mjs test/integration/guard-world-paint.test.mjs test/integration/gates.test.mjs test/integration/validate.test.mjs test/integration/validate-guard-stock-setup.test.mjs test/integration/validate-guard-explicit.test.mjs test/integration/go.test.mjs test/integration/cargo.test.mjs test/integration/engine.test.mjs test/integration/workflows.test.mjs test/integration/guard-refusable-nav.test.mjs test/integration/guard-protected-worker.test.mjs test/integration/guard-protected-worker-chrome-narrow.test.mjs test/integration/guard-protected-worker-chrome-hide.test.mjs test/integration/guard-protected-worker-chrome-hide-cut.test.mjs test/integration/guard-protected-worker-chrome-admit.test.mjs test/integration/guard-protected-worker-chrome-late.test.mjs test/integration/guard-protected-worker-chrome-rewrite.test.mjs test/integration/guard-protected-worker-chrome-rewrite-late.test.mjs test/integration/guard-sweep-union.test.mjs test/integration/guard-explicit-attach-chrome.test.mjs && node --test --test-concurrency=2 test/integration/guard-lifecycle.test.mjs test/integration/chromium-launch.test.mjs 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-child-latency-stress.test.mjs test/integration/guard-adoption.test.mjs test/integration/guard-scoping.test.mjs test/integration/guard-late-pause.test.mjs test/integration/guard-cookie-plant-raw-leg.test.mjs test/integration/guard-cookie-plant-deletion.test.mjs test/integration/guard-cookie-plant-attach.test.mjs test/integration/guard-cookie-plant-attach-retry.test.mjs test/integration/guard-cookie-plant-open-commit.test.mjs test/integration/guard-cookie-plant-legacy-setup.test.mjs test/integration/guard-legs.test.mjs test/integration/guard-fetch-enable.test.mjs test/integration/guard-diagnostics.test.mjs test/integration/guard-chrome.test.mjs test/integration/guard-worlds.test.mjs test/integration/guard-world-discovery.test.mjs test/integration/guard-world-guesses.test.mjs test/integration/guard-unparseable.test.mjs test/integration/guard-redirect-secret.test.mjs test/integration/guard-error-page.test.mjs test/integration/guard-error-page-enable.test.mjs test/integration/guard-discovery.test.mjs test/integration/guard-bfcache-chrome.test.mjs test/integration/guard-bfcache-ownership-probe.test.mjs test/integration/guard-browser-page.test.mjs test/integration/guard-scales.test.mjs test/integration/guard-shared-log.test.mjs test/integration/guard-pre-beacon.test.mjs test/integration/guard-world-pause.test.mjs test/integration/guard-reveal-overlap.test.mjs test/integration/guard-extension-frame-cast.test.mjs test/integration/guard-extension-frame-mouse.test.mjs test/integration/guard-extension-frame-click.test.mjs test/integration/guard-extension-frame-key.test.mjs test/integration/guard-extension-frame-attach.test.mjs test/integration/guard-extension-frames.test.mjs test/integration/guard-stock-setup.test.mjs test/integration/guard-explicit-attach.test.mjs test/integration/guard-explicit-order.test.mjs test/integration/guard-stock-attack.test.mjs test/integration/guard-parallel.test.mjs test/integration/guard-client-exit.test.mjs test/integration/guard-runner-record.test.mjs test/integration/guard-runner.test.mjs test/integration/guard-error-legs.test.mjs test/integration/guard-sweep-ordinary.test.mjs test/integration/guard-sweep-seven.test.mjs test/integration/guard-sweep-vault.test.mjs test/integration/guard-sweep-vault-x.test.mjs test/integration/guard-sweep-preview.test.mjs test/integration/guard-sweep-idp.test.mjs test/integration/guard-sweep-others.test.mjs test/integration/guard-browser-storage.test.mjs test/integration/guard-control-premises.test.mjs test/integration/guard-control-probe-failure.test.mjs test/integration/guard-kept-origins.test.mjs",
89
+ "test": "export PATH=\"$HOME/.cargo/bin:$PATH\" && node --test --test-concurrency=1 test/integration/debugger-stage1-packaging.test.mjs test/integration/debugger-raw-control.test.mjs test/integration/debugger-cleanup.test.mjs test/integration/debugger-stage1-install-vectors.test.mjs test/integration/protected-premise.test.mjs test/integration/protected-zones.test.mjs test/integration/debugger-stage1-vectors.test.mjs test/integration/self-contained.test.mjs test/integration/seven-corpus.test.mjs test/integration/browser-runner.test.mjs test/integration/fixture-client.test.mjs test/integration/guard-redirect-carrier.test.mjs test/integration/guard-redirect-session-end.test.mjs test/integration/guard-redirect-history.test.mjs test/integration/guard-redirect-iframe.test.mjs test/integration/guard-redirect-through.test.mjs test/integration/guard-incomplete.test.mjs test/integration/guard-unparseable-wipe.test.mjs test/integration/guard-browser-ui.test.mjs test/integration/guard-snapshot-settle.test.mjs test/integration/guard-stall.test.mjs test/integration/guard-forged.test.mjs test/integration/guard-trusted-emulation.test.mjs test/integration/guard-exit-steps.test.mjs test/integration/guard-exit-refusal.test.mjs test/integration/guard-frame-read.test.mjs test/integration/guard-bfcache.test.mjs test/integration/guard-bfcache-marker.test.mjs test/integration/guard-bfcache-history.test.mjs test/integration/guard-bfcache-review.test.mjs test/integration/guard-bfcache-quarantine.test.mjs test/integration/guard-error-page-navigation.test.mjs test/integration/guard-error-page-events.test.mjs test/integration/guard-error-page-reload.test.mjs test/integration/guard-close-protected.test.mjs test/integration/guard-close-protected-shapes.test.mjs test/integration/guard-close-protected-shapes-chrome.test.mjs test/integration/guard-ordinary-idp-cookies.test.mjs test/integration/guard-protected-parent-iframes.test.mjs test/integration/guard-protected-parent-iframes-chrome.test.mjs test/integration/guard-error-frame-class.test.mjs test/integration/guard-sign-in-hold.test.mjs test/integration/guard-cookie-plant-chrome.test.mjs test/integration/guard-cookie-plant.test.mjs test/integration/guard-protected-parent-page.test.mjs test/integration/guard-protected-parent-page-chrome.test.mjs test/integration/guard-world-paint.test.mjs test/integration/gates.test.mjs test/integration/validate.test.mjs test/integration/validate-guard-stock-setup.test.mjs test/integration/validate-guard-explicit.test.mjs test/integration/go.test.mjs test/integration/cargo.test.mjs test/integration/engine.test.mjs test/integration/workflows.test.mjs test/integration/guard-refusable-nav.test.mjs test/integration/guard-protected-worker.test.mjs test/integration/guard-protected-worker-chrome-narrow.test.mjs test/integration/guard-protected-worker-chrome-hide.test.mjs test/integration/guard-protected-worker-chrome-hide-cut.test.mjs test/integration/guard-protected-worker-chrome-admit.test.mjs test/integration/guard-protected-worker-chrome-late.test.mjs test/integration/guard-protected-worker-chrome-rewrite.test.mjs test/integration/guard-protected-worker-chrome-rewrite-late.test.mjs test/integration/guard-sweep-union.test.mjs test/integration/guard-explicit-attach-chrome.test.mjs && node --test --test-concurrency=2 test/integration/guard-lifecycle.test.mjs test/integration/chromium-launch.test.mjs 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-child-latency-stress.test.mjs test/integration/guard-adoption.test.mjs test/integration/guard-scoping.test.mjs test/integration/guard-late-pause.test.mjs test/integration/guard-cookie-plant-raw-leg.test.mjs test/integration/guard-cookie-plant-deletion.test.mjs test/integration/guard-cookie-plant-attach.test.mjs test/integration/guard-cookie-plant-attach-retry.test.mjs test/integration/guard-cookie-plant-open-commit.test.mjs test/integration/guard-cookie-plant-legacy-setup.test.mjs test/integration/guard-legs.test.mjs test/integration/guard-fetch-enable.test.mjs test/integration/guard-diagnostics.test.mjs test/integration/guard-chrome.test.mjs test/integration/guard-worlds.test.mjs test/integration/guard-world-discovery.test.mjs test/integration/guard-world-guesses.test.mjs test/integration/guard-unparseable.test.mjs test/integration/guard-redirect-secret.test.mjs test/integration/guard-error-page.test.mjs test/integration/guard-error-page-enable.test.mjs test/integration/guard-discovery.test.mjs test/integration/guard-bfcache-chrome.test.mjs test/integration/guard-bfcache-ownership-probe.test.mjs test/integration/guard-browser-page.test.mjs test/integration/guard-scales.test.mjs test/integration/guard-shared-log.test.mjs test/integration/guard-pre-beacon.test.mjs test/integration/guard-world-pause.test.mjs test/integration/guard-reveal-overlap.test.mjs test/integration/guard-extension-frame-cast.test.mjs test/integration/guard-extension-frame-mouse.test.mjs test/integration/guard-extension-frame-click.test.mjs test/integration/guard-extension-frame-key.test.mjs test/integration/guard-extension-frame-attach.test.mjs test/integration/guard-extension-frames.test.mjs test/integration/guard-stock-setup.test.mjs test/integration/guard-explicit-attach.test.mjs test/integration/guard-explicit-order.test.mjs test/integration/guard-stock-attack.test.mjs test/integration/guard-parallel.test.mjs test/integration/guard-client-exit.test.mjs test/integration/guard-runner-record.test.mjs test/integration/guard-runner.test.mjs test/integration/guard-raw-cdp.test.mjs test/integration/guard-error-legs.test.mjs test/integration/guard-sweep-ordinary.test.mjs test/integration/guard-sweep-seven.test.mjs test/integration/guard-sweep-vault.test.mjs test/integration/guard-sweep-vault-x.test.mjs test/integration/guard-sweep-preview.test.mjs test/integration/guard-sweep-idp.test.mjs test/integration/guard-sweep-others.test.mjs test/integration/guard-browser-storage.test.mjs test/integration/guard-control-premises.test.mjs test/integration/guard-control-probe-failure.test.mjs test/integration/guard-kept-origins.test.mjs",
90
90
  "test:unit": "mkdir -p coverage/unit && node --experimental-test-coverage --test --test-concurrency=1 --test-reporter=lcov --test-reporter-destination=coverage/unit/lcov.info test/unit/*.test.mjs && go test -race -cover ./...",
91
91
  "build": "export PATH=\"$HOME/.cargo/bin:$PATH\" && go build ./... && cargo build --locked --all-features && cargo build --locked --target wasm32-wasip1 --all-features && npm pack --dry-run",
92
92
  "prepublishOnly": "node scripts/set-crate-version.mjs \"$npm_package_version\"",
@@ -97,12 +97,13 @@
97
97
  "test:unit:guard": "mkdir -p coverage/unit && node --experimental-vm-modules --no-warnings --experimental-test-coverage --test --test-concurrency=1 --test-coverage-include=guard-runner.mjs --test-coverage-include=guard-driver.mjs --test-coverage-include=extension-frame.mjs --test-coverage-include=fixture-server.mjs --test-coverage-include=fixture-client.mjs --test-coverage-include=observer-target.mjs --test-coverage-include=frame-read.mjs --test-coverage-include=bfcache-restore.mjs --test-coverage-include=protected-error-page.mjs --test-coverage-include=protected-parent-iframes.mjs --test-coverage-include=unparseable-url.mjs --test-coverage-include=scripts/browser-runner.mjs --test-coverage-include=scripts/validate.mjs --test-reporter=lcov --test-reporter-destination=coverage/unit/guard.lcov test/unit/guard-*.test.mjs && slicc-diff-cover coverage/unit/guard.lcov"
98
98
  },
99
99
  "devDependencies": {
100
- "@ai-ecoverse/slicc-cdp": "2.7.0",
100
+ "@ai-ecoverse/slicc-cdp": "2.8.0",
101
101
  "@ai-ecoverse/slicc-shared-web": "3.1.0",
102
- "@biomejs/biome": "2.6.8",
102
+ "@biomejs/biome": "2.6.9",
103
103
  "ajv": "8.20.0",
104
104
  "ajv-formats": "3.0.1",
105
105
  "binaryen": "132.0.0",
106
+ "esbuild": "0.28.2",
106
107
  "lefthook": "2.2.2",
107
108
  "semantic-release": "26.0.1"
108
109
  }
package/protected.json CHANGED
@@ -5,6 +5,18 @@
5
5
  "unparseableRefusal": "slicc: refused: slicc can't parse this URL, so it could be a protected page",
6
6
  "origins": ["http://127.0.0.1:5710", "https://seven.example.test"],
7
7
  "urls": [
8
+ {
9
+ "url": "https://xn--a.%73liccy.ai/",
10
+ "protected": true,
11
+ "readOnly": true,
12
+ "note": "A rejected A-label still protects an authority with an encoded zone suffix."
13
+ },
14
+ {
15
+ "url": "https://xn--a.sliccy%2eai/",
16
+ "protected": true,
17
+ "readOnly": true,
18
+ "note": "A rejected A-label still protects an authority with an encoded zone suffix."
19
+ },
8
20
  { "url": "http://sliccy.ai/cdp-premise", "protected": false },
9
21
  { "url": "https://sliccy.ai/cdp-premise", "protected": false },
10
22
  { "url": "http://www.sliccy.ai/cdp-premise", "protected": true },
@@ -19,23 +31,68 @@
19
31
  { "url": "https://main--seven.sliccy.ai/cdp-premise", "protected": true },
20
32
  {
21
33
  "url": "http://exa mple.sliccy.ai/",
34
+ "readOnly": true,
22
35
  "protected": true
23
36
  },
24
37
  {
25
38
  "url": "http://exa%20mple.sliccy.ai/",
39
+ "readOnly": true,
26
40
  "protected": true
27
41
  },
28
42
  {
29
43
  "url": "http://‍.sliccy.ai/",
44
+ "readOnly": true,
30
45
  "protected": true
31
46
  },
32
47
  {
33
48
  "url": "http://xn--1ug.sliccy.ai/",
34
- "protected": true
49
+ "readOnly": true,
50
+ "protected": true,
51
+ "note": "Invalid A-label; the engine treats this URL as unparseable."
35
52
  },
36
53
  {
37
54
  "url": "http://xn--a.sliccy.ai/",
38
- "protected": true
55
+ "readOnly": true,
56
+ "protected": true,
57
+ "note": "Invalid A-label; the engine treats this URL as unparseable."
58
+ },
59
+ {
60
+ "url": "https://aࡳ.sliccy.ai/",
61
+ "protected": true,
62
+ "readOnly": true,
63
+ "note": "The raw host stays protected if IDNA tables reject a newer Unicode label."
64
+ },
65
+ {
66
+ "url": "https://xn--a-lld.sliccy.ai/",
67
+ "protected": true,
68
+ "readOnly": true,
69
+ "note": "The raw host stays protected if IDNA tables reject a newer Unicode label."
70
+ },
71
+ {
72
+ "url": "https://xn--a-7w4i.sliccy.ai/",
73
+ "protected": true,
74
+ "readOnly": true,
75
+ "note": "The raw host stays protected if IDNA tables reject a newer Unicode label."
76
+ },
77
+ {
78
+ "url": "https://xn--a.example.com/",
79
+ "protected": true,
80
+ "note": "Node accepts this host; the engine treats this URL as unparseable."
81
+ },
82
+ {
83
+ "url": "https://xn--1ug.example/",
84
+ "protected": true,
85
+ "note": "Node accepts this host; the engine treats this URL as unparseable."
86
+ },
87
+ {
88
+ "url": "view-source:ftp://xn--.example/",
89
+ "protected": true,
90
+ "note": "The wrapped URL has an empty A-label payload."
91
+ },
92
+ {
93
+ "url": "filesystem:https://xn--sliccy-9ra.example/temporary/x",
94
+ "protected": true,
95
+ "note": "The wrapped URL has an invalid A-label."
39
96
  },
40
97
  {
41
98
  "url": "http://[::1",
@@ -1408,6 +1465,26 @@
1408
1465
  "protected": false
1409
1466
  }
1410
1467
  ],
1468
+ "zoneHosts": [
1469
+ { "host": "www.sliccy.ai", "protected": true },
1470
+ { "host": "PREVIEW.SLICCY.AI.", "protected": true },
1471
+ { "host": "vault-x.sliccy.ai", "protected": true },
1472
+ { "host": "get.sliccy.ai", "protected": false },
1473
+ { "host": "sliccy.ai", "protected": false },
1474
+ { "host": "a.b.sliccy.ai", "protected": false },
1475
+ { "host": "x.sliccy.ai..", "protected": false },
1476
+ { "host": ".sliccy.ai", "protected": true }
1477
+ ],
1478
+ "inheritingUrls": [
1479
+ { "url": "", "inheriting": true },
1480
+ { "url": "ABOUT:blank#doc", "inheriting": true },
1481
+ { "url": "about:srcdoc?x", "inheriting": true },
1482
+ { "url": "about://", "inheriting": false },
1483
+ { "url": "null", "inheriting": false },
1484
+ { "url": "broken", "inheriting": false },
1485
+ { "url": "https://example.test/", "inheriting": false },
1486
+ { "url": "blob:about:blank", "inheriting": false }
1487
+ ],
1411
1488
  "cookieDomains": [
1412
1489
  {
1413
1490
  "domain": "sliccy.ai",
@@ -1511,6 +1588,48 @@
1511
1588
  { "domain": ".ai", "protected": true }
1512
1589
  ],
1513
1590
  "storageKeys": [
1591
+ {
1592
+ "key": "https://xn--a.%73liccy.ai/",
1593
+ "protected": true
1594
+ },
1595
+ {
1596
+ "key": "https://xn--a.sliccy%2eai/",
1597
+ "protected": true
1598
+ },
1599
+ {
1600
+ "key": "http://xn--a.sliccy.ai/",
1601
+ "protected": true
1602
+ },
1603
+ {
1604
+ "key": "https://ordinary.example/^0https://xn--a-lld.sliccy.ai",
1605
+ "protected": true
1606
+ },
1607
+ {
1608
+ "key": "blob:https://aࡳ.sliccy.ai/x",
1609
+ "protected": true
1610
+ },
1611
+ {
1612
+ "key": "view-source:filesystem:https://first@user@bad host.SLICCY.AI.:99999/path",
1613
+ "protected": true
1614
+ },
1615
+ {
1616
+ "key": "https://sliccy.ai@unrelated.invalid:99999/",
1617
+ "protected": false
1618
+ },
1619
+ {
1620
+ "key": "https://bad host.sliccy.ai.example:99999/",
1621
+ "protected": false
1622
+ },
1623
+ {
1624
+ "key": "https://seven.example.test:99999\\path",
1625
+ "protected": true
1626
+ },
1627
+
1628
+ {
1629
+ "key": "https://ordinary.example/^0file://xn--a.example.com/x",
1630
+ "protected": false,
1631
+ "note": "Read-only matching ignores an unparseable top-level site."
1632
+ },
1514
1633
  {
1515
1634
  "key": "http://[::1",
1516
1635
  "protected": false
@@ -1525,7 +1644,8 @@
1525
1644
  },
1526
1645
  {
1527
1646
  "key": "view-source:view-source:view-source:view-source:view-source:view-source:view-source:view-source:view-source:https://seven.sliccy.ai/",
1528
- "protected": false
1647
+ "protected": true,
1648
+ "note": "The wrapped authority matches a protected host even beyond the parser unwrap limit."
1529
1649
  },
1530
1650
  {
1531
1651
  "key": "https://example.com/^0http://[::1",