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

@zephytiju/lattice-common-interfaces

v0.4.0

Published

Generated client library for the Lattice Common bundle's interfaces — typed factories binding Prism micro-UIs to per-method Lattice routes. Emitted deterministically from the compiled Python bundle artifact (artifact.json, LatticeCommonBundle's compile_bu

Downloads

948

Readme

LatticeCommonInterfaces

GENERATED — do not edit. Everything in this package (src/surface.ts, src/types.ts, src/clients.ts, src/index.ts, this README) is emitted by the deterministic generator (tools/generate-from-artifact.mjs) from the compiled Python bundle artifact (github.com/zephytiju/LatticeCommonBundle's compile_bundle() output, checked in here as artifact.json). Same artifact ⇒ byte-identical client, payload types, routes, and API-surface digest on every generation; the anti-drift test (test/generation-drift.test.ts) regenerates in --check mode and fails on any hand edit, and test/artifact-drift.test.ts re-verifies artifact.json against the Python compiler when the bundle repo is checked out as a sibling.

This is the client library that powers UI components: Prism micro-UIs import its typed factories and bind them to the common Lattice transport. Each factory method calls its per-method route (interfaces/{interfaceId}/{method}) with full server-side validation — no URLs, credentials, or generic invokes. useLatticeTransport(API_SURFACE_DIGEST) verifies the digest against the generated runtime on first call so client/runtime drift fails fast (design record §8 of the Guanlan Lattice Ontology Design).

Install

Published to npm as @zephytiju/lattice-common-interfaces.

npm install @zephytiju/lattice-common-interfaces

Peer dependency: @zephytiju/prism-react — install it alongside; it provides the Lattice transport hook. The payload types (SearchRequest, EntityResultsProjection, …) are generated into this package from the artifact, so the deprecated @zephytiju/lattice-common-bundle package is no longer needed.

Interface clients (20 methods across 14 interfaces)

| Interface | Factory | Method | Route | Idempotent | | --- | --- | --- | --- | --- | | ISearchable | createSearchableClient | search | interfaces/ISearchable/search | no | | IEntitySummary | createEntitySummaryClient | get | interfaces/IEntitySummary/get | no | | IGeoView | createGeoViewClient | serialize | interfaces/IGeoView/serialize | no | | IGeoView | createGeoViewClient | restore | interfaces/IGeoView/restore | no | | IRelatedGraph | createRelatedGraphClient | relate | interfaces/IRelatedGraph/relate | no | | ITimelineEvent | createTimelineEventClient | timeline | interfaces/ITimelineEvent/timeline | no | | IGeoLocatable | createGeoLocatableClient | locate | interfaces/IGeoLocatable/locate | no | | IEvidenceSource | createEvidenceSourceClient | evidence | interfaces/IEvidenceSource/evidence | no | | IAuditChain | createAuditChainClient | query | interfaces/IAuditChain/query | no | | IAuditRefAppend | createAuditRefAppendClient | append | interfaces/IAuditRefAppend/append | yes | | IFileEntry | createFileEntryClient | list | interfaces/IFileEntry/list | no | | IFileEntry | createFileEntryClient | read | interfaces/IFileEntry/read | no | | IFileEntry | createFileEntryClient | write | interfaces/IFileEntry/write | yes | | IDossierDoc | createDossierDocClient | get | interfaces/IDossierDoc/get | no | | IDossierDoc | createDossierDocClient | appendBlock | interfaces/IDossierDoc/appendBlock | yes | | ICommentThread | createCommentThreadClient | list | interfaces/ICommentThread/list | no | | ICommentThread | createCommentThreadClient | post | interfaces/ICommentThread/post | yes | | IWorkflowDefinition | createWorkflowDefinitionClient | list | interfaces/IWorkflowDefinition/list | no | | IWorkflowRuntime | createWorkflowRuntimeClient | invoke | interfaces/IWorkflowRuntime/invoke | yes | | IWorkflowRuntime | createWorkflowRuntimeClient | status | interfaces/IWorkflowRuntime/status | no |

Regenerate

The generation flow is: Python bundle → compile_bundle() → artifact.json → generate-from-artifact.mjs → this TS client.

# 1. compile the Python bundle (github.com/zephytiju/LatticeCommonBundle) and copy the artifact
cd ../LatticeCommonBundle
python -c "from lattice_common_bundle.compile import write_artifact; write_artifact('../LatticeCommonInterfaces/artifact.json')"

# 2. regenerate every generated file in this repo from the artifact
cd ../LatticeCommonInterfaces
npm run generate          # writes src/surface.ts, src/types.ts, src/clients.ts, src/index.ts, README.md
npm run generate -- --check   # verify no drift instead of writing

npm run generate resolves the artifact in this order: an explicit --artifact <path> flag, the sibling Python checkout's ../LatticeCommonBundle/artifact.json, then the checked-in ./artifact.json. The artifact is self-certifying (artifact_digest — sha256 over its canonical JSON), so the generator fails closed on any hand-edited or stale copy, and it re-derives api_surface_digest from the embedded method manifest before emitting.

Development (of the generator, not this package)

npm install
npm run typecheck
npm test

The development dependencies install the published @zephytiju/prism-react package from the npm registry (exact pin in package.json); no local path installs are needed.