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

@vital-ai/vital-kg-model-ts

v0.1.0

Published

TypeScript models and utilities for VitalSigns Knowledge Graph ontology

Readme

@vital-ai/vital-kg-model-ts

TypeScript models and utilities for VitalSigns Knowledge Graph.

Installation

npm install @vital-ai/vital-kg-model-ts

What's Included

1. VitalSigns Domain Models

Auto-generated TypeScript classes from the VitalSigns ontology:

  • vital-core - Core VitalSigns classes
  • vital - Base ontology
  • haley-ai-kg - Knowledge Graph schema
  • haley-ai-question - Question/Answer schema
  • haley - Haley AI base classes
  • haley-taxonomy - Taxonomy classes
  • vital-nlp - NLP ontology
  • vital-social - Social media ontology
  • vital-aimp - AI Multi-Party ontology

2. KG Lookup Utilities

Essential functions for traversing Knowledge Graph data:

import { 
  lookup_entity, 
  lookup_frame, 
  lookup_slot,
  lookup_value 
} from '@vital-ai/vital-kg-model-ts';

// Get objects from backend
const objects = await fetch('/api/lead?uri=urn:lead123').then(r => r.json());

// Find entity and frame
const entity = lookup_entity(objects, 'urn:LeadEntityType');
const frame = lookup_frame(objects, entity, 'urn:PersonalInformationFrameType');

// Get slot value
const firstName = lookup_slot(objects, entity, frame, 'urn:FirstName');

// Or use shortcut
const email = lookup_value(objects, entity, 'urn:Email');

Usage

Importing Models

// Import specific classes
import { KGEntity, KGFrame, KGSlot } from '@vital-ai/vital-kg-model-ts';

// Import utilities
import { 
  lookup_entity,
  lookup_entities,
  lookup_frame,
  lookup_frames,
  lookup_slot,
  lookup_slots,
  lookup_value
} from '@vital-ai/vital-kg-model-ts';

Using VitalSigns Converter

import { VitalSignsConverter } from '@vital-ai/vital-kg-model-ts';

// Convert object to JSON
const json = VitalSignsConverter.fromInstance(entity);

// Convert JSON to object
const entity = VitalSignsConverter.toInstance(json);

Working with Edges

import { Edge_hasKGFrame, KGEntity, KGFrame } from '@vital-ai/vital-kg-model-ts';

const entity = new KGEntity();
entity.URI = 'http://example.com/entity1';

const frame = new KGFrame();
frame.URI = 'http://example.com/frame1';

const edge = new Edge_hasKGFrame();
edge.URI = 'http://example.com/edge1';
edge.edgeSource = entity.URI;
edge.edgeDestination = frame.URI;

Converting Raw JSON to Typed Objects

import { convertGraphObjects, lookup_entity, lookup_path_value } from '@vital-ai/vital-kg-model-ts';

const graphObjects = convertGraphObjects(apiResponse.graph_objects);
const entity = lookup_entity(graphObjects, 'urn:LeadEntityType');

Development

Build

npm run build

Watch Mode

npm run dev

Test

npm test

Clean

npm run clean

Publishing

This package is published to the public npm registry:

npm run release 0.1.1

Or via GitHub Actions on release creation.

License

MIT