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

@anureo/host

v0.3.16

Published

Persistent agent sessions and WebSocket access for the Anureo SDK

Downloads

1,077

Readme

@anureo/host

Persist agent sessions, observe their events, and expose scoped access through a local API or a WebSocket endpoint. The application supplies runtime clients, authenticated actors, workspace resolution, and an authorization policy.

import { createHarnessHost } from '@anureo/host'
import { HarnessStore } from '@anureo/host/sqlite'

const actor = { userId: 'owner' }
const host = createHarnessHost({
  store: new HarnessStore('./sessions.sqlite'),
  runtimes: [],
  resolveWorkspace: scopeId => scopeId === 'workspace' ? process.cwd() : undefined,
  authorize: (candidate, scopeId) =>
    candidate.userId === actor.userId && scopeId === 'workspace',
})
try {
  console.log(await host.sessions.list({ actor }, { scopeId: 'workspace' }))
} finally {
  await host.close()
}

Register runtime descriptors whose create callback returns an initialized SDK Client to execute model turns. Empty runtime registration still permits reading stored sessions. Scope IDs are application-defined workspace identities; the Host enforces the injected authorization policy for each operation.

Storage and lifecycle

@anureo/host/sqlite selects Bun SQLite under Bun and Node SQLite under Node. Use a separate database per Host instance; concurrent writers are rejected. HostStorage is the storage port for an application-owned implementation. Await host.close() to release runtime observations, subscriptions, and storage. Closing an observation does not by itself prove that a shared native execution has stopped; interruption and recovery use the runtime's declared capabilities.

WebSocket access

createScopedHostDispatcher(host) adapts the Host to the scope-based JSON-RPC contract. Pass it to createHostWebSocket to embed the transport in an existing server, or listenHostWebSocket from @anureo/host/ws for a standalone listener. The application authenticates each connection; authentication does not replace the Host's per-scope authorization policy. Close the listener before the Host. @anureo/host/protocol exports the scoped protocol types and codecs.

Compatibility

HarnessHost and @anureo/host/compat retain the existing project-based Hx integration surface. New applications should use createHarnessHost and the scoped dispatcher. Projection and UI presentation remain application-owned.

Code structure

  • src/host.ts, src/scoped-host.ts: lifecycle, execution, and scoped APIs.
  • src/store.ts, src/sqlite-bun.ts, src/sqlite-node.ts: durable storage.
  • src/catalog.ts, src/queue.ts: model discovery and queued work.
  • src/ws.ts, src/ws-connection.ts, src/ws-listener.ts: transports.
  • src/protocol.ts, schema/, scripts/generate.ts: wire types and validation.