npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tripley-kit/native

v1.3.1

Published

Unified Tripley Native capability SDK for Tauri, Electron, and browser containers

Readme

@tripley-kit/native

See also: USAGE.md for full cross-project integration instructions and the complete API list.

Unified TypeScript SDK for Tripley Native host capabilities. The SDK uses Tripley xRPC under the hood and can connect through a Tauri host bridge today or a WebSocket provider in browser/console mode.

import { createTauriTripleyNative, installTripleyNative } from '@tripley-kit/native';

const native = await createTauriTripleyNative();
installTripleyNative(native);

const info = await window.tripley.native.runtime.getInfo();
const displays = await window.tripley.native.display.listDisplays();

For high-frequency writes, keep a native file handle open instead of repeatedly calling appendFile:

const log = await native.fs.openFile('/logs/app.log', {
  write: true,
  append: true,
  create: true,
});

await log.write('started\n');
await log.flush();
await log.close();

Electron preload or main processes should load the packaged Node addon and inject it into the SDK:

import { createElectronTripleyNative, installTripleyNative } from '@tripley-kit/native';

const native = await createElectronTripleyNative({ addon: tripleyNativeAddon });
installTripleyNative(native);

Electron uses the browser-link window fallback unless real window and display adapters are injected from preload/main. BrowserWindow and screen access are host-owned:

const native = await createElectronTripleyNative({
  addon: tripleyNativeAddon,
  adapters: {
    window: window.tripleyElectronWindowAdapter,
    display: window.tripleyElectronDisplayAdapter,
  },
});

SQLite now supports callback transactions and raw result sets:

const result = await db.transaction(async (tx) => {
  await tx.run('insert into ledger(id, amount) values (?, ?)', [id, amount]);
  return tx.get('select balance from account where id = ?', [accountId]);
});

Standalone host daemons can be reached over WebSocket. Pass authToken when the host was started with --auth-token, and narrow requiredServices when the host binary only exposes selected services. In a normal browser, native.window.openWindow({ url }) uses a browser-link fallback: it calls window.open(url) and ignores native-only bounds, display, and always-on-top options so Vite/dev-server projects can run against tripley-native-hostd without a Tauri or Electron shell:

import { createWebSocketTripleyNative } from '@tripley-kit/native';

const native = createWebSocketTripleyNative({
  url: 'ws://127.0.0.1:39010',
  authToken: 'local-dev-token',
  requiredServices: ['fs'],
});

await native.connect();
await native.fs.exists('/logs/app.log');
await native.window.openWindow({ url: 'http://localhost:5173/report' });

Verify and Package

pnpm --filter @tripley-kit/native run verify

The package publishes the generated dist directory and this README. dist is built during prepublishOnly and is not required to be checked into the repository.

Related Packages

@tripley-kit/xfs-client provides the optional CEN/XFS device API, and @tripley-kit/xfs-control-client provides simulator control APIs for XFS automation tests. They are split from @tripley-kit/native because most native-capability consumers do not need the XFS surface area.