@farmslot/adapter-web 0.17.5 → 0.17.7

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/CHANGELOG.md CHANGED
@@ -6,6 +6,14 @@ All notable changes to `@farmslot/adapter-web` are tracked here.
6
6
 
7
7
  - Active-development baseline; add user-facing changes here before release or package publication.
8
8
 
9
+ ## 0.17.7 - 2026-11-04
10
+
11
+ - Check host-resolver blocking in an owned blank document so strict application CSP needs no harness-only source. Keep application HTTP and WebSocket blocking checks unchanged.
12
+
13
+ ## 0.17.6 - 2026-11-04
14
+
15
+ - Align published dependencies with the native delegation and recording-tail release cohort.
16
+
9
17
  ## 0.17.5 - 2026-11-03
10
18
 
11
19
  - Align published dependency pins with the coordinated protocol, recorded-evidence and duplicate-timestamp timeline fixes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farmslot/adapter-web",
3
- "version": "0.17.5",
3
+ "version": "0.17.7",
4
4
  "description": "Web platform adapter for Farmslot recipes: resolve and launch an isolated Chromium, own its CDP port, load unpacked extensions, and keep macOS focus.",
5
5
  "type": "commonjs",
6
6
  "exports": {
@@ -83,9 +83,9 @@
83
83
  "prepublishOnly": "node ../../scripts/quality/check-farmslot-package-readiness.mjs --publish --packages @farmslot/adapter-web"
84
84
  },
85
85
  "dependencies": {
86
- "@farmslot/adapter-sdk": "0.26.2",
87
- "@farmslot/protocol": "0.75.0",
88
- "@farmslot/recipe-runner": "0.46.5",
86
+ "@farmslot/adapter-sdk": "0.26.3",
87
+ "@farmslot/protocol": "0.76.0",
88
+ "@farmslot/recipe-runner": "0.46.6",
89
89
  "ws": "^8.18.0"
90
90
  },
91
91
  "devDependencies": {
@@ -605,12 +605,12 @@ while (
605
605
  if (!isExactAppUrl(sessionCommittedUrls.get(appSession), appOrigin))
606
606
  fail(`the app tab did not commit ${startUrl}: ${await commitStallDetail(navigation)}`);
607
607
 
608
- const evaluate = (expression, timeoutMs = 5000) =>
608
+ const evaluate = (expression, timeoutMs = 5000, sessionId = appSession) =>
609
609
  bounded(
610
610
  client.send(
611
611
  'Runtime.evaluate',
612
612
  { expression, returnByValue: true, awaitPromise: true },
613
- appSession,
613
+ sessionId,
614
614
  ),
615
615
  'app evaluation',
616
616
  timeoutMs,
@@ -648,10 +648,32 @@ if (network === 'testnet') {
648
648
  `fetch(${httpUrl}, { method: 'POST', headers: { 'content-type': 'application/json' }, body: ${JSON.stringify(probe.httpBody)} }).then(() => 'reached', () => 'blocked')`,
649
649
  20000,
650
650
  );
651
- const resolverProbe = await evaluate(
652
- `fetch(${resolverUrl}, { method: 'POST' }).then(() => 'reached', () => 'blocked')`,
653
- 20000,
651
+ // A resolver-only probe must reach DNS without the application's CSP masking it.
652
+ // The HTTP and WebSocket probes still run in the application document.
653
+ const { targetId: resolverTargetId } = await bounded(
654
+ client.send('Target.createTarget', { url: 'about:blank', background: true }),
655
+ 'resolver probe target',
656
+ 15000,
654
657
  );
658
+ let resolverProbe;
659
+ try {
660
+ const deadline = Date.now() + 15000;
661
+ while (!hookedTargets.has(resolverTargetId) && Date.now() < deadline)
662
+ await new Promise((resolve) => setTimeout(resolve, 50));
663
+ const target = hookedTargets.get(resolverTargetId);
664
+ if (!target) throw new Error('Resolver probe tab was not attached.');
665
+ const resolverSession = await bounded(target.ready, 'resolver probe hooks', 15000);
666
+ resolverProbe = await evaluate(
667
+ `fetch(${resolverUrl}, { method: 'POST' }).then(() => 'reached', () => 'blocked')`,
668
+ 20000,
669
+ resolverSession,
670
+ );
671
+ } finally {
672
+ await bounded(
673
+ client.send('Target.closeTarget', { targetId: resolverTargetId }),
674
+ 'close resolver probe',
675
+ );
676
+ }
655
677
  const wsProbe = await evaluate(
656
678
  `new Promise((resolve) => { const socket = new WebSocket(${wsUrl}); const done = (value) => { try { socket.close(); } catch {} resolve(value); }; socket.onopen = () => done('reached'); socket.onerror = () => done('blocked'); setTimeout(() => done('timeout'), 10000); })`,
657
679
  20000,