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

@holoscript/agent-sdk

v6.0.0

Published

uAA2++ Agent SDK — Mesh discovery, gossip protocol, signal service, MCP tools, and Agent Card schema

Downloads

31

Readme

@holoscript/agent-sdk

uAA2++ Agent SDK — Developer toolkit for building multi-agent systems.

Mesh discovery, inter-agent signaling, gossip-based knowledge sync, MCP tool schemas, and Agent Card (A2A) interoperability.

Quick Start

import {
  MeshDiscovery,
  SignalService,
  GossipProtocol,
  createAgentCard,
} from '@holoscript/agent-sdk';

// 1. Mesh Discovery — find other agents in the network
const mesh = new MeshDiscovery('agent_spatial_001');

mesh.onPeerDiscovered((peer) => {
  console.log(`Discovered: ${peer.hostname}:${peer.port} with ${peer.agentCount} agents`);
});

mesh.registerPeer({
  id: 'agent_spatial_002',
  hostname: '192.168.1.100',
  port: 5000,
  version: '5.0.0',
  agentCount: 3,
  capabilities: ['3d-pathfinding', 'object-tracking'],
  lastSeen: Date.now(),
});

// 2. Signal Service — broadcast capabilities
const signals = new SignalService('node_001');

signals.broadcastSignal(
  {
    type: 'mcp-server',
    url: 'http://localhost:3000/mcp',
    capabilities: ['semantic-search', 'knowledge-index'],
  },
  3600000
); // 1 hour TTL

const mcpServers = signals.discoverSignals('mcp-server');
// mcpServers: [{ type: 'mcp-server', nodeId: 'node_001', url: '...', ... }]

// 3. Gossip Protocol — sync knowledge across agents
const gossip = new GossipProtocol();

const packet = gossip.shareWisdom('agent_001', {
  insight: 'Geospatial coords are universal anchors',
  confidence: 0.95,
});

// Anti-entropy sync with peer's pool
const absorbed = gossip.antiEntropySync(peerGossipPool);
console.log(`Absorbed ${absorbed} new knowledge packets`);

Agent Card (A2A Interoperability)

Agent Cards enable standardized discovery and invocation across heterogeneous agent systems.

import { createAgentCard, validateAgentCard } from '@holoscript/agent-sdk';

const card = createAgentCard({
  name: 'SpatialReasoningAgent',
  description: 'Autonomous spatial reasoning with 3D pathfinding and object tracking',
  version: '5.0.0',
  url: 'http://localhost:5000/agent',
  skills: [
    {
      id: 'pathfinding',
      name: '3D Pathfinding',
      description: 'A* pathfinding in 3D environments with obstacle avoidance',
      tags: ['spatial', '3d', 'navigation'],
      examples: ['Find path from (0,0,0) to (10,5,3)'],
    },
    {
      id: 'object-tracking',
      name: 'Object Tracking',
      description: 'Real-time object tracking with Kalman filtering',
      tags: ['computer-vision', 'tracking'],
    },
  ],
  capabilities: [
    { id: 'spatial-reasoning', name: 'Spatial Reasoning', description: '3D spatial intelligence' },
  ],
  auth: { type: 'api-key', credentials: { apiKey: 'sk_...' } },
});

const validation = validateAgentCard(card);
// validation.valid === true

// Serialize to JSON for A2A protocol exchange
const cardJson = JSON.stringify(card, null, 2);

MCP Tool Schemas

Pre-defined schemas for common MCP tools in the semantic search hub:

import { MCP_TOOL_SCHEMAS } from '@holoscript/agent-sdk';

// Available schemas:
// - search_knowledge: Semantic vector search
// - add_pattern: Index P.XXX.XX pattern
// - add_wisdom: Index W.XXX.XX wisdom
// - add_gotcha: Index G.XXX.XX gotcha
// - get_session_context: Retrieve session state
// - knowledge_stats: Get vector index stats

const searchSchema = MCP_TOOL_SCHEMAS.find((t) => t.name === 'search_knowledge');
// searchSchema.inputSchema.properties.query.type === 'string'

Mesh Discovery Events

const mesh = new MeshDiscovery();

const unsubscribeDiscovered = mesh.onPeerDiscovered((peer) => {
  console.log(`New peer: ${peer.id} at ${peer.hostname}:${peer.port}`);
});

const unsubscribeLost = mesh.onPeerLost((peer) => {
  console.log(`Lost peer: ${peer.id} (last seen ${Date.now() - peer.lastSeen}ms ago)`);
});

// Prune stale peers (not seen in 15 seconds)
const pruned = mesh.pruneStalePeers(15000);
console.log(`Pruned ${pruned} stale peers`);

// Cleanup
unsubscribeDiscovered();
unsubscribeLost();

Architecture

  • MeshDiscovery: Peer-to-peer agent discovery with heartbeat pruning
  • SignalService: Capability broadcasting with TTL expiration
  • GossipProtocol: Eventual consistency knowledge sync via anti-entropy
  • AgentCard: Standardized agent metadata for A2A interoperability
  • MCP Schemas: Type-safe tool definitions for Model Context Protocol

Scripts

npm run test    # Run tests
npm run build   # Build to dist/
npm run dev     # Watch mode