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

@absolutejs/ai

v0.0.44

Published

AI runtime, providers, streaming, and framework adapters extracted from AbsoluteJS

Readme

@absolutejs/ai

Standalone AI runtime and provider package extracted from AbsoluteJS.

This package currently focuses on generic AI/chat/provider functionality. RAG remains a separate package.

Provider traffic can cross a trusted control plane without reimplementing a vendor protocol. remoteProvider() carries normalized provider parameters and chunks over SSE, while createProviderProxyResponse() hosts any AIProviderConfig with pre-first-token and inter-token heartbeats. Provider callbacks and abort objects never cross the wire. The Anthropic provider also accepts an injectable fetch, allowing hosts to retain egress policy, tracing, and test transports.

SSE event stream (streamAIToSSE)

streamAIToSSE yields { event, data } SSE frames. By default data is pre-rendered HTML from the renderers, and the terminal status event is overloaded across completion, budget stops, and errors — a headless consumer has to sniff ai-usage vs ai-error out of the HTML to tell them apart.

Pass structuredEvents: true to get typed, machine-readable frames instead: each data is JSON (parse it), and the overloaded terminal splits into three distinct event names:

| event | when | JSON.parse(data) | | ---------- | ----------------------- | ----------------------------------------------------------- | | content | text delta | { delta, full } | | thinking | reasoning delta | { text } (accumulated) | | tools | one per tool transition | { name, status: "running" \| "complete", input, result? } | | images | generated image | { data, format, revisedPrompt? } | | complete | normal completion | { usage, durationMs, model } | | stopped | ceiling / limit / abort | { reason, detail } | | error | thrown / lookup error | { message } | | ping | heartbeat keepalive | "" (unchanged) |

stopped.reason is one of "max_total_tokens" | "max_duration_ms" | "max_tokens" | "max_turns" | "aborted". Exactly one terminal (complete / stopped / error) fires on every path — including an externally aborted loop, which now emits stopped with reason: "aborted" rather than masquerading as a completion. Payload types are exported (AISSECompletePayload, AISSEStoppedPayload, AISSEErrorPayload, AISSEContentPayload, …).

The default (HTML) path is unchanged for the built-in HTMX/default UI, except an abort now renders the (previously unused) canceled renderer instead of a misleading usage chip.