Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@jini-ai/desktop-host

Latest version: v0.7.3-next.3

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: ai-oss
0 Stars
0 Forks
17 Versions
2.7K Downloads
TypeScript Repo language

Scan summary

@jini-ai/desktop-host was last scanned on 29 Nov 2026 at version 0.7.3-next.3. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 17 versions; the latest was published on 29 Nov 2026.
  • Findings: No rules fired in version 0.7.3-next.3.
  • Downloads: 2,696 downloads.

Versions

17 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.7.3-next.3 LATEST 29 Nov 2026 No rules fired
0.7.3-next.2 21 Nov 2026 No rules fired
0.7.3-next.1 21 Nov 2026 No rules fired
0.7.2 14 Nov 2026 Not shown
0.7.1 11 Nov 2026 Not shown

No rules fired in 0.7.3-next.3

Findings

Findings for v0.7.3-next.3. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.7.3-next.3; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@jini-ai/desktop-host

The shell-agnostic half of a desktop app: six ports covering the things every Electron or Tauri wrapper has to do — hold a single-instance lock, track the main window's lifecycle, handle a custom URL scheme, launch and supervise a sidecar process, run a headless render service, and open external URLs/paths/folder pickers. The root entry point is the port set plus shared utilities (paths, config loading, logging, the window.__jini__ host bridge). The concrete assemblies live behind ./electron and ./tauri, so an Electron app never statically imports the Tauri implementation it will never call. Note that the Tauri side is genuinely partial — its render service throws NotImplementedError.

Install

npm install @jini-ai/desktop-host

No peer dependencies, and — importantly — no dependency on electron or @tauri-apps/api. Both assemblies take object-argument bindings for their native surfaces as injected objects (ElectronAppLike, ElectronBrowserWindowFactory, TauriWindowFactory, …), so this package installs and typechecks with neither framework present, and the whole shell is testable without launching one. @jini-ai/core is a regular dependency, for the DI tokens.

What you get

The port set — DesktopHostPorts (singleInstance, windowLifecycle, protocolHandler, sidecarLauncher, renderService, shell) and DesktopHost ({ backend, ports }), with the individual port types SingleInstanceLockPort, WindowLifecyclePort, ProtocolHandlerPort, SidecarLauncherPort, RenderService, ShellPort, plus their DI tokens (SingleInstanceLockToken, WindowLifecycleToken, ProtocolHandlerToken, SidecarLauncherToken, RenderServiceToken, ShellToken).

Shell-agnostic implementations you can use directly — createNodeSidecarLauncher({}) and appendSidecarLifecycleLog (a sidecar launcher needs no Electron at all), claimSingleInstanceLock / createSingleInstanceLockPort, and withMainWindowTracking.

Protocol handling — buildProtocolProxyTargetUrl, handleProtocolProxyRequest, schemeEntryUrl — the custom-scheme-to-local-daemon proxy every packaged app needs.

Paths and config — resolveDesktopHostPathRoots(requiredArgs, optionalArgs?) → DesktopHostPathRoots, DesktopHostPathError, and loadHostConfigFile<T>(...).

Logging — createFileLogger, appendLogLine, installFatalExceptionHandlers, and isHarmlessSocketOptionError (the socket-teardown noise you do not want paging anyone).

The host bridge — the window.__jini__ contract a renderer uses to detect and call its host: JINI_HOST_GLOBAL, JINI_HOST_VERSION, JINI_HOST_CLIENT_TYPES, JiniHostBridge, isJiniHostBridge, getJiniHost, isJiniHostAvailable, detectJiniHostClientType (returns 'web' when there is no host), openHostExternalUrl, openHostPath, and checkJiniHostUpdaterAvailability. A separate ./bridge-testing entry point provides createMockJiniHost / installMockJiniHost for renderer tests.

Windows integration — syncWindowsUninstallDisplayVersion, windowsUninstallRegistryQueryArgs, windowsUninstallDisplayVersionRegistryArgs.

