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

@cnstra/devtools-dto

v1.0.2

Published

Standardized DevTools data transfer objects

Downloads

250

Readme

CNStra DevTools DTO

Data Transfer Objects (DTOs) for the CNStra DevTools protocol.

📚 Full Documentation | DevTools Guide

Data Model Overview

The CNStra DevTools uses a normalized data model where neural network relationships are represented through separate entities rather than embedded relationships.

Note: @cnstra/core runtime routing is identity-based (signals carry a collateral object reference, neurons/collaterals do not have built-in names/ids).
DevTools DTOs are the persistence/debug layer and therefore use stable string ids/names such as collateralName, neuronId, and stimulationId.

Core Entities

Neuron

  • Represents a processing unit in the neural network
  • Contains: id, appId, name, axonCollaterals?
  • Important: axonCollaterals is provided for compatibility but use Collateral entities for authoritative relationships

Collateral

  • Represents an output channel (axon collateral) that neurons use to send signals
  • Contains: collateralName, neuronId, appId, type
  • Key relationship: neuronId indicates which neuron OWNS this collateral (signal source)

Dendrite

  • Represents an input channel that neurons use to receive signals
  • Contains: dendriteId, neuronId, appId, collateralName, type, collateralNames
  • Key relationships:
    • neuronId indicates which neuron OWNS this dendrite (signal destination)
    • collateralName indicates which collateral this dendrite listens to

Building Neural Network Connections

To create connections between neurons in the DevTools visualization:

  1. Find signal sources: Use Collateral.neuronId to map collateral names → owning neurons
  2. Find signal destinations: Use Dendrite.collateralName + Dendrite.neuronId to map collateral names → listening neurons
  3. Create connections: For each collateral, connect the owning neuron → all listening neurons
// Example connection building logic
const ownerByCollateral = new Map<string, string>(); // collateralName -> owner neuronId
collaterals.forEach(c => ownerByCollateral.set(c.collateralName, c.neuronId));

const listenersByCollateral = new Map<string, Set<string>>(); // collateralName -> listener neuronIds
dendrites.forEach(d => {
    const listeners = listenersByCollateral.get(d.collateralName) || new Set();
    listeners.add(d.neuronId);
    listenersByCollateral.set(d.collateralName, listeners);
});

// Build connections: owner → listeners
const connections = [];
listenersByCollateral.forEach((listeners, collateralName) => {
    const owner = ownerByCollateral.get(collateralName);
    if (owner) {
        listeners.forEach(listener => {
            if (listener !== owner) {
                connections.push({ from: owner, to: listener, via: collateralName });
            }
        });
    }
});

Runtime Data vs Events

Stimulation

  • Represents a signal event sent on a collateral
  • Contains: stimulationId, neuronId, appId, collateralName, timestamp, payload, contexts
  • Use for: Activity visualization, signal flow tracking

StimulationResponse

  • Represents a neuron's response to receiving a stimulation
  • Contains: responseId, stimulationId, neuronId, appId, timestamp, error, duration
  • Use for: Performance monitoring, error tracking

Message Types

InitMessage

  • Sent when DevTools connects to establish initial topology
  • Contains: neurons[], collaterals[], dendrites[]
  • Use for: Building static network structure

StimulationMessage / StimulationBatchMessage

  • Sent during runtime to report signal activity
  • Use for: Real-time activity visualization

ResponseBatchMessage

  • Sent during runtime to report neuron responses
  • Use for: Real-time performance monitoring

Common Pitfalls

⚠️ Use Collateral entities for relationships

While Neuron.axonCollaterals exists for backward compatibility, use separate Collateral entities for authoritative relationship data.

❌ Don't confuse stimulations with responses

  • Stimulation = signal sent on a collateral
  • StimulationResponse = neuron's processing result
  • For activity counts, use stimulations (events) not responses (results)

❌ Don't rely on embedded relationships

All relationships are represented through separate entities and foreign keys, not embedded arrays.

Architecture Notes

This normalized approach provides several benefits:

  • Flexibility: Collaterals can be shared across multiple dendrites
  • Consistency: Single source of truth for each entity
  • Performance: Efficient querying and updates
  • Extensibility: Easy to add new relationship types

The tradeoff is that building relationships requires joining across entities rather than following embedded references.