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

@arnilo/prism

v0.14.3

Published

Agent harness for AI providers, agents, sessions, and tools.

Readme

prism

Prism is a TypeScript SDK for running AI agents on Bun. @arnilo/prism is a small kernel: the agent loop, tools and skills, hooks, slots, and a package loader. Everything else (model vendors, coding tools, web search, memory, storage, policy) is a package you choose to install. PRODUCT.md explains the design.

Install

bun add @arnilo/prism

Add the packages your agent needs. Each one is optional and activates only when you list it in createAgent:

bun add @arnilo/prism-ai @arnilo/prism-tools @arnilo/prism-extensions

Quick start

An agent is a model plus the packages you list. This one talks to Hyper and can read and edit files under the current directory. The provider reads HYPER_API_KEY from the environment; Prism never stores or logs it.

import { createAgent } from "@arnilo/prism";
import hyper from "@arnilo/prism-ai/hyper";
import approval from "@arnilo/prism-extensions/approval";
import coding from "@arnilo/prism-tools/coding";

const agent = await createAgent({
  model: "hyper/claude-sonnet-4-5",
  packages: [hyper({ apiKey: "env:HYPER_API_KEY" }), coding({ root: process.cwd() }), approval({ mode: "edits" })],
});

const session = await agent.session();
for await (const event of session.stream("List the files here")) {
  if (event.type === "message.delta" && event.content.type === "text") process.stdout.write(event.content.text);
}
await agent.dispose();

approval({ mode: "edits" }) lets reads and edits inside the root through and asks before anything else, such as a shell command. Without a policy package, coding runs shell on the host only after asking through host.ui for each command, and a run with no UI suspends at the first one; a sandbox (coding({ root, sandbox: "native" })) or guard: "off" changes that.

Run it with bun run agent.ts. To try it offline, import mockProvider from @arnilo/prism/testing, list mockProvider([[{ type: "content_delta", content: { type: "text", text: "Hello" } }, { type: "done" }]]) in packages instead of the provider and tool packages, and set model: "mock/demo".

session.stream yields the events of one run; docs/events.md lists them. agent.inspect() shows every package, tool, and hook that loaded.

Write a package

A package is a plain TypeScript module that Bun runs as-is. It receives the SDK's API when it loads and changes the agent through it:

import { definePackage } from "@arnilo/prism";

export default definePackage({
  name: "@acme/prism-audit",
  version: "1.0.0",
  requires: { api: 1 },
  setup(prism) {
    prism.hooks.on("tool.call", (call) => (call.name === "shell" ? { deny: "blocked by audit policy" } : undefined));
  },
});

Pass it to createAgent({ packages: [...] }) next to the others. docs/packages.md covers config, services, slots, and the manifest.

Where next

Packages

7 publishable manifests — root @arnilo/prism plus 6 workspace packages (0 prism-* family packages, 6 capability packages). Generated by bun scripts/package-truth.mjs --emit-docs — do not hand-edit.

| package | version | notes | | --- | --- | --- | | @arnilo/prism | 0.14.3 | core — runtime, CLI/RPC, templates, docs | | @arnilo/prism-ai | 0.14.1 | capability | | @arnilo/prism-extensions | 0.14.1 | capability | | @arnilo/prism-hosts | 0.14.3 | library bundle — host protocols, channels, evaluations, devtools, headless routing, process driver and version-exact host-builder kit | | @arnilo/prism-knowledge | 0.14.0-experimental.1 | capability — experimental knowledge bundle: wiki and RAG subpaths; depends on the memory-system range | | @arnilo/prism-memory-system | 0.14.1 | capability — the memory system: session memory (STM) that observes the session, keeps a source-backed ledger, and compacts from it when the host turns it on; experimental WM, rehearsal and long-term memory (ltm), the store of record behind the memory.* tools | | @arnilo/prism-tools | 0.14.0 | capability |

Memory. @arnilo/prism-memory-system is stable: its session memory is the recommended compaction system (enabled: true), with @arnilo/prism-extensions/compaction as the alternative. Its working memory, long-term memory and the rest are experimental config. @arnilo/prism-knowledge/wiki and /rag ship on the experimental dist-tag (bun add @arnilo/prism-knowledge@experimental), outside the stability promise.

Scripts

| command | action | |---------|--------| | bun ci | Install dependencies from the committed bun.lock (frozen) | | bun run typecheck | Build and type-check the kernel, every workspace, and the examples | | bun run test | Run the network-free tests | | bun run test:coverage | Coverage gate with Bun-measured floors (scripts/coverage-thresholds.json) | | bun run test:live | Run live suites whose credentials are present (skip the rest) | | bun run release:gate | The release gate: reference host, driver, kernel constraints, and compat baselines |

Non-goals

  • Privileged tools, MCP servers, telemetry, credentials, or databases activated by install. The host lists every package it loads.
  • A bundled TUI, sandbox, or database driver in the kernel. Packages and hosts own them.
  • Package auto-discovery. Nothing loads that the host did not list.