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

@semiont/sdk

v0.5.26

Published

Semiont SDK — SemiontClient, namespaces, session/browser, state units, and the bus-request/cache helpers. Transport-agnostic; pair with @semiont/http-transport (HttpTransport) or @semiont/make-meaning (LocalTransport) for the wire.

Readme

@semiont/sdk

Tests codecov npm version npm downloads License

The TypeScript SDK for Semiont — a programmable surface for collaborative knowledge work. A browser app where humans annotate and link, an AI agent that gathers context and generates grounded answers, a daemon that ingests sources, a one-shot query script: all reach the same verb namespaces, the same collaboration primitives, the same lifecycle observables. Humans and AI agents are peers — the SDK does not distinguish.

📖 New here? Start with the Introduction

The orientation chapter: what Semiont is, the domain vocabulary, and the three ideas the API falls out of — written for people who build web apps, assuming nothing about AI apps. Then the Developer Guide is the road: task-ordered recipes — connect → ingest → enrich → gather → generate (grounded Q&A with inline citations) → annotate → react live → tear down — each a short explanation plus the exact SDK lines. This README is the map. For protocol-level framing (the eight flows, the core tenets), see docs/protocol/README.md; daemon authors also want the skill packs.

Four ideas that hold the surface together

1. Eight verbs

Every operation belongs to one of eight flows — verbs describing what a participant does with a shared corpus. Learn them once and the surface stays small.

| Verb | What it does | Example methods | |---|---|---| | browse | Navigate, read, observe — including who's here to collaborate | browse.resource, browse.annotations, browse.agents, browse.click | | bind | Resolve ambiguous references to specific resources | bind.body, bind.initiate | | yield | Introduce new resources — uploaded or generated from gathered context | yield.resource, yield.fromResource, yield.fromAnnotation | | mark | Add structured metadata to resources | mark.annotation, mark.assist, mark.updateEntityTypes, mark.archive | | frame | Define and evolve the schema vocabulary (entity types, tag schemas) | frame.addEntityTypes, frame.addTagSchema | | gather | Assemble grounding context around a resource or an annotation | gather.resource, gather.annotation | | match | Search the corpus for candidate resources | match.search | | beckon | Coordinate attention across participants | beckon.hover, beckon.sparkle |

Each flow is a namespace on SemiontClient (client.mark.X(...)); the verb is the unit of mental model. Frame is the schema-layer flow — the others operate within the vocabulary it manages. Per-flow contracts: docs/protocol/flows.

2. One call, two ways to consume

Every long-lived value is an Observable with an explicit one-shot path — from the same call, take the value once or keep it live:

const resource = await client.browse.resource(rId).fresh();   // one-shot fresh read — no rxjs import
client.browse.resource(rId).subscribe((st) => {               // live — same call, typed states
  if (st.status === 'ready') render(st.value);                // pending | ready | failed
});
const found = await client.match.search(rId, refId, ctx);     // bounded streams ARE awaitable

Methods return one of: Promise<T> (atomic backend ops), StreamObservable / UploadObservable (bounded progress — thenable, await resolves the final value), CacheObservable (live queries — .subscribe(...) for CacheState emissions, .fresh() for the explicit network read; deliberately NOT thenable, so a cache read can never silently become a round trip), or void (collaboration signals — below). The per-method table and the .run() rule for progress-plus-result live in docs/REACTIVE-MODEL.md.

3. Collaboration primitives

The void-returning signals are protocol-level coordination, not browser-app fluff: a human hovers an annotation (beckon.hover(id)) and an AI agent across the bus reacts; an agent sparkles an annotation and the human's UI lights up. Observers reach the same signals via session.subscribe(channel, handler) or client.bus.get(channel).

4. Transport agnosticism

SemiontClient is built against the ITransport / IContentTransport contracts from @semiont/core, not any particular wire — the same surface runs over HTTP or in-process. The HTTP adapter is re-exported here for convenience; the in-process transport is LocalTransport from @semiont/make-meaning.

What's in the box

  • SemiontClient — the verb-oriented coordinator: the eight flow namespaces, plus job (always present) and auth/admin (present when constructed with backend operations).
  • Session layerSemiontSession (per-KB auth, proactive token refresh, lifecycle), SemiontBrowser (multi-KB orchestration), SessionStorage adapters, and the httpKb helper for endpoint shapes.
  • Flow state machines — closure-based factories (createMarkStateUnit, …Gather…, …Match…, …Yield…, …Beckon…) wrapping each long-running flow with loading$/error$/ progress observables; UI-shape-agnostic (docs/STATE-UNITS.md).
  • WorkerBus — the transport-neutral bus interface worker adapters consume (the adapters live with their domains: @semiont/jobs, @semiont/make-meaning).
  • KB discovery — the consumer side of the launcher's published KB view: httpDiscovery (polls the Browser origin's DISCOVERY_URL_PATH with ETag/304), textDiscovery (bring-your-own IO — the sdk never imports fs), and subscribeDiscovery (a polling diff stream with a typed absent-vs-managed state). Descriptors only; auth stays per-KB. Types (DiscoveredKB, DiscoveryDocument) come from @semiont/core's generated schema.
  • Helpers & types — the cache primitive behind live queries (docs/CACHE-SEMANTICS.md), createSearchPipeline, branded ids, and the unified error hierarchy (SemiontError, BusRequestError) re-exported so you catch every SDK error from one package. (The request/reply primitive itself, busRequest, lives in @semiont/core.)

This is everything a non-web consumer (TUI, mobile, daemon, agent) needs — nothing page-shaped. Page-level state machines and components, including the embeddable ResourceViewer, live in @semiont/react-ui.

Install & connect

npm install @semiont/sdk

One-shot script — credentials-first, one line:

import { SemiontClient } from '@semiont/sdk';

const semiont = await SemiontClient.signInHttp({
  baseUrl: 'http://localhost:4000',
  email: '[email protected]',
  password: 'pwd',
});
const resources = await semiont.browse.resources({ limit: 10 }).fresh();
semiont.dispose();

Long-running script — SemiontSession adds proactive refresh, storage, and disposal; kb.id is the storage key, so distinct scripts use distinct ids:

import { SemiontSession, InMemorySessionStorage, httpKb } from '@semiont/sdk';

const session = await SemiontSession.signInHttp({
  kb: httpKb({ id: 'my-watcher', label: 'My Watcher', email: '[email protected]',
               host: 'localhost', port: 4000, protocol: 'http' }),
  storage: new InMemorySessionStorage(),
  baseUrl: 'http://localhost:4000',
  email: '[email protected]',
  password: 'pwd',
});
const resources = await session.client.browse.resources({ limit: 10 }).fresh();
await session.dispose();

Already hold a token? SemiontClient.fromHttp({ baseUrl, token }) / SemiontSession.fromHttp(...) skip the auth round-trip. In-process (CLI, tests, embedded) — same surface, no network:

import { SemiontClient } from '@semiont/sdk';
import { startMakeMeaning, LocalTransport, LocalContentTransport } from '@semiont/make-meaning';

const ks = await startMakeMeaning(project, config, eventBus, logger);
const client = new SemiontClient(
  new LocalTransport({ knowledgeSystem: ks.knowledgeSystem, eventBus, userId }),
  new LocalContentTransport(ks.knowledgeSystem),
);

From here, the Developer Guide takes over — every recipe assumes exactly this setup.

Documentation

The full map — every doc's role, and a reading order by audience — is docs/README.md.

License

Apache-2.0 — see LICENSE.

Related packages