From e03185429fec24fb9c85531e49677c465475a4b5 Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Mon, 16 Nov 2026 08:11:09 +0800 Subject: [PATCH] refactor(desktop): declare the desktop inventory's use of the Electron fuse reader (#11494) * refactor(desktop): declare the desktop inventory's use of the Electron fuse reader * docs(architecture): list the captures to pcap provider dependency --- docs/architecture/architecture.mermaid | 3 ++- scripts/lib/module-layers.baseline.json | 1 - scripts/lib/module-layers.mjs | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/architecture/architecture.mermaid b/docs/architecture/architecture.mermaid index 3774bd7813..16e055573f 100644 --- a/docs/architecture/architecture.mermaid +++ b/docs/architecture/architecture.mermaid @@ -13,7 +13,8 @@ graph TD %% imports inner layers, including the shared provider core (src/providers/, %% which may not import a provider folder), and its own files. Importing another provider folder is recorded debt %% unless PROVIDER_DEPENDENCIES declares the file (inspector -> browser CDP - %% client, browser -> electron fuse reader); shared pieces belong in + %% client, browser and desktop -> electron fuse reader, captures -> pcap + %% tshark configuration); shared pieces belong in %% ports, foundation or the provider core. Application, composition and %% adapters reach a provider through the entry files it declares in %% scripts/lib/module-layers.mjs (ENTRY_FILES; no per-provider barrel). diff --git a/scripts/lib/module-layers.baseline.json b/scripts/lib/module-layers.baseline.json index 98ce1bc30b..6d4652455b 100644 --- a/scripts/lib/module-layers.baseline.json +++ b/scripts/lib/module-layers.baseline.json @@ -8,7 +8,6 @@ "main <-> server" ], "crossProvider": { - "desktop -> electron": 1, "gpu -> artifacts": 1, "model -> artifacts": 1 }, diff --git a/scripts/lib/module-layers.mjs b/scripts/lib/module-layers.mjs index 1501afcf87..1fc78717f5 100644 --- a/scripts/lib/module-layers.mjs +++ b/scripts/lib/module-layers.mjs @@ -451,6 +451,16 @@ export const PROVIDER_DEPENDENCIES = Object.freeze([ reason: "active Electron capture checks the inspect-arguments fuse with the electron provider's fuse reader", }), + Object.freeze({ + from: "desktop", + to: "electron", + files: Object.freeze(["ElectronFuseReader.ts"]), + // The Linux application inventory marks an executable as Electron when + // it carries a fuse sentinel. It locates the sentinel with the electron + // provider's fuse reader instead of searching the fuse wire again. + reason: + "the Linux application inventory detects Electron executables with the electron provider's fuse reader", + }), Object.freeze({ from: "captures", to: "pcap",