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

@zhongmiao/meta-lc-kernel

v0.2.0

Published

English | [中文文档](./README_zh.md)

Downloads

74

Readme

@zhongmiao/meta-lc-kernel

English | 中文文档

Package Role

kernel is the structural metadata source for the platform. It owns MetaSchema, ViewDefinition, NodeDefinition, DatasourceDefinition, PermissionPolicy, schema validation, snapshot and migration DSL helpers, schema diff, SQL generation, version publishing, rollback, repository contracts, and the versioned meta definition registry.

Responsibilities

  • Define table, field, relation, index, tenant, app, rule, and permission schema types.
  • Validate schemas before they are published.
  • Persist and retrieve versioned schemas through the repository port; concrete Postgres persistence lives in @zhongmiao/meta-lc-kernel-adapter-postgres.
  • Publish, retrieve, and diff versioned view, datasource, and permission policy definitions.
  • Generate schema SQL, migration SQL, API route manifests, and permission manifests.
  • Guard destructive migration statements and record migration audits.

Relationship With Other Packages

  • Upstream: bff, runtime, and infra/scripts.
  • Downstream: repository implementations; kernel has no workspace package dependencies.
  • Migration lifecycle scripts reuse kernel migration compile and safety helpers from infra.
  • bff reads kernel registry definitions as a thin gateway and must not orchestrate metadata.
  • query, permission, datasource, runtime, audit, and bff must not become kernel dependencies.
  • Kernel owns structure contracts; runtime consumes view/node definitions and owns only execution contracts.
  • PermissionPolicy.scope is a local structural literal; permission runtime data-scope DTOs live in permission and only share string semantics with kernel.

Minimal Flow

flowchart LR
  Schema["MetaSchema"] --> Validate["validateSchema"]
  Validate --> Publish["publishSchema"]
  Publish --> Version["meta_kernel_versions"]
  Definition["View / Datasource / Policy"] --> Registry["meta definition registry"]
  Version --> Diff["diff / buildMigrationPlan"]
  Diff --> Sql["migration SQL + safety report"]

Commands

pnpm --filter @zhongmiao/meta-lc-kernel build
pnpm --filter @zhongmiao/meta-lc-kernel test

Boundary Notes

  • Kernel is the metadata source of truth and must stay independent from BFF orchestration.
  • The package root exposes core contracts and application APIs only; domain remains an internal semantic layer, not SDK public API.
  • SDK consumers must not deep import src/domain or src/application implementation files; package-local tests may do so only for internal coverage.
  • Kernel has no workspace package dependencies and no direct Postgres access.
  • Meta DB persistence is provided by repository ports and external adapters such as @zhongmiao/meta-lc-kernel-adapter-postgres.
  • Do not add HTTP, NestJS controller, runtime UI, or business execution logic here.
  • Do not execute runtime plans from meta registry APIs; registry only versions definitions.
  • Do not keep business demo registry seeds here; examples own their own seed metadata under examples/*.