@farmslot/adapter-web 0.8.3 → 0.9.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.
- package/CHANGELOG.md +4 -0
- package/dist/web-dapp/index.d.mts +7 -2
- package/package.json +2 -2
- package/src/web-dapp/index.mjs +30 -23
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,10 @@ 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.9.0 - 2026-10-14
|
|
10
|
+
|
|
11
|
+
- Preserve explicit built-in bridge declarations without adding overlay installer leaves, while retaining verification and existing overlay defaults.
|
|
12
|
+
|
|
9
13
|
## 0.8.3 - 2026-10-14
|
|
10
14
|
|
|
11
15
|
- Align runtime dependencies with recipe-runner 0.34.1 so installed adapters and recipe hosts use one engine version.
|
|
@@ -43,7 +43,8 @@ export function bindWebDappPolicy<T extends {
|
|
|
43
43
|
export function walletRequestFindings(lines: readonly string[]): import("@farmslot/adapter-sdk").AdapterLogFinding[];
|
|
44
44
|
/**
|
|
45
45
|
* @typedef {Partial<Omit<import('@farmslot/adapter-sdk').PlatformAdapter, 'id' | 'sdkVersion' | 'harness'>> & {
|
|
46
|
-
* harness?: Partial<import('@farmslot/adapter-sdk').AdapterHarness
|
|
46
|
+
* harness?: Partial<Extract<import('@farmslot/adapter-sdk').AdapterHarness, { kind?: 'overlay' }>> |
|
|
47
|
+
* Extract<import('@farmslot/adapter-sdk').AdapterHarness, { kind: 'built-in' }>,
|
|
47
48
|
* }} WebDappAdapterHooks
|
|
48
49
|
*/
|
|
49
50
|
/**
|
|
@@ -82,7 +83,11 @@ export const WEB_DAPP_ONLY_LAUNCH_OPTIONS: Readonly<{
|
|
|
82
83
|
mainnetConfirmation: "--mainnet-confirmation";
|
|
83
84
|
}>;
|
|
84
85
|
export type WebDappAdapterHooks = Partial<Omit<import("@farmslot/adapter-sdk").PlatformAdapter, "id" | "sdkVersion" | "harness">> & {
|
|
85
|
-
harness?: Partial<import("@farmslot/adapter-sdk").AdapterHarness
|
|
86
|
+
harness?: Partial<Extract<import("@farmslot/adapter-sdk").AdapterHarness, {
|
|
87
|
+
kind?: "overlay";
|
|
88
|
+
}>> | Extract<import("@farmslot/adapter-sdk").AdapterHarness, {
|
|
89
|
+
kind: "built-in";
|
|
90
|
+
}>;
|
|
86
91
|
};
|
|
87
92
|
export type WebDappAdapterOptions = {
|
|
88
93
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farmslot/adapter-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
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,7 +83,7 @@
|
|
|
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.
|
|
86
|
+
"@farmslot/adapter-sdk": "0.13.0",
|
|
87
87
|
"@farmslot/protocol": "0.43.0",
|
|
88
88
|
"@farmslot/recipe-runner": "0.34.1",
|
|
89
89
|
"ws": "^8.18.0"
|
package/src/web-dapp/index.mjs
CHANGED
|
@@ -288,7 +288,8 @@ const flag = (options, key) => options[key] === true;
|
|
|
288
288
|
|
|
289
289
|
/**
|
|
290
290
|
* @typedef {Partial<Omit<import('@farmslot/adapter-sdk').PlatformAdapter, 'id' | 'sdkVersion' | 'harness'>> & {
|
|
291
|
-
* harness?: Partial<import('@farmslot/adapter-sdk').AdapterHarness
|
|
291
|
+
* harness?: Partial<Extract<import('@farmslot/adapter-sdk').AdapterHarness, { kind?: 'overlay' }>> |
|
|
292
|
+
* Extract<import('@farmslot/adapter-sdk').AdapterHarness, { kind: 'built-in' }>,
|
|
292
293
|
* }} WebDappAdapterHooks
|
|
293
294
|
*/
|
|
294
295
|
|
|
@@ -320,6 +321,16 @@ export function createWebDappAdapter(factoryOptions = {}) {
|
|
|
320
321
|
const resolveSigners = async () =>
|
|
321
322
|
loadSigners(signerModule ? { ...process.env, [SIGNER_MODULE_ENV]: signerModule } : process.env);
|
|
322
323
|
const venueHint = `pass --adapter <the adapter that extends ${id}>, e.g. --adapter terminal, with its recipe library on RECIPE_LIBRARY_PATH`;
|
|
324
|
+
const harnessVerification = {
|
|
325
|
+
verify: () => ({
|
|
326
|
+
command: process.execPath,
|
|
327
|
+
prefixArgs: [
|
|
328
|
+
webDappLeafPath('verify'),
|
|
329
|
+
...(signerModule ? ['--signer-module', signerModule] : []),
|
|
330
|
+
],
|
|
331
|
+
}),
|
|
332
|
+
restart: `${cli} launch`,
|
|
333
|
+
};
|
|
323
334
|
|
|
324
335
|
return {
|
|
325
336
|
id,
|
|
@@ -534,28 +545,24 @@ export function createWebDappAdapter(factoryOptions = {}) {
|
|
|
534
545
|
cdpTarget: { transport: 'chrome-cdp', probePath: 'json/version' },
|
|
535
546
|
},
|
|
536
547
|
|
|
537
|
-
//
|
|
538
|
-
harness:
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
}),
|
|
556
|
-
restart: `${cli} launch`,
|
|
557
|
-
...harness,
|
|
558
|
-
},
|
|
548
|
+
// Built-in bridges inherit verification, without overlay installer leaves.
|
|
549
|
+
harness:
|
|
550
|
+
harness?.kind === 'built-in'
|
|
551
|
+
? { ...harnessVerification, ...harness, kind: 'built-in' }
|
|
552
|
+
: {
|
|
553
|
+
install: {
|
|
554
|
+
entry: webDappLeafPath('inject'),
|
|
555
|
+
fallback: webDappLeafPath('inject'),
|
|
556
|
+
node: true,
|
|
557
|
+
},
|
|
558
|
+
cleanup: {
|
|
559
|
+
entry: webDappLeafPath('cleanup'),
|
|
560
|
+
fallback: webDappLeafPath('cleanup'),
|
|
561
|
+
node: true,
|
|
562
|
+
},
|
|
563
|
+
...harnessVerification,
|
|
564
|
+
...harness,
|
|
565
|
+
},
|
|
559
566
|
|
|
560
567
|
// An agentic-runtime.json whose ports all belong to the slot (never claimed here).
|
|
561
568
|
runtimeContext: {
|