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

@decido/billing

v4.1.19

Published

Decido OS strategic billing, licensing, token budgeting, and ROI analytics

Readme

💰 @decido/billing - Ecosistema de Monetización y Facturación Decido OS

Este paquete centraliza las reglas comerciales, control de límites, agregadores de telemetría de inferencia híbrida y pasarela de cobro del Swarm Marketplace (Plugins Chameleon) de Decido OS.


🏛️ Guía Estratégica: ¿Cómo responder por el Modelo de Negocio?

Si un auditor, inversor o director de la junta te pregunta sobre el Modelo de Negocio, utiliza este documento como base. Aquí tienes las preguntas difíciles resueltas con respuestas sólidas basadas en la arquitectura del monorepo:

1. ¿Cómo gana dinero Decido OS si es de código abierto y local-first?

Respuesta: Gana dinero a través de una Estrategia Híbrida SaaS/On-Premise de Tres Pilares:

  1. Tiers de Suscripción (Gobernanza): Cobramos por el acceso directo a nubes premium sin API Keys del usuario ($29/usuario/mes) y por el control financiero centralizado en Citadel Enterprise (SaaS Corporativo). El plan gratuito cuesta $0.00 en cómputo para la empresa porque forzamos el enrutamiento a los daemons locales de Ollama instalados en el hardware del cliente.
  2. Revenue Share en el Swarm Marketplace (20%): Retenemos una comisión del 20% en cada plugin de Chameleon transaccionado dentro de nuestro Marketplace por parte de desarrolladores externos.
  3. Observabilidad Genkit-as-a-Service: Cobramos $0.005 USD por cada log de telemetría auditado que exceda la cuota gratuita de 10,000 logs al mes.

2. ¿Por qué una gran empresa preferiría pagar por la licencia Citadel en lugar de usar la versión gratuita?

Respuesta: Por Gobernanza, Seguridad Corporativa y Ahorro:

  • Control de Costos: Un administrador define límites de presupuesto diarios/mensuales en USD por usuario para evitar fugas financieras por llamadas de inferencia recurrentes o bucles de código de IA.
  • Aislamiento Físico y RLS: Activación de directivas Postgres RLS en Citadel para que los datos de un departamento o inquilino estén completamente herméticos de otros.
  • Alertas Preventivas: Los administradores reciben notificaciones tempranas cuando se consume un umbral específico (ej: 80%) del presupuesto del departamento.

3. ¿Cómo demostramos matemáticamente el Retorno de Inversión (ROI) a un cliente corporativo?

Respuesta: Usando la Amortización Híbrida que calcula este paquete (UsageAggregator): "Para 100 operadores consumiendo asistentes de IA premium, el costo de API mensual superaría los $5,000 USD. Al enrutar de forma transparente consultas rutinarias y automatizaciones locales a hardware corporativo local (costo de cómputo $0.00 USD), el consumo mensual real de nube se reduce a $1,500 USD. El ahorro neto mensual de $3,500 USD amortiza el costo de la licencia de Citadel Enterprise en su primer trimestre, logrando a su vez un ROI de más del 300% al año."


🛠️ APIs del Paquete

Este paquete expone clases 100% tipadas en TypeScript:

import { SubscriptionManager, UsageAggregator, MarketplaceGateway } from '@decido/billing';

// 1. Resolver el target de inferencia de IA según el tier
const manager = new SubscriptionManager('free');
const target = manager.resolveAIProfileTarget('gemini-1.5-pro');
console.log(target.model); // Output: 'ollama:qwen2:latest' -> Desvío imperativo a costo cero

// 2. Registrar consumos y calcular ROI
const aggregator = new UsageAggregator();
aggregator.registerLocalUsage(50000, 0.015); // 50k tokens locales (equivalente a $0.015/1k tokens en la nube)
aggregator.registerCloudUsage(10000, 0.015); // 10k tokens consumidos en la nube
const usage = aggregator.getUsageMetrics();
console.log(usage.savedUSD); // Ahorro neto en USD

// 3. Generar reporte estratégico para la Junta Directiva
const report = aggregator.getROIReport(5000); // Licencia de $5,000 USD
console.log(report.report);

// 4. Cobrar transacciones en el Marketplace
const marketplace = new MarketplaceGateway();
const tx = marketplace.processPluginPurchase('plg_twin', 'Digital Twin Engine', 'MadeFront Org', 150);
console.log(tx.commissionAmountUSD); // Output: 30 USD (20% de comisión de Decido OS)
console.log(tx.netAmountUSD);        // Output: 120 USD (80% neto al desarrollador)