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

zyvron-lead-recovery-engine

v0.1.0

Published

Rule-based TypeScript engine for analyzing service-business enquiries and prioritizing follow-up

Readme

Which enquiries need follow-up first?
  |
  v
analyzeLead(input)
  |
  v
intent + after-hours risk + priority score + opportunity estimate + next manual action

Most service businesses do not lose leads only because demand is low. They lose leads when enquiries arrive after hours, replies are delayed, pricing questions are missed, and follow-ups are not prioritized.

This engine turns a single enquiry into a structured follow-up decision.

This is one public feature from Zyvron SaaS. This is not the full Zyvron SaaS.

This repository contains the public, generic 70% to 75% version of one Zyvron SaaS feature. The production Zyvron SaaS keeps private integrations, workflows, scoring, reporting, and operational logic closed.

Public Boundary

| Public in this repo | Private in Zyvron SaaS | | --- | --- | | Rule-based enquiry classification | Managed product integrations | | After-hours risk detection | Production data and account systems | | Generic priority scoring | Billing, activation, and setup workflows | | Single-enquiry opportunity estimate | Dashboard, admin, and reporting workflows | | Manual next-action recommendation | Production scoring and automation logic | | Private tag redaction | Operational playbooks and managed services | | Local adapters for copied text, CSV rows, and web forms | Client-specific configuration and infrastructure |

Quick Start

This package is package-ready but not published to npm yet.

Clone the repository:

git clone https://github.com/vighnesh-kamble/zyvron-lead-recovery-engine.git
cd zyvron-lead-recovery-engine
npm install
npm run test
npm run build

After a future npm release, package usage will look like this:

npm install zyvron-lead-recovery-engine

Use fake data while testing:

import { analyzeLead } from "zyvron-lead-recovery-engine";

const result = analyzeLead({
  messageReceivedAt: "22:45",
  businessHours: {
    open: "10:00",
    close: "21:00"
  },
  customerMessage: "Hi, what is the price for hair spa?",
  averageBookingValue: 1500,
  estimatedConversionRate: 0.25,
  lastReplyDelayMinutes: 180
});

console.log(result);

Example output:

{
  "intent": "pricing",
  "isAfterHours": true,
  "urgency": "high",
  "followUpPriority": 82,
  "estimatedOpportunityValue": 375,
  "recommendedAction": "reply_with_pricing",
  "explanation": [
    "The enquiry came after business hours.",
    "The reply delay is high.",
    "The customer asked about pricing."
  ],
  "disclaimer": "This is a rough prioritization estimate only. It does not guarantee bookings, conversion, or revenue."
}

Features

| Module | Purpose | | --- | --- | | classifyEnquiry | Classifies intent as pricing, availability, booking, complaint, general, or unknown. | | detectAfterHours | Detects whether the enquiry arrived outside business hours. | | calculateFollowUpPriority | Returns a 0-100 public priority score and urgency label. | | estimateOpportunityValue | Estimates single-enquiry opportunity value without revenue guarantees. | | recommendNextAction | Recommends one manual next action. | | analyzeLead | Combines the public modules into one result. | | adapters | Normalizes copied text, CSV rows, or web form fields. | | redactPrivateTags | Replaces <private>...</private> content with [REDACTED]. |

What It Does

  • Analyzes enquiry intent.
  • Detects after-hours risk.
  • Scores follow-up priority.
  • Estimates single-enquiry opportunity value.
  • Recommends a manual next action.
  • Redacts private tags.
  • Works locally with no external API calls.

What It Does Not Do

  • Does not connect to external platforms.
  • Does not include production database, billing, or account logic.
  • Does not include the Zyvron dashboard or admin console.
  • Does not include managed setup, reporting, or automation workflows.
  • Does not include internal prompts or private Zyvron scoring.
  • Does not store customer data.
  • Does not guarantee bookings, conversion, or revenue.

Zero Runtime Dependencies

This package is designed to run locally with zero runtime dependencies, no network calls, no storage, and no external services.

Development uses TypeScript and Node test tooling only.

Adapters

Adapters normalize manually copied enquiry text, generic CSV rows, or web form fields into the AnalyzeLeadInput shape.

They are not connectors. This package does not connect to external messaging, CRM, billing, database, or automation systems.

Workflow Diagram

flowchart LR
  A["Lead input"] --> B["Redact private data"]
  B --> C["Classify intent"]
  C --> D["Detect timing risk"]
  D --> E["Score priority"]
  E --> F["Estimate opportunity"]
  F --> G["Recommend action"]

For LLM Agents

  • Use fake/sample data.
  • Do not paste real customer phone numbers or emails.
  • Do not add platform integration code.
  • Do not add private product, billing, database, reporting, or automation logic.
  • Keep the disclaimer visible.
  • Do not represent estimates as guaranteed revenue.
  • Treat this as a public generic feature only.

Safety And Privacy

  • No storage.
  • No external calls.
  • No secrets.
  • No customer data required.
  • <private>...</private> redaction is supported.
  • No guaranteed bookings, conversion, or revenue.

License

MIT.

The MIT license applies to the code in this repository. The Zyvron name, logo, website, and managed SaaS product are not included in the license.