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

@gik-ai/kernel

v0.1.2

Published

The embeddable Generative Interaction Kernel: interprets a portable UI-intent document into a running, reactive interface.

Readme

@gik-ai/kernel

The embeddable Generative Interaction Kernel: it interprets a portable UI-intent document into a running, reactive interface, delegating everything domain- and framework-specific to pluggable providers. The kernel owns the invariants (grammar, validation, reduction) and is dependency-free.

npm install @gik-ai/kernel
import { Kernel, GIKClient, KernelTransportHost, InMemoryStateModel } from "@gik-ai/kernel";

// Own the runtime in process: one dispatch produces one revision.
const kernel = new Kernel(/* manifest, document */);

When to use

  • You want local runtime authority and deterministic execution in-process.
  • You are connecting a remote renderer to an authoritative host over the GIK wire protocol (GIKClient + KernelTransportHost).

Package boundary

The kernel owns document validation, state revisions, deterministic reduction, effect declarations, snapshots, and compensation. Renderers, storage, transports, domain components, and effect execution are supplied by other packages or by the host application.

The TypeScript exports are the API authority. See the project documentation for architecture, protocol, and compatibility contracts.

Exported API

Runtime classes

  • Kernel is the main runtime class:
    • Constructor: new Kernel(manifest: Enveloped<ExecutableVocabularyManifest>, document: Enveloped<ExecutableProgramDefinition>, opts?: KernelOptions)
    • KernelOptions can supply custom expression, predicateExpression, state, contexts, registry, orchestrator, sink, validate, admitProgramPatch, and executeGraphExtension.
    • Core methods: init(), dispatch(event), syncExternal(), resolve(), whenIdle(), state(), and program().
    • Additional public methods: hasProjection(), start(), publish(), publishSync(), mutate(), resume(), execution(), applyProgramPatch(), subscribePatches(), subscribeProgress(), cancelInvocation(), checkpoint(), restore(), effectsSince(), compensate(), baseline(), and snapshotPatch().
    • resolve() throws ProjectionUnavailableError when the current program has no root.
    • publishSync() requires SyncJsonataExpressionProvider.
  • GIKClient is the renderer-side replica over a TransportProvider:
    • Constructor: new GIKClient(transport: TransportProvider, options?: GIKClientOptions)
    • Public methods: start(), stop(), rebind(), getTree(), getRev(), get(path), subscribe(), subscribeProgress(), and emit(node, name, payload?, actorId?).
  • KernelTransportHost binds a Kernel to one or more TransportProvider connections:
    • Constructor: new KernelTransportHost(manifest: Enveloped<ProjectedVocabularyManifest>, document: Enveloped<ExecutableProgramDefinition>, kernel: Kernel, defaultTransport?: TransportProvider)
    • Public methods: start(), attach(), detach(), stop(), dispatch(), and whenIdle().
  • TransportProvider is the transport contract used by GIKClient and KernelTransportHost: send(message) and subscribe(listener).
  • createInMemoryTransportPair() returns a connected [TransportProvider, TransportProvider] pair for in-memory transport wiring.

Program, vocabulary, and document contracts

  • ProgramDefinition is the shared executable program shape. It can carry vocabulary, graph, handlers, machines, and derivations.
  • ExecutableProgramDefinition is ProjectedProgramDefinition | HeadlessProgramDefinition.
    • ProjectedProgramDefinition adds root: DocNode.
    • HeadlessProgramDefinition has no root.
  • DocNode is the authored projection node contract: capability, id, optional props, and optional edges.
  • ResolvedNode is the resolved renderer-facing node contract: capability, id, props, visible, fallback, and children.
  • ExecutableVocabularyManifest is ProjectedVocabularyManifest | HeadlessVocabularyManifest.
  • ProjectedVocabularyManifest carries version, optional expression, namespaces, contexts, actions, a capabilities map, and optional externals.
  • CapabilityDescriptor describes one capability's optional propsSchema, emits, slots, and dataProp.

Validation and provider contracts

  • validateProgramMessage(message) validates a program message and throws ValidationError on failure.
  • validateProgramDefinition(program, capabilities?) validates authored node props against capability descriptors and throws ValidationError on failure.
  • ValidationError extends Error and exposes the underlying errors value.
  • validateJsonValue(schema, value, label) validates a value against a supplied JSON schema.
  • ExpressionProvider defines eval(expr, data, bindings?).
  • CapabilityRegistry defines has(type) and get(type).
  • VocabularyRegistry implements CapabilityRegistry and also provides VocabularyRegistry.fromVocabulary(manifest).
  • StateModel defines snapshot(), get(path), and apply(ops). InMemoryStateModel and CompositeStateModel implement it.

Authoring and protocol helpers

  • Action authoring helpers: assign, assignFrom, emit, invoke, route, request, and guarded.
  • Program authoring helpers: node, projectedProgram, authorProjectedProgram, program, authorProgram, generateVocabulary, and lintVocabularyReferences.
  • Protocol helpers: envelope(type, payload) and unwrap(message).

License

MIT