./electron — createElectronDesktopHost(surfaces, overrides?) plus each port factory individually (createElectronSingleInstanceLockPort, createElectronWindowLifecyclePort, createElectronProtocolHandlerPort, createElectronRenderService, createElectronShellPort), the ElectronAppLike / ElectronBrowserWindowFactory / ElectronProtocolLike / ElectronShellLike / ElectronDialogLike surface interfaces, and fakes for all of them (createFakeElectronApp, createFakeBrowserWindowFactory, createFakeElectronProtocol, createFakeElectronShell, createFakeElectronDialog).

./tauri — createTauriDesktopHost and the matching per-port factories and fakes. createTauriRenderService throws NotImplementedError — the Tauri backend is a real but incomplete sibling, not a drop-in equal of the Electron one.

Argument convention

Public functions and constructors take a required-arguments object, followed by an optional-arguments object when needed. Functions with only optional values receive {} first. Port methods use the same convention. Existing export names stay the same; there are no compatibility overloads. Native Electron/Tauri modules must be bound to the exported object-argument interfaces before injection. Event callbacks deliver payloads in the object shapes documented by those interfaces.

See API-CONVENTION.md for the full before/after inventory and consumer ledger.

Usage

import { createElectronDesktopHost } from '@jini-ai/desktop-host/electron';
import { createFileLogger, installFatalExceptionHandlers } from '@jini-ai/desktop-host';

const logger = createFileLogger({ logPath: '/Users/me/Library/Logs/example/main.log' }, { echoToConsole: true });
installFatalExceptionHandlers({ logger });

// Supply object-argument bindings around native Electron operations. See the
// exported Electron* interfaces for each binding's full contract.
const host = createElectronDesktopHost(electronPorts);

if (!host.ports.singleInstance.claim({ onSecondInstance: () => host.ports.windowLifecycle.showMainWindow() })) {
  electronPorts.app.quit();
}

const window = await host.ports.windowLifecycle.createWindow({ url: 'https://example.test/' }, { width: 1024 });
const sidecar = await host.ports.sidecarLauncher.launch({ command: '/absolute/sidecar' }, { args: ['--port', '0'] });

In the renderer, detect and call the host without importing any Electron code:

import { detectJiniHostClientType, openHostExternalUrl } from '@jini-ai/desktop-host';

if (detectJiniHostClientType({}) !== 'web') {
  await openHostExternalUrl({ url: 'https://example.com' });
}

Read DesktopHostPorts and each port interface in src/ for the full method sets and option shapes before calling through. The ports are small: SingleInstanceLockPort is just claim, WindowLifecyclePort is createWindow / getMainWindow / showMainWindow, and SidecarLauncherPort is launch.

Entry points

subpath what's behind it extra dep it pulls in
. The six port interfaces + DI tokens, the shell-agnostic implementations (sidecar launcher, single-instance, protocol proxy), paths, config, logging, Windows registry helpers, and the window.__jini__ bridge. none
./bridge-testing createMockJiniHost / installMockJiniHost for testing renderer code against the host bridge. none
./electron The full Electron assembly + per-port factories + fakes. none — electron is injected, not imported
./tauri The full Tauri assembly + per-port factories + fakes. createTauriRenderService throws NotImplementedError. none — the Tauri API is injected, not imported
./shutdown Pending teardown tracking, quit/drain decisions and signal routing. none
./electron/navigation-policy Window/renderer origin boundaries and guest admission. none
./electron/updates Updater policy/controller and file-backed multi-instance presence. none
./node-toolchain Node/npm/npx shims and caller-named environment variables. none
./electron/usability Find, zoom, spelling menus and remembered bounds through host ports. none
./speech Transcription contracts, mono PCM/WAV encoding, validated IPC and preload bridge. none
./speech/macos On-device helper compilation and transcription through filesystem/process ports. none; host supplies Swift compiler
./speech/macos/speech-helper.swift Native Swift source asset copied into the published dist tree. none

What's swappable

