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

@node-i3x/pseudo-session-connector

v0.5.4

Published

i3X data-source adapter using node-opcua PseudoSession — connects directly to an AddressSpace without binary OPC UA transport

Readme

@node-i3x/pseudo-session-connector

In-process OPC UA adapter — implements IDataSourcePort using node-opcua PseudoSession for zero-network embedded mode.

Node.js >=20 TypeScript License: AGPL-3.0-or-later OR Commercial Built by Sterfive

Overview

This package lets you embed the i3X REST API directly inside a node-opcua OPCUAServer process. Instead of connecting via OPC UA binary transport (TCP + serialization), the adapter talks directly to the AddressSpace in memory — zero network overhead, microsecond latency.

Installation

npm install @node-i3x/pseudo-session-connector

Requires @node-i3x/core as a peer dependency.

Usage

import { OPCUAServer } from 'node-opcua';
import { PseudoSessionDataSourceAdapter } from '@node-i3x/pseudo-session-connector';

const server = new OPCUAServer({ port: 4840 });
await server.initialize();
// ... populate address space ...
await server.start();

// Connect i3X directly to the AddressSpace — no network!
const dataSource = new PseudoSessionDataSourceAdapter(
  server.engine.addressSpace!,
  logger,
);
await dataSource.connect();

Remote vs Embedded

┌─ Remote (opcua-connector) ──────────────────┐
│  i3X REST → OPC UA Client → TCP → Server    │
│  Latency: milliseconds                       │
└──────────────────────────────────────────────┘

┌─ Embedded (pseudo-session-connector) ───────┐
│  i3X REST → PseudoSession → AddressSpace     │
│  Latency: microseconds  (same process)       │
└──────────────────────────────────────────────┘

Both implement the same IDataSourcePort interface — all domain services work identically regardless of which adapter is used.

Subscription Strategies

Event-based (default) — zero latency

Listens directly to UAVariable value_changed events:

UAVariable.setValueFromSource(...)
  └── 'value_changed' event
       └── DataChangeCallback fires immediately

Polling-based — universal fallback

Periodically reads values via PseudoSession.read() and compares:

setInterval(100ms)
  └── PseudoSession.read(nodeIds)
       └── Compare with previous values
            └── DataChangeCallback fires on change

Key Exports

| Export | Description | |--------|-------------| | PseudoSessionDataSourceAdapter | IDataSourcePort implementation for embedded mode | | AddressSpaceMonitoredSubscription | Event-based subscription (listens to value_changed) | | PollingMonitoredSubscription | Polling-based subscription (periodic read() + diff) |

Dependencies

| Package | Purpose | |---------|---------| | @node-i3x/core | Domain ports and types | | node-opcua-address-space | AddressSpace access | | node-opcua-pseudo-session | In-process session | | node-opcua-data-model | QualifiedName, NodeClass |

Tutorial

For a complete, step-by-step guide with a full working example, see TUTORIAL.md -- a literate-programming walkthrough that builds an OPC UA server + i3X REST API from scratch in ~80 lines.

License

Dual-licensed:

  • AGPL-3.0-or-later -- you may use, modify, and distribute this software freely, provided that all derivative works and network-accessible deployments also make their complete source code available under the AGPL.
  • Sterfive Commercial License -- allows proprietary use without copyleft obligations.

See LICENSING.md for details, or contact Sterfive for commercial licensing.