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

vasp-sdk

v1.0.3

Published

SDK for Vectorized Agent Synaptic Protocol (VASP) enabling AI-to-AI state synchronization and task delegation

Readme

Vectorized Agent Synaptic Protocol (VASP) SDK

A transport-agnostic, lightweight JavaScript SDK enabling AIs to coordinate sessions, synchronize conversational state, and delegate tasks across different runtimes, applications, and LLM backends.


Features

  • 🤖 AI-to-AI Handshake Negotiation (hello): Session setup with automated ACK check handshakes.
  • 🧠 State & Memory Synchronization (memory.sync): Pack and transmit conversation memory deltas (S-Deltas) without token-heavy full chat histories.
  • 📝 Task Delegation & Tool Requests (task.request): Request other agents to execute tasks (e.g., query APIs, search databases) and receive structured tool results.
  • 🔌 Transport Agnostic: Works seamlessly over WebSockets, HTTP REST APIs, Chrome Extension messaging ports, or IPC channels.

Installation

Once published to NPM:

npm install vasp-sdk

Or install directly from your repository:

npm install git+https://github.com/Aadithyanas/wpbot.git#main

Quick Start Guide

1. Initializing the Synaptic Gateway (Server Router)

Expose a VASP Gateway to manage active sessions and validate incoming frames.

const { VaspGateway } = require("vasp-sdk");

// Create Gateway Instance
const gateway = new VaspGateway({ gatewayId: "nexa-synaptic-router" });

// Bind Memory Sync Observer
gateway.onMemorySync(async (packet, replySender) => {
    console.log(`Received context delta from ${packet.from.agent}:`, packet.delta.content);
    
    // Save to vector database / pgvector...
    
    // Reply back to notify client of ingestion
    if (replySender) {
        await replySender({
            version: "1.0",
            id: `msg_sync_ack_${Date.now()}`,
            timestamp: Date.now(),
            type: "memory.sync",
            from: { agent: "nexa-synaptic-router" },
            to: { agent: packet.from.agent },
            delta: { role: "assistant", content: "Context delta received and indexed." }
        });
    }
});

// Link incoming network frames to Gateway handler
// (Example: Express WebSocket Server)
wss.on("connection", (ws) => {
    ws.on("message", async (data) => {
        const packet = JSON.parse(data);
        await gateway.handleIncoming(packet, async (replyPacket) => {
            ws.send(JSON.stringify(replyPacket));
        });
    });
});

2. Initializing the Edge Client (Active UI Tab/Agent)

Instantiate a VaspClient and plug in a transport callback to send packets.

const { VaspClient } = require("vasp-sdk");
const WebSocket = require("ws");

const ws = new WebSocket("ws://localhost:8080");

// Initialize Client Instance
const client = new VaspClient({
    sessionId: "sess_chrome_sync_101",
    senderId: "claude-agent-aadithyan",
    targetId: "nexa-synaptic-router",
    onSend: async (packet) => {
        // Transmit packet over WebSockets
        ws.send(JSON.stringify(packet));
    }
});

// Bind incoming network frames to client handler
ws.on("message", (data) => {
    const packet = JSON.parse(data);
    client.handleIncoming(packet);
});

// Establish connection handshake
ws.on("open", async () => {
    try {
        console.log("WebSocket open. Initiating handshake...");
        await client.handshake();
        console.log("Synaptic session established!");

        // Send a conversation memory update (S-Delta)
        await client.sendMemorySync("User wants to build a CRM database table named LeadFlow");
    } catch (err) {
        console.error("Session initialization failed:", err.message);
    }
});

API Specifications

VaspClient

  • constructor({ sessionId, senderId, targetId, onSend })
  • async handshake(): Sends hello and awaits hello_ack reply.
  • async sendMemorySync(content, [metadata]): Dispatches dialog state deltas.
  • async sendTaskRequest(taskName, args, [priority]): Requests tool execution.
  • handleIncoming(packet): Feeds incoming network payloads back into the client engine.
  • Listeners:
    • onMemorySync(callback)
    • onTaskResponse(callback)
    • onCapabilities(callback)
    • onError(callback)

VaspGateway

  • constructor({ gatewayId })
  • validatePacket(packet): Validates format version and parameters.
  • async handleIncoming(packet, replySender): Parses and routes client frames.
  • Listeners:
    • onHello(callback)
    • onMemorySync(callback)
    • onTaskRequest(callback)
    • onError(callback)

🛠️ VASP Project Synapse CLI

The SDK includes a built-in CLI to manage state handovers directly inside your local developer workspace (such as in Cursor, VS Code, or shell-based agents).

1. Initialize Synapse Files

Creates the hidden .vasp/ folder containing default synapse.json (state tracking) and plan.md (active checklist).

npx vasp init

2. Record Workspace Changes

Manually updates the local synapse.json file with git diff stats. You can optionally log the active AI model name and focused files:

npx vasp record --model claude-3-opus --focus controllers/whatsappController.js

3. Start Auto-Watcher Daemon (Automatic Sync)

Starts a background watcher to automatically monitor and record file changes, updating your .vasp/synapse.json history on every file save:

npx vasp watch

4. Display Synaptic State (Handover Prompt)

Outputs a compiled, structured Markdown prompt representing the project state. Feed this output directly to the new model when switching AIs to instantly align context:

npx vasp status

License

MIT License. © 2026 Aadithyan A. S., Nexa AI Core Team.