Nearly all of it. Every one of the six ports is an interface with a DI token, and createElectronDesktopHost(surfaces, overrides) takes a Partial<DesktopHostPorts> second argument so any single port can be replaced without abandoning the assembly. One level down, the native surfaces are injected too — ElectronAppLike, ElectronBrowserWindowFactory, TauriWindowFactory and friends are structural interfaces, which is why the shipped fakes can drive a complete host in a plain unit test. createFileLogger returns core Logger that installFatalExceptionHandlers accepts, so logging is replaceable too. Fixed: the window.__jini__ bridge contract itself (that is a wire contract between host and renderer), the protocol-proxy URL construction, and the path-root resolution rules.

Runtime

jini.runtime: "desktop" — Node built-ins (node:fs, node:child_process, node:path) in the host half; the bridge helpers are the exception and read only globalThis, so they run in a renderer. ESM only — ships "type": "module" with no CommonJS require build. Electron's main process must be configured for ESM to import it.

Provenance

See the archived provenance ledger for per-file provenance and scope decisions. Apache-2.0, inherited from Open Design — see the repo NOTICE.

Desktop policies and speech

All additional entries keep application channels, labels, paths, locale, messages and persistence keys in required objects supplied by the host. No dependency was added. API-USABILITY-SPEECH.md documents each usability and speech function, injected port, native binding and asset location. The four policy/toolchain subpaths are documented in API.md.

The root and native shell entry points retain their existing export names. The object-argument conversion is a breaking caller change: bind native methods to the exported port interfaces, including usability and speech callbacks, before injecting SDK objects. Find/zoom renderer hooks remain application-owned pending a separate React entry; the current additions cover main-process behavior and the speech bridge.

Verification for this integration is not run by owner directive. The exact per-file commands and later consumer rewiring requests are in INTEGRATION-desktop-host.md.

Native updater and navigation callbacks

./electron/updates accepts the structural native electron-updater surface directly: on(event, listener) and quitAndInstall(isSilent?, isForceRunAfter?). createElectronUpdaterAdapter({ updater }) forwards mutable flags and retains the native receiver without importing Electron. Controllers take a core Clock in clock; effects remain required. Timer, timing and message overrides go in the second options object:

import { createSystemClock } from '@jini-ai/core/primitives';
import { createAutoUpdateController } from '@jini-ai/desktop-host/electron/updates';

const controller = createAutoUpdateController({
  updater, platform, pid, presence, clock: createSystemClock(),
  promptUpdateReady, explainOthersOpen, quit, log,
}, { timing: { firstCheckDelayMs: 30_000 } });

The default Node timer adapter is also exported as createNodeUpdateTimers(). Default timing is 30 seconds before the first check, 15-minute ticks, four-hour checks, 45-minute stale presence and a two-minute install fallback. Partial timing overrides inherit the other values. defaultUpdateMessages is the single exported controller copy object; a host can replace it as a whole through options.messages. Options override legacy settings in the dependency object.

./electron/navigation-policy accepts raw webContents, including setWindowOpenHandler(handler) and native navigation/redirect listeners. Origin and scheme checks stay the same.

UpdaterLike and NavigableContents are unions with the existing object registration types, exported as LegacyUpdaterLike and LegacyNavigableContents. The legacy controller now callback and dependency-object timers/timing/messages also remain accepted during migration. Native on implementations have two parameters (or a rest tuple); the old object registration has one. Custom one-parameter native updater facades should use createElectronUpdaterAdapter. Popup-only contents receive a callable handler that also supports the old { handler } destructuring ABI. Hosts can remove their registration wrappers when ready.

File logging uses core Logger; error in the optional bag is normalized into the JSON metadata alongside meta, consistently across all three levels.

Native speech runtime asset

@jini-ai/desktop-host/speech/macos/speech-helper.swift exports the Swift source used by the macOS speech adapter. The build copies it into dist/speech/macos; desktop hosts bundle or compile that source on macOS alongside the adapter. It is a required runtime asset, not a TypeScript entry.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @jini-ai/desktop-host

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229