@farmslot/adapter-web 0.10.4 → 0.10.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/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.10.6 - 2026-10-15
10
+
11
+ - Use the operator-wait runtime and protocol dependency set.
12
+
13
+ ## 0.10.5 - 2026-10-15
14
+
15
+ - Consume the plain `ProjectRuntime` and `ActionCatalog` contracts.
16
+
9
17
  ## 0.10.4 - 2026-10-15
10
18
 
11
19
  - Align the published dependency set with protocol 0.47.0 initial resource proof modes.
package/README.md CHANGED
@@ -29,7 +29,7 @@ Docs: https://farmslot.io/docs/reference/adapter-web
29
29
  | `slot-title` | prefix the extension home tab's title with the farm slot id, kept across the page's own title resets |
30
30
  | `validation-process-ownership` | find and stop the processes that own a slot profile |
31
31
  | `validation-launch-supervisor` | supervised child for one validation launch: port lease, quarantine and cleanup |
32
- | `web-dapp` | the generic web-dapp lifecycle as an adapter-sdk `PlatformAdapter` (ESM): slot browser, wallet host, readiness, stop |
32
+ | `web-dapp` | the generic web-dapp lifecycle as an adapter-sdk `ProjectRuntime` (ESM): slot browser, wallet host, readiness, stop |
33
33
 
34
34
  Sources are CommonJS (`src/**/*.cjs`) and ship as is; `yarn build` emits `.d.cts` declarations. `web-dapp` is the exception: its sources are ESM (`src/web-dapp/**/*.mjs`, declarations `.d.mts`), because its leaf scripts run as their own node processes. Every library subpath can be `require`d or `import`ed with named imports, except `validation-launch-supervisor`: it is a child-process entry (it runs when loaded), so hosts `require.resolve` it and fork it.
35
35
 
