@farmslot/adapter-web 0.7.0 → 0.7.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/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ All notable changes to `@farmslot/adapter-web` are tracked here.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.7.2 - 2026-10-12
8
+
9
+ - Record web-dapp recipes through the shared recorder, selecting only the owned browser on the requested CDP port.
10
+
11
+ ## 0.7.1 - 2026-10-12
12
+
13
+ - Update shared runtime dependencies for corrected keyboard events and bounded log observations.
14
+
7
15
  ## 0.7.0 - 2026-10-12
8
16
 
9
17
  - Collect opt-in rendered HUD observations around screenshot capture for live conformance.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farmslot/adapter-web",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
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.9.0",
87
- "@farmslot/protocol": "0.39.0",
88
- "@farmslot/recipe-runner": "0.30.0",
86
+ "@farmslot/adapter-sdk": "0.9.1",
87
+ "@farmslot/protocol": "0.40.0",
88
+ "@farmslot/recipe-runner": "0.31.0",
89
89
  "ws": "^8.18.0"
90
90
  },
91
91
  "devDependencies": {
@@ -17,7 +17,9 @@ import { fileURLToPath } from 'node:url';
17
17
 
18
18
  import { recipeRuntimePath, shellQuote } from './lib/paths.mjs';
19
19
  import { POLICY_ENV, webDappAdapterId, webDappPolicy } from './lib/policy.mjs';
20
+ import { cdpListenerPids, ownsProcess } from './lib/processes.mjs';
20
21
  import { check, webDappReadiness } from './lib/readiness.mjs';
22
+ import { cdpPort, readBrowserState, webDappRuntimeDir } from './lib/runtime.mjs';
21
23
  import { defaultSigner, loadSigners, SIGNER_MODULE_ENV } from './lib/signers.mjs';
22
24
  import { resolveBrowser } from './launch.mjs';
23
25
 
@@ -324,6 +326,26 @@ export function createWebDappAdapter(factoryOptions = {}) {
324
326
  sdkVersion: 1,
325
327
  headless: false,
326
328
 
329
+ recording: {
330
+ async target(context) {
331
+ const port = cdpPort(context, context.env);
332
+ const state = await readBrowserState(context.projectRoot);
333
+ const pid = state?.browserPid;
334
+ if (
335
+ !Number.isInteger(pid) ||
336
+ pid <= 0 ||
337
+ state.cdpPort !== port ||
338
+ !ownsProcess('browser', pid, webDappRuntimeDir(context.projectRoot)) ||
339
+ !cdpListenerPids(port).includes(pid)
340
+ ) {
341
+ throw new Error(
342
+ `Could not resolve the owned ${webDappAdapterId()} browser for recording on CDP ${port}. Next: launch and verify the selected slot browser.`,
343
+ );
344
+ }
345
+ return { kind: 'pid', pid };
346
+ },
347
+ },
348
+
327
349
  resolveSlotPorts() {
328
350
  // Ports come from the slot (Farmslot {{port}} / {{cdp_port}}) through
329
351
  // --watcher-port / --cdp-port or the runtime context; nothing is claimed here.