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

@synap-core/hub-protocol

v1.1.0

Published

Hub Protocol V1.0 - Standardized schemas for Hub ↔ Data Pod communication

Readme

@synap/hub-protocol

Hub Protocol V1.0 - Standardized schemas for communication between Synap Intelligence Hub and Synap Core OS (Data Pod).

Installation

pnpm add @synap/hub-protocol
# or
npm install @synap/hub-protocol

Usage

Basic Validation

import { validateHubInsight, type HubInsight } from "@synap/hub-protocol";

const insight: HubInsight = {
  version: "1.0",
  type: "action_plan",
  correlationId: "123e4567-e89b-12d3-a456-426614174000",
  actions: [
    {
      eventType: "project.creation.requested",
      data: { title: "My Project" },
      requiresConfirmation: false,
    },
  ],
  confidence: 0.95,
  reasoning: "Based on user preferences",
};

// Validate the insight
const validated = validateHubInsight(insight);

Type Guards

import { isActionPlan, isAnalysis } from "@synap/hub-protocol";

if (isActionPlan(insight)) {
  // TypeScript knows actions is defined
  insight.actions.forEach((action) => {
    console.log(action.eventType);
  });
}

if (isAnalysis(insight)) {
  // TypeScript knows analysis is defined
  console.log(insight.analysis.title);
}

Schemas

import {
  HubInsightSchema,
  ActionSchema,
  AnalysisSchema,
} from "@synap/hub-protocol";

// Use with Zod for custom validation
const result = HubInsightSchema.safeParse(data);
if (result.success) {
  // Valid insight
}

Schema Reference

HubInsight

The main schema for insights returned by the Intelligence Hub.

  • version: '1.0' (literal)
  • type: 'action_plan' | 'suggestion' | 'analysis' | 'automation'
  • correlationId: UUID string
  • actions: Array of Action (optional, for action_plan/automation)
  • analysis: Analysis object (optional, for analysis/suggestion)
  • confidence: Number between 0.0 and 1.0
  • reasoning: String (optional)
  • metadata: Record<string, unknown> (optional)

Action

Represents an action to be transformed into a SynapEvent.

  • eventType: String (must match EventTypes)
  • subjectId: UUID string (optional)
  • data: Record<string, unknown>
  • requiresConfirmation: Boolean (default: false)
  • priority: Number 0-100 (optional)
  • metadata: Record<string, unknown> (optional)

Analysis

Contains textual analysis to display to the user.

  • title: String
  • content: String (markdown supported)
  • keyPoints: Array of strings (optional)
  • recommendations: Array of strings (optional)
  • sources: Array of Source objects (optional)
  • tags: Array of strings (optional)

Documentation

See Hub Protocol V1.0 Specification for complete documentation.

License

MIT