@@ -110,7 +110,7 @@ const binding = createWalletRequestBinding({
110
110
 
111
111
  ## Web-dapp adapter
112
112
 
113
- `@farmslot/adapter-web/web-dapp` (ESM) is the lifecycle of a web app under test whose dev server the slot owns. `createWebDappAdapter({ id, signerModule, cli, hooks })` returns an `@farmslot/adapter-sdk` `PlatformAdapter`: launch, stop, runtime status, doctor checks, logs and the wallet request-log findings. It runs one slot browser per slot, and a wallet host attached to it over CDP that records the wallet requests (and, with `signer=injected`, answers them with the strict wallet from `dapp`).
113
+ `@farmslot/adapter-web/web-dapp` (ESM) is the lifecycle of a web app under test whose dev server the slot owns. `createWebDappAdapter({ id, signerModule, cli, hooks })` returns an `@farmslot/adapter-sdk` `ProjectRuntime`: launch, stop, runtime status, doctor checks, logs and the wallet request-log findings. It runs one slot browser per slot, and a wallet host attached to it over CDP that records the wallet requests (and, with `signer=injected`, answers them with the strict wallet from `dapp`).
114
114
 
115
115
  - **Venue policy.** The app's venue (the hosts a testnet run blocks and serves, the typed data to refuse, the start page) comes from the adapter that `extends: 'web-dapp'`: its policy module goes to `RECIPE_WEB_DAPP_POLICY` through `bindWebDappPolicy(adapter)`. Bare web-dapp has no policy and refuses to launch. `fencePolicy` and `assertPolicyDigest` hold the module and what it imports to the files the plugin digest covers, and every process that loads the policy refuses, with a `module.registerHooks` resolve hook, any import resolved from one of those files (static, dynamic, or a `require` created for it) that lands outside them (Node.js 22.15 or later).
116
116
  - **Served network.** A policy that declares served hosts (`venueHosts().served`) has the wallet host wait for the app to request one of them, which proves the dev server serves testnet. A policy for an app whose page makes no venue request of its own (such as test-dapp-multichain, whose wallet traffic goes through the extension) opts out explicitly: `venueHosts()` returns `served: []` with `servedCheck: 'not-applicable'`. The check is then skipped, and `networkEnforcement.served` in `browser.json` and the `network-enforcement` entry of the wallet request log say `not-applicable`. An empty `served` without that opt-out keeps the check, which fails closed, so a policy that computes its served hosts can't lose the check by finding none. Listing served hosts and opting out together is refused. Mainnet blocking is enforced either way.
@@ -42,7 +42,7 @@ export function bindWebDappPolicy<T extends {
42
42
  */
43
43
  export function walletRequestFindings(lines: readonly string[]): import("@farmslot/adapter-sdk").AdapterLogFinding[];
44
44
  /**
45
- * @typedef {Partial<Omit<import('@farmslot/adapter-sdk').PlatformAdapter, 'id' | 'sdkVersion' | 'harness'>> & {
45
+ * @typedef {Partial<Omit<import('@farmslot/adapter-sdk').ProjectRuntime, 'id' | 'sdkVersion' | 'harness'>> & {
46
46
  * harness?: Partial<Extract<import('@farmslot/adapter-sdk').AdapterHarness, { kind?: 'overlay' }>> |
47
47
  * Extract<import('@farmslot/adapter-sdk').AdapterHarness, { kind: 'built-in' }>,
48
48
  * }} WebDappAdapterHooks
@@ -55,15 +55,15 @@ export function walletRequestFindings(lines: readonly string[]): import("@farmsl
55
55
  * loads it in this process and launch, verify and the wallet host load it in theirs.
56
56
  * @property {string} [cli] The host's bin name, for `Next:` lines. farmslot-recipe by default.
57
57
  * @property {WebDappAdapterHooks} [hooks]
58
- * Anything of the PlatformAdapter the host supplies or replaces. `actions` is
58
+ * Anything of the ProjectRuntime the host supplies or replaces. `actions` is
59
59
  * required in practice (web-dapp ships no action manifest); `diagnostics`,
60
60
  * `readiness` and `harness` merge over the generic members, the rest replace.
61
61
  */
62
62
  /**
63
63
  * @param {WebDappAdapterOptions} [factoryOptions]
64
- * @returns {import('@farmslot/adapter-sdk').PlatformAdapter}
64
+ * @returns {import('@farmslot/adapter-sdk').ProjectRuntime}
65
65
  */
66
- export function createWebDappAdapter(factoryOptions?: WebDappAdapterOptions): import("@farmslot/adapter-sdk").PlatformAdapter;
66
+ export function createWebDappAdapter(factoryOptions?: WebDappAdapterOptions): import("@farmslot/adapter-sdk").ProjectRuntime;
67
67
  export { cleanupWebDappRuntime } from "./cleanup.mjs";
68
68
  export { installWebDappRuntime } from "./inject.mjs";
69
69
  export const WEB_DAPP_CONSOLE_FILES: Readonly<{
@@ -82,7 +82,7 @@ export const WEB_DAPP_ONLY_LAUNCH_OPTIONS: Readonly<{
82
82
  network: "--network";
83
83
  mainnetConfirmation: "--mainnet-confirmation";
84
84
  }>;
85
- export type WebDappAdapterHooks = Partial<Omit<import("@farmslot/adapter-sdk").PlatformAdapter, "id" | "sdkVersion" | "harness">> & {
85
+ export type WebDappAdapterHooks = Partial<Omit<import("@farmslot/adapter-sdk").ProjectRuntime, "id" | "sdkVersion" | "harness">> & {
86
86
  harness?: Partial<Extract<import("@farmslot/adapter-sdk").AdapterHarness, {
87
87
  kind?: "overlay";
88
88
  }>> | Extract<import("@farmslot/adapter-sdk").AdapterHarness, {
@@ -105,7 +105,7 @@ export type WebDappAdapterOptions = {
105
105
  */
106
106
  cli?: string | undefined;
107
107
  /**
108
- * Anything of the PlatformAdapter the host supplies or replaces. `actions` is
108
+ * Anything of the ProjectRuntime the host supplies or replaces. `actions` is
109
109
  * required in practice (web-dapp ships no action manifest); `diagnostics`,
110
110
  * `readiness` and `harness` merge over the generic members, the rest replace.
111
111
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @param {import('@farmslot/adapter-sdk').AdapterActions} actions
2
+ * @param {import('@farmslot/adapter-sdk').ActionCatalog} actions
3
3
  * @param {import('@farmslot/adapter-sdk').AdapterRecording} recording
4
- * @returns {import('@farmslot/adapter-sdk').AdapterActions}
4
+ * @returns {import('@farmslot/adapter-sdk').ActionCatalog}
5
5
  */
6
- export function browserWindowScreenshots(actions: import("@farmslot/adapter-sdk").AdapterActions, recording: import("@farmslot/adapter-sdk").AdapterRecording): import("@farmslot/adapter-sdk").AdapterActions;
6
+ export function browserWindowScreenshots(actions: import("@farmslot/adapter-sdk").ActionCatalog, recording: import("@farmslot/adapter-sdk").AdapterRecording): import("@farmslot/adapter-sdk").ActionCatalog;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farmslot/adapter-web",
3
- "version": "0.10.4",
3
+ "version": "0.10.6",
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.14.2",
87
- "@farmslot/protocol": "0.47.0",
88
- "@farmslot/recipe-runner": "0.36.2",
86
+ "@farmslot/adapter-sdk": "0.15.1",
87
+ "@farmslot/protocol": "0.48.0",
88
+ "@farmslot/recipe-runner": "0.37.1",
89
89
  "ws": "^8.18.0"
90
90
  },
91
91
  "devDependencies": {
@@ -1,5 +1,5 @@
1
1
  // @ts-check
2
- // The generic web-dapp lifecycle as an adapter-sdk PlatformAdapter: a web app
2
+ // The generic web-dapp lifecycle as an adapter-sdk ProjectRuntime: a web app
3
3
  // under test whose dev server the slot owns; the adapter owns the slot browser
4
4
  // (an extension signer or the injected strict wallet) and its wallet host. What
5
5
  // it knows about the app's venue comes from the venue policy of the adapter that
@@ -288,7 +288,7 @@ const str = (options, key) => (typeof options[key] === 'string' ? options[key] :
288
288
  const flag = (options, key) => options[key] === true;
289
289
 
290
290
  /**
291
- * @typedef {Partial<Omit<import('@farmslot/adapter-sdk').PlatformAdapter, 'id' | 'sdkVersion' | 'harness'>> & {
291
+ * @typedef {Partial<Omit<import('@farmslot/adapter-sdk').ProjectRuntime, 'id' | 'sdkVersion' | 'harness'>> & {
292
292
  * harness?: Partial<Extract<import('@farmslot/adapter-sdk').AdapterHarness, { kind?: 'overlay' }>> |
293
293
  * Extract<import('@farmslot/adapter-sdk').AdapterHarness, { kind: 'built-in' }>,
294
294
  * }} WebDappAdapterHooks
@@ -302,14 +302,14 @@ const flag = (options, key) => options[key] === true;
302
302
  * loads it in this process and launch, verify and the wallet host load it in theirs.
303
303
  * @property {string} [cli] The host's bin name, for `Next:` lines. farmslot-recipe by default.
304
304
  * @property {WebDappAdapterHooks} [hooks]
305
- * Anything of the PlatformAdapter the host supplies or replaces. `actions` is
305
+ * Anything of the ProjectRuntime the host supplies or replaces. `actions` is
306
306
  * required in practice (web-dapp ships no action manifest); `diagnostics`,
307
307
  * `readiness` and `harness` merge over the generic members, the rest replace.
308
308
  */
309
309
 
310
310
  /**
311
311
  * @param {WebDappAdapterOptions} [factoryOptions]
312
- * @returns {import('@farmslot/adapter-sdk').PlatformAdapter}
312
+ * @returns {import('@farmslot/adapter-sdk').ProjectRuntime}
313
313
  */
314
314
  export function createWebDappAdapter(factoryOptions = {}) {
315
315
  if ('signers' in factoryOptions) {
@@ -2,9 +2,9 @@
2
2
  import { captureHelperSnapshot } from '@farmslot/recipe-runner';
3
3
 
4
4
  /**
5
- * @param {import('@farmslot/adapter-sdk').AdapterActions} actions
5
+ * @param {import('@farmslot/adapter-sdk').ActionCatalog} actions
6
6
  * @param {import('@farmslot/adapter-sdk').AdapterRecording} recording
7
- * @returns {import('@farmslot/adapter-sdk').AdapterActions}
7
+ * @returns {import('@farmslot/adapter-sdk').ActionCatalog}
8
8
  */
9
9
  export function browserWindowScreenshots(actions, recording) {
10
10
  const ui = actions.ui;