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

@younndai/domains

v2.0.2

Published

Fetch, validate, introspect, and classify YounndAI Domain schemas — industry-specific vocabularies for YON™, the stream-first data format, with JSON Schema export.

Readme

npm license

What is this?

YounndAI Domains define industry-specific vocabularies — structured schemas that specify what data a domain contains, what fields each record requires, and how values should be validated. Think of it as "JSON Schema for industry concepts."

This package gives you:

  • 34 official domains bundled — health, fintech, logistics, HR, legal, and more
  • Zero-config validation — validate any JS object against domain rules
  • JSON Schema export — convert domains to JSON Schema draft-07 for any ecosystem
  • Universal — works in Node.js, Deno, Bun, browsers, and edge runtimes

Install

npm install @younndai/domains

Quick Start

import {
  resolveDomain,
  validateRecord,
  getBundledDomain,
} from "@younndai/domains";

// ── Resolve a domain (bundled → local → remote) ──
const health = await resolveDomain("yai.health");
console.log(health?.records); // { VITALS: {...}, DX: {...}, RX: {...}, ... }

// ── Validate data against a domain record ──
const result = await validateRecord("yai.fintech", "TXN", {
  id: "txn-001",
  amount: 1500.5,
  currency: "USD",
});

if (!result.valid) {
  result.errors.forEach((e) => console.error(`${e.field}: ${e.message}`));
}

// ── Access bundled domains (zero network) ──
const fintech = getBundledDomain("yai.fintech");
console.log(fintech?.records.TXN.fields);

JSON Schema Export

Convert any domain record to industry-standard JSON Schema draft-07:

import {
  recordToJSONSchema,
  exportJSONSchemas,
} from "@younndai/domains/json-schema";
import { getBundledDomain } from "@younndai/domains";

// Single record → JSON Schema
const fintech = getBundledDomain("yai.fintech")!;
const schema = recordToJSONSchema(fintech.records.TXN, "TXN", "yai.fintech");
// → { $schema: 'http://json-schema.org/draft-07/schema#', ... }

// Entire domain → all record schemas
const schemas = await exportJSONSchemas("yai.health");

Schema Introspection

Explore domain structure programmatically:

import {
  getRecordTags,
  describeRecord,
  findDomainsByTag,
} from "@younndai/domains";

// List all tags in a domain
const tags = await getRecordTags("yai.health");
// → ['VITALS', 'DX', 'RX', 'LAB', ...]

// Describe a record
const summary = await describeRecord("yai.health", "VITALS");
// → { tag: 'VITALS', requiredFields: ['bp'], optionalFields: ['hr', ...], ... }

// Reverse lookup: find all domains that define a tag
const results = findDomainsByTag("POSITION");
// → { tag: 'POSITION', matches: [
//     { domainId: 'yai.hr', record: {...} },
//     { domainId: 'yai.fintech', record: {...} },
//   ] }

Taxonomy & Classification

Classify domains by tier, conformance, trust, and freshness:

import {
  resolveSetType,
  resolveConformanceLevel,
  resolveTrustLevel,
  getFreshnessLabel,
} from "@younndai/domains/taxonomy";

resolveSetType("yai.health", "official");
// → 'official'

resolveConformanceLevel(0.95);
// → { key: 'gold', label: 'Gold', colorKey: 'conformance-gold', ... }

resolveTrustLevel(true, 0.95, "official");
// → 'trusted'

getFreshnessLabel("2026-02-01");
// → { label: 'Updated 27d ago', colorKey: 'freshness-recent' }

Configuration

import { configureClient, setRegistryUrl } from "@younndai/domains";

// Change registry URL (default: https://domains.younndai.com)
setRegistryUrl("https://domains-staging.younndai.com");

// Full configuration
configureClient({
  registryUrl: "https://domains.younndai.com",
  timeout: 5000,
  onWarn: (msg) => logger.warn(msg),
});

Subpath Exports

| Export | Description | | ------------------------------- | ----------------------- | | @younndai/domains | Main entry — everything | | @younndai/domains/taxonomy | Classification engine | | @younndai/domains/json-schema | JSON Schema conversion |

Spec vs SDK: This package implements the normative YON Domain Schema Format and extends it with SDK-specific features: taxonomy classification, JSON Schema export, offline bundles, sync introspection, and reverse tag lookup. These extensions do not modify the normative schema format.

API Surface

Core

  • resolveDomain(id) — Unified T1→T3→T2 resolution
  • getBundledDomain(id) / listBundledDomains() / isBundledDomain(id)
  • loadDomainFromJSON(json) — Convert raw JSON to DomainSchema

Registry Client (10 methods)

  • getDomain(id) / getDomains(ids[]) / fetchDomainList(opts?)
  • searchDomains(query) / getDomainVersions(id) / getRegistryStats()
  • listNamespaces(opts?) / getNamespace(path)
  • getNotices(opts?) / getAnnouncements(opts?)
  • checkRegistryHealth()
  • configureClient(opts) / setRegistryUrl(url) / getRegistryUrl()
  • setCacheAdapter(adapter) / clearDomainCache() / getDomainCacheStats() / resetCacheStats()

Local Registry

  • registerDomain(schema) / unregisterDomain(id)
  • listDomains(filter?) / getDomainTags(domains[])
  • getLocalDomain(id) / isOfficialDomain(id)

Validation

  • validateRecord(domainId, tag, data) — async
  • validateRecordSync(tag, data, domain) — sync
  • validateRecords(entries[]) — batch
  • validateFields(data, constraints) — low-level

Introspection

  • getRecordTags(id) / getRecordSchema(id, tag)
  • getRequiredFields(id, tag) / getOptionalFields(id, tag)
  • getFieldConstraints(id, tag, field?) / describeRecord(id, tag)
  • All have *Sync variants

Lookup

  • findDomainsByTag(tag) / buildTagIndex()

Offline

  • downloadRegistryBundle(opts?) / serializeBundle(bundle) / deserializeBundle(json)
  • applyBundle(bundle, registerFn) / getBundleManifest(bundle)

Documentation

  • API examples — see the Quick Start, JSON Schema, Introspection, Taxonomy, and Configuration sections above; TESTING.md covers the test suite.
  • Domain registrydomains.younndai.com (API: https://domains.younndai.com/api/domains).
  • ChangelogCHANGELOG.md.

The YON Project

YON is an open block format and toolchain.

Testing

Run the Vitest suite with npm test. See TESTING.md for coverage details.


About YounndAI

YounndAI™ — You and AI, unified. (pronounced "yoon-dye")

A philosophy of intelligence: building with intention, so humans and machines think together without losing what makes either whole.

License & Attribution

Apache-2.0. © 2026 MARLINK TRADING SRL (YounndAI). See LICENSE and NOTICE.

"YON" and "YounndAI" are trademarks of MARLINK TRADING SRL — see TRADEMARK.md.

Created by Alexandru Mareș.

Website: yon.younndai.com


| | | | ------------- | ------------------------------------------------------- | | Spec | YON v2.0 | | Author | Alexandru Mareș | | Company | MARLINK TRADING SRL · YounndAI™ | | License | Apache 2.0 — © 2026 MARLINK TRADING SRL | | Trademark | YounndAI™ Trademark Guidelines |