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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@agentic-robotics/core

v0.2.1

Published

High-performance agentic robotics framework - Core bindings

Readme

@agentic-robotics/core

npm version Downloads License Node

Core native bindings for the agentic-robotics framework - High-performance robotics middleware with ROS2 compatibility.

Features

  • 🚀 High Performance - Native Rust implementation via NAPI-RS
  • 🤖 ROS2 Compatible - Full ROS2 message compatibility
  • 📡 Pub/Sub Pattern - Efficient publisher/subscriber communication
  • 🔄 Real-time Capable - Low-latency message passing
  • 📊 Statistics Tracking - Built-in performance metrics
  • 🌐 Cross-platform - Linux (x64, ARM64), macOS (x64, ARM64)
  • 💪 Type-safe - Full TypeScript support
  • Zero-copy - Efficient memory management

Installation

npm install @agentic-robotics/core

Platform-specific binaries are automatically installed based on your system.

Quick Start

Create a Node

const { AgenticNode } = require('@agentic-robotics/core');

const node = new AgenticNode('my-robot');
console.log('Node created:', node.getName());

Publish Messages

const publisher = await node.createPublisher('/sensors/temperature');

await publisher.publish(JSON.stringify({
  value: 25.5,
  unit: 'celsius',
  timestamp: Date.now()
}));

console.log('Stats:', publisher.getStats());
// { messages: 1, bytes: 66 }

Subscribe to Messages

const subscriber = await node.createSubscriber('/sensors/temperature');

// Non-blocking receive
const message = await subscriber.tryRecv();
if (message) {
  const data = JSON.parse(message);
  console.log('Temperature:', data.value, data.unit);
}

// Blocking receive (waits for message)
const nextMessage = await subscriber.recv();
console.log('Received:', JSON.parse(nextMessage));

Full Example

const { AgenticNode } = require('@agentic-robotics/core');

async function main() {
  // Create nodes
  const publisher_node = new AgenticNode('temperature-sensor');
  const subscriber_node = new AgenticNode('temperature-monitor');

  // Set up publisher
  const pub = await publisher_node.createPublisher('/temperature');

  // Set up subscriber
  const sub = await subscriber_node.createSubscriber('/temperature');

  // Publish temperature readings
  setInterval(async () => {
    const reading = {
      value: 20 + Math.random() * 10,
      timestamp: Date.now()
    };

    await pub.publish(JSON.stringify(reading));
    console.log('Published:', reading);
  }, 1000);

  // Monitor temperature
  setInterval(async () => {
    const msg = await sub.tryRecv();
    if (msg) {
      const data = JSON.parse(msg);
      console.log('Received:', data);

      if (data.value > 28) {
        console.warn('⚠️  High temperature detected!');
      }
    }
  }, 500);
}

main().catch(console.error);

API Reference

AgenticNode

Main class for creating publishers and subscribers.

Constructor

new AgenticNode(name: string): AgenticNode

Creates a new node with the given name.

Methods

createPublisher(topic: string): Promise<AgenticPublisher>

Creates a publisher for the specified topic.

createSubscriber(topic: string): Promise<AgenticSubscriber>

Creates a subscriber for the specified topic.

getName(): string

Returns the node name.

listPublishers(): Promise<string[]>

Lists all active publisher topics.

listSubscribers(): Promise<string[]>

Lists all active subscriber topics.


AgenticPublisher

Publisher for sending messages to a topic.

Methods

publish(data: string): Promise<void>

Publishes a JSON string message to the topic.

getStats(): PublisherStats

Returns publisher statistics:

interface PublisherStats {
  messages: number;  // Total messages published
  bytes: number;     // Total bytes sent
}

AgenticSubscriber

Subscriber for receiving messages from a topic.

Methods

tryRecv(): Promise<string | null>

Non-blocking receive. Returns message as JSON string or null if no message available.

recv(): Promise<string>

Blocking receive. Waits for and returns the next message as JSON string.

Performance

  • Message Latency: < 1ms (same process)
  • Throughput: 10,000+ msgs/sec
  • Memory Overhead: ~100 bytes per message
  • Serialization: JSON format (efficient)

Platform Support

| Platform | Architecture | Status | |----------|-------------|--------| | Linux | x86_64 | ✅ Supported | | Linux | ARM64 | ✅ Supported | | macOS | x86_64 | ✅ Supported | | macOS | ARM64 (M1/M2) | ✅ Supported |

Requirements

  • Node.js >= 14.0.0
  • Platform-specific native module (automatically installed)

TypeScript Support

Full TypeScript definitions included:

import { AgenticNode, AgenticPublisher, AgenticSubscriber, PublisherStats } from '@agentic-robotics/core';

Error Handling

try {
  const publisher = await node.createPublisher('/topic');
  await publisher.publish(JSON.stringify({ data: 'test' }));
} catch (error) {
  console.error('Publisher error:', error.message);
}

try {
  const invalidJson = '{ not valid json }';
  await publisher.publish(invalidJson);
} catch (error) {
  console.error('Invalid JSON:', error.message);
  // Error: Invalid JSON: expected ident at line 1 column 2
}

Advanced Usage

Multiple Publishers

const sensors = ['temperature', 'pressure', 'humidity'];
const publishers = await Promise.all(
  sensors.map(sensor =>
    node.createPublisher(`/sensors/${sensor}`)
  )
);

// Publish to all sensors
await Promise.all(
  publishers.map(pub =>
    pub.publish(JSON.stringify({ value: Math.random() }))
  )
);

Message Batching

const messages = Array.from({ length: 100 }, (_, i) => ({
  id: i,
  value: Math.random()
}));

for (const msg of messages) {
  await publisher.publish(JSON.stringify(msg));
}

const stats = publisher.getStats();
console.log(`Sent ${stats.messages} messages (${stats.bytes} bytes)`);

Related Packages

Homepage

Visit ruv.io for more information and documentation.

Contributing

Contributions welcome! Visit github.com/ruvnet/vibecast

License

MIT OR Apache-2.0

Support