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

@haklex/rich-plugin-agent-stream

v0.65.7

Published

Plays agent writes into the editor as a streaming reveal with a virtual caret

Readme

@haklex/rich-plugin-agent-stream

Plays agent writes into a Haklex editor as a streaming reveal: the data lands in one update, the plugin reveals the new text character by character with a virtual caret.

Installation

pnpm add @haklex/rich-plugin-agent-stream

Usage

import '@haklex/rich-plugin-agent-stream/style.css';
import { AgentStreamPlugin } from '@haklex/rich-plugin-agent-stream';

<RichEditor>
  <AgentStreamPlugin agentName="Claude" />
</RichEditor>;

With @haklex/rich-collab-loro, imports whose changes carry an agent: commit message (and are less than 15 seconds old) are played automatically. Older changes, such as those caught up after a reconnect, show at once.

Two things the writer must get right:

  • Loro merges consecutive changes from the same peer with the same commit message, and the merged change keeps the first timestamp. A writer that reuses one peer for several agent writes must give each write a distinct message (for example agent: <summary> #<n>) or use a fresh peer per write; otherwise playback stops about 15 seconds into the session.
  • The window compares the writer's clock with the viewer's. Pass createLoroBinding(editor, doc, { agentLiveWindowSeconds }) to widen it when clocks may drift.

Without CRDT, wrap the write:

import { playAgentWrite } from '@haklex/rich-plugin-agent-stream';

playAgentWrite(editor, () => {
  $getRoot().append(paragraph);
});

Props

| Prop | Default | Meaning | | ------------------ | ------- | ---------------------------------------------------------- | | agentName | "AI" | Label above the caret | | charsPerSecond | 80 | Base reveal speed | | maxSeconds | 3 | Longest playback of one write; longer writes speed up | | backlogSeconds | 6 | Queued playback beyond this is shown at once | | scrollContainer | nearest | Element followed while the caret moves | | onPlaybackChange | — | ({ playing, blockKey }) when playback starts/moves/stops |

Text blocks (paragraph, heading, quote) reveal character by character; other blocks appear when the reveal reaches them. Typing, pasting or clicking in the editor ends playback immediately. Browsers without the CSS Custom Highlight API show writes without playback.

Peer Dependencies

| Package | Version | | -------------------------- | --------- | | @haklex/rich-style-token | workspace | | @lexical/react | ^0.53.0 | | @lexical/rich-text | ^0.53.0 | | lexical | ^0.53.0 | | react | >= 19 | | react-dom | >= 19 |